1package web 2 3// Copyright (c) Microsoft and contributors. All rights reserved. 4// 5// Licensed under the Apache License, Version 2.0 (the "License"); 6// you may not use this file except in compliance with the License. 7// You may obtain a copy of the License at 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// 14// See the License for the specific language governing permissions and 15// limitations under the License. 16// 17// Code generated by Microsoft (R) AutoRest Code Generator. 18// Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 20import ( 21 "context" 22 "encoding/json" 23 "github.com/Azure/go-autorest/autorest" 24 "github.com/Azure/go-autorest/autorest/azure" 25 "github.com/Azure/go-autorest/autorest/date" 26 "github.com/Azure/go-autorest/autorest/to" 27 "github.com/Azure/go-autorest/tracing" 28 "io" 29 "net/http" 30) 31 32// The package's fully qualified name. 33const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-01-preview/web" 34 35// AccessControlEntryAction enumerates the values for access control entry action. 36type AccessControlEntryAction string 37 38const ( 39 // Deny ... 40 Deny AccessControlEntryAction = "Deny" 41 // Permit ... 42 Permit AccessControlEntryAction = "Permit" 43) 44 45// PossibleAccessControlEntryActionValues returns an array of possible values for the AccessControlEntryAction const type. 46func PossibleAccessControlEntryActionValues() []AccessControlEntryAction { 47 return []AccessControlEntryAction{Deny, Permit} 48} 49 50// AutoHealActionType enumerates the values for auto heal action type. 51type AutoHealActionType string 52 53const ( 54 // CustomAction ... 55 CustomAction AutoHealActionType = "CustomAction" 56 // LogEvent ... 57 LogEvent AutoHealActionType = "LogEvent" 58 // Recycle ... 59 Recycle AutoHealActionType = "Recycle" 60) 61 62// PossibleAutoHealActionTypeValues returns an array of possible values for the AutoHealActionType const type. 63func PossibleAutoHealActionTypeValues() []AutoHealActionType { 64 return []AutoHealActionType{CustomAction, LogEvent, Recycle} 65} 66 67// AzureResourceType enumerates the values for azure resource type. 68type AzureResourceType string 69 70const ( 71 // TrafficManager ... 72 TrafficManager AzureResourceType = "TrafficManager" 73 // Website ... 74 Website AzureResourceType = "Website" 75) 76 77// PossibleAzureResourceTypeValues returns an array of possible values for the AzureResourceType const type. 78func PossibleAzureResourceTypeValues() []AzureResourceType { 79 return []AzureResourceType{TrafficManager, Website} 80} 81 82// BackupItemStatus enumerates the values for backup item status. 83type BackupItemStatus string 84 85const ( 86 // Created ... 87 Created BackupItemStatus = "Created" 88 // Deleted ... 89 Deleted BackupItemStatus = "Deleted" 90 // DeleteFailed ... 91 DeleteFailed BackupItemStatus = "DeleteFailed" 92 // DeleteInProgress ... 93 DeleteInProgress BackupItemStatus = "DeleteInProgress" 94 // Failed ... 95 Failed BackupItemStatus = "Failed" 96 // InProgress ... 97 InProgress BackupItemStatus = "InProgress" 98 // PartiallySucceeded ... 99 PartiallySucceeded BackupItemStatus = "PartiallySucceeded" 100 // Skipped ... 101 Skipped BackupItemStatus = "Skipped" 102 // Succeeded ... 103 Succeeded BackupItemStatus = "Succeeded" 104 // TimedOut ... 105 TimedOut BackupItemStatus = "TimedOut" 106) 107 108// PossibleBackupItemStatusValues returns an array of possible values for the BackupItemStatus const type. 109func PossibleBackupItemStatusValues() []BackupItemStatus { 110 return []BackupItemStatus{Created, Deleted, DeleteFailed, DeleteInProgress, Failed, InProgress, PartiallySucceeded, Skipped, Succeeded, TimedOut} 111} 112 113// BackupRestoreOperationType enumerates the values for backup restore operation type. 114type BackupRestoreOperationType string 115 116const ( 117 // Clone ... 118 Clone BackupRestoreOperationType = "Clone" 119 // Default ... 120 Default BackupRestoreOperationType = "Default" 121 // Relocation ... 122 Relocation BackupRestoreOperationType = "Relocation" 123) 124 125// PossibleBackupRestoreOperationTypeValues returns an array of possible values for the BackupRestoreOperationType const type. 126func PossibleBackupRestoreOperationTypeValues() []BackupRestoreOperationType { 127 return []BackupRestoreOperationType{Clone, Default, Relocation} 128} 129 130// BuiltInAuthenticationProvider enumerates the values for built in authentication provider. 131type BuiltInAuthenticationProvider string 132 133const ( 134 // AzureActiveDirectory ... 135 AzureActiveDirectory BuiltInAuthenticationProvider = "AzureActiveDirectory" 136 // Facebook ... 137 Facebook BuiltInAuthenticationProvider = "Facebook" 138 // Google ... 139 Google BuiltInAuthenticationProvider = "Google" 140 // MicrosoftAccount ... 141 MicrosoftAccount BuiltInAuthenticationProvider = "MicrosoftAccount" 142 // Twitter ... 143 Twitter BuiltInAuthenticationProvider = "Twitter" 144) 145 146// PossibleBuiltInAuthenticationProviderValues returns an array of possible values for the BuiltInAuthenticationProvider const type. 147func PossibleBuiltInAuthenticationProviderValues() []BuiltInAuthenticationProvider { 148 return []BuiltInAuthenticationProvider{AzureActiveDirectory, Facebook, Google, MicrosoftAccount, Twitter} 149} 150 151// CertificateOrderActionType enumerates the values for certificate order action type. 152type CertificateOrderActionType string 153 154const ( 155 // CertificateIssued ... 156 CertificateIssued CertificateOrderActionType = "CertificateIssued" 157 // CertificateOrderCanceled ... 158 CertificateOrderCanceled CertificateOrderActionType = "CertificateOrderCanceled" 159 // CertificateOrderCreated ... 160 CertificateOrderCreated CertificateOrderActionType = "CertificateOrderCreated" 161 // CertificateRevoked ... 162 CertificateRevoked CertificateOrderActionType = "CertificateRevoked" 163 // DomainValidationComplete ... 164 DomainValidationComplete CertificateOrderActionType = "DomainValidationComplete" 165 // FraudDetected ... 166 FraudDetected CertificateOrderActionType = "FraudDetected" 167 // OrgNameChange ... 168 OrgNameChange CertificateOrderActionType = "OrgNameChange" 169 // OrgValidationComplete ... 170 OrgValidationComplete CertificateOrderActionType = "OrgValidationComplete" 171 // SanDrop ... 172 SanDrop CertificateOrderActionType = "SanDrop" 173) 174 175// PossibleCertificateOrderActionTypeValues returns an array of possible values for the CertificateOrderActionType const type. 176func PossibleCertificateOrderActionTypeValues() []CertificateOrderActionType { 177 return []CertificateOrderActionType{CertificateIssued, CertificateOrderCanceled, CertificateOrderCreated, CertificateRevoked, DomainValidationComplete, FraudDetected, OrgNameChange, OrgValidationComplete, SanDrop} 178} 179 180// CertificateOrderStatus enumerates the values for certificate order status. 181type CertificateOrderStatus string 182 183const ( 184 // Canceled ... 185 Canceled CertificateOrderStatus = "Canceled" 186 // Denied ... 187 Denied CertificateOrderStatus = "Denied" 188 // Expired ... 189 Expired CertificateOrderStatus = "Expired" 190 // Issued ... 191 Issued CertificateOrderStatus = "Issued" 192 // NotSubmitted ... 193 NotSubmitted CertificateOrderStatus = "NotSubmitted" 194 // Pendingissuance ... 195 Pendingissuance CertificateOrderStatus = "Pendingissuance" 196 // PendingRekey ... 197 PendingRekey CertificateOrderStatus = "PendingRekey" 198 // Pendingrevocation ... 199 Pendingrevocation CertificateOrderStatus = "Pendingrevocation" 200 // Revoked ... 201 Revoked CertificateOrderStatus = "Revoked" 202 // Unused ... 203 Unused CertificateOrderStatus = "Unused" 204) 205 206// PossibleCertificateOrderStatusValues returns an array of possible values for the CertificateOrderStatus const type. 207func PossibleCertificateOrderStatusValues() []CertificateOrderStatus { 208 return []CertificateOrderStatus{Canceled, Denied, Expired, Issued, NotSubmitted, Pendingissuance, PendingRekey, Pendingrevocation, Revoked, Unused} 209} 210 211// CertificateProductType enumerates the values for certificate product type. 212type CertificateProductType string 213 214const ( 215 // StandardDomainValidatedSsl ... 216 StandardDomainValidatedSsl CertificateProductType = "StandardDomainValidatedSsl" 217 // StandardDomainValidatedWildCardSsl ... 218 StandardDomainValidatedWildCardSsl CertificateProductType = "StandardDomainValidatedWildCardSsl" 219) 220 221// PossibleCertificateProductTypeValues returns an array of possible values for the CertificateProductType const type. 222func PossibleCertificateProductTypeValues() []CertificateProductType { 223 return []CertificateProductType{StandardDomainValidatedSsl, StandardDomainValidatedWildCardSsl} 224} 225 226// Channels enumerates the values for channels. 227type Channels string 228 229const ( 230 // All ... 231 All Channels = "All" 232 // API ... 233 API Channels = "Api" 234 // Email ... 235 Email Channels = "Email" 236 // Notification ... 237 Notification Channels = "Notification" 238) 239 240// PossibleChannelsValues returns an array of possible values for the Channels const type. 241func PossibleChannelsValues() []Channels { 242 return []Channels{All, API, Email, Notification} 243} 244 245// CloneAbilityResult enumerates the values for clone ability result. 246type CloneAbilityResult string 247 248const ( 249 // Cloneable ... 250 Cloneable CloneAbilityResult = "Cloneable" 251 // NotCloneable ... 252 NotCloneable CloneAbilityResult = "NotCloneable" 253 // PartiallyCloneable ... 254 PartiallyCloneable CloneAbilityResult = "PartiallyCloneable" 255) 256 257// PossibleCloneAbilityResultValues returns an array of possible values for the CloneAbilityResult const type. 258func PossibleCloneAbilityResultValues() []CloneAbilityResult { 259 return []CloneAbilityResult{Cloneable, NotCloneable, PartiallyCloneable} 260} 261 262// ComputeModeOptions enumerates the values for compute mode options. 263type ComputeModeOptions string 264 265const ( 266 // Dedicated ... 267 Dedicated ComputeModeOptions = "Dedicated" 268 // Dynamic ... 269 Dynamic ComputeModeOptions = "Dynamic" 270 // Shared ... 271 Shared ComputeModeOptions = "Shared" 272) 273 274// PossibleComputeModeOptionsValues returns an array of possible values for the ComputeModeOptions const type. 275func PossibleComputeModeOptionsValues() []ComputeModeOptions { 276 return []ComputeModeOptions{Dedicated, Dynamic, Shared} 277} 278 279// ConnectionParameterType enumerates the values for connection parameter type. 280type ConnectionParameterType string 281 282const ( 283 // ConnectionParameterTypeArray ... 284 ConnectionParameterTypeArray ConnectionParameterType = "array" 285 // ConnectionParameterTypeBool ... 286 ConnectionParameterTypeBool ConnectionParameterType = "bool" 287 // ConnectionParameterTypeConnection ... 288 ConnectionParameterTypeConnection ConnectionParameterType = "connection" 289 // ConnectionParameterTypeInt ... 290 ConnectionParameterTypeInt ConnectionParameterType = "int" 291 // ConnectionParameterTypeOauthSetting ... 292 ConnectionParameterTypeOauthSetting ConnectionParameterType = "oauthSetting" 293 // ConnectionParameterTypeObject ... 294 ConnectionParameterTypeObject ConnectionParameterType = "object" 295 // ConnectionParameterTypeSecureobject ... 296 ConnectionParameterTypeSecureobject ConnectionParameterType = "secureobject" 297 // ConnectionParameterTypeSecurestring ... 298 ConnectionParameterTypeSecurestring ConnectionParameterType = "securestring" 299 // ConnectionParameterTypeString ... 300 ConnectionParameterTypeString ConnectionParameterType = "string" 301) 302 303// PossibleConnectionParameterTypeValues returns an array of possible values for the ConnectionParameterType const type. 304func PossibleConnectionParameterTypeValues() []ConnectionParameterType { 305 return []ConnectionParameterType{ConnectionParameterTypeArray, ConnectionParameterTypeBool, ConnectionParameterTypeConnection, ConnectionParameterTypeInt, ConnectionParameterTypeOauthSetting, ConnectionParameterTypeObject, ConnectionParameterTypeSecureobject, ConnectionParameterTypeSecurestring, ConnectionParameterTypeString} 306} 307 308// CustomHostNameDNSRecordType enumerates the values for custom host name dns record type. 309type CustomHostNameDNSRecordType string 310 311const ( 312 // A ... 313 A CustomHostNameDNSRecordType = "A" 314 // CName ... 315 CName CustomHostNameDNSRecordType = "CName" 316) 317 318// PossibleCustomHostNameDNSRecordTypeValues returns an array of possible values for the CustomHostNameDNSRecordType const type. 319func PossibleCustomHostNameDNSRecordTypeValues() []CustomHostNameDNSRecordType { 320 return []CustomHostNameDNSRecordType{A, CName} 321} 322 323// DatabaseServerType enumerates the values for database server type. 324type DatabaseServerType string 325 326const ( 327 // Custom ... 328 Custom DatabaseServerType = "Custom" 329 // MySQL ... 330 MySQL DatabaseServerType = "MySql" 331 // SQLAzure ... 332 SQLAzure DatabaseServerType = "SQLAzure" 333 // SQLServer ... 334 SQLServer DatabaseServerType = "SQLServer" 335) 336 337// PossibleDatabaseServerTypeValues returns an array of possible values for the DatabaseServerType const type. 338func PossibleDatabaseServerTypeValues() []DatabaseServerType { 339 return []DatabaseServerType{Custom, MySQL, SQLAzure, SQLServer} 340} 341 342// DomainStatus enumerates the values for domain status. 343type DomainStatus string 344 345const ( 346 // DomainStatusActive ... 347 DomainStatusActive DomainStatus = "Active" 348 // DomainStatusAwaiting ... 349 DomainStatusAwaiting DomainStatus = "Awaiting" 350 // DomainStatusCancelled ... 351 DomainStatusCancelled DomainStatus = "Cancelled" 352 // DomainStatusConfiscated ... 353 DomainStatusConfiscated DomainStatus = "Confiscated" 354 // DomainStatusDisabled ... 355 DomainStatusDisabled DomainStatus = "Disabled" 356 // DomainStatusExcluded ... 357 DomainStatusExcluded DomainStatus = "Excluded" 358 // DomainStatusExpired ... 359 DomainStatusExpired DomainStatus = "Expired" 360 // DomainStatusFailed ... 361 DomainStatusFailed DomainStatus = "Failed" 362 // DomainStatusHeld ... 363 DomainStatusHeld DomainStatus = "Held" 364 // DomainStatusJSONConverterFailed ... 365 DomainStatusJSONConverterFailed DomainStatus = "JsonConverterFailed" 366 // DomainStatusLocked ... 367 DomainStatusLocked DomainStatus = "Locked" 368 // DomainStatusParked ... 369 DomainStatusParked DomainStatus = "Parked" 370 // DomainStatusPending ... 371 DomainStatusPending DomainStatus = "Pending" 372 // DomainStatusReserved ... 373 DomainStatusReserved DomainStatus = "Reserved" 374 // DomainStatusReverted ... 375 DomainStatusReverted DomainStatus = "Reverted" 376 // DomainStatusSuspended ... 377 DomainStatusSuspended DomainStatus = "Suspended" 378 // DomainStatusTransferred ... 379 DomainStatusTransferred DomainStatus = "Transferred" 380 // DomainStatusUnknown ... 381 DomainStatusUnknown DomainStatus = "Unknown" 382 // DomainStatusUnlocked ... 383 DomainStatusUnlocked DomainStatus = "Unlocked" 384 // DomainStatusUnparked ... 385 DomainStatusUnparked DomainStatus = "Unparked" 386 // DomainStatusUpdated ... 387 DomainStatusUpdated DomainStatus = "Updated" 388) 389 390// PossibleDomainStatusValues returns an array of possible values for the DomainStatus const type. 391func PossibleDomainStatusValues() []DomainStatus { 392 return []DomainStatus{DomainStatusActive, DomainStatusAwaiting, DomainStatusCancelled, DomainStatusConfiscated, DomainStatusDisabled, DomainStatusExcluded, DomainStatusExpired, DomainStatusFailed, DomainStatusHeld, DomainStatusJSONConverterFailed, DomainStatusLocked, DomainStatusParked, DomainStatusPending, DomainStatusReserved, DomainStatusReverted, DomainStatusSuspended, DomainStatusTransferred, DomainStatusUnknown, DomainStatusUnlocked, DomainStatusUnparked, DomainStatusUpdated} 393} 394 395// DomainType enumerates the values for domain type. 396type DomainType string 397 398const ( 399 // Regular ... 400 Regular DomainType = "Regular" 401 // SoftDeleted ... 402 SoftDeleted DomainType = "SoftDeleted" 403) 404 405// PossibleDomainTypeValues returns an array of possible values for the DomainType const type. 406func PossibleDomainTypeValues() []DomainType { 407 return []DomainType{Regular, SoftDeleted} 408} 409 410// FrequencyUnit enumerates the values for frequency unit. 411type FrequencyUnit string 412 413const ( 414 // Day ... 415 Day FrequencyUnit = "Day" 416 // Hour ... 417 Hour FrequencyUnit = "Hour" 418) 419 420// PossibleFrequencyUnitValues returns an array of possible values for the FrequencyUnit const type. 421func PossibleFrequencyUnitValues() []FrequencyUnit { 422 return []FrequencyUnit{Day, Hour} 423} 424 425// HostingEnvironmentStatus enumerates the values for hosting environment status. 426type HostingEnvironmentStatus string 427 428const ( 429 // Deleting ... 430 Deleting HostingEnvironmentStatus = "Deleting" 431 // Preparing ... 432 Preparing HostingEnvironmentStatus = "Preparing" 433 // Ready ... 434 Ready HostingEnvironmentStatus = "Ready" 435 // Scaling ... 436 Scaling HostingEnvironmentStatus = "Scaling" 437) 438 439// PossibleHostingEnvironmentStatusValues returns an array of possible values for the HostingEnvironmentStatus const type. 440func PossibleHostingEnvironmentStatusValues() []HostingEnvironmentStatus { 441 return []HostingEnvironmentStatus{Deleting, Preparing, Ready, Scaling} 442} 443 444// HostNameType enumerates the values for host name type. 445type HostNameType string 446 447const ( 448 // Managed ... 449 Managed HostNameType = "Managed" 450 // Verified ... 451 Verified HostNameType = "Verified" 452) 453 454// PossibleHostNameTypeValues returns an array of possible values for the HostNameType const type. 455func PossibleHostNameTypeValues() []HostNameType { 456 return []HostNameType{Managed, Verified} 457} 458 459// InternalLoadBalancingMode enumerates the values for internal load balancing mode. 460type InternalLoadBalancingMode string 461 462const ( 463 // None ... 464 None InternalLoadBalancingMode = "None" 465 // Publishing ... 466 Publishing InternalLoadBalancingMode = "Publishing" 467 // Web ... 468 Web InternalLoadBalancingMode = "Web" 469) 470 471// PossibleInternalLoadBalancingModeValues returns an array of possible values for the InternalLoadBalancingMode const type. 472func PossibleInternalLoadBalancingModeValues() []InternalLoadBalancingMode { 473 return []InternalLoadBalancingMode{None, Publishing, Web} 474} 475 476// KeyVaultSecretStatus enumerates the values for key vault secret status. 477type KeyVaultSecretStatus string 478 479const ( 480 // KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault ... 481 KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault KeyVaultSecretStatus = "AzureServiceUnauthorizedToAccessKeyVault" 482 // KeyVaultSecretStatusCertificateOrderFailed ... 483 KeyVaultSecretStatusCertificateOrderFailed KeyVaultSecretStatus = "CertificateOrderFailed" 484 // KeyVaultSecretStatusInitialized ... 485 KeyVaultSecretStatusInitialized KeyVaultSecretStatus = "Initialized" 486 // KeyVaultSecretStatusKeyVaultDoesNotExist ... 487 KeyVaultSecretStatusKeyVaultDoesNotExist KeyVaultSecretStatus = "KeyVaultDoesNotExist" 488 // KeyVaultSecretStatusKeyVaultSecretDoesNotExist ... 489 KeyVaultSecretStatusKeyVaultSecretDoesNotExist KeyVaultSecretStatus = "KeyVaultSecretDoesNotExist" 490 // KeyVaultSecretStatusOperationNotPermittedOnKeyVault ... 491 KeyVaultSecretStatusOperationNotPermittedOnKeyVault KeyVaultSecretStatus = "OperationNotPermittedOnKeyVault" 492 // KeyVaultSecretStatusSucceeded ... 493 KeyVaultSecretStatusSucceeded KeyVaultSecretStatus = "Succeeded" 494 // KeyVaultSecretStatusUnknown ... 495 KeyVaultSecretStatusUnknown KeyVaultSecretStatus = "Unknown" 496 // KeyVaultSecretStatusUnknownError ... 497 KeyVaultSecretStatusUnknownError KeyVaultSecretStatus = "UnknownError" 498 // KeyVaultSecretStatusWaitingOnCertificateOrder ... 499 KeyVaultSecretStatusWaitingOnCertificateOrder KeyVaultSecretStatus = "WaitingOnCertificateOrder" 500) 501 502// PossibleKeyVaultSecretStatusValues returns an array of possible values for the KeyVaultSecretStatus const type. 503func PossibleKeyVaultSecretStatusValues() []KeyVaultSecretStatus { 504 return []KeyVaultSecretStatus{KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault, KeyVaultSecretStatusCertificateOrderFailed, KeyVaultSecretStatusInitialized, KeyVaultSecretStatusKeyVaultDoesNotExist, KeyVaultSecretStatusKeyVaultSecretDoesNotExist, KeyVaultSecretStatusOperationNotPermittedOnKeyVault, KeyVaultSecretStatusSucceeded, KeyVaultSecretStatusUnknown, KeyVaultSecretStatusUnknownError, KeyVaultSecretStatusWaitingOnCertificateOrder} 505} 506 507// LinkState enumerates the values for link state. 508type LinkState string 509 510const ( 511 // Authenticated ... 512 Authenticated LinkState = "Authenticated" 513 // Error ... 514 Error LinkState = "Error" 515 // Unauthenticated ... 516 Unauthenticated LinkState = "Unauthenticated" 517) 518 519// PossibleLinkStateValues returns an array of possible values for the LinkState const type. 520func PossibleLinkStateValues() []LinkState { 521 return []LinkState{Authenticated, Error, Unauthenticated} 522} 523 524// LogLevel enumerates the values for log level. 525type LogLevel string 526 527const ( 528 // LogLevelError ... 529 LogLevelError LogLevel = "Error" 530 // LogLevelInformation ... 531 LogLevelInformation LogLevel = "Information" 532 // LogLevelOff ... 533 LogLevelOff LogLevel = "Off" 534 // LogLevelVerbose ... 535 LogLevelVerbose LogLevel = "Verbose" 536 // LogLevelWarning ... 537 LogLevelWarning LogLevel = "Warning" 538) 539 540// PossibleLogLevelValues returns an array of possible values for the LogLevel const type. 541func PossibleLogLevelValues() []LogLevel { 542 return []LogLevel{LogLevelError, LogLevelInformation, LogLevelOff, LogLevelVerbose, LogLevelWarning} 543} 544 545// ManagedHostingEnvironmentStatus enumerates the values for managed hosting environment status. 546type ManagedHostingEnvironmentStatus string 547 548const ( 549 // ManagedHostingEnvironmentStatusDeleting ... 550 ManagedHostingEnvironmentStatusDeleting ManagedHostingEnvironmentStatus = "Deleting" 551 // ManagedHostingEnvironmentStatusPreparing ... 552 ManagedHostingEnvironmentStatusPreparing ManagedHostingEnvironmentStatus = "Preparing" 553 // ManagedHostingEnvironmentStatusReady ... 554 ManagedHostingEnvironmentStatusReady ManagedHostingEnvironmentStatus = "Ready" 555) 556 557// PossibleManagedHostingEnvironmentStatusValues returns an array of possible values for the ManagedHostingEnvironmentStatus const type. 558func PossibleManagedHostingEnvironmentStatusValues() []ManagedHostingEnvironmentStatus { 559 return []ManagedHostingEnvironmentStatus{ManagedHostingEnvironmentStatusDeleting, ManagedHostingEnvironmentStatusPreparing, ManagedHostingEnvironmentStatusReady} 560} 561 562// ManagedPipelineMode enumerates the values for managed pipeline mode. 563type ManagedPipelineMode string 564 565const ( 566 // Classic ... 567 Classic ManagedPipelineMode = "Classic" 568 // Integrated ... 569 Integrated ManagedPipelineMode = "Integrated" 570) 571 572// PossibleManagedPipelineModeValues returns an array of possible values for the ManagedPipelineMode const type. 573func PossibleManagedPipelineModeValues() []ManagedPipelineMode { 574 return []ManagedPipelineMode{Classic, Integrated} 575} 576 577// NotificationLevel enumerates the values for notification level. 578type NotificationLevel string 579 580const ( 581 // Critical ... 582 Critical NotificationLevel = "Critical" 583 // Information ... 584 Information NotificationLevel = "Information" 585 // NonUrgentSuggestion ... 586 NonUrgentSuggestion NotificationLevel = "NonUrgentSuggestion" 587 // Warning ... 588 Warning NotificationLevel = "Warning" 589) 590 591// PossibleNotificationLevelValues returns an array of possible values for the NotificationLevel const type. 592func PossibleNotificationLevelValues() []NotificationLevel { 593 return []NotificationLevel{Critical, Information, NonUrgentSuggestion, Warning} 594} 595 596// PrincipalType enumerates the values for principal type. 597type PrincipalType string 598 599const ( 600 // PrincipalTypeActiveDirectory ... 601 PrincipalTypeActiveDirectory PrincipalType = "ActiveDirectory" 602 // PrincipalTypeConnection ... 603 PrincipalTypeConnection PrincipalType = "Connection" 604 // PrincipalTypeMicrosoftAccount ... 605 PrincipalTypeMicrosoftAccount PrincipalType = "MicrosoftAccount" 606) 607 608// PossiblePrincipalTypeValues returns an array of possible values for the PrincipalType const type. 609func PossiblePrincipalTypeValues() []PrincipalType { 610 return []PrincipalType{PrincipalTypeActiveDirectory, PrincipalTypeConnection, PrincipalTypeMicrosoftAccount} 611} 612 613// ProvisioningState enumerates the values for provisioning state. 614type ProvisioningState string 615 616const ( 617 // ProvisioningStateCanceled ... 618 ProvisioningStateCanceled ProvisioningState = "Canceled" 619 // ProvisioningStateDeleting ... 620 ProvisioningStateDeleting ProvisioningState = "Deleting" 621 // ProvisioningStateFailed ... 622 ProvisioningStateFailed ProvisioningState = "Failed" 623 // ProvisioningStateInProgress ... 624 ProvisioningStateInProgress ProvisioningState = "InProgress" 625 // ProvisioningStateSucceeded ... 626 ProvisioningStateSucceeded ProvisioningState = "Succeeded" 627) 628 629// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. 630func PossibleProvisioningStateValues() []ProvisioningState { 631 return []ProvisioningState{ProvisioningStateCanceled, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateInProgress, ProvisioningStateSucceeded} 632} 633 634// SiteAvailabilityState enumerates the values for site availability state. 635type SiteAvailabilityState string 636 637const ( 638 // DisasterRecoveryMode ... 639 DisasterRecoveryMode SiteAvailabilityState = "DisasterRecoveryMode" 640 // Limited ... 641 Limited SiteAvailabilityState = "Limited" 642 // Normal ... 643 Normal SiteAvailabilityState = "Normal" 644) 645 646// PossibleSiteAvailabilityStateValues returns an array of possible values for the SiteAvailabilityState const type. 647func PossibleSiteAvailabilityStateValues() []SiteAvailabilityState { 648 return []SiteAvailabilityState{DisasterRecoveryMode, Limited, Normal} 649} 650 651// SiteLoadBalancing enumerates the values for site load balancing. 652type SiteLoadBalancing string 653 654const ( 655 // LeastRequests ... 656 LeastRequests SiteLoadBalancing = "LeastRequests" 657 // LeastResponseTime ... 658 LeastResponseTime SiteLoadBalancing = "LeastResponseTime" 659 // RequestHash ... 660 RequestHash SiteLoadBalancing = "RequestHash" 661 // WeightedRoundRobin ... 662 WeightedRoundRobin SiteLoadBalancing = "WeightedRoundRobin" 663 // WeightedTotalTraffic ... 664 WeightedTotalTraffic SiteLoadBalancing = "WeightedTotalTraffic" 665) 666 667// PossibleSiteLoadBalancingValues returns an array of possible values for the SiteLoadBalancing const type. 668func PossibleSiteLoadBalancingValues() []SiteLoadBalancing { 669 return []SiteLoadBalancing{LeastRequests, LeastResponseTime, RequestHash, WeightedRoundRobin, WeightedTotalTraffic} 670} 671 672// SslState enumerates the values for ssl state. 673type SslState string 674 675const ( 676 // Disabled ... 677 Disabled SslState = "Disabled" 678 // IPBasedEnabled ... 679 IPBasedEnabled SslState = "IpBasedEnabled" 680 // SniEnabled ... 681 SniEnabled SslState = "SniEnabled" 682) 683 684// PossibleSslStateValues returns an array of possible values for the SslState const type. 685func PossibleSslStateValues() []SslState { 686 return []SslState{Disabled, IPBasedEnabled, SniEnabled} 687} 688 689// StatusOptions enumerates the values for status options. 690type StatusOptions string 691 692const ( 693 // StatusOptionsPending ... 694 StatusOptionsPending StatusOptions = "Pending" 695 // StatusOptionsReady ... 696 StatusOptionsReady StatusOptions = "Ready" 697) 698 699// PossibleStatusOptionsValues returns an array of possible values for the StatusOptions const type. 700func PossibleStatusOptionsValues() []StatusOptions { 701 return []StatusOptions{StatusOptionsPending, StatusOptionsReady} 702} 703 704// UnauthenticatedClientAction enumerates the values for unauthenticated client action. 705type UnauthenticatedClientAction string 706 707const ( 708 // AllowAnonymous ... 709 AllowAnonymous UnauthenticatedClientAction = "AllowAnonymous" 710 // RedirectToLoginPage ... 711 RedirectToLoginPage UnauthenticatedClientAction = "RedirectToLoginPage" 712) 713 714// PossibleUnauthenticatedClientActionValues returns an array of possible values for the UnauthenticatedClientAction const type. 715func PossibleUnauthenticatedClientActionValues() []UnauthenticatedClientAction { 716 return []UnauthenticatedClientAction{AllowAnonymous, RedirectToLoginPage} 717} 718 719// UsageState enumerates the values for usage state. 720type UsageState string 721 722const ( 723 // UsageStateExceeded ... 724 UsageStateExceeded UsageState = "Exceeded" 725 // UsageStateNormal ... 726 UsageStateNormal UsageState = "Normal" 727) 728 729// PossibleUsageStateValues returns an array of possible values for the UsageState const type. 730func PossibleUsageStateValues() []UsageState { 731 return []UsageState{UsageStateExceeded, UsageStateNormal} 732} 733 734// WorkerSizeOptions enumerates the values for worker size options. 735type WorkerSizeOptions string 736 737const ( 738 // WorkerSizeOptionsDefault ... 739 WorkerSizeOptionsDefault WorkerSizeOptions = "Default" 740 // WorkerSizeOptionsLarge ... 741 WorkerSizeOptionsLarge WorkerSizeOptions = "Large" 742 // WorkerSizeOptionsMedium ... 743 WorkerSizeOptionsMedium WorkerSizeOptions = "Medium" 744 // WorkerSizeOptionsSmall ... 745 WorkerSizeOptionsSmall WorkerSizeOptions = "Small" 746) 747 748// PossibleWorkerSizeOptionsValues returns an array of possible values for the WorkerSizeOptions const type. 749func PossibleWorkerSizeOptionsValues() []WorkerSizeOptions { 750 return []WorkerSizeOptions{WorkerSizeOptionsDefault, WorkerSizeOptionsLarge, WorkerSizeOptionsMedium, WorkerSizeOptionsSmall} 751} 752 753// Address address information for domain registration 754type Address struct { 755 // Address1 - Address 1 756 Address1 *string `json:"address1,omitempty"` 757 // Address2 - Address 2 758 Address2 *string `json:"address2,omitempty"` 759 // City - City 760 City *string `json:"city,omitempty"` 761 // Country - Country 762 Country *string `json:"country,omitempty"` 763 // PostalCode - Postal code 764 PostalCode *string `json:"postalCode,omitempty"` 765 // State - State 766 State *string `json:"state,omitempty"` 767} 768 769// AddressResponse describes main public ip address and any extra vips 770type AddressResponse struct { 771 autorest.Response `json:"-"` 772 // ServiceIPAddress - Main public vip 773 ServiceIPAddress *string `json:"serviceIpAddress,omitempty"` 774 // InternalIPAddress - VNET internal ip address of the hostingEnvironment (App Service Environment) if it is in internal load-balancing mode 775 InternalIPAddress *string `json:"internalIpAddress,omitempty"` 776 // OutboundIPAddresses - IP addresses appearing on outbound connections 777 OutboundIPAddresses *[]string `json:"outboundIpAddresses,omitempty"` 778 // VipMappings - Additional vips 779 VipMappings *[]VirtualIPMapping `json:"vipMappings,omitempty"` 780} 781 782// APIDefinitionInfo information about the formal API definition for the web app. 783type APIDefinitionInfo struct { 784 // URL - The URL of the API definition. 785 URL *string `json:"url,omitempty"` 786} 787 788// APIEntity API Management 789type APIEntity struct { 790 autorest.Response `json:"-"` 791 *APIEntityProperties `json:"properties,omitempty"` 792 // ID - Resource Id 793 ID *string `json:"id,omitempty"` 794 // Name - Resource Name 795 Name *string `json:"name,omitempty"` 796 // Kind - Kind of resource 797 Kind *string `json:"kind,omitempty"` 798 // Location - Resource Location 799 Location *string `json:"location,omitempty"` 800 // Type - Resource type 801 Type *string `json:"type,omitempty"` 802 // Tags - Resource tags 803 Tags map[string]*string `json:"tags"` 804} 805 806// MarshalJSON is the custom marshaler for APIEntity. 807func (ae APIEntity) MarshalJSON() ([]byte, error) { 808 objectMap := make(map[string]interface{}) 809 if ae.APIEntityProperties != nil { 810 objectMap["properties"] = ae.APIEntityProperties 811 } 812 if ae.ID != nil { 813 objectMap["id"] = ae.ID 814 } 815 if ae.Name != nil { 816 objectMap["name"] = ae.Name 817 } 818 if ae.Kind != nil { 819 objectMap["kind"] = ae.Kind 820 } 821 if ae.Location != nil { 822 objectMap["location"] = ae.Location 823 } 824 if ae.Type != nil { 825 objectMap["type"] = ae.Type 826 } 827 if ae.Tags != nil { 828 objectMap["tags"] = ae.Tags 829 } 830 return json.Marshal(objectMap) 831} 832 833// UnmarshalJSON is the custom unmarshaler for APIEntity struct. 834func (ae *APIEntity) UnmarshalJSON(body []byte) error { 835 var m map[string]*json.RawMessage 836 err := json.Unmarshal(body, &m) 837 if err != nil { 838 return err 839 } 840 for k, v := range m { 841 switch k { 842 case "properties": 843 if v != nil { 844 var APIEntityProperties APIEntityProperties 845 err = json.Unmarshal(*v, &APIEntityProperties) 846 if err != nil { 847 return err 848 } 849 ae.APIEntityProperties = &APIEntityProperties 850 } 851 case "id": 852 if v != nil { 853 var ID string 854 err = json.Unmarshal(*v, &ID) 855 if err != nil { 856 return err 857 } 858 ae.ID = &ID 859 } 860 case "name": 861 if v != nil { 862 var name string 863 err = json.Unmarshal(*v, &name) 864 if err != nil { 865 return err 866 } 867 ae.Name = &name 868 } 869 case "kind": 870 if v != nil { 871 var kind string 872 err = json.Unmarshal(*v, &kind) 873 if err != nil { 874 return err 875 } 876 ae.Kind = &kind 877 } 878 case "location": 879 if v != nil { 880 var location string 881 err = json.Unmarshal(*v, &location) 882 if err != nil { 883 return err 884 } 885 ae.Location = &location 886 } 887 case "type": 888 if v != nil { 889 var typeVar string 890 err = json.Unmarshal(*v, &typeVar) 891 if err != nil { 892 return err 893 } 894 ae.Type = &typeVar 895 } 896 case "tags": 897 if v != nil { 898 var tags map[string]*string 899 err = json.Unmarshal(*v, &tags) 900 if err != nil { 901 return err 902 } 903 ae.Tags = tags 904 } 905 } 906 } 907 908 return nil 909} 910 911// APIEntityProperties ... 912type APIEntityProperties struct { 913 // Name - Name of the API 914 // the URL path of this API when exposed via APIM 915 Name *string `json:"name,omitempty"` 916 // GeneralInformation - the URL path of this API when exposed via APIM 917 GeneralInformation *GeneralAPIInformation `json:"generalInformation,omitempty"` 918 // Path - the URL path of this API when exposed via APIM 919 Path *string `json:"path,omitempty"` 920 // RuntimeUrls - Read only property returning the runtime endpoints where the API can be called 921 RuntimeUrls *[]string `json:"runtimeUrls,omitempty"` 922 // Protocols - Protocols supported by the front end - http/https 923 Protocols *[]string `json:"protocols,omitempty"` 924 // Policies - API policies 925 Policies *APIPolicies `json:"policies,omitempty"` 926 // BackendService - Backend service definition 927 BackendService *BackendServiceDefinition `json:"backendService,omitempty"` 928 // APIDefinitionURL - API definition Url - url where the swagger can be downloaded from 929 APIDefinitionURL *string `json:"apiDefinitionUrl,omitempty"` 930 // Metadata - Free form object for the data caller wants to store 931 Metadata interface{} `json:"metadata,omitempty"` 932 // Capabilities - Capabilities 933 Capabilities *[]string `json:"capabilities,omitempty"` 934 // ConnectionParameters - Connection parameters 935 ConnectionParameters map[string]*ConnectionParameter `json:"connectionParameters"` 936 // CreatedTime - Timestamp of the connection creation 937 CreatedTime *date.Time `json:"createdTime,omitempty"` 938 // ChangedTime - Timestamp of last connection change. 939 ChangedTime *date.Time `json:"changedTime,omitempty"` 940} 941 942// MarshalJSON is the custom marshaler for APIEntityProperties. 943func (ae APIEntityProperties) MarshalJSON() ([]byte, error) { 944 objectMap := make(map[string]interface{}) 945 if ae.Name != nil { 946 objectMap["name"] = ae.Name 947 } 948 if ae.GeneralInformation != nil { 949 objectMap["generalInformation"] = ae.GeneralInformation 950 } 951 if ae.Path != nil { 952 objectMap["path"] = ae.Path 953 } 954 if ae.RuntimeUrls != nil { 955 objectMap["runtimeUrls"] = ae.RuntimeUrls 956 } 957 if ae.Protocols != nil { 958 objectMap["protocols"] = ae.Protocols 959 } 960 if ae.Policies != nil { 961 objectMap["policies"] = ae.Policies 962 } 963 if ae.BackendService != nil { 964 objectMap["backendService"] = ae.BackendService 965 } 966 if ae.APIDefinitionURL != nil { 967 objectMap["apiDefinitionUrl"] = ae.APIDefinitionURL 968 } 969 if ae.Metadata != nil { 970 objectMap["metadata"] = ae.Metadata 971 } 972 if ae.Capabilities != nil { 973 objectMap["capabilities"] = ae.Capabilities 974 } 975 if ae.ConnectionParameters != nil { 976 objectMap["connectionParameters"] = ae.ConnectionParameters 977 } 978 if ae.CreatedTime != nil { 979 objectMap["createdTime"] = ae.CreatedTime 980 } 981 if ae.ChangedTime != nil { 982 objectMap["changedTime"] = ae.ChangedTime 983 } 984 return json.Marshal(objectMap) 985} 986 987// APIOAuthSettings oAuth settings for the connection provider 988type APIOAuthSettings struct { 989 // IdentityProvider - Identity provider 990 IdentityProvider *string `json:"identityProvider,omitempty"` 991 // ClientID - Resource provider client id 992 ClientID *string `json:"clientId,omitempty"` 993 // ClientSecret - Client Secret needed for OAuth 994 ClientSecret *string `json:"clientSecret,omitempty"` 995 // Scopes - OAuth scopes 996 Scopes *[]string `json:"scopes,omitempty"` 997 // RedirectURL - Url 998 RedirectURL *string `json:"redirectUrl,omitempty"` 999 // Properties - Read only properties for this oauth setting. 1000 Properties interface{} `json:"properties,omitempty"` 1001 // CustomParameters - OAuth parameters key is the name of parameter 1002 CustomParameters map[string]*APIOAuthSettingsParameter `json:"customParameters"` 1003} 1004 1005// MarshalJSON is the custom marshaler for APIOAuthSettings. 1006func (aoas APIOAuthSettings) MarshalJSON() ([]byte, error) { 1007 objectMap := make(map[string]interface{}) 1008 if aoas.IdentityProvider != nil { 1009 objectMap["identityProvider"] = aoas.IdentityProvider 1010 } 1011 if aoas.ClientID != nil { 1012 objectMap["clientId"] = aoas.ClientID 1013 } 1014 if aoas.ClientSecret != nil { 1015 objectMap["clientSecret"] = aoas.ClientSecret 1016 } 1017 if aoas.Scopes != nil { 1018 objectMap["scopes"] = aoas.Scopes 1019 } 1020 if aoas.RedirectURL != nil { 1021 objectMap["redirectUrl"] = aoas.RedirectURL 1022 } 1023 if aoas.Properties != nil { 1024 objectMap["properties"] = aoas.Properties 1025 } 1026 if aoas.CustomParameters != nil { 1027 objectMap["customParameters"] = aoas.CustomParameters 1028 } 1029 return json.Marshal(objectMap) 1030} 1031 1032// APIOAuthSettingsParameter oAuth Settings Parameter 1033type APIOAuthSettingsParameter struct { 1034 // Value - Value 1035 Value *string `json:"value,omitempty"` 1036 // Options - Read only: Options available to this parameter 1037 Options interface{} `json:"options,omitempty"` 1038 // UIDefinition - UI definitions per culture as caller can specify the culture 1039 UIDefinition interface{} `json:"uiDefinition,omitempty"` 1040} 1041 1042// APIPolicies API policies 1043type APIPolicies struct { 1044 *APIPoliciesProperties `json:"properties,omitempty"` 1045 // ID - Resource Id 1046 ID *string `json:"id,omitempty"` 1047 // Name - Resource Name 1048 Name *string `json:"name,omitempty"` 1049 // Kind - Kind of resource 1050 Kind *string `json:"kind,omitempty"` 1051 // Location - Resource Location 1052 Location *string `json:"location,omitempty"` 1053 // Type - Resource type 1054 Type *string `json:"type,omitempty"` 1055 // Tags - Resource tags 1056 Tags map[string]*string `json:"tags"` 1057} 1058 1059// MarshalJSON is the custom marshaler for APIPolicies. 1060func (ap APIPolicies) MarshalJSON() ([]byte, error) { 1061 objectMap := make(map[string]interface{}) 1062 if ap.APIPoliciesProperties != nil { 1063 objectMap["properties"] = ap.APIPoliciesProperties 1064 } 1065 if ap.ID != nil { 1066 objectMap["id"] = ap.ID 1067 } 1068 if ap.Name != nil { 1069 objectMap["name"] = ap.Name 1070 } 1071 if ap.Kind != nil { 1072 objectMap["kind"] = ap.Kind 1073 } 1074 if ap.Location != nil { 1075 objectMap["location"] = ap.Location 1076 } 1077 if ap.Type != nil { 1078 objectMap["type"] = ap.Type 1079 } 1080 if ap.Tags != nil { 1081 objectMap["tags"] = ap.Tags 1082 } 1083 return json.Marshal(objectMap) 1084} 1085 1086// UnmarshalJSON is the custom unmarshaler for APIPolicies struct. 1087func (ap *APIPolicies) UnmarshalJSON(body []byte) error { 1088 var m map[string]*json.RawMessage 1089 err := json.Unmarshal(body, &m) 1090 if err != nil { 1091 return err 1092 } 1093 for k, v := range m { 1094 switch k { 1095 case "properties": 1096 if v != nil { 1097 var APIPoliciesProperties APIPoliciesProperties 1098 err = json.Unmarshal(*v, &APIPoliciesProperties) 1099 if err != nil { 1100 return err 1101 } 1102 ap.APIPoliciesProperties = &APIPoliciesProperties 1103 } 1104 case "id": 1105 if v != nil { 1106 var ID string 1107 err = json.Unmarshal(*v, &ID) 1108 if err != nil { 1109 return err 1110 } 1111 ap.ID = &ID 1112 } 1113 case "name": 1114 if v != nil { 1115 var name string 1116 err = json.Unmarshal(*v, &name) 1117 if err != nil { 1118 return err 1119 } 1120 ap.Name = &name 1121 } 1122 case "kind": 1123 if v != nil { 1124 var kind string 1125 err = json.Unmarshal(*v, &kind) 1126 if err != nil { 1127 return err 1128 } 1129 ap.Kind = &kind 1130 } 1131 case "location": 1132 if v != nil { 1133 var location string 1134 err = json.Unmarshal(*v, &location) 1135 if err != nil { 1136 return err 1137 } 1138 ap.Location = &location 1139 } 1140 case "type": 1141 if v != nil { 1142 var typeVar string 1143 err = json.Unmarshal(*v, &typeVar) 1144 if err != nil { 1145 return err 1146 } 1147 ap.Type = &typeVar 1148 } 1149 case "tags": 1150 if v != nil { 1151 var tags map[string]*string 1152 err = json.Unmarshal(*v, &tags) 1153 if err != nil { 1154 return err 1155 } 1156 ap.Tags = tags 1157 } 1158 } 1159 } 1160 1161 return nil 1162} 1163 1164// APIPoliciesProperties ... 1165type APIPoliciesProperties struct { 1166 // Content - Content of xml policy 1167 Content *string `json:"content,omitempty"` 1168} 1169 1170// ApisCollection collection of Apis 1171type ApisCollection struct { 1172 autorest.Response `json:"-"` 1173 // Value - Collection of resources 1174 Value *[]APIEntity `json:"value,omitempty"` 1175 // NextLink - Link to next page of resources 1176 NextLink *string `json:"nextLink,omitempty"` 1177} 1178 1179// ApisCollectionIterator provides access to a complete listing of APIEntity values. 1180type ApisCollectionIterator struct { 1181 i int 1182 page ApisCollectionPage 1183} 1184 1185// NextWithContext advances to the next value. If there was an error making 1186// the request the iterator does not advance and the error is returned. 1187func (iter *ApisCollectionIterator) NextWithContext(ctx context.Context) (err error) { 1188 if tracing.IsEnabled() { 1189 ctx = tracing.StartSpan(ctx, fqdn+"/ApisCollectionIterator.NextWithContext") 1190 defer func() { 1191 sc := -1 1192 if iter.Response().Response.Response != nil { 1193 sc = iter.Response().Response.Response.StatusCode 1194 } 1195 tracing.EndSpan(ctx, sc, err) 1196 }() 1197 } 1198 iter.i++ 1199 if iter.i < len(iter.page.Values()) { 1200 return nil 1201 } 1202 err = iter.page.NextWithContext(ctx) 1203 if err != nil { 1204 iter.i-- 1205 return err 1206 } 1207 iter.i = 0 1208 return nil 1209} 1210 1211// Next advances to the next value. If there was an error making 1212// the request the iterator does not advance and the error is returned. 1213// Deprecated: Use NextWithContext() instead. 1214func (iter *ApisCollectionIterator) Next() error { 1215 return iter.NextWithContext(context.Background()) 1216} 1217 1218// NotDone returns true if the enumeration should be started or is not yet complete. 1219func (iter ApisCollectionIterator) NotDone() bool { 1220 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1221} 1222 1223// Response returns the raw server response from the last page request. 1224func (iter ApisCollectionIterator) Response() ApisCollection { 1225 return iter.page.Response() 1226} 1227 1228// Value returns the current value or a zero-initialized value if the 1229// iterator has advanced beyond the end of the collection. 1230func (iter ApisCollectionIterator) Value() APIEntity { 1231 if !iter.page.NotDone() { 1232 return APIEntity{} 1233 } 1234 return iter.page.Values()[iter.i] 1235} 1236 1237// Creates a new instance of the ApisCollectionIterator type. 1238func NewApisCollectionIterator(page ApisCollectionPage) ApisCollectionIterator { 1239 return ApisCollectionIterator{page: page} 1240} 1241 1242// IsEmpty returns true if the ListResult contains no values. 1243func (ac ApisCollection) IsEmpty() bool { 1244 return ac.Value == nil || len(*ac.Value) == 0 1245} 1246 1247// apisCollectionPreparer prepares a request to retrieve the next set of results. 1248// It returns nil if no more results exist. 1249func (ac ApisCollection) apisCollectionPreparer(ctx context.Context) (*http.Request, error) { 1250 if ac.NextLink == nil || len(to.String(ac.NextLink)) < 1 { 1251 return nil, nil 1252 } 1253 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1254 autorest.AsJSON(), 1255 autorest.AsGet(), 1256 autorest.WithBaseURL(to.String(ac.NextLink))) 1257} 1258 1259// ApisCollectionPage contains a page of APIEntity values. 1260type ApisCollectionPage struct { 1261 fn func(context.Context, ApisCollection) (ApisCollection, error) 1262 ac ApisCollection 1263} 1264 1265// NextWithContext advances to the next page of values. If there was an error making 1266// the request the page does not advance and the error is returned. 1267func (page *ApisCollectionPage) NextWithContext(ctx context.Context) (err error) { 1268 if tracing.IsEnabled() { 1269 ctx = tracing.StartSpan(ctx, fqdn+"/ApisCollectionPage.NextWithContext") 1270 defer func() { 1271 sc := -1 1272 if page.Response().Response.Response != nil { 1273 sc = page.Response().Response.Response.StatusCode 1274 } 1275 tracing.EndSpan(ctx, sc, err) 1276 }() 1277 } 1278 next, err := page.fn(ctx, page.ac) 1279 if err != nil { 1280 return err 1281 } 1282 page.ac = next 1283 return nil 1284} 1285 1286// Next advances to the next page of values. If there was an error making 1287// the request the page does not advance and the error is returned. 1288// Deprecated: Use NextWithContext() instead. 1289func (page *ApisCollectionPage) Next() error { 1290 return page.NextWithContext(context.Background()) 1291} 1292 1293// NotDone returns true if the page enumeration should be started or is not yet complete. 1294func (page ApisCollectionPage) NotDone() bool { 1295 return !page.ac.IsEmpty() 1296} 1297 1298// Response returns the raw server response from the last page request. 1299func (page ApisCollectionPage) Response() ApisCollection { 1300 return page.ac 1301} 1302 1303// Values returns the slice of values for the current page or nil if there are no values. 1304func (page ApisCollectionPage) Values() []APIEntity { 1305 if page.ac.IsEmpty() { 1306 return nil 1307 } 1308 return *page.ac.Value 1309} 1310 1311// Creates a new instance of the ApisCollectionPage type. 1312func NewApisCollectionPage(getNextPage func(context.Context, ApisCollection) (ApisCollection, error)) ApisCollectionPage { 1313 return ApisCollectionPage{fn: getNextPage} 1314} 1315 1316// ApplicationLogsConfig application logs configuration 1317type ApplicationLogsConfig struct { 1318 // FileSystem - Application logs to file system configuration 1319 FileSystem *FileSystemApplicationLogsConfig `json:"fileSystem,omitempty"` 1320 // AzureTableStorage - Application logs to azure table storage configuration 1321 AzureTableStorage *AzureTableStorageApplicationLogsConfig `json:"azureTableStorage,omitempty"` 1322 // AzureBlobStorage - Application logs to blob storage configuration 1323 AzureBlobStorage *AzureBlobStorageApplicationLogsConfig `json:"azureBlobStorage,omitempty"` 1324} 1325 1326// ArmPlan the plan object in an ARM, represents a marketplace plan 1327type ArmPlan struct { 1328 // Name - The name 1329 Name *string `json:"name,omitempty"` 1330 // Publisher - The publisher 1331 Publisher *string `json:"publisher,omitempty"` 1332 // Product - The product 1333 Product *string `json:"product,omitempty"` 1334 // PromotionCode - The promotion code 1335 PromotionCode *string `json:"promotionCode,omitempty"` 1336 // Version - Version of product 1337 Version *string `json:"version,omitempty"` 1338} 1339 1340// AutoHealActions autoHealActions - Describes the actions which can be 1341// taken by the auto-heal module when a rule is triggered. 1342type AutoHealActions struct { 1343 // ActionType - ActionType - predefined action to be taken. Possible values include: 'Recycle', 'LogEvent', 'CustomAction' 1344 ActionType AutoHealActionType `json:"actionType,omitempty"` 1345 // CustomAction - CustomAction - custom action to be taken 1346 CustomAction *AutoHealCustomAction `json:"customAction,omitempty"` 1347 // MinProcessExecutionTime - MinProcessExecutionTime - minimum time the process must execute 1348 // before taking the action 1349 MinProcessExecutionTime *string `json:"minProcessExecutionTime,omitempty"` 1350} 1351 1352// AutoHealCustomAction autoHealCustomAction - Describes the custom action to be executed 1353// when an auto heal rule is triggered. 1354type AutoHealCustomAction struct { 1355 // Exe - Executable to be run 1356 Exe *string `json:"exe,omitempty"` 1357 // Parameters - Parameters for the executable 1358 Parameters *string `json:"parameters,omitempty"` 1359} 1360 1361// AutoHealRules autoHealRules - describes the rules which can be defined for auto-heal 1362type AutoHealRules struct { 1363 // Triggers - Triggers - Conditions that describe when to execute the auto-heal actions 1364 Triggers *AutoHealTriggers `json:"triggers,omitempty"` 1365 // Actions - Actions - Actions to be executed when a rule is triggered 1366 Actions *AutoHealActions `json:"actions,omitempty"` 1367} 1368 1369// AutoHealTriggers autoHealTriggers - describes the triggers for auto-heal. 1370type AutoHealTriggers struct { 1371 // Requests - Requests - Defines a rule based on total requests 1372 Requests *RequestsBasedTrigger `json:"requests,omitempty"` 1373 // PrivateBytesInKB - PrivateBytesInKB - Defines a rule based on private bytes 1374 PrivateBytesInKB *int32 `json:"privateBytesInKB,omitempty"` 1375 // StatusCodes - StatusCodes - Defines a rule based on status codes 1376 StatusCodes *[]StatusCodesBasedTrigger `json:"statusCodes,omitempty"` 1377 // SlowRequests - SlowRequests - Defines a rule based on request execution time 1378 SlowRequests *SlowRequestsBasedTrigger `json:"slowRequests,omitempty"` 1379} 1380 1381// AzureBlobStorageApplicationLogsConfig application logs azure blob storage configuration 1382type AzureBlobStorageApplicationLogsConfig struct { 1383 // Level - Log level. Possible values include: 'LogLevelOff', 'LogLevelVerbose', 'LogLevelInformation', 'LogLevelWarning', 'LogLevelError' 1384 Level LogLevel `json:"level,omitempty"` 1385 // SasURL - SAS url to a azure blob container with read/write/list/delete permissions 1386 SasURL *string `json:"sasUrl,omitempty"` 1387 // RetentionInDays - Retention in days. 1388 // Remove blobs older than X days. 1389 // 0 or lower means no retention. 1390 RetentionInDays *int32 `json:"retentionInDays,omitempty"` 1391} 1392 1393// AzureBlobStorageHTTPLogsConfig http logs to azure blob storage configuration 1394type AzureBlobStorageHTTPLogsConfig struct { 1395 // SasURL - SAS url to a azure blob container with read/write/list/delete permissions 1396 SasURL *string `json:"sasUrl,omitempty"` 1397 // RetentionInDays - Retention in days. 1398 // Remove blobs older than X days. 1399 // 0 or lower means no retention. 1400 RetentionInDays *int32 `json:"retentionInDays,omitempty"` 1401 // Enabled - Enabled 1402 Enabled *bool `json:"enabled,omitempty"` 1403} 1404 1405// AzureTableStorageApplicationLogsConfig application logs to azure table storage configuration 1406type AzureTableStorageApplicationLogsConfig struct { 1407 // Level - Log level. Possible values include: 'LogLevelOff', 'LogLevelVerbose', 'LogLevelInformation', 'LogLevelWarning', 'LogLevelError' 1408 Level LogLevel `json:"level,omitempty"` 1409 // SasURL - SAS url to an azure table with add/query/delete permissions 1410 SasURL *string `json:"sasUrl,omitempty"` 1411} 1412 1413// BackendServiceDefinition API definitions with backend urls 1414type BackendServiceDefinition struct { 1415 *BackendServiceDefinitionProperties `json:"properties,omitempty"` 1416 // ID - Resource Id 1417 ID *string `json:"id,omitempty"` 1418 // Name - Resource Name 1419 Name *string `json:"name,omitempty"` 1420 // Kind - Kind of resource 1421 Kind *string `json:"kind,omitempty"` 1422 // Location - Resource Location 1423 Location *string `json:"location,omitempty"` 1424 // Type - Resource type 1425 Type *string `json:"type,omitempty"` 1426 // Tags - Resource tags 1427 Tags map[string]*string `json:"tags"` 1428} 1429 1430// MarshalJSON is the custom marshaler for BackendServiceDefinition. 1431func (bsd BackendServiceDefinition) MarshalJSON() ([]byte, error) { 1432 objectMap := make(map[string]interface{}) 1433 if bsd.BackendServiceDefinitionProperties != nil { 1434 objectMap["properties"] = bsd.BackendServiceDefinitionProperties 1435 } 1436 if bsd.ID != nil { 1437 objectMap["id"] = bsd.ID 1438 } 1439 if bsd.Name != nil { 1440 objectMap["name"] = bsd.Name 1441 } 1442 if bsd.Kind != nil { 1443 objectMap["kind"] = bsd.Kind 1444 } 1445 if bsd.Location != nil { 1446 objectMap["location"] = bsd.Location 1447 } 1448 if bsd.Type != nil { 1449 objectMap["type"] = bsd.Type 1450 } 1451 if bsd.Tags != nil { 1452 objectMap["tags"] = bsd.Tags 1453 } 1454 return json.Marshal(objectMap) 1455} 1456 1457// UnmarshalJSON is the custom unmarshaler for BackendServiceDefinition struct. 1458func (bsd *BackendServiceDefinition) UnmarshalJSON(body []byte) error { 1459 var m map[string]*json.RawMessage 1460 err := json.Unmarshal(body, &m) 1461 if err != nil { 1462 return err 1463 } 1464 for k, v := range m { 1465 switch k { 1466 case "properties": 1467 if v != nil { 1468 var backendServiceDefinitionProperties BackendServiceDefinitionProperties 1469 err = json.Unmarshal(*v, &backendServiceDefinitionProperties) 1470 if err != nil { 1471 return err 1472 } 1473 bsd.BackendServiceDefinitionProperties = &backendServiceDefinitionProperties 1474 } 1475 case "id": 1476 if v != nil { 1477 var ID string 1478 err = json.Unmarshal(*v, &ID) 1479 if err != nil { 1480 return err 1481 } 1482 bsd.ID = &ID 1483 } 1484 case "name": 1485 if v != nil { 1486 var name string 1487 err = json.Unmarshal(*v, &name) 1488 if err != nil { 1489 return err 1490 } 1491 bsd.Name = &name 1492 } 1493 case "kind": 1494 if v != nil { 1495 var kind string 1496 err = json.Unmarshal(*v, &kind) 1497 if err != nil { 1498 return err 1499 } 1500 bsd.Kind = &kind 1501 } 1502 case "location": 1503 if v != nil { 1504 var location string 1505 err = json.Unmarshal(*v, &location) 1506 if err != nil { 1507 return err 1508 } 1509 bsd.Location = &location 1510 } 1511 case "type": 1512 if v != nil { 1513 var typeVar string 1514 err = json.Unmarshal(*v, &typeVar) 1515 if err != nil { 1516 return err 1517 } 1518 bsd.Type = &typeVar 1519 } 1520 case "tags": 1521 if v != nil { 1522 var tags map[string]*string 1523 err = json.Unmarshal(*v, &tags) 1524 if err != nil { 1525 return err 1526 } 1527 bsd.Tags = tags 1528 } 1529 } 1530 } 1531 1532 return nil 1533} 1534 1535// BackendServiceDefinitionProperties ... 1536type BackendServiceDefinitionProperties struct { 1537 // ServiceURL - Url from which the swagger payload will be fetched 1538 ServiceURL *string `json:"serviceUrl,omitempty"` 1539 // HostingEnvironmentServiceUrls - Service Urls per Hosting environment 1540 HostingEnvironmentServiceUrls *[]HostingEnvironmentServiceDescriptions `json:"hostingEnvironmentServiceUrls,omitempty"` 1541} 1542 1543// BackupItem backup description 1544type BackupItem struct { 1545 autorest.Response `json:"-"` 1546 *BackupItemProperties `json:"properties,omitempty"` 1547 // ID - Resource Id 1548 ID *string `json:"id,omitempty"` 1549 // Name - Resource Name 1550 Name *string `json:"name,omitempty"` 1551 // Kind - Kind of resource 1552 Kind *string `json:"kind,omitempty"` 1553 // Location - Resource Location 1554 Location *string `json:"location,omitempty"` 1555 // Type - Resource type 1556 Type *string `json:"type,omitempty"` 1557 // Tags - Resource tags 1558 Tags map[string]*string `json:"tags"` 1559} 1560 1561// MarshalJSON is the custom marshaler for BackupItem. 1562func (bi BackupItem) MarshalJSON() ([]byte, error) { 1563 objectMap := make(map[string]interface{}) 1564 if bi.BackupItemProperties != nil { 1565 objectMap["properties"] = bi.BackupItemProperties 1566 } 1567 if bi.ID != nil { 1568 objectMap["id"] = bi.ID 1569 } 1570 if bi.Name != nil { 1571 objectMap["name"] = bi.Name 1572 } 1573 if bi.Kind != nil { 1574 objectMap["kind"] = bi.Kind 1575 } 1576 if bi.Location != nil { 1577 objectMap["location"] = bi.Location 1578 } 1579 if bi.Type != nil { 1580 objectMap["type"] = bi.Type 1581 } 1582 if bi.Tags != nil { 1583 objectMap["tags"] = bi.Tags 1584 } 1585 return json.Marshal(objectMap) 1586} 1587 1588// UnmarshalJSON is the custom unmarshaler for BackupItem struct. 1589func (bi *BackupItem) UnmarshalJSON(body []byte) error { 1590 var m map[string]*json.RawMessage 1591 err := json.Unmarshal(body, &m) 1592 if err != nil { 1593 return err 1594 } 1595 for k, v := range m { 1596 switch k { 1597 case "properties": 1598 if v != nil { 1599 var backupItemProperties BackupItemProperties 1600 err = json.Unmarshal(*v, &backupItemProperties) 1601 if err != nil { 1602 return err 1603 } 1604 bi.BackupItemProperties = &backupItemProperties 1605 } 1606 case "id": 1607 if v != nil { 1608 var ID string 1609 err = json.Unmarshal(*v, &ID) 1610 if err != nil { 1611 return err 1612 } 1613 bi.ID = &ID 1614 } 1615 case "name": 1616 if v != nil { 1617 var name string 1618 err = json.Unmarshal(*v, &name) 1619 if err != nil { 1620 return err 1621 } 1622 bi.Name = &name 1623 } 1624 case "kind": 1625 if v != nil { 1626 var kind string 1627 err = json.Unmarshal(*v, &kind) 1628 if err != nil { 1629 return err 1630 } 1631 bi.Kind = &kind 1632 } 1633 case "location": 1634 if v != nil { 1635 var location string 1636 err = json.Unmarshal(*v, &location) 1637 if err != nil { 1638 return err 1639 } 1640 bi.Location = &location 1641 } 1642 case "type": 1643 if v != nil { 1644 var typeVar string 1645 err = json.Unmarshal(*v, &typeVar) 1646 if err != nil { 1647 return err 1648 } 1649 bi.Type = &typeVar 1650 } 1651 case "tags": 1652 if v != nil { 1653 var tags map[string]*string 1654 err = json.Unmarshal(*v, &tags) 1655 if err != nil { 1656 return err 1657 } 1658 bi.Tags = tags 1659 } 1660 } 1661 } 1662 1663 return nil 1664} 1665 1666// BackupItemCollection collection of Backup Items 1667type BackupItemCollection struct { 1668 autorest.Response `json:"-"` 1669 // Value - Collection of resources 1670 Value *[]BackupItem `json:"value,omitempty"` 1671 // NextLink - Link to next page of resources 1672 NextLink *string `json:"nextLink,omitempty"` 1673} 1674 1675// BackupItemCollectionIterator provides access to a complete listing of BackupItem values. 1676type BackupItemCollectionIterator struct { 1677 i int 1678 page BackupItemCollectionPage 1679} 1680 1681// NextWithContext advances to the next value. If there was an error making 1682// the request the iterator does not advance and the error is returned. 1683func (iter *BackupItemCollectionIterator) NextWithContext(ctx context.Context) (err error) { 1684 if tracing.IsEnabled() { 1685 ctx = tracing.StartSpan(ctx, fqdn+"/BackupItemCollectionIterator.NextWithContext") 1686 defer func() { 1687 sc := -1 1688 if iter.Response().Response.Response != nil { 1689 sc = iter.Response().Response.Response.StatusCode 1690 } 1691 tracing.EndSpan(ctx, sc, err) 1692 }() 1693 } 1694 iter.i++ 1695 if iter.i < len(iter.page.Values()) { 1696 return nil 1697 } 1698 err = iter.page.NextWithContext(ctx) 1699 if err != nil { 1700 iter.i-- 1701 return err 1702 } 1703 iter.i = 0 1704 return nil 1705} 1706 1707// Next advances to the next value. If there was an error making 1708// the request the iterator does not advance and the error is returned. 1709// Deprecated: Use NextWithContext() instead. 1710func (iter *BackupItemCollectionIterator) Next() error { 1711 return iter.NextWithContext(context.Background()) 1712} 1713 1714// NotDone returns true if the enumeration should be started or is not yet complete. 1715func (iter BackupItemCollectionIterator) NotDone() bool { 1716 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1717} 1718 1719// Response returns the raw server response from the last page request. 1720func (iter BackupItemCollectionIterator) Response() BackupItemCollection { 1721 return iter.page.Response() 1722} 1723 1724// Value returns the current value or a zero-initialized value if the 1725// iterator has advanced beyond the end of the collection. 1726func (iter BackupItemCollectionIterator) Value() BackupItem { 1727 if !iter.page.NotDone() { 1728 return BackupItem{} 1729 } 1730 return iter.page.Values()[iter.i] 1731} 1732 1733// Creates a new instance of the BackupItemCollectionIterator type. 1734func NewBackupItemCollectionIterator(page BackupItemCollectionPage) BackupItemCollectionIterator { 1735 return BackupItemCollectionIterator{page: page} 1736} 1737 1738// IsEmpty returns true if the ListResult contains no values. 1739func (bic BackupItemCollection) IsEmpty() bool { 1740 return bic.Value == nil || len(*bic.Value) == 0 1741} 1742 1743// backupItemCollectionPreparer prepares a request to retrieve the next set of results. 1744// It returns nil if no more results exist. 1745func (bic BackupItemCollection) backupItemCollectionPreparer(ctx context.Context) (*http.Request, error) { 1746 if bic.NextLink == nil || len(to.String(bic.NextLink)) < 1 { 1747 return nil, nil 1748 } 1749 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1750 autorest.AsJSON(), 1751 autorest.AsGet(), 1752 autorest.WithBaseURL(to.String(bic.NextLink))) 1753} 1754 1755// BackupItemCollectionPage contains a page of BackupItem values. 1756type BackupItemCollectionPage struct { 1757 fn func(context.Context, BackupItemCollection) (BackupItemCollection, error) 1758 bic BackupItemCollection 1759} 1760 1761// NextWithContext advances to the next page of values. If there was an error making 1762// the request the page does not advance and the error is returned. 1763func (page *BackupItemCollectionPage) NextWithContext(ctx context.Context) (err error) { 1764 if tracing.IsEnabled() { 1765 ctx = tracing.StartSpan(ctx, fqdn+"/BackupItemCollectionPage.NextWithContext") 1766 defer func() { 1767 sc := -1 1768 if page.Response().Response.Response != nil { 1769 sc = page.Response().Response.Response.StatusCode 1770 } 1771 tracing.EndSpan(ctx, sc, err) 1772 }() 1773 } 1774 next, err := page.fn(ctx, page.bic) 1775 if err != nil { 1776 return err 1777 } 1778 page.bic = next 1779 return nil 1780} 1781 1782// Next advances to the next page of values. If there was an error making 1783// the request the page does not advance and the error is returned. 1784// Deprecated: Use NextWithContext() instead. 1785func (page *BackupItemCollectionPage) Next() error { 1786 return page.NextWithContext(context.Background()) 1787} 1788 1789// NotDone returns true if the page enumeration should be started or is not yet complete. 1790func (page BackupItemCollectionPage) NotDone() bool { 1791 return !page.bic.IsEmpty() 1792} 1793 1794// Response returns the raw server response from the last page request. 1795func (page BackupItemCollectionPage) Response() BackupItemCollection { 1796 return page.bic 1797} 1798 1799// Values returns the slice of values for the current page or nil if there are no values. 1800func (page BackupItemCollectionPage) Values() []BackupItem { 1801 if page.bic.IsEmpty() { 1802 return nil 1803 } 1804 return *page.bic.Value 1805} 1806 1807// Creates a new instance of the BackupItemCollectionPage type. 1808func NewBackupItemCollectionPage(getNextPage func(context.Context, BackupItemCollection) (BackupItemCollection, error)) BackupItemCollectionPage { 1809 return BackupItemCollectionPage{fn: getNextPage} 1810} 1811 1812// BackupItemProperties ... 1813type BackupItemProperties struct { 1814 // ID - Id of the backup. 1815 ID *int32 `json:"id,omitempty"` 1816 // StorageAccountURL - SAS URL for the storage account container which contains this backup 1817 StorageAccountURL *string `json:"storageAccountUrl,omitempty"` 1818 // BlobName - Name of the blob which contains data for this backup 1819 BlobName *string `json:"blobName,omitempty"` 1820 // Name - Name of this backup 1821 Name *string `json:"name,omitempty"` 1822 // Status - Backup status. Possible values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created', 'Skipped', 'PartiallySucceeded', 'DeleteInProgress', 'DeleteFailed', 'Deleted' 1823 Status BackupItemStatus `json:"status,omitempty"` 1824 // SizeInBytes - Size of the backup in bytes 1825 SizeInBytes *int64 `json:"sizeInBytes,omitempty"` 1826 // Created - Timestamp of the backup creation 1827 Created *date.Time `json:"created,omitempty"` 1828 // Log - Details regarding this backup. Might contain an error message. 1829 Log *string `json:"log,omitempty"` 1830 // Databases - List of databases included in the backup 1831 Databases *[]DatabaseBackupSetting `json:"databases,omitempty"` 1832 // Scheduled - True if this backup has been created due to a schedule being triggered. 1833 Scheduled *bool `json:"scheduled,omitempty"` 1834 // LastRestoreTimeStamp - Timestamp of a last restore operation which used this backup. 1835 LastRestoreTimeStamp *date.Time `json:"lastRestoreTimeStamp,omitempty"` 1836 // FinishedTimeStamp - Timestamp when this backup finished. 1837 FinishedTimeStamp *date.Time `json:"finishedTimeStamp,omitempty"` 1838 // CorrelationID - Unique correlation identifier. Please use this along with the timestamp while communicating with Azure support. 1839 CorrelationID *string `json:"correlationId,omitempty"` 1840 // WebsiteSizeInBytes - Size of the original web app which has been backed up 1841 WebsiteSizeInBytes *int64 `json:"websiteSizeInBytes,omitempty"` 1842} 1843 1844// BackupRequest description of a backup which will be performed 1845type BackupRequest struct { 1846 autorest.Response `json:"-"` 1847 *BackupRequestProperties `json:"properties,omitempty"` 1848 // ID - Resource Id 1849 ID *string `json:"id,omitempty"` 1850 // Name - Resource Name 1851 Name *string `json:"name,omitempty"` 1852 // Kind - Kind of resource 1853 Kind *string `json:"kind,omitempty"` 1854 // Location - Resource Location 1855 Location *string `json:"location,omitempty"` 1856 // Type - Resource type 1857 Type *string `json:"type,omitempty"` 1858 // Tags - Resource tags 1859 Tags map[string]*string `json:"tags"` 1860} 1861 1862// MarshalJSON is the custom marshaler for BackupRequest. 1863func (br BackupRequest) MarshalJSON() ([]byte, error) { 1864 objectMap := make(map[string]interface{}) 1865 if br.BackupRequestProperties != nil { 1866 objectMap["properties"] = br.BackupRequestProperties 1867 } 1868 if br.ID != nil { 1869 objectMap["id"] = br.ID 1870 } 1871 if br.Name != nil { 1872 objectMap["name"] = br.Name 1873 } 1874 if br.Kind != nil { 1875 objectMap["kind"] = br.Kind 1876 } 1877 if br.Location != nil { 1878 objectMap["location"] = br.Location 1879 } 1880 if br.Type != nil { 1881 objectMap["type"] = br.Type 1882 } 1883 if br.Tags != nil { 1884 objectMap["tags"] = br.Tags 1885 } 1886 return json.Marshal(objectMap) 1887} 1888 1889// UnmarshalJSON is the custom unmarshaler for BackupRequest struct. 1890func (br *BackupRequest) UnmarshalJSON(body []byte) error { 1891 var m map[string]*json.RawMessage 1892 err := json.Unmarshal(body, &m) 1893 if err != nil { 1894 return err 1895 } 1896 for k, v := range m { 1897 switch k { 1898 case "properties": 1899 if v != nil { 1900 var backupRequestProperties BackupRequestProperties 1901 err = json.Unmarshal(*v, &backupRequestProperties) 1902 if err != nil { 1903 return err 1904 } 1905 br.BackupRequestProperties = &backupRequestProperties 1906 } 1907 case "id": 1908 if v != nil { 1909 var ID string 1910 err = json.Unmarshal(*v, &ID) 1911 if err != nil { 1912 return err 1913 } 1914 br.ID = &ID 1915 } 1916 case "name": 1917 if v != nil { 1918 var name string 1919 err = json.Unmarshal(*v, &name) 1920 if err != nil { 1921 return err 1922 } 1923 br.Name = &name 1924 } 1925 case "kind": 1926 if v != nil { 1927 var kind string 1928 err = json.Unmarshal(*v, &kind) 1929 if err != nil { 1930 return err 1931 } 1932 br.Kind = &kind 1933 } 1934 case "location": 1935 if v != nil { 1936 var location string 1937 err = json.Unmarshal(*v, &location) 1938 if err != nil { 1939 return err 1940 } 1941 br.Location = &location 1942 } 1943 case "type": 1944 if v != nil { 1945 var typeVar string 1946 err = json.Unmarshal(*v, &typeVar) 1947 if err != nil { 1948 return err 1949 } 1950 br.Type = &typeVar 1951 } 1952 case "tags": 1953 if v != nil { 1954 var tags map[string]*string 1955 err = json.Unmarshal(*v, &tags) 1956 if err != nil { 1957 return err 1958 } 1959 br.Tags = tags 1960 } 1961 } 1962 } 1963 1964 return nil 1965} 1966 1967// BackupRequestProperties ... 1968type BackupRequestProperties struct { 1969 // Name - Name of the backup 1970 Name *string `json:"name,omitempty"` 1971 // Enabled - True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled 1972 Enabled *bool `json:"enabled,omitempty"` 1973 // StorageAccountURL - SAS URL to the container 1974 StorageAccountURL *string `json:"storageAccountUrl,omitempty"` 1975 // BackupSchedule - Schedule for the backup if it is executed periodically 1976 BackupSchedule *BackupSchedule `json:"backupSchedule,omitempty"` 1977 // Databases - Databases included in the backup 1978 Databases *[]DatabaseBackupSetting `json:"databases,omitempty"` 1979 // Type - Type of the backup. Possible values include: 'Default', 'Clone', 'Relocation' 1980 Type BackupRestoreOperationType `json:"type,omitempty"` 1981} 1982 1983// BackupSchedule description of a backup schedule. Describes how often should be the backup performed and 1984// what should be the retention policy. 1985type BackupSchedule struct { 1986 // 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) 1987 FrequencyInterval *int32 `json:"frequencyInterval,omitempty"` 1988 // 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' 1989 FrequencyUnit FrequencyUnit `json:"frequencyUnit,omitempty"` 1990 // KeepAtLeastOneBackup - True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise. 1991 KeepAtLeastOneBackup *bool `json:"keepAtLeastOneBackup,omitempty"` 1992 // RetentionPeriodInDays - After how many days backups should be deleted 1993 RetentionPeriodInDays *int32 `json:"retentionPeriodInDays,omitempty"` 1994 // StartTime - When the schedule should start working 1995 StartTime *date.Time `json:"startTime,omitempty"` 1996 // LastExecutionTime - The last time when this schedule was triggered 1997 LastExecutionTime *date.Time `json:"lastExecutionTime,omitempty"` 1998} 1999 2000// Certificate app certificate 2001type Certificate struct { 2002 autorest.Response `json:"-"` 2003 *CertificateProperties `json:"properties,omitempty"` 2004 // ID - Resource Id 2005 ID *string `json:"id,omitempty"` 2006 // Name - Resource Name 2007 Name *string `json:"name,omitempty"` 2008 // Kind - Kind of resource 2009 Kind *string `json:"kind,omitempty"` 2010 // Location - Resource Location 2011 Location *string `json:"location,omitempty"` 2012 // Type - Resource type 2013 Type *string `json:"type,omitempty"` 2014 // Tags - Resource tags 2015 Tags map[string]*string `json:"tags"` 2016} 2017 2018// MarshalJSON is the custom marshaler for Certificate. 2019func (c Certificate) MarshalJSON() ([]byte, error) { 2020 objectMap := make(map[string]interface{}) 2021 if c.CertificateProperties != nil { 2022 objectMap["properties"] = c.CertificateProperties 2023 } 2024 if c.ID != nil { 2025 objectMap["id"] = c.ID 2026 } 2027 if c.Name != nil { 2028 objectMap["name"] = c.Name 2029 } 2030 if c.Kind != nil { 2031 objectMap["kind"] = c.Kind 2032 } 2033 if c.Location != nil { 2034 objectMap["location"] = c.Location 2035 } 2036 if c.Type != nil { 2037 objectMap["type"] = c.Type 2038 } 2039 if c.Tags != nil { 2040 objectMap["tags"] = c.Tags 2041 } 2042 return json.Marshal(objectMap) 2043} 2044 2045// UnmarshalJSON is the custom unmarshaler for Certificate struct. 2046func (c *Certificate) UnmarshalJSON(body []byte) error { 2047 var m map[string]*json.RawMessage 2048 err := json.Unmarshal(body, &m) 2049 if err != nil { 2050 return err 2051 } 2052 for k, v := range m { 2053 switch k { 2054 case "properties": 2055 if v != nil { 2056 var certificateProperties CertificateProperties 2057 err = json.Unmarshal(*v, &certificateProperties) 2058 if err != nil { 2059 return err 2060 } 2061 c.CertificateProperties = &certificateProperties 2062 } 2063 case "id": 2064 if v != nil { 2065 var ID string 2066 err = json.Unmarshal(*v, &ID) 2067 if err != nil { 2068 return err 2069 } 2070 c.ID = &ID 2071 } 2072 case "name": 2073 if v != nil { 2074 var name string 2075 err = json.Unmarshal(*v, &name) 2076 if err != nil { 2077 return err 2078 } 2079 c.Name = &name 2080 } 2081 case "kind": 2082 if v != nil { 2083 var kind string 2084 err = json.Unmarshal(*v, &kind) 2085 if err != nil { 2086 return err 2087 } 2088 c.Kind = &kind 2089 } 2090 case "location": 2091 if v != nil { 2092 var location string 2093 err = json.Unmarshal(*v, &location) 2094 if err != nil { 2095 return err 2096 } 2097 c.Location = &location 2098 } 2099 case "type": 2100 if v != nil { 2101 var typeVar string 2102 err = json.Unmarshal(*v, &typeVar) 2103 if err != nil { 2104 return err 2105 } 2106 c.Type = &typeVar 2107 } 2108 case "tags": 2109 if v != nil { 2110 var tags map[string]*string 2111 err = json.Unmarshal(*v, &tags) 2112 if err != nil { 2113 return err 2114 } 2115 c.Tags = tags 2116 } 2117 } 2118 } 2119 2120 return nil 2121} 2122 2123// CertificateCollection collection of certificates 2124type CertificateCollection struct { 2125 autorest.Response `json:"-"` 2126 // Value - Collection of resources 2127 Value *[]Certificate `json:"value,omitempty"` 2128 // NextLink - Link to next page of resources 2129 NextLink *string `json:"nextLink,omitempty"` 2130} 2131 2132// CertificateCollectionIterator provides access to a complete listing of Certificate values. 2133type CertificateCollectionIterator struct { 2134 i int 2135 page CertificateCollectionPage 2136} 2137 2138// NextWithContext advances to the next value. If there was an error making 2139// the request the iterator does not advance and the error is returned. 2140func (iter *CertificateCollectionIterator) NextWithContext(ctx context.Context) (err error) { 2141 if tracing.IsEnabled() { 2142 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateCollectionIterator.NextWithContext") 2143 defer func() { 2144 sc := -1 2145 if iter.Response().Response.Response != nil { 2146 sc = iter.Response().Response.Response.StatusCode 2147 } 2148 tracing.EndSpan(ctx, sc, err) 2149 }() 2150 } 2151 iter.i++ 2152 if iter.i < len(iter.page.Values()) { 2153 return nil 2154 } 2155 err = iter.page.NextWithContext(ctx) 2156 if err != nil { 2157 iter.i-- 2158 return err 2159 } 2160 iter.i = 0 2161 return nil 2162} 2163 2164// Next advances to the next value. If there was an error making 2165// the request the iterator does not advance and the error is returned. 2166// Deprecated: Use NextWithContext() instead. 2167func (iter *CertificateCollectionIterator) Next() error { 2168 return iter.NextWithContext(context.Background()) 2169} 2170 2171// NotDone returns true if the enumeration should be started or is not yet complete. 2172func (iter CertificateCollectionIterator) NotDone() bool { 2173 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2174} 2175 2176// Response returns the raw server response from the last page request. 2177func (iter CertificateCollectionIterator) Response() CertificateCollection { 2178 return iter.page.Response() 2179} 2180 2181// Value returns the current value or a zero-initialized value if the 2182// iterator has advanced beyond the end of the collection. 2183func (iter CertificateCollectionIterator) Value() Certificate { 2184 if !iter.page.NotDone() { 2185 return Certificate{} 2186 } 2187 return iter.page.Values()[iter.i] 2188} 2189 2190// Creates a new instance of the CertificateCollectionIterator type. 2191func NewCertificateCollectionIterator(page CertificateCollectionPage) CertificateCollectionIterator { 2192 return CertificateCollectionIterator{page: page} 2193} 2194 2195// IsEmpty returns true if the ListResult contains no values. 2196func (cc CertificateCollection) IsEmpty() bool { 2197 return cc.Value == nil || len(*cc.Value) == 0 2198} 2199 2200// certificateCollectionPreparer prepares a request to retrieve the next set of results. 2201// It returns nil if no more results exist. 2202func (cc CertificateCollection) certificateCollectionPreparer(ctx context.Context) (*http.Request, error) { 2203 if cc.NextLink == nil || len(to.String(cc.NextLink)) < 1 { 2204 return nil, nil 2205 } 2206 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2207 autorest.AsJSON(), 2208 autorest.AsGet(), 2209 autorest.WithBaseURL(to.String(cc.NextLink))) 2210} 2211 2212// CertificateCollectionPage contains a page of Certificate values. 2213type CertificateCollectionPage struct { 2214 fn func(context.Context, CertificateCollection) (CertificateCollection, error) 2215 cc CertificateCollection 2216} 2217 2218// NextWithContext advances to the next page of values. If there was an error making 2219// the request the page does not advance and the error is returned. 2220func (page *CertificateCollectionPage) NextWithContext(ctx context.Context) (err error) { 2221 if tracing.IsEnabled() { 2222 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateCollectionPage.NextWithContext") 2223 defer func() { 2224 sc := -1 2225 if page.Response().Response.Response != nil { 2226 sc = page.Response().Response.Response.StatusCode 2227 } 2228 tracing.EndSpan(ctx, sc, err) 2229 }() 2230 } 2231 next, err := page.fn(ctx, page.cc) 2232 if err != nil { 2233 return err 2234 } 2235 page.cc = next 2236 return nil 2237} 2238 2239// Next advances to the next page of values. If there was an error making 2240// the request the page does not advance and the error is returned. 2241// Deprecated: Use NextWithContext() instead. 2242func (page *CertificateCollectionPage) Next() error { 2243 return page.NextWithContext(context.Background()) 2244} 2245 2246// NotDone returns true if the page enumeration should be started or is not yet complete. 2247func (page CertificateCollectionPage) NotDone() bool { 2248 return !page.cc.IsEmpty() 2249} 2250 2251// Response returns the raw server response from the last page request. 2252func (page CertificateCollectionPage) Response() CertificateCollection { 2253 return page.cc 2254} 2255 2256// Values returns the slice of values for the current page or nil if there are no values. 2257func (page CertificateCollectionPage) Values() []Certificate { 2258 if page.cc.IsEmpty() { 2259 return nil 2260 } 2261 return *page.cc.Value 2262} 2263 2264// Creates a new instance of the CertificateCollectionPage type. 2265func NewCertificateCollectionPage(getNextPage func(context.Context, CertificateCollection) (CertificateCollection, error)) CertificateCollectionPage { 2266 return CertificateCollectionPage{fn: getNextPage} 2267} 2268 2269// CertificateDetails certificate Details 2270type CertificateDetails struct { 2271 *CertificateDetailsProperties `json:"properties,omitempty"` 2272 // ID - Resource Id 2273 ID *string `json:"id,omitempty"` 2274 // Name - Resource Name 2275 Name *string `json:"name,omitempty"` 2276 // Kind - Kind of resource 2277 Kind *string `json:"kind,omitempty"` 2278 // Location - Resource Location 2279 Location *string `json:"location,omitempty"` 2280 // Type - Resource type 2281 Type *string `json:"type,omitempty"` 2282 // Tags - Resource tags 2283 Tags map[string]*string `json:"tags"` 2284} 2285 2286// MarshalJSON is the custom marshaler for CertificateDetails. 2287func (cd CertificateDetails) MarshalJSON() ([]byte, error) { 2288 objectMap := make(map[string]interface{}) 2289 if cd.CertificateDetailsProperties != nil { 2290 objectMap["properties"] = cd.CertificateDetailsProperties 2291 } 2292 if cd.ID != nil { 2293 objectMap["id"] = cd.ID 2294 } 2295 if cd.Name != nil { 2296 objectMap["name"] = cd.Name 2297 } 2298 if cd.Kind != nil { 2299 objectMap["kind"] = cd.Kind 2300 } 2301 if cd.Location != nil { 2302 objectMap["location"] = cd.Location 2303 } 2304 if cd.Type != nil { 2305 objectMap["type"] = cd.Type 2306 } 2307 if cd.Tags != nil { 2308 objectMap["tags"] = cd.Tags 2309 } 2310 return json.Marshal(objectMap) 2311} 2312 2313// UnmarshalJSON is the custom unmarshaler for CertificateDetails struct. 2314func (cd *CertificateDetails) UnmarshalJSON(body []byte) error { 2315 var m map[string]*json.RawMessage 2316 err := json.Unmarshal(body, &m) 2317 if err != nil { 2318 return err 2319 } 2320 for k, v := range m { 2321 switch k { 2322 case "properties": 2323 if v != nil { 2324 var certificateDetailsProperties CertificateDetailsProperties 2325 err = json.Unmarshal(*v, &certificateDetailsProperties) 2326 if err != nil { 2327 return err 2328 } 2329 cd.CertificateDetailsProperties = &certificateDetailsProperties 2330 } 2331 case "id": 2332 if v != nil { 2333 var ID string 2334 err = json.Unmarshal(*v, &ID) 2335 if err != nil { 2336 return err 2337 } 2338 cd.ID = &ID 2339 } 2340 case "name": 2341 if v != nil { 2342 var name string 2343 err = json.Unmarshal(*v, &name) 2344 if err != nil { 2345 return err 2346 } 2347 cd.Name = &name 2348 } 2349 case "kind": 2350 if v != nil { 2351 var kind string 2352 err = json.Unmarshal(*v, &kind) 2353 if err != nil { 2354 return err 2355 } 2356 cd.Kind = &kind 2357 } 2358 case "location": 2359 if v != nil { 2360 var location string 2361 err = json.Unmarshal(*v, &location) 2362 if err != nil { 2363 return err 2364 } 2365 cd.Location = &location 2366 } 2367 case "type": 2368 if v != nil { 2369 var typeVar string 2370 err = json.Unmarshal(*v, &typeVar) 2371 if err != nil { 2372 return err 2373 } 2374 cd.Type = &typeVar 2375 } 2376 case "tags": 2377 if v != nil { 2378 var tags map[string]*string 2379 err = json.Unmarshal(*v, &tags) 2380 if err != nil { 2381 return err 2382 } 2383 cd.Tags = tags 2384 } 2385 } 2386 } 2387 2388 return nil 2389} 2390 2391// CertificateDetailsProperties ... 2392type CertificateDetailsProperties struct { 2393 // Version - Version 2394 Version *int32 `json:"version,omitempty"` 2395 // SerialNumber - Serial Number 2396 SerialNumber *string `json:"serialNumber,omitempty"` 2397 // Thumbprint - Thumbprint 2398 Thumbprint *string `json:"thumbprint,omitempty"` 2399 // Subject - Subject 2400 Subject *string `json:"subject,omitempty"` 2401 // NotBefore - Valid from 2402 NotBefore *date.Time `json:"notBefore,omitempty"` 2403 // NotAfter - Valid to 2404 NotAfter *date.Time `json:"notAfter,omitempty"` 2405 // SignatureAlgorithm - Signature Algorithm 2406 SignatureAlgorithm *string `json:"signatureAlgorithm,omitempty"` 2407 // Issuer - Issuer 2408 Issuer *string `json:"issuer,omitempty"` 2409 // RawData - Raw certificate data 2410 RawData *string `json:"rawData,omitempty"` 2411} 2412 2413// CertificateEmail certificate Email 2414type CertificateEmail struct { 2415 *CertificateEmailProperties `json:"properties,omitempty"` 2416 // ID - Resource Id 2417 ID *string `json:"id,omitempty"` 2418 // Name - Resource Name 2419 Name *string `json:"name,omitempty"` 2420 // Kind - Kind of resource 2421 Kind *string `json:"kind,omitempty"` 2422 // Location - Resource Location 2423 Location *string `json:"location,omitempty"` 2424 // Type - Resource type 2425 Type *string `json:"type,omitempty"` 2426 // Tags - Resource tags 2427 Tags map[string]*string `json:"tags"` 2428} 2429 2430// MarshalJSON is the custom marshaler for CertificateEmail. 2431func (ce CertificateEmail) MarshalJSON() ([]byte, error) { 2432 objectMap := make(map[string]interface{}) 2433 if ce.CertificateEmailProperties != nil { 2434 objectMap["properties"] = ce.CertificateEmailProperties 2435 } 2436 if ce.ID != nil { 2437 objectMap["id"] = ce.ID 2438 } 2439 if ce.Name != nil { 2440 objectMap["name"] = ce.Name 2441 } 2442 if ce.Kind != nil { 2443 objectMap["kind"] = ce.Kind 2444 } 2445 if ce.Location != nil { 2446 objectMap["location"] = ce.Location 2447 } 2448 if ce.Type != nil { 2449 objectMap["type"] = ce.Type 2450 } 2451 if ce.Tags != nil { 2452 objectMap["tags"] = ce.Tags 2453 } 2454 return json.Marshal(objectMap) 2455} 2456 2457// UnmarshalJSON is the custom unmarshaler for CertificateEmail struct. 2458func (ce *CertificateEmail) UnmarshalJSON(body []byte) error { 2459 var m map[string]*json.RawMessage 2460 err := json.Unmarshal(body, &m) 2461 if err != nil { 2462 return err 2463 } 2464 for k, v := range m { 2465 switch k { 2466 case "properties": 2467 if v != nil { 2468 var certificateEmailProperties CertificateEmailProperties 2469 err = json.Unmarshal(*v, &certificateEmailProperties) 2470 if err != nil { 2471 return err 2472 } 2473 ce.CertificateEmailProperties = &certificateEmailProperties 2474 } 2475 case "id": 2476 if v != nil { 2477 var ID string 2478 err = json.Unmarshal(*v, &ID) 2479 if err != nil { 2480 return err 2481 } 2482 ce.ID = &ID 2483 } 2484 case "name": 2485 if v != nil { 2486 var name string 2487 err = json.Unmarshal(*v, &name) 2488 if err != nil { 2489 return err 2490 } 2491 ce.Name = &name 2492 } 2493 case "kind": 2494 if v != nil { 2495 var kind string 2496 err = json.Unmarshal(*v, &kind) 2497 if err != nil { 2498 return err 2499 } 2500 ce.Kind = &kind 2501 } 2502 case "location": 2503 if v != nil { 2504 var location string 2505 err = json.Unmarshal(*v, &location) 2506 if err != nil { 2507 return err 2508 } 2509 ce.Location = &location 2510 } 2511 case "type": 2512 if v != nil { 2513 var typeVar string 2514 err = json.Unmarshal(*v, &typeVar) 2515 if err != nil { 2516 return err 2517 } 2518 ce.Type = &typeVar 2519 } 2520 case "tags": 2521 if v != nil { 2522 var tags map[string]*string 2523 err = json.Unmarshal(*v, &tags) 2524 if err != nil { 2525 return err 2526 } 2527 ce.Tags = tags 2528 } 2529 } 2530 } 2531 2532 return nil 2533} 2534 2535// CertificateEmailProperties ... 2536type CertificateEmailProperties struct { 2537 // EmailID - Email id 2538 EmailID *string `json:"emailId,omitempty"` 2539 // TimeStamp - Time stamp 2540 TimeStamp *date.Time `json:"timeStamp,omitempty"` 2541} 2542 2543// CertificateOrder certificate purchase order 2544type CertificateOrder struct { 2545 autorest.Response `json:"-"` 2546 *CertificateOrderProperties `json:"properties,omitempty"` 2547 // ID - Resource Id 2548 ID *string `json:"id,omitempty"` 2549 // Name - Resource Name 2550 Name *string `json:"name,omitempty"` 2551 // Kind - Kind of resource 2552 Kind *string `json:"kind,omitempty"` 2553 // Location - Resource Location 2554 Location *string `json:"location,omitempty"` 2555 // Type - Resource type 2556 Type *string `json:"type,omitempty"` 2557 // Tags - Resource tags 2558 Tags map[string]*string `json:"tags"` 2559} 2560 2561// MarshalJSON is the custom marshaler for CertificateOrder. 2562func (co CertificateOrder) MarshalJSON() ([]byte, error) { 2563 objectMap := make(map[string]interface{}) 2564 if co.CertificateOrderProperties != nil { 2565 objectMap["properties"] = co.CertificateOrderProperties 2566 } 2567 if co.ID != nil { 2568 objectMap["id"] = co.ID 2569 } 2570 if co.Name != nil { 2571 objectMap["name"] = co.Name 2572 } 2573 if co.Kind != nil { 2574 objectMap["kind"] = co.Kind 2575 } 2576 if co.Location != nil { 2577 objectMap["location"] = co.Location 2578 } 2579 if co.Type != nil { 2580 objectMap["type"] = co.Type 2581 } 2582 if co.Tags != nil { 2583 objectMap["tags"] = co.Tags 2584 } 2585 return json.Marshal(objectMap) 2586} 2587 2588// UnmarshalJSON is the custom unmarshaler for CertificateOrder struct. 2589func (co *CertificateOrder) UnmarshalJSON(body []byte) error { 2590 var m map[string]*json.RawMessage 2591 err := json.Unmarshal(body, &m) 2592 if err != nil { 2593 return err 2594 } 2595 for k, v := range m { 2596 switch k { 2597 case "properties": 2598 if v != nil { 2599 var certificateOrderProperties CertificateOrderProperties 2600 err = json.Unmarshal(*v, &certificateOrderProperties) 2601 if err != nil { 2602 return err 2603 } 2604 co.CertificateOrderProperties = &certificateOrderProperties 2605 } 2606 case "id": 2607 if v != nil { 2608 var ID string 2609 err = json.Unmarshal(*v, &ID) 2610 if err != nil { 2611 return err 2612 } 2613 co.ID = &ID 2614 } 2615 case "name": 2616 if v != nil { 2617 var name string 2618 err = json.Unmarshal(*v, &name) 2619 if err != nil { 2620 return err 2621 } 2622 co.Name = &name 2623 } 2624 case "kind": 2625 if v != nil { 2626 var kind string 2627 err = json.Unmarshal(*v, &kind) 2628 if err != nil { 2629 return err 2630 } 2631 co.Kind = &kind 2632 } 2633 case "location": 2634 if v != nil { 2635 var location string 2636 err = json.Unmarshal(*v, &location) 2637 if err != nil { 2638 return err 2639 } 2640 co.Location = &location 2641 } 2642 case "type": 2643 if v != nil { 2644 var typeVar string 2645 err = json.Unmarshal(*v, &typeVar) 2646 if err != nil { 2647 return err 2648 } 2649 co.Type = &typeVar 2650 } 2651 case "tags": 2652 if v != nil { 2653 var tags map[string]*string 2654 err = json.Unmarshal(*v, &tags) 2655 if err != nil { 2656 return err 2657 } 2658 co.Tags = tags 2659 } 2660 } 2661 } 2662 2663 return nil 2664} 2665 2666// CertificateOrderAction represents a certificate action 2667type CertificateOrderAction struct { 2668 *CertificateOrderActionProperties `json:"properties,omitempty"` 2669 // ID - Resource Id 2670 ID *string `json:"id,omitempty"` 2671 // Name - Resource Name 2672 Name *string `json:"name,omitempty"` 2673 // Kind - Kind of resource 2674 Kind *string `json:"kind,omitempty"` 2675 // Location - Resource Location 2676 Location *string `json:"location,omitempty"` 2677 // Type - Resource type 2678 Type *string `json:"type,omitempty"` 2679 // Tags - Resource tags 2680 Tags map[string]*string `json:"tags"` 2681} 2682 2683// MarshalJSON is the custom marshaler for CertificateOrderAction. 2684func (coa CertificateOrderAction) MarshalJSON() ([]byte, error) { 2685 objectMap := make(map[string]interface{}) 2686 if coa.CertificateOrderActionProperties != nil { 2687 objectMap["properties"] = coa.CertificateOrderActionProperties 2688 } 2689 if coa.ID != nil { 2690 objectMap["id"] = coa.ID 2691 } 2692 if coa.Name != nil { 2693 objectMap["name"] = coa.Name 2694 } 2695 if coa.Kind != nil { 2696 objectMap["kind"] = coa.Kind 2697 } 2698 if coa.Location != nil { 2699 objectMap["location"] = coa.Location 2700 } 2701 if coa.Type != nil { 2702 objectMap["type"] = coa.Type 2703 } 2704 if coa.Tags != nil { 2705 objectMap["tags"] = coa.Tags 2706 } 2707 return json.Marshal(objectMap) 2708} 2709 2710// UnmarshalJSON is the custom unmarshaler for CertificateOrderAction struct. 2711func (coa *CertificateOrderAction) UnmarshalJSON(body []byte) error { 2712 var m map[string]*json.RawMessage 2713 err := json.Unmarshal(body, &m) 2714 if err != nil { 2715 return err 2716 } 2717 for k, v := range m { 2718 switch k { 2719 case "properties": 2720 if v != nil { 2721 var certificateOrderActionProperties CertificateOrderActionProperties 2722 err = json.Unmarshal(*v, &certificateOrderActionProperties) 2723 if err != nil { 2724 return err 2725 } 2726 coa.CertificateOrderActionProperties = &certificateOrderActionProperties 2727 } 2728 case "id": 2729 if v != nil { 2730 var ID string 2731 err = json.Unmarshal(*v, &ID) 2732 if err != nil { 2733 return err 2734 } 2735 coa.ID = &ID 2736 } 2737 case "name": 2738 if v != nil { 2739 var name string 2740 err = json.Unmarshal(*v, &name) 2741 if err != nil { 2742 return err 2743 } 2744 coa.Name = &name 2745 } 2746 case "kind": 2747 if v != nil { 2748 var kind string 2749 err = json.Unmarshal(*v, &kind) 2750 if err != nil { 2751 return err 2752 } 2753 coa.Kind = &kind 2754 } 2755 case "location": 2756 if v != nil { 2757 var location string 2758 err = json.Unmarshal(*v, &location) 2759 if err != nil { 2760 return err 2761 } 2762 coa.Location = &location 2763 } 2764 case "type": 2765 if v != nil { 2766 var typeVar string 2767 err = json.Unmarshal(*v, &typeVar) 2768 if err != nil { 2769 return err 2770 } 2771 coa.Type = &typeVar 2772 } 2773 case "tags": 2774 if v != nil { 2775 var tags map[string]*string 2776 err = json.Unmarshal(*v, &tags) 2777 if err != nil { 2778 return err 2779 } 2780 coa.Tags = tags 2781 } 2782 } 2783 } 2784 2785 return nil 2786} 2787 2788// CertificateOrderActionProperties ... 2789type CertificateOrderActionProperties struct { 2790 // Type - Type. Possible values include: 'CertificateIssued', 'CertificateOrderCanceled', 'CertificateOrderCreated', 'CertificateRevoked', 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange', 'OrgValidationComplete', 'SanDrop' 2791 Type CertificateOrderActionType `json:"type,omitempty"` 2792 // CreatedAt - Time at which the certificate action was performed 2793 CreatedAt *date.Time `json:"createdAt,omitempty"` 2794} 2795 2796// CertificateOrderCertificate class representing the Key Vault container for certificate purchased through 2797// Azure 2798type CertificateOrderCertificate struct { 2799 autorest.Response `json:"-"` 2800 *CertificateOrderCertificateProperties `json:"properties,omitempty"` 2801 // ID - Resource Id 2802 ID *string `json:"id,omitempty"` 2803 // Name - Resource Name 2804 Name *string `json:"name,omitempty"` 2805 // Kind - Kind of resource 2806 Kind *string `json:"kind,omitempty"` 2807 // Location - Resource Location 2808 Location *string `json:"location,omitempty"` 2809 // Type - Resource type 2810 Type *string `json:"type,omitempty"` 2811 // Tags - Resource tags 2812 Tags map[string]*string `json:"tags"` 2813} 2814 2815// MarshalJSON is the custom marshaler for CertificateOrderCertificate. 2816func (coc CertificateOrderCertificate) MarshalJSON() ([]byte, error) { 2817 objectMap := make(map[string]interface{}) 2818 if coc.CertificateOrderCertificateProperties != nil { 2819 objectMap["properties"] = coc.CertificateOrderCertificateProperties 2820 } 2821 if coc.ID != nil { 2822 objectMap["id"] = coc.ID 2823 } 2824 if coc.Name != nil { 2825 objectMap["name"] = coc.Name 2826 } 2827 if coc.Kind != nil { 2828 objectMap["kind"] = coc.Kind 2829 } 2830 if coc.Location != nil { 2831 objectMap["location"] = coc.Location 2832 } 2833 if coc.Type != nil { 2834 objectMap["type"] = coc.Type 2835 } 2836 if coc.Tags != nil { 2837 objectMap["tags"] = coc.Tags 2838 } 2839 return json.Marshal(objectMap) 2840} 2841 2842// UnmarshalJSON is the custom unmarshaler for CertificateOrderCertificate struct. 2843func (coc *CertificateOrderCertificate) UnmarshalJSON(body []byte) error { 2844 var m map[string]*json.RawMessage 2845 err := json.Unmarshal(body, &m) 2846 if err != nil { 2847 return err 2848 } 2849 for k, v := range m { 2850 switch k { 2851 case "properties": 2852 if v != nil { 2853 var certificateOrderCertificateProperties CertificateOrderCertificateProperties 2854 err = json.Unmarshal(*v, &certificateOrderCertificateProperties) 2855 if err != nil { 2856 return err 2857 } 2858 coc.CertificateOrderCertificateProperties = &certificateOrderCertificateProperties 2859 } 2860 case "id": 2861 if v != nil { 2862 var ID string 2863 err = json.Unmarshal(*v, &ID) 2864 if err != nil { 2865 return err 2866 } 2867 coc.ID = &ID 2868 } 2869 case "name": 2870 if v != nil { 2871 var name string 2872 err = json.Unmarshal(*v, &name) 2873 if err != nil { 2874 return err 2875 } 2876 coc.Name = &name 2877 } 2878 case "kind": 2879 if v != nil { 2880 var kind string 2881 err = json.Unmarshal(*v, &kind) 2882 if err != nil { 2883 return err 2884 } 2885 coc.Kind = &kind 2886 } 2887 case "location": 2888 if v != nil { 2889 var location string 2890 err = json.Unmarshal(*v, &location) 2891 if err != nil { 2892 return err 2893 } 2894 coc.Location = &location 2895 } 2896 case "type": 2897 if v != nil { 2898 var typeVar string 2899 err = json.Unmarshal(*v, &typeVar) 2900 if err != nil { 2901 return err 2902 } 2903 coc.Type = &typeVar 2904 } 2905 case "tags": 2906 if v != nil { 2907 var tags map[string]*string 2908 err = json.Unmarshal(*v, &tags) 2909 if err != nil { 2910 return err 2911 } 2912 coc.Tags = tags 2913 } 2914 } 2915 } 2916 2917 return nil 2918} 2919 2920// CertificateOrderCertificateCollection collection of certificate order certificates 2921type CertificateOrderCertificateCollection struct { 2922 autorest.Response `json:"-"` 2923 // Value - Collection of resources 2924 Value *[]CertificateOrderCertificate `json:"value,omitempty"` 2925 // NextLink - Link to next page of resources 2926 NextLink *string `json:"nextLink,omitempty"` 2927} 2928 2929// CertificateOrderCertificateCollectionIterator provides access to a complete listing of 2930// CertificateOrderCertificate values. 2931type CertificateOrderCertificateCollectionIterator struct { 2932 i int 2933 page CertificateOrderCertificateCollectionPage 2934} 2935 2936// NextWithContext advances to the next value. If there was an error making 2937// the request the iterator does not advance and the error is returned. 2938func (iter *CertificateOrderCertificateCollectionIterator) NextWithContext(ctx context.Context) (err error) { 2939 if tracing.IsEnabled() { 2940 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateOrderCertificateCollectionIterator.NextWithContext") 2941 defer func() { 2942 sc := -1 2943 if iter.Response().Response.Response != nil { 2944 sc = iter.Response().Response.Response.StatusCode 2945 } 2946 tracing.EndSpan(ctx, sc, err) 2947 }() 2948 } 2949 iter.i++ 2950 if iter.i < len(iter.page.Values()) { 2951 return nil 2952 } 2953 err = iter.page.NextWithContext(ctx) 2954 if err != nil { 2955 iter.i-- 2956 return err 2957 } 2958 iter.i = 0 2959 return nil 2960} 2961 2962// Next advances to the next value. If there was an error making 2963// the request the iterator does not advance and the error is returned. 2964// Deprecated: Use NextWithContext() instead. 2965func (iter *CertificateOrderCertificateCollectionIterator) Next() error { 2966 return iter.NextWithContext(context.Background()) 2967} 2968 2969// NotDone returns true if the enumeration should be started or is not yet complete. 2970func (iter CertificateOrderCertificateCollectionIterator) NotDone() bool { 2971 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2972} 2973 2974// Response returns the raw server response from the last page request. 2975func (iter CertificateOrderCertificateCollectionIterator) Response() CertificateOrderCertificateCollection { 2976 return iter.page.Response() 2977} 2978 2979// Value returns the current value or a zero-initialized value if the 2980// iterator has advanced beyond the end of the collection. 2981func (iter CertificateOrderCertificateCollectionIterator) Value() CertificateOrderCertificate { 2982 if !iter.page.NotDone() { 2983 return CertificateOrderCertificate{} 2984 } 2985 return iter.page.Values()[iter.i] 2986} 2987 2988// Creates a new instance of the CertificateOrderCertificateCollectionIterator type. 2989func NewCertificateOrderCertificateCollectionIterator(page CertificateOrderCertificateCollectionPage) CertificateOrderCertificateCollectionIterator { 2990 return CertificateOrderCertificateCollectionIterator{page: page} 2991} 2992 2993// IsEmpty returns true if the ListResult contains no values. 2994func (cocc CertificateOrderCertificateCollection) IsEmpty() bool { 2995 return cocc.Value == nil || len(*cocc.Value) == 0 2996} 2997 2998// certificateOrderCertificateCollectionPreparer prepares a request to retrieve the next set of results. 2999// It returns nil if no more results exist. 3000func (cocc CertificateOrderCertificateCollection) certificateOrderCertificateCollectionPreparer(ctx context.Context) (*http.Request, error) { 3001 if cocc.NextLink == nil || len(to.String(cocc.NextLink)) < 1 { 3002 return nil, nil 3003 } 3004 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3005 autorest.AsJSON(), 3006 autorest.AsGet(), 3007 autorest.WithBaseURL(to.String(cocc.NextLink))) 3008} 3009 3010// CertificateOrderCertificateCollectionPage contains a page of CertificateOrderCertificate values. 3011type CertificateOrderCertificateCollectionPage struct { 3012 fn func(context.Context, CertificateOrderCertificateCollection) (CertificateOrderCertificateCollection, error) 3013 cocc CertificateOrderCertificateCollection 3014} 3015 3016// NextWithContext advances to the next page of values. If there was an error making 3017// the request the page does not advance and the error is returned. 3018func (page *CertificateOrderCertificateCollectionPage) NextWithContext(ctx context.Context) (err error) { 3019 if tracing.IsEnabled() { 3020 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateOrderCertificateCollectionPage.NextWithContext") 3021 defer func() { 3022 sc := -1 3023 if page.Response().Response.Response != nil { 3024 sc = page.Response().Response.Response.StatusCode 3025 } 3026 tracing.EndSpan(ctx, sc, err) 3027 }() 3028 } 3029 next, err := page.fn(ctx, page.cocc) 3030 if err != nil { 3031 return err 3032 } 3033 page.cocc = next 3034 return nil 3035} 3036 3037// Next advances to the next page of values. If there was an error making 3038// the request the page does not advance and the error is returned. 3039// Deprecated: Use NextWithContext() instead. 3040func (page *CertificateOrderCertificateCollectionPage) Next() error { 3041 return page.NextWithContext(context.Background()) 3042} 3043 3044// NotDone returns true if the page enumeration should be started or is not yet complete. 3045func (page CertificateOrderCertificateCollectionPage) NotDone() bool { 3046 return !page.cocc.IsEmpty() 3047} 3048 3049// Response returns the raw server response from the last page request. 3050func (page CertificateOrderCertificateCollectionPage) Response() CertificateOrderCertificateCollection { 3051 return page.cocc 3052} 3053 3054// Values returns the slice of values for the current page or nil if there are no values. 3055func (page CertificateOrderCertificateCollectionPage) Values() []CertificateOrderCertificate { 3056 if page.cocc.IsEmpty() { 3057 return nil 3058 } 3059 return *page.cocc.Value 3060} 3061 3062// Creates a new instance of the CertificateOrderCertificateCollectionPage type. 3063func NewCertificateOrderCertificateCollectionPage(getNextPage func(context.Context, CertificateOrderCertificateCollection) (CertificateOrderCertificateCollection, error)) CertificateOrderCertificateCollectionPage { 3064 return CertificateOrderCertificateCollectionPage{fn: getNextPage} 3065} 3066 3067// CertificateOrderCertificateProperties ... 3068type CertificateOrderCertificateProperties struct { 3069 // KeyVaultID - Key Vault Csm resource Id 3070 KeyVaultID *string `json:"keyVaultId,omitempty"` 3071 // KeyVaultSecretName - Key Vault secret name 3072 KeyVaultSecretName *string `json:"keyVaultSecretName,omitempty"` 3073 // ProvisioningState - Status of the Key Vault secret. Possible values include: 'KeyVaultSecretStatusInitialized', 'KeyVaultSecretStatusWaitingOnCertificateOrder', 'KeyVaultSecretStatusSucceeded', 'KeyVaultSecretStatusCertificateOrderFailed', 'KeyVaultSecretStatusOperationNotPermittedOnKeyVault', 'KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultSecretStatusKeyVaultDoesNotExist', 'KeyVaultSecretStatusKeyVaultSecretDoesNotExist', 'KeyVaultSecretStatusUnknownError', 'KeyVaultSecretStatusUnknown' 3074 ProvisioningState KeyVaultSecretStatus `json:"provisioningState,omitempty"` 3075} 3076 3077// CertificateOrderCollection collection of certificate orders 3078type CertificateOrderCollection struct { 3079 autorest.Response `json:"-"` 3080 // Value - Collection of resources 3081 Value *[]CertificateOrder `json:"value,omitempty"` 3082 // NextLink - Link to next page of resources 3083 NextLink *string `json:"nextLink,omitempty"` 3084} 3085 3086// CertificateOrderCollectionIterator provides access to a complete listing of CertificateOrder values. 3087type CertificateOrderCollectionIterator struct { 3088 i int 3089 page CertificateOrderCollectionPage 3090} 3091 3092// NextWithContext advances to the next value. If there was an error making 3093// the request the iterator does not advance and the error is returned. 3094func (iter *CertificateOrderCollectionIterator) NextWithContext(ctx context.Context) (err error) { 3095 if tracing.IsEnabled() { 3096 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateOrderCollectionIterator.NextWithContext") 3097 defer func() { 3098 sc := -1 3099 if iter.Response().Response.Response != nil { 3100 sc = iter.Response().Response.Response.StatusCode 3101 } 3102 tracing.EndSpan(ctx, sc, err) 3103 }() 3104 } 3105 iter.i++ 3106 if iter.i < len(iter.page.Values()) { 3107 return nil 3108 } 3109 err = iter.page.NextWithContext(ctx) 3110 if err != nil { 3111 iter.i-- 3112 return err 3113 } 3114 iter.i = 0 3115 return nil 3116} 3117 3118// Next advances to the next value. If there was an error making 3119// the request the iterator does not advance and the error is returned. 3120// Deprecated: Use NextWithContext() instead. 3121func (iter *CertificateOrderCollectionIterator) Next() error { 3122 return iter.NextWithContext(context.Background()) 3123} 3124 3125// NotDone returns true if the enumeration should be started or is not yet complete. 3126func (iter CertificateOrderCollectionIterator) NotDone() bool { 3127 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3128} 3129 3130// Response returns the raw server response from the last page request. 3131func (iter CertificateOrderCollectionIterator) Response() CertificateOrderCollection { 3132 return iter.page.Response() 3133} 3134 3135// Value returns the current value or a zero-initialized value if the 3136// iterator has advanced beyond the end of the collection. 3137func (iter CertificateOrderCollectionIterator) Value() CertificateOrder { 3138 if !iter.page.NotDone() { 3139 return CertificateOrder{} 3140 } 3141 return iter.page.Values()[iter.i] 3142} 3143 3144// Creates a new instance of the CertificateOrderCollectionIterator type. 3145func NewCertificateOrderCollectionIterator(page CertificateOrderCollectionPage) CertificateOrderCollectionIterator { 3146 return CertificateOrderCollectionIterator{page: page} 3147} 3148 3149// IsEmpty returns true if the ListResult contains no values. 3150func (coc CertificateOrderCollection) IsEmpty() bool { 3151 return coc.Value == nil || len(*coc.Value) == 0 3152} 3153 3154// certificateOrderCollectionPreparer prepares a request to retrieve the next set of results. 3155// It returns nil if no more results exist. 3156func (coc CertificateOrderCollection) certificateOrderCollectionPreparer(ctx context.Context) (*http.Request, error) { 3157 if coc.NextLink == nil || len(to.String(coc.NextLink)) < 1 { 3158 return nil, nil 3159 } 3160 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3161 autorest.AsJSON(), 3162 autorest.AsGet(), 3163 autorest.WithBaseURL(to.String(coc.NextLink))) 3164} 3165 3166// CertificateOrderCollectionPage contains a page of CertificateOrder values. 3167type CertificateOrderCollectionPage struct { 3168 fn func(context.Context, CertificateOrderCollection) (CertificateOrderCollection, error) 3169 coc CertificateOrderCollection 3170} 3171 3172// NextWithContext advances to the next page of values. If there was an error making 3173// the request the page does not advance and the error is returned. 3174func (page *CertificateOrderCollectionPage) NextWithContext(ctx context.Context) (err error) { 3175 if tracing.IsEnabled() { 3176 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateOrderCollectionPage.NextWithContext") 3177 defer func() { 3178 sc := -1 3179 if page.Response().Response.Response != nil { 3180 sc = page.Response().Response.Response.StatusCode 3181 } 3182 tracing.EndSpan(ctx, sc, err) 3183 }() 3184 } 3185 next, err := page.fn(ctx, page.coc) 3186 if err != nil { 3187 return err 3188 } 3189 page.coc = next 3190 return nil 3191} 3192 3193// Next advances to the next page of values. If there was an error making 3194// the request the page does not advance and the error is returned. 3195// Deprecated: Use NextWithContext() instead. 3196func (page *CertificateOrderCollectionPage) Next() error { 3197 return page.NextWithContext(context.Background()) 3198} 3199 3200// NotDone returns true if the page enumeration should be started or is not yet complete. 3201func (page CertificateOrderCollectionPage) NotDone() bool { 3202 return !page.coc.IsEmpty() 3203} 3204 3205// Response returns the raw server response from the last page request. 3206func (page CertificateOrderCollectionPage) Response() CertificateOrderCollection { 3207 return page.coc 3208} 3209 3210// Values returns the slice of values for the current page or nil if there are no values. 3211func (page CertificateOrderCollectionPage) Values() []CertificateOrder { 3212 if page.coc.IsEmpty() { 3213 return nil 3214 } 3215 return *page.coc.Value 3216} 3217 3218// Creates a new instance of the CertificateOrderCollectionPage type. 3219func NewCertificateOrderCollectionPage(getNextPage func(context.Context, CertificateOrderCollection) (CertificateOrderCollection, error)) CertificateOrderCollectionPage { 3220 return CertificateOrderCollectionPage{fn: getNextPage} 3221} 3222 3223// CertificateOrderProperties ... 3224type CertificateOrderProperties struct { 3225 // Certificates - State of the Key Vault secret 3226 Certificates map[string]*CertificateOrderCertificate `json:"certificates"` 3227 // DistinguishedName - Certificate distinguished name 3228 DistinguishedName *string `json:"distinguishedName,omitempty"` 3229 // DomainVerificationToken - Domain Verification Token 3230 DomainVerificationToken *string `json:"domainVerificationToken,omitempty"` 3231 // ValidityInYears - Duration in years (must be between 1 and 3) 3232 ValidityInYears *int32 `json:"validityInYears,omitempty"` 3233 // KeySize - Certificate Key Size 3234 KeySize *int32 `json:"keySize,omitempty"` 3235 // ProductType - Certificate product type. Possible values include: 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl' 3236 ProductType CertificateProductType `json:"productType,omitempty"` 3237 // AutoRenew - Auto renew 3238 AutoRenew *bool `json:"autoRenew,omitempty"` 3239 // ProvisioningState - Status of certificate order. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' 3240 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 3241 // Status - Current order status. Possible values include: 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted' 3242 Status CertificateOrderStatus `json:"status,omitempty"` 3243 // SignedCertificate - Signed certificate 3244 SignedCertificate *CertificateDetails `json:"signedCertificate,omitempty"` 3245 // Csr - Last CSR that was created for this order 3246 Csr *string `json:"csr,omitempty"` 3247 // Intermediate - Intermediate certificate 3248 Intermediate *CertificateDetails `json:"intermediate,omitempty"` 3249 // Root - Root certificate 3250 Root *CertificateDetails `json:"root,omitempty"` 3251 // SerialNumber - Current serial number of the certificate 3252 SerialNumber *string `json:"serialNumber,omitempty"` 3253 // LastCertificateIssuanceTime - Certificate last issuance time 3254 LastCertificateIssuanceTime *date.Time `json:"lastCertificateIssuanceTime,omitempty"` 3255 // ExpirationTime - Certificate expiration time 3256 ExpirationTime *date.Time `json:"expirationTime,omitempty"` 3257} 3258 3259// MarshalJSON is the custom marshaler for CertificateOrderProperties. 3260func (co CertificateOrderProperties) MarshalJSON() ([]byte, error) { 3261 objectMap := make(map[string]interface{}) 3262 if co.Certificates != nil { 3263 objectMap["certificates"] = co.Certificates 3264 } 3265 if co.DistinguishedName != nil { 3266 objectMap["distinguishedName"] = co.DistinguishedName 3267 } 3268 if co.DomainVerificationToken != nil { 3269 objectMap["domainVerificationToken"] = co.DomainVerificationToken 3270 } 3271 if co.ValidityInYears != nil { 3272 objectMap["validityInYears"] = co.ValidityInYears 3273 } 3274 if co.KeySize != nil { 3275 objectMap["keySize"] = co.KeySize 3276 } 3277 if co.ProductType != "" { 3278 objectMap["productType"] = co.ProductType 3279 } 3280 if co.AutoRenew != nil { 3281 objectMap["autoRenew"] = co.AutoRenew 3282 } 3283 if co.ProvisioningState != "" { 3284 objectMap["provisioningState"] = co.ProvisioningState 3285 } 3286 if co.Status != "" { 3287 objectMap["status"] = co.Status 3288 } 3289 if co.SignedCertificate != nil { 3290 objectMap["signedCertificate"] = co.SignedCertificate 3291 } 3292 if co.Csr != nil { 3293 objectMap["csr"] = co.Csr 3294 } 3295 if co.Intermediate != nil { 3296 objectMap["intermediate"] = co.Intermediate 3297 } 3298 if co.Root != nil { 3299 objectMap["root"] = co.Root 3300 } 3301 if co.SerialNumber != nil { 3302 objectMap["serialNumber"] = co.SerialNumber 3303 } 3304 if co.LastCertificateIssuanceTime != nil { 3305 objectMap["lastCertificateIssuanceTime"] = co.LastCertificateIssuanceTime 3306 } 3307 if co.ExpirationTime != nil { 3308 objectMap["expirationTime"] = co.ExpirationTime 3309 } 3310 return json.Marshal(objectMap) 3311} 3312 3313// CertificateProperties ... 3314type CertificateProperties struct { 3315 // FriendlyName - Friendly name of the certificate 3316 FriendlyName *string `json:"friendlyName,omitempty"` 3317 // SubjectName - Subject name of the certificate 3318 SubjectName *string `json:"subjectName,omitempty"` 3319 // HostNames - Host names the certificate applies to 3320 HostNames *[]string `json:"hostNames,omitempty"` 3321 // PfxBlob - Pfx blob 3322 PfxBlob *string `json:"pfxBlob,omitempty"` 3323 // SiteName - App name 3324 SiteName *string `json:"siteName,omitempty"` 3325 // SelfLink - Self link 3326 SelfLink *string `json:"selfLink,omitempty"` 3327 // Issuer - Certificate issuer 3328 Issuer *string `json:"issuer,omitempty"` 3329 // IssueDate - Certificate issue Date 3330 IssueDate *date.Time `json:"issueDate,omitempty"` 3331 // ExpirationDate - Certificate expiration date 3332 ExpirationDate *date.Time `json:"expirationDate,omitempty"` 3333 // Password - Certificate password 3334 Password *string `json:"password,omitempty"` 3335 // Thumbprint - Certificate thumbprint 3336 Thumbprint *string `json:"thumbprint,omitempty"` 3337 // Valid - Is the certificate valid? 3338 Valid *bool `json:"valid,omitempty"` 3339 // CerBlob - Raw bytes of .cer file 3340 CerBlob *string `json:"cerBlob,omitempty"` 3341 // PublicKeyHash - Public key hash 3342 PublicKeyHash *string `json:"publicKeyHash,omitempty"` 3343 // HostingEnvironmentProfile - Specification for the hosting environment (App Service Environment) to use for the certificate 3344 HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` 3345} 3346 3347// ClassicMobileService a mobile service 3348type ClassicMobileService struct { 3349 autorest.Response `json:"-"` 3350 *ClassicMobileServiceProperties `json:"properties,omitempty"` 3351 // ID - Resource Id 3352 ID *string `json:"id,omitempty"` 3353 // Name - Resource Name 3354 Name *string `json:"name,omitempty"` 3355 // Kind - Kind of resource 3356 Kind *string `json:"kind,omitempty"` 3357 // Location - Resource Location 3358 Location *string `json:"location,omitempty"` 3359 // Type - Resource type 3360 Type *string `json:"type,omitempty"` 3361 // Tags - Resource tags 3362 Tags map[string]*string `json:"tags"` 3363} 3364 3365// MarshalJSON is the custom marshaler for ClassicMobileService. 3366func (cms ClassicMobileService) MarshalJSON() ([]byte, error) { 3367 objectMap := make(map[string]interface{}) 3368 if cms.ClassicMobileServiceProperties != nil { 3369 objectMap["properties"] = cms.ClassicMobileServiceProperties 3370 } 3371 if cms.ID != nil { 3372 objectMap["id"] = cms.ID 3373 } 3374 if cms.Name != nil { 3375 objectMap["name"] = cms.Name 3376 } 3377 if cms.Kind != nil { 3378 objectMap["kind"] = cms.Kind 3379 } 3380 if cms.Location != nil { 3381 objectMap["location"] = cms.Location 3382 } 3383 if cms.Type != nil { 3384 objectMap["type"] = cms.Type 3385 } 3386 if cms.Tags != nil { 3387 objectMap["tags"] = cms.Tags 3388 } 3389 return json.Marshal(objectMap) 3390} 3391 3392// UnmarshalJSON is the custom unmarshaler for ClassicMobileService struct. 3393func (cms *ClassicMobileService) UnmarshalJSON(body []byte) error { 3394 var m map[string]*json.RawMessage 3395 err := json.Unmarshal(body, &m) 3396 if err != nil { 3397 return err 3398 } 3399 for k, v := range m { 3400 switch k { 3401 case "properties": 3402 if v != nil { 3403 var classicMobileServiceProperties ClassicMobileServiceProperties 3404 err = json.Unmarshal(*v, &classicMobileServiceProperties) 3405 if err != nil { 3406 return err 3407 } 3408 cms.ClassicMobileServiceProperties = &classicMobileServiceProperties 3409 } 3410 case "id": 3411 if v != nil { 3412 var ID string 3413 err = json.Unmarshal(*v, &ID) 3414 if err != nil { 3415 return err 3416 } 3417 cms.ID = &ID 3418 } 3419 case "name": 3420 if v != nil { 3421 var name string 3422 err = json.Unmarshal(*v, &name) 3423 if err != nil { 3424 return err 3425 } 3426 cms.Name = &name 3427 } 3428 case "kind": 3429 if v != nil { 3430 var kind string 3431 err = json.Unmarshal(*v, &kind) 3432 if err != nil { 3433 return err 3434 } 3435 cms.Kind = &kind 3436 } 3437 case "location": 3438 if v != nil { 3439 var location string 3440 err = json.Unmarshal(*v, &location) 3441 if err != nil { 3442 return err 3443 } 3444 cms.Location = &location 3445 } 3446 case "type": 3447 if v != nil { 3448 var typeVar string 3449 err = json.Unmarshal(*v, &typeVar) 3450 if err != nil { 3451 return err 3452 } 3453 cms.Type = &typeVar 3454 } 3455 case "tags": 3456 if v != nil { 3457 var tags map[string]*string 3458 err = json.Unmarshal(*v, &tags) 3459 if err != nil { 3460 return err 3461 } 3462 cms.Tags = tags 3463 } 3464 } 3465 } 3466 3467 return nil 3468} 3469 3470// ClassicMobileServiceCollection collection of Classic Mobile Services 3471type ClassicMobileServiceCollection struct { 3472 autorest.Response `json:"-"` 3473 // Value - Collection of resources 3474 Value *[]ClassicMobileService `json:"value,omitempty"` 3475 // NextLink - Link to next page of resources 3476 NextLink *string `json:"nextLink,omitempty"` 3477} 3478 3479// ClassicMobileServiceCollectionIterator provides access to a complete listing of ClassicMobileService 3480// values. 3481type ClassicMobileServiceCollectionIterator struct { 3482 i int 3483 page ClassicMobileServiceCollectionPage 3484} 3485 3486// NextWithContext advances to the next value. If there was an error making 3487// the request the iterator does not advance and the error is returned. 3488func (iter *ClassicMobileServiceCollectionIterator) NextWithContext(ctx context.Context) (err error) { 3489 if tracing.IsEnabled() { 3490 ctx = tracing.StartSpan(ctx, fqdn+"/ClassicMobileServiceCollectionIterator.NextWithContext") 3491 defer func() { 3492 sc := -1 3493 if iter.Response().Response.Response != nil { 3494 sc = iter.Response().Response.Response.StatusCode 3495 } 3496 tracing.EndSpan(ctx, sc, err) 3497 }() 3498 } 3499 iter.i++ 3500 if iter.i < len(iter.page.Values()) { 3501 return nil 3502 } 3503 err = iter.page.NextWithContext(ctx) 3504 if err != nil { 3505 iter.i-- 3506 return err 3507 } 3508 iter.i = 0 3509 return nil 3510} 3511 3512// Next advances to the next value. If there was an error making 3513// the request the iterator does not advance and the error is returned. 3514// Deprecated: Use NextWithContext() instead. 3515func (iter *ClassicMobileServiceCollectionIterator) Next() error { 3516 return iter.NextWithContext(context.Background()) 3517} 3518 3519// NotDone returns true if the enumeration should be started or is not yet complete. 3520func (iter ClassicMobileServiceCollectionIterator) NotDone() bool { 3521 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3522} 3523 3524// Response returns the raw server response from the last page request. 3525func (iter ClassicMobileServiceCollectionIterator) Response() ClassicMobileServiceCollection { 3526 return iter.page.Response() 3527} 3528 3529// Value returns the current value or a zero-initialized value if the 3530// iterator has advanced beyond the end of the collection. 3531func (iter ClassicMobileServiceCollectionIterator) Value() ClassicMobileService { 3532 if !iter.page.NotDone() { 3533 return ClassicMobileService{} 3534 } 3535 return iter.page.Values()[iter.i] 3536} 3537 3538// Creates a new instance of the ClassicMobileServiceCollectionIterator type. 3539func NewClassicMobileServiceCollectionIterator(page ClassicMobileServiceCollectionPage) ClassicMobileServiceCollectionIterator { 3540 return ClassicMobileServiceCollectionIterator{page: page} 3541} 3542 3543// IsEmpty returns true if the ListResult contains no values. 3544func (cmsc ClassicMobileServiceCollection) IsEmpty() bool { 3545 return cmsc.Value == nil || len(*cmsc.Value) == 0 3546} 3547 3548// classicMobileServiceCollectionPreparer prepares a request to retrieve the next set of results. 3549// It returns nil if no more results exist. 3550func (cmsc ClassicMobileServiceCollection) classicMobileServiceCollectionPreparer(ctx context.Context) (*http.Request, error) { 3551 if cmsc.NextLink == nil || len(to.String(cmsc.NextLink)) < 1 { 3552 return nil, nil 3553 } 3554 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3555 autorest.AsJSON(), 3556 autorest.AsGet(), 3557 autorest.WithBaseURL(to.String(cmsc.NextLink))) 3558} 3559 3560// ClassicMobileServiceCollectionPage contains a page of ClassicMobileService values. 3561type ClassicMobileServiceCollectionPage struct { 3562 fn func(context.Context, ClassicMobileServiceCollection) (ClassicMobileServiceCollection, error) 3563 cmsc ClassicMobileServiceCollection 3564} 3565 3566// NextWithContext advances to the next page of values. If there was an error making 3567// the request the page does not advance and the error is returned. 3568func (page *ClassicMobileServiceCollectionPage) NextWithContext(ctx context.Context) (err error) { 3569 if tracing.IsEnabled() { 3570 ctx = tracing.StartSpan(ctx, fqdn+"/ClassicMobileServiceCollectionPage.NextWithContext") 3571 defer func() { 3572 sc := -1 3573 if page.Response().Response.Response != nil { 3574 sc = page.Response().Response.Response.StatusCode 3575 } 3576 tracing.EndSpan(ctx, sc, err) 3577 }() 3578 } 3579 next, err := page.fn(ctx, page.cmsc) 3580 if err != nil { 3581 return err 3582 } 3583 page.cmsc = next 3584 return nil 3585} 3586 3587// Next advances to the next page of values. If there was an error making 3588// the request the page does not advance and the error is returned. 3589// Deprecated: Use NextWithContext() instead. 3590func (page *ClassicMobileServiceCollectionPage) Next() error { 3591 return page.NextWithContext(context.Background()) 3592} 3593 3594// NotDone returns true if the page enumeration should be started or is not yet complete. 3595func (page ClassicMobileServiceCollectionPage) NotDone() bool { 3596 return !page.cmsc.IsEmpty() 3597} 3598 3599// Response returns the raw server response from the last page request. 3600func (page ClassicMobileServiceCollectionPage) Response() ClassicMobileServiceCollection { 3601 return page.cmsc 3602} 3603 3604// Values returns the slice of values for the current page or nil if there are no values. 3605func (page ClassicMobileServiceCollectionPage) Values() []ClassicMobileService { 3606 if page.cmsc.IsEmpty() { 3607 return nil 3608 } 3609 return *page.cmsc.Value 3610} 3611 3612// Creates a new instance of the ClassicMobileServiceCollectionPage type. 3613func NewClassicMobileServiceCollectionPage(getNextPage func(context.Context, ClassicMobileServiceCollection) (ClassicMobileServiceCollection, error)) ClassicMobileServiceCollectionPage { 3614 return ClassicMobileServiceCollectionPage{fn: getNextPage} 3615} 3616 3617// ClassicMobileServiceProperties ... 3618type ClassicMobileServiceProperties struct { 3619 // Name - Name of the mobile service 3620 Name *string `json:"name,omitempty"` 3621} 3622 3623// CloningInfo represents information needed for cloning operation 3624type CloningInfo struct { 3625 // CorrelationID - Correlation Id of cloning operation. This id ties multiple cloning operations 3626 // together to use the same snapshot 3627 CorrelationID *string `json:"correlationId,omitempty"` 3628 // Overwrite - Overwrite destination web app 3629 Overwrite *bool `json:"overwrite,omitempty"` 3630 // CloneCustomHostNames - If true, clone custom hostnames from source web app 3631 CloneCustomHostNames *bool `json:"cloneCustomHostNames,omitempty"` 3632 // CloneSourceControl - Clone source control from source web app 3633 CloneSourceControl *bool `json:"cloneSourceControl,omitempty"` 3634 // SourceWebAppID - ARM resource id of the source web app. Web app resource id is of the form 3635 // /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production slots and 3636 // /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} for other slots 3637 SourceWebAppID *string `json:"sourceWebAppId,omitempty"` 3638 // HostingEnvironment - Hosting environment 3639 HostingEnvironment *string `json:"hostingEnvironment,omitempty"` 3640 // AppSettingsOverrides - Application settings overrides for cloned web app. If specified these settings will override the settings cloned 3641 // from source web app. If not specified, application settings from source web app are retained. 3642 AppSettingsOverrides map[string]*string `json:"appSettingsOverrides"` 3643 // ConfigureLoadBalancing - If specified configure load balancing for source and clone site 3644 ConfigureLoadBalancing *bool `json:"configureLoadBalancing,omitempty"` 3645 // TrafficManagerProfileID - ARM resource id of the traffic manager profile to use if it exists. Traffic manager resource id is of the form 3646 // /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName} 3647 TrafficManagerProfileID *string `json:"trafficManagerProfileId,omitempty"` 3648 // TrafficManagerProfileName - Name of traffic manager profile to create. This is only needed if traffic manager profile does not already exist 3649 TrafficManagerProfileName *string `json:"trafficManagerProfileName,omitempty"` 3650} 3651 3652// MarshalJSON is the custom marshaler for CloningInfo. 3653func (ci CloningInfo) MarshalJSON() ([]byte, error) { 3654 objectMap := make(map[string]interface{}) 3655 if ci.CorrelationID != nil { 3656 objectMap["correlationId"] = ci.CorrelationID 3657 } 3658 if ci.Overwrite != nil { 3659 objectMap["overwrite"] = ci.Overwrite 3660 } 3661 if ci.CloneCustomHostNames != nil { 3662 objectMap["cloneCustomHostNames"] = ci.CloneCustomHostNames 3663 } 3664 if ci.CloneSourceControl != nil { 3665 objectMap["cloneSourceControl"] = ci.CloneSourceControl 3666 } 3667 if ci.SourceWebAppID != nil { 3668 objectMap["sourceWebAppId"] = ci.SourceWebAppID 3669 } 3670 if ci.HostingEnvironment != nil { 3671 objectMap["hostingEnvironment"] = ci.HostingEnvironment 3672 } 3673 if ci.AppSettingsOverrides != nil { 3674 objectMap["appSettingsOverrides"] = ci.AppSettingsOverrides 3675 } 3676 if ci.ConfigureLoadBalancing != nil { 3677 objectMap["configureLoadBalancing"] = ci.ConfigureLoadBalancing 3678 } 3679 if ci.TrafficManagerProfileID != nil { 3680 objectMap["trafficManagerProfileId"] = ci.TrafficManagerProfileID 3681 } 3682 if ci.TrafficManagerProfileName != nil { 3683 objectMap["trafficManagerProfileName"] = ci.TrafficManagerProfileName 3684 } 3685 return json.Marshal(objectMap) 3686} 3687 3688// ConfirmConsentCodeInput confirm Consent Code Input payload 3689type ConfirmConsentCodeInput struct { 3690 *ConfirmConsentCodeInputProperties `json:"properties,omitempty"` 3691 // ID - Resource Id 3692 ID *string `json:"id,omitempty"` 3693 // Name - Resource Name 3694 Name *string `json:"name,omitempty"` 3695 // Kind - Kind of resource 3696 Kind *string `json:"kind,omitempty"` 3697 // Location - Resource Location 3698 Location *string `json:"location,omitempty"` 3699 // Type - Resource type 3700 Type *string `json:"type,omitempty"` 3701 // Tags - Resource tags 3702 Tags map[string]*string `json:"tags"` 3703} 3704 3705// MarshalJSON is the custom marshaler for ConfirmConsentCodeInput. 3706func (ccci ConfirmConsentCodeInput) MarshalJSON() ([]byte, error) { 3707 objectMap := make(map[string]interface{}) 3708 if ccci.ConfirmConsentCodeInputProperties != nil { 3709 objectMap["properties"] = ccci.ConfirmConsentCodeInputProperties 3710 } 3711 if ccci.ID != nil { 3712 objectMap["id"] = ccci.ID 3713 } 3714 if ccci.Name != nil { 3715 objectMap["name"] = ccci.Name 3716 } 3717 if ccci.Kind != nil { 3718 objectMap["kind"] = ccci.Kind 3719 } 3720 if ccci.Location != nil { 3721 objectMap["location"] = ccci.Location 3722 } 3723 if ccci.Type != nil { 3724 objectMap["type"] = ccci.Type 3725 } 3726 if ccci.Tags != nil { 3727 objectMap["tags"] = ccci.Tags 3728 } 3729 return json.Marshal(objectMap) 3730} 3731 3732// UnmarshalJSON is the custom unmarshaler for ConfirmConsentCodeInput struct. 3733func (ccci *ConfirmConsentCodeInput) UnmarshalJSON(body []byte) error { 3734 var m map[string]*json.RawMessage 3735 err := json.Unmarshal(body, &m) 3736 if err != nil { 3737 return err 3738 } 3739 for k, v := range m { 3740 switch k { 3741 case "properties": 3742 if v != nil { 3743 var confirmConsentCodeInputProperties ConfirmConsentCodeInputProperties 3744 err = json.Unmarshal(*v, &confirmConsentCodeInputProperties) 3745 if err != nil { 3746 return err 3747 } 3748 ccci.ConfirmConsentCodeInputProperties = &confirmConsentCodeInputProperties 3749 } 3750 case "id": 3751 if v != nil { 3752 var ID string 3753 err = json.Unmarshal(*v, &ID) 3754 if err != nil { 3755 return err 3756 } 3757 ccci.ID = &ID 3758 } 3759 case "name": 3760 if v != nil { 3761 var name string 3762 err = json.Unmarshal(*v, &name) 3763 if err != nil { 3764 return err 3765 } 3766 ccci.Name = &name 3767 } 3768 case "kind": 3769 if v != nil { 3770 var kind string 3771 err = json.Unmarshal(*v, &kind) 3772 if err != nil { 3773 return err 3774 } 3775 ccci.Kind = &kind 3776 } 3777 case "location": 3778 if v != nil { 3779 var location string 3780 err = json.Unmarshal(*v, &location) 3781 if err != nil { 3782 return err 3783 } 3784 ccci.Location = &location 3785 } 3786 case "type": 3787 if v != nil { 3788 var typeVar string 3789 err = json.Unmarshal(*v, &typeVar) 3790 if err != nil { 3791 return err 3792 } 3793 ccci.Type = &typeVar 3794 } 3795 case "tags": 3796 if v != nil { 3797 var tags map[string]*string 3798 err = json.Unmarshal(*v, &tags) 3799 if err != nil { 3800 return err 3801 } 3802 ccci.Tags = tags 3803 } 3804 } 3805 } 3806 3807 return nil 3808} 3809 3810// ConfirmConsentCodeInputProperties ... 3811type ConfirmConsentCodeInputProperties struct { 3812 // PrincipalType - Principal type. Possible values include: 'PrincipalTypeActiveDirectory', 'PrincipalTypeConnection', 'PrincipalTypeMicrosoftAccount' 3813 PrincipalType PrincipalType `json:"principalType,omitempty"` 3814 // TenantID - Tenant Id 3815 TenantID *string `json:"tenantId,omitempty"` 3816 // ObjectID - AAD object ID. This is userId 3817 ObjectID *string `json:"objectId,omitempty"` 3818 // Code - Code that was returned during consent flow 3819 Code *string `json:"code,omitempty"` 3820} 3821 3822// Connection API Connection 3823type Connection struct { 3824 autorest.Response `json:"-"` 3825 *ConnectionProperties `json:"properties,omitempty"` 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 Connection. 3841func (c Connection) MarshalJSON() ([]byte, error) { 3842 objectMap := make(map[string]interface{}) 3843 if c.ConnectionProperties != nil { 3844 objectMap["properties"] = c.ConnectionProperties 3845 } 3846 if c.ID != nil { 3847 objectMap["id"] = c.ID 3848 } 3849 if c.Name != nil { 3850 objectMap["name"] = c.Name 3851 } 3852 if c.Kind != nil { 3853 objectMap["kind"] = c.Kind 3854 } 3855 if c.Location != nil { 3856 objectMap["location"] = c.Location 3857 } 3858 if c.Type != nil { 3859 objectMap["type"] = c.Type 3860 } 3861 if c.Tags != nil { 3862 objectMap["tags"] = c.Tags 3863 } 3864 return json.Marshal(objectMap) 3865} 3866 3867// UnmarshalJSON is the custom unmarshaler for Connection struct. 3868func (c *Connection) UnmarshalJSON(body []byte) error { 3869 var m map[string]*json.RawMessage 3870 err := json.Unmarshal(body, &m) 3871 if err != nil { 3872 return err 3873 } 3874 for k, v := range m { 3875 switch k { 3876 case "properties": 3877 if v != nil { 3878 var connectionProperties ConnectionProperties 3879 err = json.Unmarshal(*v, &connectionProperties) 3880 if err != nil { 3881 return err 3882 } 3883 c.ConnectionProperties = &connectionProperties 3884 } 3885 case "id": 3886 if v != nil { 3887 var ID string 3888 err = json.Unmarshal(*v, &ID) 3889 if err != nil { 3890 return err 3891 } 3892 c.ID = &ID 3893 } 3894 case "name": 3895 if v != nil { 3896 var name string 3897 err = json.Unmarshal(*v, &name) 3898 if err != nil { 3899 return err 3900 } 3901 c.Name = &name 3902 } 3903 case "kind": 3904 if v != nil { 3905 var kind string 3906 err = json.Unmarshal(*v, &kind) 3907 if err != nil { 3908 return err 3909 } 3910 c.Kind = &kind 3911 } 3912 case "location": 3913 if v != nil { 3914 var location string 3915 err = json.Unmarshal(*v, &location) 3916 if err != nil { 3917 return err 3918 } 3919 c.Location = &location 3920 } 3921 case "type": 3922 if v != nil { 3923 var typeVar string 3924 err = json.Unmarshal(*v, &typeVar) 3925 if err != nil { 3926 return err 3927 } 3928 c.Type = &typeVar 3929 } 3930 case "tags": 3931 if v != nil { 3932 var tags map[string]*string 3933 err = json.Unmarshal(*v, &tags) 3934 if err != nil { 3935 return err 3936 } 3937 c.Tags = tags 3938 } 3939 } 3940 } 3941 3942 return nil 3943} 3944 3945// ConnectionCollection collection of connections 3946type ConnectionCollection struct { 3947 autorest.Response `json:"-"` 3948 // Value - Collection of resources 3949 Value *[]Connection `json:"value,omitempty"` 3950 // NextLink - Link to next page of resources 3951 NextLink *string `json:"nextLink,omitempty"` 3952} 3953 3954// ConnectionCollectionIterator provides access to a complete listing of Connection values. 3955type ConnectionCollectionIterator struct { 3956 i int 3957 page ConnectionCollectionPage 3958} 3959 3960// NextWithContext advances to the next value. If there was an error making 3961// the request the iterator does not advance and the error is returned. 3962func (iter *ConnectionCollectionIterator) NextWithContext(ctx context.Context) (err error) { 3963 if tracing.IsEnabled() { 3964 ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionCollectionIterator.NextWithContext") 3965 defer func() { 3966 sc := -1 3967 if iter.Response().Response.Response != nil { 3968 sc = iter.Response().Response.Response.StatusCode 3969 } 3970 tracing.EndSpan(ctx, sc, err) 3971 }() 3972 } 3973 iter.i++ 3974 if iter.i < len(iter.page.Values()) { 3975 return nil 3976 } 3977 err = iter.page.NextWithContext(ctx) 3978 if err != nil { 3979 iter.i-- 3980 return err 3981 } 3982 iter.i = 0 3983 return nil 3984} 3985 3986// Next advances to the next value. If there was an error making 3987// the request the iterator does not advance and the error is returned. 3988// Deprecated: Use NextWithContext() instead. 3989func (iter *ConnectionCollectionIterator) Next() error { 3990 return iter.NextWithContext(context.Background()) 3991} 3992 3993// NotDone returns true if the enumeration should be started or is not yet complete. 3994func (iter ConnectionCollectionIterator) NotDone() bool { 3995 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3996} 3997 3998// Response returns the raw server response from the last page request. 3999func (iter ConnectionCollectionIterator) Response() ConnectionCollection { 4000 return iter.page.Response() 4001} 4002 4003// Value returns the current value or a zero-initialized value if the 4004// iterator has advanced beyond the end of the collection. 4005func (iter ConnectionCollectionIterator) Value() Connection { 4006 if !iter.page.NotDone() { 4007 return Connection{} 4008 } 4009 return iter.page.Values()[iter.i] 4010} 4011 4012// Creates a new instance of the ConnectionCollectionIterator type. 4013func NewConnectionCollectionIterator(page ConnectionCollectionPage) ConnectionCollectionIterator { 4014 return ConnectionCollectionIterator{page: page} 4015} 4016 4017// IsEmpty returns true if the ListResult contains no values. 4018func (cc ConnectionCollection) IsEmpty() bool { 4019 return cc.Value == nil || len(*cc.Value) == 0 4020} 4021 4022// connectionCollectionPreparer prepares a request to retrieve the next set of results. 4023// It returns nil if no more results exist. 4024func (cc ConnectionCollection) connectionCollectionPreparer(ctx context.Context) (*http.Request, error) { 4025 if cc.NextLink == nil || len(to.String(cc.NextLink)) < 1 { 4026 return nil, nil 4027 } 4028 return autorest.Prepare((&http.Request{}).WithContext(ctx), 4029 autorest.AsJSON(), 4030 autorest.AsGet(), 4031 autorest.WithBaseURL(to.String(cc.NextLink))) 4032} 4033 4034// ConnectionCollectionPage contains a page of Connection values. 4035type ConnectionCollectionPage struct { 4036 fn func(context.Context, ConnectionCollection) (ConnectionCollection, error) 4037 cc ConnectionCollection 4038} 4039 4040// NextWithContext advances to the next page of values. If there was an error making 4041// the request the page does not advance and the error is returned. 4042func (page *ConnectionCollectionPage) NextWithContext(ctx context.Context) (err error) { 4043 if tracing.IsEnabled() { 4044 ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionCollectionPage.NextWithContext") 4045 defer func() { 4046 sc := -1 4047 if page.Response().Response.Response != nil { 4048 sc = page.Response().Response.Response.StatusCode 4049 } 4050 tracing.EndSpan(ctx, sc, err) 4051 }() 4052 } 4053 next, err := page.fn(ctx, page.cc) 4054 if err != nil { 4055 return err 4056 } 4057 page.cc = next 4058 return nil 4059} 4060 4061// Next advances to the next page of values. If there was an error making 4062// the request the page does not advance and the error is returned. 4063// Deprecated: Use NextWithContext() instead. 4064func (page *ConnectionCollectionPage) Next() error { 4065 return page.NextWithContext(context.Background()) 4066} 4067 4068// NotDone returns true if the page enumeration should be started or is not yet complete. 4069func (page ConnectionCollectionPage) NotDone() bool { 4070 return !page.cc.IsEmpty() 4071} 4072 4073// Response returns the raw server response from the last page request. 4074func (page ConnectionCollectionPage) Response() ConnectionCollection { 4075 return page.cc 4076} 4077 4078// Values returns the slice of values for the current page or nil if there are no values. 4079func (page ConnectionCollectionPage) Values() []Connection { 4080 if page.cc.IsEmpty() { 4081 return nil 4082 } 4083 return *page.cc.Value 4084} 4085 4086// Creates a new instance of the ConnectionCollectionPage type. 4087func NewConnectionCollectionPage(getNextPage func(context.Context, ConnectionCollection) (ConnectionCollection, error)) ConnectionCollectionPage { 4088 return ConnectionCollectionPage{fn: getNextPage} 4089} 4090 4091// ConnectionError connection error 4092type ConnectionError struct { 4093 *ConnectionErrorProperties `json:"properties,omitempty"` 4094 // ID - Resource Id 4095 ID *string `json:"id,omitempty"` 4096 // Name - Resource Name 4097 Name *string `json:"name,omitempty"` 4098 // Kind - Kind of resource 4099 Kind *string `json:"kind,omitempty"` 4100 // Location - Resource Location 4101 Location *string `json:"location,omitempty"` 4102 // Type - Resource type 4103 Type *string `json:"type,omitempty"` 4104 // Tags - Resource tags 4105 Tags map[string]*string `json:"tags"` 4106} 4107 4108// MarshalJSON is the custom marshaler for ConnectionError. 4109func (ce ConnectionError) MarshalJSON() ([]byte, error) { 4110 objectMap := make(map[string]interface{}) 4111 if ce.ConnectionErrorProperties != nil { 4112 objectMap["properties"] = ce.ConnectionErrorProperties 4113 } 4114 if ce.ID != nil { 4115 objectMap["id"] = ce.ID 4116 } 4117 if ce.Name != nil { 4118 objectMap["name"] = ce.Name 4119 } 4120 if ce.Kind != nil { 4121 objectMap["kind"] = ce.Kind 4122 } 4123 if ce.Location != nil { 4124 objectMap["location"] = ce.Location 4125 } 4126 if ce.Type != nil { 4127 objectMap["type"] = ce.Type 4128 } 4129 if ce.Tags != nil { 4130 objectMap["tags"] = ce.Tags 4131 } 4132 return json.Marshal(objectMap) 4133} 4134 4135// UnmarshalJSON is the custom unmarshaler for ConnectionError struct. 4136func (ce *ConnectionError) UnmarshalJSON(body []byte) error { 4137 var m map[string]*json.RawMessage 4138 err := json.Unmarshal(body, &m) 4139 if err != nil { 4140 return err 4141 } 4142 for k, v := range m { 4143 switch k { 4144 case "properties": 4145 if v != nil { 4146 var connectionErrorProperties ConnectionErrorProperties 4147 err = json.Unmarshal(*v, &connectionErrorProperties) 4148 if err != nil { 4149 return err 4150 } 4151 ce.ConnectionErrorProperties = &connectionErrorProperties 4152 } 4153 case "id": 4154 if v != nil { 4155 var ID string 4156 err = json.Unmarshal(*v, &ID) 4157 if err != nil { 4158 return err 4159 } 4160 ce.ID = &ID 4161 } 4162 case "name": 4163 if v != nil { 4164 var name string 4165 err = json.Unmarshal(*v, &name) 4166 if err != nil { 4167 return err 4168 } 4169 ce.Name = &name 4170 } 4171 case "kind": 4172 if v != nil { 4173 var kind string 4174 err = json.Unmarshal(*v, &kind) 4175 if err != nil { 4176 return err 4177 } 4178 ce.Kind = &kind 4179 } 4180 case "location": 4181 if v != nil { 4182 var location string 4183 err = json.Unmarshal(*v, &location) 4184 if err != nil { 4185 return err 4186 } 4187 ce.Location = &location 4188 } 4189 case "type": 4190 if v != nil { 4191 var typeVar string 4192 err = json.Unmarshal(*v, &typeVar) 4193 if err != nil { 4194 return err 4195 } 4196 ce.Type = &typeVar 4197 } 4198 case "tags": 4199 if v != nil { 4200 var tags map[string]*string 4201 err = json.Unmarshal(*v, &tags) 4202 if err != nil { 4203 return err 4204 } 4205 ce.Tags = tags 4206 } 4207 } 4208 } 4209 4210 return nil 4211} 4212 4213// ConnectionErrorProperties ... 4214type ConnectionErrorProperties struct { 4215 // Code - code of the status 4216 Code *string `json:"code,omitempty"` 4217 // Message - Description of the status 4218 Message *string `json:"message,omitempty"` 4219} 4220 4221// ConnectionParameter connection provider parameters 4222type ConnectionParameter struct { 4223 // Type - Type of the parameter. Possible values include: 'ConnectionParameterTypeString', 'ConnectionParameterTypeSecurestring', 'ConnectionParameterTypeSecureobject', 'ConnectionParameterTypeInt', 'ConnectionParameterTypeBool', 'ConnectionParameterTypeObject', 'ConnectionParameterTypeArray', 'ConnectionParameterTypeOauthSetting', 'ConnectionParameterTypeConnection' 4224 Type ConnectionParameterType `json:"type,omitempty"` 4225 // DefaultValue - Default parameter value 4226 DefaultValue interface{} `json:"defaultValue,omitempty"` 4227 // OAuthSettings - Settings defining OAuth flow for the back end provider 4228 OAuthSettings *APIOAuthSettings `json:"oAuthSettings,omitempty"` 4229 // UIDefinition - UI definitions 4230 UIDefinition interface{} `json:"uiDefinition,omitempty"` 4231} 4232 4233// ConnectionProperties ... 4234type ConnectionProperties struct { 4235 // Name - connection name 4236 Name *string `json:"name,omitempty"` 4237 // DisplayName - display name 4238 DisplayName *string `json:"displayName,omitempty"` 4239 // Statuses - Status of the connection 4240 Statuses *[]ConnectionStatus `json:"statuses,omitempty"` 4241 // CustomParameterValues - Custom login setting values. 4242 CustomParameterValues map[string]*ParameterCustomLoginSettingValues `json:"customParameterValues"` 4243 TenantID *string `json:"tenantId,omitempty"` 4244 // ParameterValues - Tokens/Claim 4245 ParameterValues map[string]interface{} `json:"parameterValues"` 4246 // NonSecretParameterValues - Tokens/Claim 4247 NonSecretParameterValues map[string]interface{} `json:"nonSecretParameterValues"` 4248 Metadata interface{} `json:"metadata,omitempty"` 4249 // FirstExpirationTime - Time in UTC when the first expiration of OAuth tokens 4250 FirstExpirationTime *date.Time `json:"firstExpirationTime,omitempty"` 4251 // Keywords - List of Keywords that tag the acl 4252 Keywords *[]string `json:"keywords,omitempty"` 4253 // CreatedTime - Timestamp of the connection creation 4254 CreatedTime *date.Time `json:"createdTime,omitempty"` 4255 // ChangedTime - Timestamp of last connection change. 4256 ChangedTime *date.Time `json:"changedTime,omitempty"` 4257 // API - expanded connection provider name 4258 API *ExpandedParentAPIEntity `json:"api,omitempty"` 4259} 4260 4261// MarshalJSON is the custom marshaler for ConnectionProperties. 4262func (c ConnectionProperties) MarshalJSON() ([]byte, error) { 4263 objectMap := make(map[string]interface{}) 4264 if c.Name != nil { 4265 objectMap["name"] = c.Name 4266 } 4267 if c.DisplayName != nil { 4268 objectMap["displayName"] = c.DisplayName 4269 } 4270 if c.Statuses != nil { 4271 objectMap["statuses"] = c.Statuses 4272 } 4273 if c.CustomParameterValues != nil { 4274 objectMap["customParameterValues"] = c.CustomParameterValues 4275 } 4276 if c.TenantID != nil { 4277 objectMap["tenantId"] = c.TenantID 4278 } 4279 if c.ParameterValues != nil { 4280 objectMap["parameterValues"] = c.ParameterValues 4281 } 4282 if c.NonSecretParameterValues != nil { 4283 objectMap["nonSecretParameterValues"] = c.NonSecretParameterValues 4284 } 4285 if c.Metadata != nil { 4286 objectMap["metadata"] = c.Metadata 4287 } 4288 if c.FirstExpirationTime != nil { 4289 objectMap["firstExpirationTime"] = c.FirstExpirationTime 4290 } 4291 if c.Keywords != nil { 4292 objectMap["keywords"] = c.Keywords 4293 } 4294 if c.CreatedTime != nil { 4295 objectMap["createdTime"] = c.CreatedTime 4296 } 4297 if c.ChangedTime != nil { 4298 objectMap["changedTime"] = c.ChangedTime 4299 } 4300 if c.API != nil { 4301 objectMap["api"] = c.API 4302 } 4303 return json.Marshal(objectMap) 4304} 4305 4306// ConnectionSecrets ... 4307type ConnectionSecrets struct { 4308 autorest.Response `json:"-"` 4309 // ParameterValues - Tokens/Claim 4310 ParameterValues map[string]interface{} `json:"parameterValues"` 4311 // ConnectionKey - Connection Key 4312 ConnectionKey *string `json:"connectionKey,omitempty"` 4313} 4314 4315// MarshalJSON is the custom marshaler for ConnectionSecrets. 4316func (cs ConnectionSecrets) MarshalJSON() ([]byte, error) { 4317 objectMap := make(map[string]interface{}) 4318 if cs.ParameterValues != nil { 4319 objectMap["parameterValues"] = cs.ParameterValues 4320 } 4321 if cs.ConnectionKey != nil { 4322 objectMap["connectionKey"] = cs.ConnectionKey 4323 } 4324 return json.Marshal(objectMap) 4325} 4326 4327// ConnectionStatus connection status 4328type ConnectionStatus struct { 4329 *ConnectionStatusProperties `json:"properties,omitempty"` 4330 // ID - Resource Id 4331 ID *string `json:"id,omitempty"` 4332 // Name - Resource Name 4333 Name *string `json:"name,omitempty"` 4334 // Kind - Kind of resource 4335 Kind *string `json:"kind,omitempty"` 4336 // Location - Resource Location 4337 Location *string `json:"location,omitempty"` 4338 // Type - Resource type 4339 Type *string `json:"type,omitempty"` 4340 // Tags - Resource tags 4341 Tags map[string]*string `json:"tags"` 4342} 4343 4344// MarshalJSON is the custom marshaler for ConnectionStatus. 4345func (cs ConnectionStatus) MarshalJSON() ([]byte, error) { 4346 objectMap := make(map[string]interface{}) 4347 if cs.ConnectionStatusProperties != nil { 4348 objectMap["properties"] = cs.ConnectionStatusProperties 4349 } 4350 if cs.ID != nil { 4351 objectMap["id"] = cs.ID 4352 } 4353 if cs.Name != nil { 4354 objectMap["name"] = cs.Name 4355 } 4356 if cs.Kind != nil { 4357 objectMap["kind"] = cs.Kind 4358 } 4359 if cs.Location != nil { 4360 objectMap["location"] = cs.Location 4361 } 4362 if cs.Type != nil { 4363 objectMap["type"] = cs.Type 4364 } 4365 if cs.Tags != nil { 4366 objectMap["tags"] = cs.Tags 4367 } 4368 return json.Marshal(objectMap) 4369} 4370 4371// UnmarshalJSON is the custom unmarshaler for ConnectionStatus struct. 4372func (cs *ConnectionStatus) UnmarshalJSON(body []byte) error { 4373 var m map[string]*json.RawMessage 4374 err := json.Unmarshal(body, &m) 4375 if err != nil { 4376 return err 4377 } 4378 for k, v := range m { 4379 switch k { 4380 case "properties": 4381 if v != nil { 4382 var connectionStatusProperties ConnectionStatusProperties 4383 err = json.Unmarshal(*v, &connectionStatusProperties) 4384 if err != nil { 4385 return err 4386 } 4387 cs.ConnectionStatusProperties = &connectionStatusProperties 4388 } 4389 case "id": 4390 if v != nil { 4391 var ID string 4392 err = json.Unmarshal(*v, &ID) 4393 if err != nil { 4394 return err 4395 } 4396 cs.ID = &ID 4397 } 4398 case "name": 4399 if v != nil { 4400 var name string 4401 err = json.Unmarshal(*v, &name) 4402 if err != nil { 4403 return err 4404 } 4405 cs.Name = &name 4406 } 4407 case "kind": 4408 if v != nil { 4409 var kind string 4410 err = json.Unmarshal(*v, &kind) 4411 if err != nil { 4412 return err 4413 } 4414 cs.Kind = &kind 4415 } 4416 case "location": 4417 if v != nil { 4418 var location string 4419 err = json.Unmarshal(*v, &location) 4420 if err != nil { 4421 return err 4422 } 4423 cs.Location = &location 4424 } 4425 case "type": 4426 if v != nil { 4427 var typeVar string 4428 err = json.Unmarshal(*v, &typeVar) 4429 if err != nil { 4430 return err 4431 } 4432 cs.Type = &typeVar 4433 } 4434 case "tags": 4435 if v != nil { 4436 var tags map[string]*string 4437 err = json.Unmarshal(*v, &tags) 4438 if err != nil { 4439 return err 4440 } 4441 cs.Tags = tags 4442 } 4443 } 4444 } 4445 4446 return nil 4447} 4448 4449// ConnectionStatusProperties ... 4450type ConnectionStatusProperties struct { 4451 // Status - Status 4452 Status *string `json:"status,omitempty"` 4453 // Target - Target of the error 4454 Target *string `json:"target,omitempty"` 4455 // Error - Error details 4456 Error *ConnectionError `json:"error,omitempty"` 4457} 4458 4459// ConnectionStringDictionary string dictionary resource 4460type ConnectionStringDictionary struct { 4461 autorest.Response `json:"-"` 4462 // Properties - Connection strings 4463 Properties map[string]*ConnStringValueTypePair `json:"properties"` 4464 // ID - Resource Id 4465 ID *string `json:"id,omitempty"` 4466 // Name - Resource Name 4467 Name *string `json:"name,omitempty"` 4468 // Kind - Kind of resource 4469 Kind *string `json:"kind,omitempty"` 4470 // Location - Resource Location 4471 Location *string `json:"location,omitempty"` 4472 // Type - Resource type 4473 Type *string `json:"type,omitempty"` 4474 // Tags - Resource tags 4475 Tags map[string]*string `json:"tags"` 4476} 4477 4478// MarshalJSON is the custom marshaler for ConnectionStringDictionary. 4479func (csd ConnectionStringDictionary) MarshalJSON() ([]byte, error) { 4480 objectMap := make(map[string]interface{}) 4481 if csd.Properties != nil { 4482 objectMap["properties"] = csd.Properties 4483 } 4484 if csd.ID != nil { 4485 objectMap["id"] = csd.ID 4486 } 4487 if csd.Name != nil { 4488 objectMap["name"] = csd.Name 4489 } 4490 if csd.Kind != nil { 4491 objectMap["kind"] = csd.Kind 4492 } 4493 if csd.Location != nil { 4494 objectMap["location"] = csd.Location 4495 } 4496 if csd.Type != nil { 4497 objectMap["type"] = csd.Type 4498 } 4499 if csd.Tags != nil { 4500 objectMap["tags"] = csd.Tags 4501 } 4502 return json.Marshal(objectMap) 4503} 4504 4505// ConnStringInfo represents database connection string information 4506type ConnStringInfo struct { 4507 // Name - Name of connection string 4508 Name *string `json:"name,omitempty"` 4509 // ConnectionString - Connection string value 4510 ConnectionString *string `json:"connectionString,omitempty"` 4511 // Type - Type of database. Possible values include: 'MySQL', 'SQLServer', 'SQLAzure', 'Custom' 4512 Type DatabaseServerType `json:"type,omitempty"` 4513} 4514 4515// ConnStringValueTypePair database connection string value to type pair 4516type ConnStringValueTypePair struct { 4517 // Value - Value of pair 4518 Value *string `json:"value,omitempty"` 4519 // Type - Type of database. Possible values include: 'MySQL', 'SQLServer', 'SQLAzure', 'Custom' 4520 Type DatabaseServerType `json:"type,omitempty"` 4521} 4522 4523// ConsentLink ... 4524type ConsentLink struct { 4525 // Link - Uri for the consent link 4526 Link *string `json:"link,omitempty"` 4527 // FirstPartyLoginURI - Uri for first party login 4528 FirstPartyLoginURI *string `json:"firstPartyLoginUri,omitempty"` 4529 // DisplayName - Display Name of the parameter in the connection provider's oauthSettings 4530 DisplayName *string `json:"displayName,omitempty"` 4531 // Status - Status of the link. Possible values include: 'Unauthenticated', 'Authenticated', 'Error' 4532 Status LinkState `json:"status,omitempty"` 4533} 4534 4535// ConsentLinkInput connection Consent Link payload 4536type ConsentLinkInput struct { 4537 *ConsentLinkInputProperties `json:"properties,omitempty"` 4538 // ID - Resource Id 4539 ID *string `json:"id,omitempty"` 4540 // Name - Resource Name 4541 Name *string `json:"name,omitempty"` 4542 // Kind - Kind of resource 4543 Kind *string `json:"kind,omitempty"` 4544 // Location - Resource Location 4545 Location *string `json:"location,omitempty"` 4546 // Type - Resource type 4547 Type *string `json:"type,omitempty"` 4548 // Tags - Resource tags 4549 Tags map[string]*string `json:"tags"` 4550} 4551 4552// MarshalJSON is the custom marshaler for ConsentLinkInput. 4553func (cli ConsentLinkInput) MarshalJSON() ([]byte, error) { 4554 objectMap := make(map[string]interface{}) 4555 if cli.ConsentLinkInputProperties != nil { 4556 objectMap["properties"] = cli.ConsentLinkInputProperties 4557 } 4558 if cli.ID != nil { 4559 objectMap["id"] = cli.ID 4560 } 4561 if cli.Name != nil { 4562 objectMap["name"] = cli.Name 4563 } 4564 if cli.Kind != nil { 4565 objectMap["kind"] = cli.Kind 4566 } 4567 if cli.Location != nil { 4568 objectMap["location"] = cli.Location 4569 } 4570 if cli.Type != nil { 4571 objectMap["type"] = cli.Type 4572 } 4573 if cli.Tags != nil { 4574 objectMap["tags"] = cli.Tags 4575 } 4576 return json.Marshal(objectMap) 4577} 4578 4579// UnmarshalJSON is the custom unmarshaler for ConsentLinkInput struct. 4580func (cli *ConsentLinkInput) UnmarshalJSON(body []byte) error { 4581 var m map[string]*json.RawMessage 4582 err := json.Unmarshal(body, &m) 4583 if err != nil { 4584 return err 4585 } 4586 for k, v := range m { 4587 switch k { 4588 case "properties": 4589 if v != nil { 4590 var consentLinkInputProperties ConsentLinkInputProperties 4591 err = json.Unmarshal(*v, &consentLinkInputProperties) 4592 if err != nil { 4593 return err 4594 } 4595 cli.ConsentLinkInputProperties = &consentLinkInputProperties 4596 } 4597 case "id": 4598 if v != nil { 4599 var ID string 4600 err = json.Unmarshal(*v, &ID) 4601 if err != nil { 4602 return err 4603 } 4604 cli.ID = &ID 4605 } 4606 case "name": 4607 if v != nil { 4608 var name string 4609 err = json.Unmarshal(*v, &name) 4610 if err != nil { 4611 return err 4612 } 4613 cli.Name = &name 4614 } 4615 case "kind": 4616 if v != nil { 4617 var kind string 4618 err = json.Unmarshal(*v, &kind) 4619 if err != nil { 4620 return err 4621 } 4622 cli.Kind = &kind 4623 } 4624 case "location": 4625 if v != nil { 4626 var location string 4627 err = json.Unmarshal(*v, &location) 4628 if err != nil { 4629 return err 4630 } 4631 cli.Location = &location 4632 } 4633 case "type": 4634 if v != nil { 4635 var typeVar string 4636 err = json.Unmarshal(*v, &typeVar) 4637 if err != nil { 4638 return err 4639 } 4640 cli.Type = &typeVar 4641 } 4642 case "tags": 4643 if v != nil { 4644 var tags map[string]*string 4645 err = json.Unmarshal(*v, &tags) 4646 if err != nil { 4647 return err 4648 } 4649 cli.Tags = tags 4650 } 4651 } 4652 } 4653 4654 return nil 4655} 4656 4657// ConsentLinkInputParameter ... 4658type ConsentLinkInputParameter struct { 4659 // PrincipalType - Principal type. Possible values include: 'PrincipalTypeActiveDirectory', 'PrincipalTypeConnection', 'PrincipalTypeMicrosoftAccount' 4660 PrincipalType PrincipalType `json:"principalType,omitempty"` 4661 // TenantID - Tenant Id 4662 TenantID *string `json:"tenantId,omitempty"` 4663 // ObjectID - AAD OID (user or group) if the principal type is ActiveDirectory. 4664 // MSA PUID if the principal type is MicrosoftAccount. 4665 ObjectID *string `json:"objectId,omitempty"` 4666 // ParameterName - Name of the parameter in the connection provider's oauthSettings 4667 ParameterName *string `json:"parameterName,omitempty"` 4668 // RedirectURL - Name of the parameter in the connection provider's oauthSettings 4669 RedirectURL *string `json:"redirectUrl,omitempty"` 4670} 4671 4672// ConsentLinkInputProperties ... 4673type ConsentLinkInputProperties struct { 4674 // Parameters - Array of links 4675 Parameters *[]ConsentLinkInputParameter `json:"parameters,omitempty"` 4676} 4677 4678// ConsentLinkPayload collection of consent links 4679type ConsentLinkPayload struct { 4680 autorest.Response `json:"-"` 4681 // Value - Collection of resources 4682 Value *[]ConsentLink `json:"value,omitempty"` 4683} 4684 4685// Contact contact information for domain registration. If 'Domain Privacy' option is not selected then the 4686// contact information will be made publicly available through the Whois directories as per ICANN 4687// requirements. 4688type Contact struct { 4689 // AddressMailing - Mailing address 4690 AddressMailing *Address `json:"addressMailing,omitempty"` 4691 // Email - Email address 4692 Email *string `json:"email,omitempty"` 4693 // Fax - Fax number 4694 Fax *string `json:"fax,omitempty"` 4695 // JobTitle - Job title 4696 JobTitle *string `json:"jobTitle,omitempty"` 4697 // NameFirst - First name 4698 NameFirst *string `json:"nameFirst,omitempty"` 4699 // NameLast - Last name 4700 NameLast *string `json:"nameLast,omitempty"` 4701 // NameMiddle - Middle name 4702 NameMiddle *string `json:"nameMiddle,omitempty"` 4703 // Organization - Organization 4704 Organization *string `json:"organization,omitempty"` 4705 // Phone - Phone number 4706 Phone *string `json:"phone,omitempty"` 4707} 4708 4709// CorsSettings cross-Origin Resource Sharing (CORS) settings for the web app. 4710type CorsSettings struct { 4711 // AllowedOrigins - Gets or sets the list of origins that should be allowed to make cross-origin 4712 // calls (for example: http://example.com:12345). Use "*" to allow all. 4713 AllowedOrigins *[]string `json:"allowedOrigins,omitempty"` 4714} 4715 4716// CsmMoveResourceEnvelope class containing a list of the resources that need to be moved and the resource 4717// group they should be moved to 4718type CsmMoveResourceEnvelope struct { 4719 TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` 4720 Resources *[]string `json:"resources,omitempty"` 4721} 4722 4723// CsmPublishingProfileOptions publishing options for requested profile 4724type CsmPublishingProfileOptions struct { 4725 // Format - Name of the format. Valid values are: 4726 // FileZilla3 4727 // WebDeploy -- default 4728 // Ftp 4729 Format *string `json:"format,omitempty"` 4730} 4731 4732// CsmSiteRecoveryEntity class containing details about site recovery operation. 4733type CsmSiteRecoveryEntity struct { 4734 // SnapshotTime - Point in time in which the site recover should be attempted. 4735 SnapshotTime *date.Time `json:"snapshotTime,omitempty"` 4736 // RecoverConfig - If true, then the website's configuration will be reverted to its state at SnapshotTime 4737 RecoverConfig *bool `json:"recoverConfig,omitempty"` 4738 // SiteName - [Optional] Destination web app name into which web app should be recovered. This is case when new web app should be created instead. 4739 SiteName *string `json:"siteName,omitempty"` 4740 // SlotName - [Optional] Destination web app slot name into which web app should be recovered 4741 SlotName *string `json:"slotName,omitempty"` 4742} 4743 4744// CsmSlotEntity class containing deployment slot parameters 4745type CsmSlotEntity struct { 4746 // TargetSlot - Set the destination deployment slot during swap operation 4747 TargetSlot *string `json:"targetSlot,omitempty"` 4748 // PreserveVnet - Get or set the flag indicating it should preserve VNet to the slot during swap 4749 PreserveVnet *bool `json:"preserveVnet,omitempty"` 4750} 4751 4752// CsmUsageQuota usage of the quota resource 4753type CsmUsageQuota struct { 4754 // Unit - Units of measurement for the quota resource 4755 Unit *string `json:"unit,omitempty"` 4756 // NextResetTime - Next reset time for the resource counter 4757 NextResetTime *date.Time `json:"nextResetTime,omitempty"` 4758 // CurrentValue - The current value of the resource counter 4759 CurrentValue *int64 `json:"currentValue,omitempty"` 4760 // Limit - The resource limit 4761 Limit *int64 `json:"limit,omitempty"` 4762 // Name - Quota name 4763 Name *LocalizableString `json:"name,omitempty"` 4764} 4765 4766// CsmUsageQuotaCollection collection of csm usage quotas 4767type CsmUsageQuotaCollection struct { 4768 autorest.Response `json:"-"` 4769 // Value - Collection of resources 4770 Value *[]CsmUsageQuota `json:"value,omitempty"` 4771 // NextLink - Link to next page of resources 4772 NextLink *string `json:"nextLink,omitempty"` 4773} 4774 4775// CsmUsageQuotaCollectionIterator provides access to a complete listing of CsmUsageQuota values. 4776type CsmUsageQuotaCollectionIterator struct { 4777 i int 4778 page CsmUsageQuotaCollectionPage 4779} 4780 4781// NextWithContext advances to the next value. If there was an error making 4782// the request the iterator does not advance and the error is returned. 4783func (iter *CsmUsageQuotaCollectionIterator) NextWithContext(ctx context.Context) (err error) { 4784 if tracing.IsEnabled() { 4785 ctx = tracing.StartSpan(ctx, fqdn+"/CsmUsageQuotaCollectionIterator.NextWithContext") 4786 defer func() { 4787 sc := -1 4788 if iter.Response().Response.Response != nil { 4789 sc = iter.Response().Response.Response.StatusCode 4790 } 4791 tracing.EndSpan(ctx, sc, err) 4792 }() 4793 } 4794 iter.i++ 4795 if iter.i < len(iter.page.Values()) { 4796 return nil 4797 } 4798 err = iter.page.NextWithContext(ctx) 4799 if err != nil { 4800 iter.i-- 4801 return err 4802 } 4803 iter.i = 0 4804 return nil 4805} 4806 4807// Next advances to the next value. If there was an error making 4808// the request the iterator does not advance and the error is returned. 4809// Deprecated: Use NextWithContext() instead. 4810func (iter *CsmUsageQuotaCollectionIterator) Next() error { 4811 return iter.NextWithContext(context.Background()) 4812} 4813 4814// NotDone returns true if the enumeration should be started or is not yet complete. 4815func (iter CsmUsageQuotaCollectionIterator) NotDone() bool { 4816 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4817} 4818 4819// Response returns the raw server response from the last page request. 4820func (iter CsmUsageQuotaCollectionIterator) Response() CsmUsageQuotaCollection { 4821 return iter.page.Response() 4822} 4823 4824// Value returns the current value or a zero-initialized value if the 4825// iterator has advanced beyond the end of the collection. 4826func (iter CsmUsageQuotaCollectionIterator) Value() CsmUsageQuota { 4827 if !iter.page.NotDone() { 4828 return CsmUsageQuota{} 4829 } 4830 return iter.page.Values()[iter.i] 4831} 4832 4833// Creates a new instance of the CsmUsageQuotaCollectionIterator type. 4834func NewCsmUsageQuotaCollectionIterator(page CsmUsageQuotaCollectionPage) CsmUsageQuotaCollectionIterator { 4835 return CsmUsageQuotaCollectionIterator{page: page} 4836} 4837 4838// IsEmpty returns true if the ListResult contains no values. 4839func (cuqc CsmUsageQuotaCollection) IsEmpty() bool { 4840 return cuqc.Value == nil || len(*cuqc.Value) == 0 4841} 4842 4843// csmUsageQuotaCollectionPreparer prepares a request to retrieve the next set of results. 4844// It returns nil if no more results exist. 4845func (cuqc CsmUsageQuotaCollection) csmUsageQuotaCollectionPreparer(ctx context.Context) (*http.Request, error) { 4846 if cuqc.NextLink == nil || len(to.String(cuqc.NextLink)) < 1 { 4847 return nil, nil 4848 } 4849 return autorest.Prepare((&http.Request{}).WithContext(ctx), 4850 autorest.AsJSON(), 4851 autorest.AsGet(), 4852 autorest.WithBaseURL(to.String(cuqc.NextLink))) 4853} 4854 4855// CsmUsageQuotaCollectionPage contains a page of CsmUsageQuota values. 4856type CsmUsageQuotaCollectionPage struct { 4857 fn func(context.Context, CsmUsageQuotaCollection) (CsmUsageQuotaCollection, error) 4858 cuqc CsmUsageQuotaCollection 4859} 4860 4861// NextWithContext advances to the next page of values. If there was an error making 4862// the request the page does not advance and the error is returned. 4863func (page *CsmUsageQuotaCollectionPage) NextWithContext(ctx context.Context) (err error) { 4864 if tracing.IsEnabled() { 4865 ctx = tracing.StartSpan(ctx, fqdn+"/CsmUsageQuotaCollectionPage.NextWithContext") 4866 defer func() { 4867 sc := -1 4868 if page.Response().Response.Response != nil { 4869 sc = page.Response().Response.Response.StatusCode 4870 } 4871 tracing.EndSpan(ctx, sc, err) 4872 }() 4873 } 4874 next, err := page.fn(ctx, page.cuqc) 4875 if err != nil { 4876 return err 4877 } 4878 page.cuqc = next 4879 return nil 4880} 4881 4882// Next advances to the next page of values. If there was an error making 4883// the request the page does not advance and the error is returned. 4884// Deprecated: Use NextWithContext() instead. 4885func (page *CsmUsageQuotaCollectionPage) Next() error { 4886 return page.NextWithContext(context.Background()) 4887} 4888 4889// NotDone returns true if the page enumeration should be started or is not yet complete. 4890func (page CsmUsageQuotaCollectionPage) NotDone() bool { 4891 return !page.cuqc.IsEmpty() 4892} 4893 4894// Response returns the raw server response from the last page request. 4895func (page CsmUsageQuotaCollectionPage) Response() CsmUsageQuotaCollection { 4896 return page.cuqc 4897} 4898 4899// Values returns the slice of values for the current page or nil if there are no values. 4900func (page CsmUsageQuotaCollectionPage) Values() []CsmUsageQuota { 4901 if page.cuqc.IsEmpty() { 4902 return nil 4903 } 4904 return *page.cuqc.Value 4905} 4906 4907// Creates a new instance of the CsmUsageQuotaCollectionPage type. 4908func NewCsmUsageQuotaCollectionPage(getNextPage func(context.Context, CsmUsageQuotaCollection) (CsmUsageQuotaCollection, error)) CsmUsageQuotaCollectionPage { 4909 return CsmUsageQuotaCollectionPage{fn: getNextPage} 4910} 4911 4912// Csr certificate signing request object 4913type Csr struct { 4914 autorest.Response `json:"-"` 4915 *CsrProperties `json:"properties,omitempty"` 4916 // ID - Resource Id 4917 ID *string `json:"id,omitempty"` 4918 // Name - Resource Name 4919 Name *string `json:"name,omitempty"` 4920 // Kind - Kind of resource 4921 Kind *string `json:"kind,omitempty"` 4922 // Location - Resource Location 4923 Location *string `json:"location,omitempty"` 4924 // Type - Resource type 4925 Type *string `json:"type,omitempty"` 4926 // Tags - Resource tags 4927 Tags map[string]*string `json:"tags"` 4928} 4929 4930// MarshalJSON is the custom marshaler for Csr. 4931func (c Csr) MarshalJSON() ([]byte, error) { 4932 objectMap := make(map[string]interface{}) 4933 if c.CsrProperties != nil { 4934 objectMap["properties"] = c.CsrProperties 4935 } 4936 if c.ID != nil { 4937 objectMap["id"] = c.ID 4938 } 4939 if c.Name != nil { 4940 objectMap["name"] = c.Name 4941 } 4942 if c.Kind != nil { 4943 objectMap["kind"] = c.Kind 4944 } 4945 if c.Location != nil { 4946 objectMap["location"] = c.Location 4947 } 4948 if c.Type != nil { 4949 objectMap["type"] = c.Type 4950 } 4951 if c.Tags != nil { 4952 objectMap["tags"] = c.Tags 4953 } 4954 return json.Marshal(objectMap) 4955} 4956 4957// UnmarshalJSON is the custom unmarshaler for Csr struct. 4958func (c *Csr) UnmarshalJSON(body []byte) error { 4959 var m map[string]*json.RawMessage 4960 err := json.Unmarshal(body, &m) 4961 if err != nil { 4962 return err 4963 } 4964 for k, v := range m { 4965 switch k { 4966 case "properties": 4967 if v != nil { 4968 var csrProperties CsrProperties 4969 err = json.Unmarshal(*v, &csrProperties) 4970 if err != nil { 4971 return err 4972 } 4973 c.CsrProperties = &csrProperties 4974 } 4975 case "id": 4976 if v != nil { 4977 var ID string 4978 err = json.Unmarshal(*v, &ID) 4979 if err != nil { 4980 return err 4981 } 4982 c.ID = &ID 4983 } 4984 case "name": 4985 if v != nil { 4986 var name string 4987 err = json.Unmarshal(*v, &name) 4988 if err != nil { 4989 return err 4990 } 4991 c.Name = &name 4992 } 4993 case "kind": 4994 if v != nil { 4995 var kind string 4996 err = json.Unmarshal(*v, &kind) 4997 if err != nil { 4998 return err 4999 } 5000 c.Kind = &kind 5001 } 5002 case "location": 5003 if v != nil { 5004 var location string 5005 err = json.Unmarshal(*v, &location) 5006 if err != nil { 5007 return err 5008 } 5009 c.Location = &location 5010 } 5011 case "type": 5012 if v != nil { 5013 var typeVar string 5014 err = json.Unmarshal(*v, &typeVar) 5015 if err != nil { 5016 return err 5017 } 5018 c.Type = &typeVar 5019 } 5020 case "tags": 5021 if v != nil { 5022 var tags map[string]*string 5023 err = json.Unmarshal(*v, &tags) 5024 if err != nil { 5025 return err 5026 } 5027 c.Tags = tags 5028 } 5029 } 5030 } 5031 5032 return nil 5033} 5034 5035// CsrProperties ... 5036type CsrProperties struct { 5037 // Name - Name used to locate CSR object 5038 Name *string `json:"name,omitempty"` 5039 // DistinguishedName - Distinguished name of certificate to be created 5040 DistinguishedName *string `json:"distinguishedName,omitempty"` 5041 // CsrString - Actual CSR string created 5042 CsrString *string `json:"csrString,omitempty"` 5043 // PfxBlob - PFX certificate of created certificate 5044 PfxBlob *string `json:"pfxBlob,omitempty"` 5045 // Password - PFX password 5046 Password *string `json:"password,omitempty"` 5047 // PublicKeyHash - Hash of the certificates public key 5048 PublicKeyHash *string `json:"publicKeyHash,omitempty"` 5049 // HostingEnvironment - Hosting environment 5050 HostingEnvironment *string `json:"hostingEnvironment,omitempty"` 5051} 5052 5053// CustomLoginSettingValue custom logging setting value 5054type CustomLoginSettingValue struct { 5055 *CustomLoginSettingValueProperties `json:"properties,omitempty"` 5056 // ID - Resource Id 5057 ID *string `json:"id,omitempty"` 5058 // Name - Resource Name 5059 Name *string `json:"name,omitempty"` 5060 // Kind - Kind of resource 5061 Kind *string `json:"kind,omitempty"` 5062 // Location - Resource Location 5063 Location *string `json:"location,omitempty"` 5064 // Type - Resource type 5065 Type *string `json:"type,omitempty"` 5066 // Tags - Resource tags 5067 Tags map[string]*string `json:"tags"` 5068} 5069 5070// MarshalJSON is the custom marshaler for CustomLoginSettingValue. 5071func (clsv CustomLoginSettingValue) MarshalJSON() ([]byte, error) { 5072 objectMap := make(map[string]interface{}) 5073 if clsv.CustomLoginSettingValueProperties != nil { 5074 objectMap["properties"] = clsv.CustomLoginSettingValueProperties 5075 } 5076 if clsv.ID != nil { 5077 objectMap["id"] = clsv.ID 5078 } 5079 if clsv.Name != nil { 5080 objectMap["name"] = clsv.Name 5081 } 5082 if clsv.Kind != nil { 5083 objectMap["kind"] = clsv.Kind 5084 } 5085 if clsv.Location != nil { 5086 objectMap["location"] = clsv.Location 5087 } 5088 if clsv.Type != nil { 5089 objectMap["type"] = clsv.Type 5090 } 5091 if clsv.Tags != nil { 5092 objectMap["tags"] = clsv.Tags 5093 } 5094 return json.Marshal(objectMap) 5095} 5096 5097// UnmarshalJSON is the custom unmarshaler for CustomLoginSettingValue struct. 5098func (clsv *CustomLoginSettingValue) UnmarshalJSON(body []byte) error { 5099 var m map[string]*json.RawMessage 5100 err := json.Unmarshal(body, &m) 5101 if err != nil { 5102 return err 5103 } 5104 for k, v := range m { 5105 switch k { 5106 case "properties": 5107 if v != nil { 5108 var customLoginSettingValueProperties CustomLoginSettingValueProperties 5109 err = json.Unmarshal(*v, &customLoginSettingValueProperties) 5110 if err != nil { 5111 return err 5112 } 5113 clsv.CustomLoginSettingValueProperties = &customLoginSettingValueProperties 5114 } 5115 case "id": 5116 if v != nil { 5117 var ID string 5118 err = json.Unmarshal(*v, &ID) 5119 if err != nil { 5120 return err 5121 } 5122 clsv.ID = &ID 5123 } 5124 case "name": 5125 if v != nil { 5126 var name string 5127 err = json.Unmarshal(*v, &name) 5128 if err != nil { 5129 return err 5130 } 5131 clsv.Name = &name 5132 } 5133 case "kind": 5134 if v != nil { 5135 var kind string 5136 err = json.Unmarshal(*v, &kind) 5137 if err != nil { 5138 return err 5139 } 5140 clsv.Kind = &kind 5141 } 5142 case "location": 5143 if v != nil { 5144 var location string 5145 err = json.Unmarshal(*v, &location) 5146 if err != nil { 5147 return err 5148 } 5149 clsv.Location = &location 5150 } 5151 case "type": 5152 if v != nil { 5153 var typeVar string 5154 err = json.Unmarshal(*v, &typeVar) 5155 if err != nil { 5156 return err 5157 } 5158 clsv.Type = &typeVar 5159 } 5160 case "tags": 5161 if v != nil { 5162 var tags map[string]*string 5163 err = json.Unmarshal(*v, &tags) 5164 if err != nil { 5165 return err 5166 } 5167 clsv.Tags = tags 5168 } 5169 } 5170 } 5171 5172 return nil 5173} 5174 5175// CustomLoginSettingValueProperties ... 5176type CustomLoginSettingValueProperties struct { 5177 // Option - Option selected for this custom login setting value 5178 Option *string `json:"option,omitempty"` 5179} 5180 5181// DatabaseBackupSetting note: properties are serialized in JSON format and stored in DB. 5182// if new properties are added they might not be in the previous data rows 5183// so please handle nulls 5184type DatabaseBackupSetting struct { 5185 // DatabaseType - SqlAzure / MySql 5186 DatabaseType *string `json:"databaseType,omitempty"` 5187 Name *string `json:"name,omitempty"` 5188 // ConnectionStringName - Contains a connection string name that is linked to the SiteConfig.ConnectionStrings. 5189 // This is used during restore with overwrite connection strings options. 5190 ConnectionStringName *string `json:"connectionStringName,omitempty"` 5191 // 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. 5192 ConnectionString *string `json:"connectionString,omitempty"` 5193} 5194 5195// DeletedSite reports deleted site including the timestamp of operation 5196type DeletedSite struct { 5197 *DeletedSiteProperties `json:"properties,omitempty"` 5198 // ID - Resource Id 5199 ID *string `json:"id,omitempty"` 5200 // Name - Resource Name 5201 Name *string `json:"name,omitempty"` 5202 // Kind - Kind of resource 5203 Kind *string `json:"kind,omitempty"` 5204 // Location - Resource Location 5205 Location *string `json:"location,omitempty"` 5206 // Type - Resource type 5207 Type *string `json:"type,omitempty"` 5208 // Tags - Resource tags 5209 Tags map[string]*string `json:"tags"` 5210} 5211 5212// MarshalJSON is the custom marshaler for DeletedSite. 5213func (ds DeletedSite) MarshalJSON() ([]byte, error) { 5214 objectMap := make(map[string]interface{}) 5215 if ds.DeletedSiteProperties != nil { 5216 objectMap["properties"] = ds.DeletedSiteProperties 5217 } 5218 if ds.ID != nil { 5219 objectMap["id"] = ds.ID 5220 } 5221 if ds.Name != nil { 5222 objectMap["name"] = ds.Name 5223 } 5224 if ds.Kind != nil { 5225 objectMap["kind"] = ds.Kind 5226 } 5227 if ds.Location != nil { 5228 objectMap["location"] = ds.Location 5229 } 5230 if ds.Type != nil { 5231 objectMap["type"] = ds.Type 5232 } 5233 if ds.Tags != nil { 5234 objectMap["tags"] = ds.Tags 5235 } 5236 return json.Marshal(objectMap) 5237} 5238 5239// UnmarshalJSON is the custom unmarshaler for DeletedSite struct. 5240func (ds *DeletedSite) UnmarshalJSON(body []byte) error { 5241 var m map[string]*json.RawMessage 5242 err := json.Unmarshal(body, &m) 5243 if err != nil { 5244 return err 5245 } 5246 for k, v := range m { 5247 switch k { 5248 case "properties": 5249 if v != nil { 5250 var deletedSiteProperties DeletedSiteProperties 5251 err = json.Unmarshal(*v, &deletedSiteProperties) 5252 if err != nil { 5253 return err 5254 } 5255 ds.DeletedSiteProperties = &deletedSiteProperties 5256 } 5257 case "id": 5258 if v != nil { 5259 var ID string 5260 err = json.Unmarshal(*v, &ID) 5261 if err != nil { 5262 return err 5263 } 5264 ds.ID = &ID 5265 } 5266 case "name": 5267 if v != nil { 5268 var name string 5269 err = json.Unmarshal(*v, &name) 5270 if err != nil { 5271 return err 5272 } 5273 ds.Name = &name 5274 } 5275 case "kind": 5276 if v != nil { 5277 var kind string 5278 err = json.Unmarshal(*v, &kind) 5279 if err != nil { 5280 return err 5281 } 5282 ds.Kind = &kind 5283 } 5284 case "location": 5285 if v != nil { 5286 var location string 5287 err = json.Unmarshal(*v, &location) 5288 if err != nil { 5289 return err 5290 } 5291 ds.Location = &location 5292 } 5293 case "type": 5294 if v != nil { 5295 var typeVar string 5296 err = json.Unmarshal(*v, &typeVar) 5297 if err != nil { 5298 return err 5299 } 5300 ds.Type = &typeVar 5301 } 5302 case "tags": 5303 if v != nil { 5304 var tags map[string]*string 5305 err = json.Unmarshal(*v, &tags) 5306 if err != nil { 5307 return err 5308 } 5309 ds.Tags = tags 5310 } 5311 } 5312 } 5313 5314 return nil 5315} 5316 5317// DeletedSiteCollection collection of deleted sites 5318type DeletedSiteCollection struct { 5319 autorest.Response `json:"-"` 5320 // Value - Collection of resources 5321 Value *[]DeletedSite `json:"value,omitempty"` 5322 // NextLink - Link to next page of resources 5323 NextLink *string `json:"nextLink,omitempty"` 5324} 5325 5326// DeletedSiteCollectionIterator provides access to a complete listing of DeletedSite values. 5327type DeletedSiteCollectionIterator struct { 5328 i int 5329 page DeletedSiteCollectionPage 5330} 5331 5332// NextWithContext advances to the next value. If there was an error making 5333// the request the iterator does not advance and the error is returned. 5334func (iter *DeletedSiteCollectionIterator) NextWithContext(ctx context.Context) (err error) { 5335 if tracing.IsEnabled() { 5336 ctx = tracing.StartSpan(ctx, fqdn+"/DeletedSiteCollectionIterator.NextWithContext") 5337 defer func() { 5338 sc := -1 5339 if iter.Response().Response.Response != nil { 5340 sc = iter.Response().Response.Response.StatusCode 5341 } 5342 tracing.EndSpan(ctx, sc, err) 5343 }() 5344 } 5345 iter.i++ 5346 if iter.i < len(iter.page.Values()) { 5347 return nil 5348 } 5349 err = iter.page.NextWithContext(ctx) 5350 if err != nil { 5351 iter.i-- 5352 return err 5353 } 5354 iter.i = 0 5355 return nil 5356} 5357 5358// Next advances to the next value. If there was an error making 5359// the request the iterator does not advance and the error is returned. 5360// Deprecated: Use NextWithContext() instead. 5361func (iter *DeletedSiteCollectionIterator) Next() error { 5362 return iter.NextWithContext(context.Background()) 5363} 5364 5365// NotDone returns true if the enumeration should be started or is not yet complete. 5366func (iter DeletedSiteCollectionIterator) NotDone() bool { 5367 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5368} 5369 5370// Response returns the raw server response from the last page request. 5371func (iter DeletedSiteCollectionIterator) Response() DeletedSiteCollection { 5372 return iter.page.Response() 5373} 5374 5375// Value returns the current value or a zero-initialized value if the 5376// iterator has advanced beyond the end of the collection. 5377func (iter DeletedSiteCollectionIterator) Value() DeletedSite { 5378 if !iter.page.NotDone() { 5379 return DeletedSite{} 5380 } 5381 return iter.page.Values()[iter.i] 5382} 5383 5384// Creates a new instance of the DeletedSiteCollectionIterator type. 5385func NewDeletedSiteCollectionIterator(page DeletedSiteCollectionPage) DeletedSiteCollectionIterator { 5386 return DeletedSiteCollectionIterator{page: page} 5387} 5388 5389// IsEmpty returns true if the ListResult contains no values. 5390func (dsc DeletedSiteCollection) IsEmpty() bool { 5391 return dsc.Value == nil || len(*dsc.Value) == 0 5392} 5393 5394// deletedSiteCollectionPreparer prepares a request to retrieve the next set of results. 5395// It returns nil if no more results exist. 5396func (dsc DeletedSiteCollection) deletedSiteCollectionPreparer(ctx context.Context) (*http.Request, error) { 5397 if dsc.NextLink == nil || len(to.String(dsc.NextLink)) < 1 { 5398 return nil, nil 5399 } 5400 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5401 autorest.AsJSON(), 5402 autorest.AsGet(), 5403 autorest.WithBaseURL(to.String(dsc.NextLink))) 5404} 5405 5406// DeletedSiteCollectionPage contains a page of DeletedSite values. 5407type DeletedSiteCollectionPage struct { 5408 fn func(context.Context, DeletedSiteCollection) (DeletedSiteCollection, error) 5409 dsc DeletedSiteCollection 5410} 5411 5412// NextWithContext advances to the next page of values. If there was an error making 5413// the request the page does not advance and the error is returned. 5414func (page *DeletedSiteCollectionPage) NextWithContext(ctx context.Context) (err error) { 5415 if tracing.IsEnabled() { 5416 ctx = tracing.StartSpan(ctx, fqdn+"/DeletedSiteCollectionPage.NextWithContext") 5417 defer func() { 5418 sc := -1 5419 if page.Response().Response.Response != nil { 5420 sc = page.Response().Response.Response.StatusCode 5421 } 5422 tracing.EndSpan(ctx, sc, err) 5423 }() 5424 } 5425 next, err := page.fn(ctx, page.dsc) 5426 if err != nil { 5427 return err 5428 } 5429 page.dsc = next 5430 return nil 5431} 5432 5433// Next advances to the next page of values. If there was an error making 5434// the request the page does not advance and the error is returned. 5435// Deprecated: Use NextWithContext() instead. 5436func (page *DeletedSiteCollectionPage) Next() error { 5437 return page.NextWithContext(context.Background()) 5438} 5439 5440// NotDone returns true if the page enumeration should be started or is not yet complete. 5441func (page DeletedSiteCollectionPage) NotDone() bool { 5442 return !page.dsc.IsEmpty() 5443} 5444 5445// Response returns the raw server response from the last page request. 5446func (page DeletedSiteCollectionPage) Response() DeletedSiteCollection { 5447 return page.dsc 5448} 5449 5450// Values returns the slice of values for the current page or nil if there are no values. 5451func (page DeletedSiteCollectionPage) Values() []DeletedSite { 5452 if page.dsc.IsEmpty() { 5453 return nil 5454 } 5455 return *page.dsc.Value 5456} 5457 5458// Creates a new instance of the DeletedSiteCollectionPage type. 5459func NewDeletedSiteCollectionPage(getNextPage func(context.Context, DeletedSiteCollection) (DeletedSiteCollection, error)) DeletedSiteCollectionPage { 5460 return DeletedSiteCollectionPage{fn: getNextPage} 5461} 5462 5463// DeletedSiteProperties ... 5464type DeletedSiteProperties struct { 5465 // DeletedTimestamp - Time when the site was deleted 5466 DeletedTimestamp *date.Time `json:"deletedTimestamp,omitempty"` 5467 // Name - Name of web app 5468 Name *string `json:"name,omitempty"` 5469 // State - READ-ONLY; State of the web app 5470 State *string `json:"state,omitempty"` 5471 // HostNames - READ-ONLY; Hostnames associated with web app 5472 HostNames *[]string `json:"hostNames,omitempty"` 5473 // RepositorySiteName - READ-ONLY; Name of repository site 5474 RepositorySiteName *string `json:"repositorySiteName,omitempty"` 5475 // UsageState - READ-ONLY; State indicating whether web app has exceeded its quota usage. Possible values include: 'UsageStateNormal', 'UsageStateExceeded' 5476 UsageState UsageState `json:"usageState,omitempty"` 5477 // Enabled - True if the site is enabled; otherwise, false. Setting this value to false disables the site (takes the site off line). 5478 Enabled *bool `json:"enabled,omitempty"` 5479 // 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 5480 // the app is not served on those hostnames 5481 EnabledHostNames *[]string `json:"enabledHostNames,omitempty"` 5482 // AvailabilityState - READ-ONLY; Management information availability state for the web app. Possible values are Normal or Limited. 5483 // Normal means that the site is running correctly and that management information for the site is available. 5484 // 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' 5485 AvailabilityState SiteAvailabilityState `json:"availabilityState,omitempty"` 5486 // HostNameSslStates - Hostname SSL states are used to manage the SSL bindings for site's hostnames. 5487 HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"` 5488 ServerFarmID *string `json:"serverFarmId,omitempty"` 5489 // LastModifiedTimeUtc - READ-ONLY; Last time web app was modified in UTC 5490 LastModifiedTimeUtc *date.Time `json:"lastModifiedTimeUtc,omitempty"` 5491 // SiteConfig - Configuration of web app 5492 SiteConfig *SiteConfig `json:"siteConfig,omitempty"` 5493 // TrafficManagerHostNames - READ-ONLY; Read-only list of Azure Traffic manager hostnames associated with web app 5494 TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"` 5495 // PremiumAppDeployed - READ-ONLY; If set indicates whether web app is deployed as a premium app 5496 PremiumAppDeployed *bool `json:"premiumAppDeployed,omitempty"` 5497 // ScmSiteAlsoStopped - If set indicates whether to stop SCM (KUDU) site when the web app is stopped. Default is false. 5498 ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` 5499 // TargetSwapSlot - READ-ONLY; Read-only property that specifies which slot this app will swap into 5500 TargetSwapSlot *string `json:"targetSwapSlot,omitempty"` 5501 // HostingEnvironmentProfile - Specification for the hosting environment (App Service Environment) to use for the web app 5502 HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` 5503 MicroService *string `json:"microService,omitempty"` 5504 // GatewaySiteName - Name of gateway app associated with web app 5505 GatewaySiteName *string `json:"gatewaySiteName,omitempty"` 5506 // ClientAffinityEnabled - Specifies if the client affinity is enabled when load balancing http request for multiple instances of the web app 5507 ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"` 5508 // ClientCertEnabled - Specifies if the client certificate is enabled for the web app 5509 ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` 5510 // HostNamesDisabled - Specifies if the public hostnames are disabled the web app. 5511 // If set to true the app is only accessible via API Management process 5512 HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"` 5513 // 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. 5514 OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"` 5515 // ContainerSize - Size of a function container 5516 ContainerSize *int32 `json:"containerSize,omitempty"` 5517 // MaxNumberOfWorkers - Maximum number of workers 5518 // This only applies to function container 5519 MaxNumberOfWorkers *int32 `json:"maxNumberOfWorkers,omitempty"` 5520 // CloningInfo - This is only valid for web app creation. If specified, web app is cloned from 5521 // a source web app 5522 CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` 5523 // ResourceGroup - READ-ONLY; Resource group web app belongs to 5524 ResourceGroup *string `json:"resourceGroup,omitempty"` 5525 // IsDefaultContainer - READ-ONLY; Site is a default container 5526 IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"` 5527 // DefaultHostName - READ-ONLY; Default hostname of the web app 5528 DefaultHostName *string `json:"defaultHostName,omitempty"` 5529} 5530 5531// Deployment represents user credentials used for publishing activity 5532type Deployment struct { 5533 autorest.Response `json:"-"` 5534 *DeploymentProperties `json:"properties,omitempty"` 5535 // ID - Resource Id 5536 ID *string `json:"id,omitempty"` 5537 // Name - Resource Name 5538 Name *string `json:"name,omitempty"` 5539 // Kind - Kind of resource 5540 Kind *string `json:"kind,omitempty"` 5541 // Location - Resource Location 5542 Location *string `json:"location,omitempty"` 5543 // Type - Resource type 5544 Type *string `json:"type,omitempty"` 5545 // Tags - Resource tags 5546 Tags map[string]*string `json:"tags"` 5547} 5548 5549// MarshalJSON is the custom marshaler for Deployment. 5550func (d Deployment) MarshalJSON() ([]byte, error) { 5551 objectMap := make(map[string]interface{}) 5552 if d.DeploymentProperties != nil { 5553 objectMap["properties"] = d.DeploymentProperties 5554 } 5555 if d.ID != nil { 5556 objectMap["id"] = d.ID 5557 } 5558 if d.Name != nil { 5559 objectMap["name"] = d.Name 5560 } 5561 if d.Kind != nil { 5562 objectMap["kind"] = d.Kind 5563 } 5564 if d.Location != nil { 5565 objectMap["location"] = d.Location 5566 } 5567 if d.Type != nil { 5568 objectMap["type"] = d.Type 5569 } 5570 if d.Tags != nil { 5571 objectMap["tags"] = d.Tags 5572 } 5573 return json.Marshal(objectMap) 5574} 5575 5576// UnmarshalJSON is the custom unmarshaler for Deployment struct. 5577func (d *Deployment) UnmarshalJSON(body []byte) error { 5578 var m map[string]*json.RawMessage 5579 err := json.Unmarshal(body, &m) 5580 if err != nil { 5581 return err 5582 } 5583 for k, v := range m { 5584 switch k { 5585 case "properties": 5586 if v != nil { 5587 var deploymentProperties DeploymentProperties 5588 err = json.Unmarshal(*v, &deploymentProperties) 5589 if err != nil { 5590 return err 5591 } 5592 d.DeploymentProperties = &deploymentProperties 5593 } 5594 case "id": 5595 if v != nil { 5596 var ID string 5597 err = json.Unmarshal(*v, &ID) 5598 if err != nil { 5599 return err 5600 } 5601 d.ID = &ID 5602 } 5603 case "name": 5604 if v != nil { 5605 var name string 5606 err = json.Unmarshal(*v, &name) 5607 if err != nil { 5608 return err 5609 } 5610 d.Name = &name 5611 } 5612 case "kind": 5613 if v != nil { 5614 var kind string 5615 err = json.Unmarshal(*v, &kind) 5616 if err != nil { 5617 return err 5618 } 5619 d.Kind = &kind 5620 } 5621 case "location": 5622 if v != nil { 5623 var location string 5624 err = json.Unmarshal(*v, &location) 5625 if err != nil { 5626 return err 5627 } 5628 d.Location = &location 5629 } 5630 case "type": 5631 if v != nil { 5632 var typeVar string 5633 err = json.Unmarshal(*v, &typeVar) 5634 if err != nil { 5635 return err 5636 } 5637 d.Type = &typeVar 5638 } 5639 case "tags": 5640 if v != nil { 5641 var tags map[string]*string 5642 err = json.Unmarshal(*v, &tags) 5643 if err != nil { 5644 return err 5645 } 5646 d.Tags = tags 5647 } 5648 } 5649 } 5650 5651 return nil 5652} 5653 5654// DeploymentCollection collection of app deployments 5655type DeploymentCollection struct { 5656 autorest.Response `json:"-"` 5657 // Value - Collection of resources 5658 Value *[]Deployment `json:"value,omitempty"` 5659 // NextLink - Link to next page of resources 5660 NextLink *string `json:"nextLink,omitempty"` 5661} 5662 5663// DeploymentCollectionIterator provides access to a complete listing of Deployment values. 5664type DeploymentCollectionIterator struct { 5665 i int 5666 page DeploymentCollectionPage 5667} 5668 5669// NextWithContext advances to the next value. If there was an error making 5670// the request the iterator does not advance and the error is returned. 5671func (iter *DeploymentCollectionIterator) NextWithContext(ctx context.Context) (err error) { 5672 if tracing.IsEnabled() { 5673 ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentCollectionIterator.NextWithContext") 5674 defer func() { 5675 sc := -1 5676 if iter.Response().Response.Response != nil { 5677 sc = iter.Response().Response.Response.StatusCode 5678 } 5679 tracing.EndSpan(ctx, sc, err) 5680 }() 5681 } 5682 iter.i++ 5683 if iter.i < len(iter.page.Values()) { 5684 return nil 5685 } 5686 err = iter.page.NextWithContext(ctx) 5687 if err != nil { 5688 iter.i-- 5689 return err 5690 } 5691 iter.i = 0 5692 return nil 5693} 5694 5695// Next advances to the next value. If there was an error making 5696// the request the iterator does not advance and the error is returned. 5697// Deprecated: Use NextWithContext() instead. 5698func (iter *DeploymentCollectionIterator) Next() error { 5699 return iter.NextWithContext(context.Background()) 5700} 5701 5702// NotDone returns true if the enumeration should be started or is not yet complete. 5703func (iter DeploymentCollectionIterator) NotDone() bool { 5704 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5705} 5706 5707// Response returns the raw server response from the last page request. 5708func (iter DeploymentCollectionIterator) Response() DeploymentCollection { 5709 return iter.page.Response() 5710} 5711 5712// Value returns the current value or a zero-initialized value if the 5713// iterator has advanced beyond the end of the collection. 5714func (iter DeploymentCollectionIterator) Value() Deployment { 5715 if !iter.page.NotDone() { 5716 return Deployment{} 5717 } 5718 return iter.page.Values()[iter.i] 5719} 5720 5721// Creates a new instance of the DeploymentCollectionIterator type. 5722func NewDeploymentCollectionIterator(page DeploymentCollectionPage) DeploymentCollectionIterator { 5723 return DeploymentCollectionIterator{page: page} 5724} 5725 5726// IsEmpty returns true if the ListResult contains no values. 5727func (dc DeploymentCollection) IsEmpty() bool { 5728 return dc.Value == nil || len(*dc.Value) == 0 5729} 5730 5731// deploymentCollectionPreparer prepares a request to retrieve the next set of results. 5732// It returns nil if no more results exist. 5733func (dc DeploymentCollection) deploymentCollectionPreparer(ctx context.Context) (*http.Request, error) { 5734 if dc.NextLink == nil || len(to.String(dc.NextLink)) < 1 { 5735 return nil, nil 5736 } 5737 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5738 autorest.AsJSON(), 5739 autorest.AsGet(), 5740 autorest.WithBaseURL(to.String(dc.NextLink))) 5741} 5742 5743// DeploymentCollectionPage contains a page of Deployment values. 5744type DeploymentCollectionPage struct { 5745 fn func(context.Context, DeploymentCollection) (DeploymentCollection, error) 5746 dc DeploymentCollection 5747} 5748 5749// NextWithContext advances to the next page of values. If there was an error making 5750// the request the page does not advance and the error is returned. 5751func (page *DeploymentCollectionPage) NextWithContext(ctx context.Context) (err error) { 5752 if tracing.IsEnabled() { 5753 ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentCollectionPage.NextWithContext") 5754 defer func() { 5755 sc := -1 5756 if page.Response().Response.Response != nil { 5757 sc = page.Response().Response.Response.StatusCode 5758 } 5759 tracing.EndSpan(ctx, sc, err) 5760 }() 5761 } 5762 next, err := page.fn(ctx, page.dc) 5763 if err != nil { 5764 return err 5765 } 5766 page.dc = next 5767 return nil 5768} 5769 5770// Next advances to the next page of values. If there was an error making 5771// the request the page does not advance and the error is returned. 5772// Deprecated: Use NextWithContext() instead. 5773func (page *DeploymentCollectionPage) Next() error { 5774 return page.NextWithContext(context.Background()) 5775} 5776 5777// NotDone returns true if the page enumeration should be started or is not yet complete. 5778func (page DeploymentCollectionPage) NotDone() bool { 5779 return !page.dc.IsEmpty() 5780} 5781 5782// Response returns the raw server response from the last page request. 5783func (page DeploymentCollectionPage) Response() DeploymentCollection { 5784 return page.dc 5785} 5786 5787// Values returns the slice of values for the current page or nil if there are no values. 5788func (page DeploymentCollectionPage) Values() []Deployment { 5789 if page.dc.IsEmpty() { 5790 return nil 5791 } 5792 return *page.dc.Value 5793} 5794 5795// Creates a new instance of the DeploymentCollectionPage type. 5796func NewDeploymentCollectionPage(getNextPage func(context.Context, DeploymentCollection) (DeploymentCollection, error)) DeploymentCollectionPage { 5797 return DeploymentCollectionPage{fn: getNextPage} 5798} 5799 5800// DeploymentProperties ... 5801type DeploymentProperties struct { 5802 // ID - Id 5803 ID *string `json:"id,omitempty"` 5804 // Status - Status 5805 Status *int32 `json:"status,omitempty"` 5806 // Message - Message 5807 Message *string `json:"message,omitempty"` 5808 // Author - Author 5809 Author *string `json:"author,omitempty"` 5810 // Deployer - Deployer 5811 Deployer *string `json:"deployer,omitempty"` 5812 // AuthorEmail - AuthorEmail 5813 AuthorEmail *string `json:"author_email,omitempty"` 5814 // StartTime - StartTime 5815 StartTime *date.Time `json:"start_time,omitempty"` 5816 // EndTime - EndTime 5817 EndTime *date.Time `json:"end_time,omitempty"` 5818 // Active - Active 5819 Active *bool `json:"active,omitempty"` 5820 // Details - Detail 5821 Details *string `json:"details,omitempty"` 5822} 5823 5824// Domain represents a domain 5825type Domain struct { 5826 autorest.Response `json:"-"` 5827 *DomainProperties `json:"properties,omitempty"` 5828 // ID - Resource Id 5829 ID *string `json:"id,omitempty"` 5830 // Name - Resource Name 5831 Name *string `json:"name,omitempty"` 5832 // Kind - Kind of resource 5833 Kind *string `json:"kind,omitempty"` 5834 // Location - Resource Location 5835 Location *string `json:"location,omitempty"` 5836 // Type - Resource type 5837 Type *string `json:"type,omitempty"` 5838 // Tags - Resource tags 5839 Tags map[string]*string `json:"tags"` 5840} 5841 5842// MarshalJSON is the custom marshaler for Domain. 5843func (d Domain) MarshalJSON() ([]byte, error) { 5844 objectMap := make(map[string]interface{}) 5845 if d.DomainProperties != nil { 5846 objectMap["properties"] = d.DomainProperties 5847 } 5848 if d.ID != nil { 5849 objectMap["id"] = d.ID 5850 } 5851 if d.Name != nil { 5852 objectMap["name"] = d.Name 5853 } 5854 if d.Kind != nil { 5855 objectMap["kind"] = d.Kind 5856 } 5857 if d.Location != nil { 5858 objectMap["location"] = d.Location 5859 } 5860 if d.Type != nil { 5861 objectMap["type"] = d.Type 5862 } 5863 if d.Tags != nil { 5864 objectMap["tags"] = d.Tags 5865 } 5866 return json.Marshal(objectMap) 5867} 5868 5869// UnmarshalJSON is the custom unmarshaler for Domain struct. 5870func (d *Domain) UnmarshalJSON(body []byte) error { 5871 var m map[string]*json.RawMessage 5872 err := json.Unmarshal(body, &m) 5873 if err != nil { 5874 return err 5875 } 5876 for k, v := range m { 5877 switch k { 5878 case "properties": 5879 if v != nil { 5880 var domainProperties DomainProperties 5881 err = json.Unmarshal(*v, &domainProperties) 5882 if err != nil { 5883 return err 5884 } 5885 d.DomainProperties = &domainProperties 5886 } 5887 case "id": 5888 if v != nil { 5889 var ID string 5890 err = json.Unmarshal(*v, &ID) 5891 if err != nil { 5892 return err 5893 } 5894 d.ID = &ID 5895 } 5896 case "name": 5897 if v != nil { 5898 var name string 5899 err = json.Unmarshal(*v, &name) 5900 if err != nil { 5901 return err 5902 } 5903 d.Name = &name 5904 } 5905 case "kind": 5906 if v != nil { 5907 var kind string 5908 err = json.Unmarshal(*v, &kind) 5909 if err != nil { 5910 return err 5911 } 5912 d.Kind = &kind 5913 } 5914 case "location": 5915 if v != nil { 5916 var location string 5917 err = json.Unmarshal(*v, &location) 5918 if err != nil { 5919 return err 5920 } 5921 d.Location = &location 5922 } 5923 case "type": 5924 if v != nil { 5925 var typeVar string 5926 err = json.Unmarshal(*v, &typeVar) 5927 if err != nil { 5928 return err 5929 } 5930 d.Type = &typeVar 5931 } 5932 case "tags": 5933 if v != nil { 5934 var tags map[string]*string 5935 err = json.Unmarshal(*v, &tags) 5936 if err != nil { 5937 return err 5938 } 5939 d.Tags = tags 5940 } 5941 } 5942 } 5943 5944 return nil 5945} 5946 5947// DomainAvailablilityCheckResult domain availablility check result 5948type DomainAvailablilityCheckResult struct { 5949 autorest.Response `json:"-"` 5950 // Name - Name of the domain 5951 Name *string `json:"name,omitempty"` 5952 // Available - If true then domain can be purchased using CreateDomain Api 5953 Available *bool `json:"available,omitempty"` 5954 // DomainType - Domain type. Possible values include: 'Regular', 'SoftDeleted' 5955 DomainType DomainType `json:"domainType,omitempty"` 5956} 5957 5958// DomainCollection collection of domains 5959type DomainCollection struct { 5960 autorest.Response `json:"-"` 5961 // Value - Collection of resources 5962 Value *[]Domain `json:"value,omitempty"` 5963 // NextLink - Link to next page of resources 5964 NextLink *string `json:"nextLink,omitempty"` 5965} 5966 5967// DomainCollectionIterator provides access to a complete listing of Domain values. 5968type DomainCollectionIterator struct { 5969 i int 5970 page DomainCollectionPage 5971} 5972 5973// NextWithContext advances to the next value. If there was an error making 5974// the request the iterator does not advance and the error is returned. 5975func (iter *DomainCollectionIterator) NextWithContext(ctx context.Context) (err error) { 5976 if tracing.IsEnabled() { 5977 ctx = tracing.StartSpan(ctx, fqdn+"/DomainCollectionIterator.NextWithContext") 5978 defer func() { 5979 sc := -1 5980 if iter.Response().Response.Response != nil { 5981 sc = iter.Response().Response.Response.StatusCode 5982 } 5983 tracing.EndSpan(ctx, sc, err) 5984 }() 5985 } 5986 iter.i++ 5987 if iter.i < len(iter.page.Values()) { 5988 return nil 5989 } 5990 err = iter.page.NextWithContext(ctx) 5991 if err != nil { 5992 iter.i-- 5993 return err 5994 } 5995 iter.i = 0 5996 return nil 5997} 5998 5999// Next advances to the next value. If there was an error making 6000// the request the iterator does not advance and the error is returned. 6001// Deprecated: Use NextWithContext() instead. 6002func (iter *DomainCollectionIterator) Next() error { 6003 return iter.NextWithContext(context.Background()) 6004} 6005 6006// NotDone returns true if the enumeration should be started or is not yet complete. 6007func (iter DomainCollectionIterator) NotDone() bool { 6008 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6009} 6010 6011// Response returns the raw server response from the last page request. 6012func (iter DomainCollectionIterator) Response() DomainCollection { 6013 return iter.page.Response() 6014} 6015 6016// Value returns the current value or a zero-initialized value if the 6017// iterator has advanced beyond the end of the collection. 6018func (iter DomainCollectionIterator) Value() Domain { 6019 if !iter.page.NotDone() { 6020 return Domain{} 6021 } 6022 return iter.page.Values()[iter.i] 6023} 6024 6025// Creates a new instance of the DomainCollectionIterator type. 6026func NewDomainCollectionIterator(page DomainCollectionPage) DomainCollectionIterator { 6027 return DomainCollectionIterator{page: page} 6028} 6029 6030// IsEmpty returns true if the ListResult contains no values. 6031func (dc DomainCollection) IsEmpty() bool { 6032 return dc.Value == nil || len(*dc.Value) == 0 6033} 6034 6035// domainCollectionPreparer prepares a request to retrieve the next set of results. 6036// It returns nil if no more results exist. 6037func (dc DomainCollection) domainCollectionPreparer(ctx context.Context) (*http.Request, error) { 6038 if dc.NextLink == nil || len(to.String(dc.NextLink)) < 1 { 6039 return nil, nil 6040 } 6041 return autorest.Prepare((&http.Request{}).WithContext(ctx), 6042 autorest.AsJSON(), 6043 autorest.AsGet(), 6044 autorest.WithBaseURL(to.String(dc.NextLink))) 6045} 6046 6047// DomainCollectionPage contains a page of Domain values. 6048type DomainCollectionPage struct { 6049 fn func(context.Context, DomainCollection) (DomainCollection, error) 6050 dc DomainCollection 6051} 6052 6053// NextWithContext advances to the next page of values. If there was an error making 6054// the request the page does not advance and the error is returned. 6055func (page *DomainCollectionPage) NextWithContext(ctx context.Context) (err error) { 6056 if tracing.IsEnabled() { 6057 ctx = tracing.StartSpan(ctx, fqdn+"/DomainCollectionPage.NextWithContext") 6058 defer func() { 6059 sc := -1 6060 if page.Response().Response.Response != nil { 6061 sc = page.Response().Response.Response.StatusCode 6062 } 6063 tracing.EndSpan(ctx, sc, err) 6064 }() 6065 } 6066 next, err := page.fn(ctx, page.dc) 6067 if err != nil { 6068 return err 6069 } 6070 page.dc = next 6071 return nil 6072} 6073 6074// Next advances to the next page of values. If there was an error making 6075// the request the page does not advance and the error is returned. 6076// Deprecated: Use NextWithContext() instead. 6077func (page *DomainCollectionPage) Next() error { 6078 return page.NextWithContext(context.Background()) 6079} 6080 6081// NotDone returns true if the page enumeration should be started or is not yet complete. 6082func (page DomainCollectionPage) NotDone() bool { 6083 return !page.dc.IsEmpty() 6084} 6085 6086// Response returns the raw server response from the last page request. 6087func (page DomainCollectionPage) Response() DomainCollection { 6088 return page.dc 6089} 6090 6091// Values returns the slice of values for the current page or nil if there are no values. 6092func (page DomainCollectionPage) Values() []Domain { 6093 if page.dc.IsEmpty() { 6094 return nil 6095 } 6096 return *page.dc.Value 6097} 6098 6099// Creates a new instance of the DomainCollectionPage type. 6100func NewDomainCollectionPage(getNextPage func(context.Context, DomainCollection) (DomainCollection, error)) DomainCollectionPage { 6101 return DomainCollectionPage{fn: getNextPage} 6102} 6103 6104// DomainControlCenterSsoRequest single sign on request information for domain management 6105type DomainControlCenterSsoRequest struct { 6106 autorest.Response `json:"-"` 6107 // URL - Url where the single sign on request is to be made 6108 URL *string `json:"url,omitempty"` 6109 // PostParameterKey - Post parameter key 6110 PostParameterKey *string `json:"postParameterKey,omitempty"` 6111 // PostParameterValue - Post parameter value. Client should use 'application/x-www-form-urlencoded' encoding for this value. 6112 PostParameterValue *string `json:"postParameterValue,omitempty"` 6113} 6114 6115// DomainProperties ... 6116type DomainProperties struct { 6117 // ContactAdmin - Admin contact information 6118 ContactAdmin *Contact `json:"contactAdmin,omitempty"` 6119 // ContactBilling - Billing contact information 6120 ContactBilling *Contact `json:"contactBilling,omitempty"` 6121 // ContactRegistrant - Registrant contact information 6122 ContactRegistrant *Contact `json:"contactRegistrant,omitempty"` 6123 // ContactTech - Technical contact information 6124 ContactTech *Contact `json:"contactTech,omitempty"` 6125 // 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' 6126 RegistrationStatus DomainStatus `json:"registrationStatus,omitempty"` 6127 // ProvisioningState - Domain provisioning state. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' 6128 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 6129 // NameServers - Name servers 6130 NameServers *[]string `json:"nameServers,omitempty"` 6131 // Privacy - If true then domain privacy is enabled for this domain 6132 Privacy *bool `json:"privacy,omitempty"` 6133 // CreatedTime - Domain creation timestamp 6134 CreatedTime *date.Time `json:"createdTime,omitempty"` 6135 // ExpirationTime - Domain expiration timestamp 6136 ExpirationTime *date.Time `json:"expirationTime,omitempty"` 6137 // LastRenewedTime - Timestamp when the domain was renewed last time 6138 LastRenewedTime *date.Time `json:"lastRenewedTime,omitempty"` 6139 // AutoRenew - If true then domain will renewed automatically 6140 AutoRenew *bool `json:"autoRenew,omitempty"` 6141 // 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 6142 ReadyForDNSRecordManagement *bool `json:"readyForDnsRecordManagement,omitempty"` 6143 // ManagedHostNames - All hostnames derived from the domain and assigned to Azure resources 6144 ManagedHostNames *[]HostName `json:"managedHostNames,omitempty"` 6145 // Consent - Legal agreement consent 6146 Consent *DomainPurchaseConsent `json:"consent,omitempty"` 6147 // DomainNotRenewableReasons - Reasons why domain is not renewable 6148 DomainNotRenewableReasons *[]string `json:"domainNotRenewableReasons,omitempty"` 6149} 6150 6151// DomainPurchaseConsent domain purchase consent object representing acceptance of applicable legal 6152// agreements 6153type DomainPurchaseConsent struct { 6154 // AgreementKeys - List of applicable legal agreement keys. This list can be retrieved using ListLegalAgreements Api under TopLevelDomain resource 6155 AgreementKeys *[]string `json:"agreementKeys,omitempty"` 6156 // AgreedBy - Client IP address 6157 AgreedBy *string `json:"agreedBy,omitempty"` 6158 // AgreedAt - Timestamp when the agreements were accepted 6159 AgreedAt *date.Time `json:"agreedAt,omitempty"` 6160} 6161 6162// DomainRecommendationSearchParameters domain recommendation search parameters 6163type DomainRecommendationSearchParameters struct { 6164 // Keywords - Keywords to be used for generating domain recommendations 6165 Keywords *string `json:"keywords,omitempty"` 6166 // MaxDomainRecommendations - Maximum number of recommendations 6167 MaxDomainRecommendations *int32 `json:"maxDomainRecommendations,omitempty"` 6168} 6169 6170// DomainRegistrationInput domain registration input for validation Api 6171type DomainRegistrationInput struct { 6172 *DomainRegistrationInputProperties `json:"properties,omitempty"` 6173 // ID - Resource Id 6174 ID *string `json:"id,omitempty"` 6175 // Name - Resource Name 6176 Name *string `json:"name,omitempty"` 6177 // Kind - Kind of resource 6178 Kind *string `json:"kind,omitempty"` 6179 // Location - Resource Location 6180 Location *string `json:"location,omitempty"` 6181 // Type - Resource type 6182 Type *string `json:"type,omitempty"` 6183 // Tags - Resource tags 6184 Tags map[string]*string `json:"tags"` 6185} 6186 6187// MarshalJSON is the custom marshaler for DomainRegistrationInput. 6188func (dri DomainRegistrationInput) MarshalJSON() ([]byte, error) { 6189 objectMap := make(map[string]interface{}) 6190 if dri.DomainRegistrationInputProperties != nil { 6191 objectMap["properties"] = dri.DomainRegistrationInputProperties 6192 } 6193 if dri.ID != nil { 6194 objectMap["id"] = dri.ID 6195 } 6196 if dri.Name != nil { 6197 objectMap["name"] = dri.Name 6198 } 6199 if dri.Kind != nil { 6200 objectMap["kind"] = dri.Kind 6201 } 6202 if dri.Location != nil { 6203 objectMap["location"] = dri.Location 6204 } 6205 if dri.Type != nil { 6206 objectMap["type"] = dri.Type 6207 } 6208 if dri.Tags != nil { 6209 objectMap["tags"] = dri.Tags 6210 } 6211 return json.Marshal(objectMap) 6212} 6213 6214// UnmarshalJSON is the custom unmarshaler for DomainRegistrationInput struct. 6215func (dri *DomainRegistrationInput) UnmarshalJSON(body []byte) error { 6216 var m map[string]*json.RawMessage 6217 err := json.Unmarshal(body, &m) 6218 if err != nil { 6219 return err 6220 } 6221 for k, v := range m { 6222 switch k { 6223 case "properties": 6224 if v != nil { 6225 var domainRegistrationInputProperties DomainRegistrationInputProperties 6226 err = json.Unmarshal(*v, &domainRegistrationInputProperties) 6227 if err != nil { 6228 return err 6229 } 6230 dri.DomainRegistrationInputProperties = &domainRegistrationInputProperties 6231 } 6232 case "id": 6233 if v != nil { 6234 var ID string 6235 err = json.Unmarshal(*v, &ID) 6236 if err != nil { 6237 return err 6238 } 6239 dri.ID = &ID 6240 } 6241 case "name": 6242 if v != nil { 6243 var name string 6244 err = json.Unmarshal(*v, &name) 6245 if err != nil { 6246 return err 6247 } 6248 dri.Name = &name 6249 } 6250 case "kind": 6251 if v != nil { 6252 var kind string 6253 err = json.Unmarshal(*v, &kind) 6254 if err != nil { 6255 return err 6256 } 6257 dri.Kind = &kind 6258 } 6259 case "location": 6260 if v != nil { 6261 var location string 6262 err = json.Unmarshal(*v, &location) 6263 if err != nil { 6264 return err 6265 } 6266 dri.Location = &location 6267 } 6268 case "type": 6269 if v != nil { 6270 var typeVar string 6271 err = json.Unmarshal(*v, &typeVar) 6272 if err != nil { 6273 return err 6274 } 6275 dri.Type = &typeVar 6276 } 6277 case "tags": 6278 if v != nil { 6279 var tags map[string]*string 6280 err = json.Unmarshal(*v, &tags) 6281 if err != nil { 6282 return err 6283 } 6284 dri.Tags = tags 6285 } 6286 } 6287 } 6288 6289 return nil 6290} 6291 6292// DomainRegistrationInputProperties ... 6293type DomainRegistrationInputProperties struct { 6294 // Name - Name of the domain 6295 Name *string `json:"name,omitempty"` 6296 // ContactAdmin - Admin contact information 6297 ContactAdmin *Contact `json:"contactAdmin,omitempty"` 6298 // ContactBilling - Billing contact information 6299 ContactBilling *Contact `json:"contactBilling,omitempty"` 6300 // ContactRegistrant - Registrant contact information 6301 ContactRegistrant *Contact `json:"contactRegistrant,omitempty"` 6302 // ContactTech - Technical contact information 6303 ContactTech *Contact `json:"contactTech,omitempty"` 6304 // 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' 6305 RegistrationStatus DomainStatus `json:"registrationStatus,omitempty"` 6306 // ProvisioningState - Domain provisioning state. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' 6307 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 6308 // NameServers - Name servers 6309 NameServers *[]string `json:"nameServers,omitempty"` 6310 // Privacy - If true then domain privacy is enabled for this domain 6311 Privacy *bool `json:"privacy,omitempty"` 6312 // CreatedTime - Domain creation timestamp 6313 CreatedTime *date.Time `json:"createdTime,omitempty"` 6314 // ExpirationTime - Domain expiration timestamp 6315 ExpirationTime *date.Time `json:"expirationTime,omitempty"` 6316 // LastRenewedTime - Timestamp when the domain was renewed last time 6317 LastRenewedTime *date.Time `json:"lastRenewedTime,omitempty"` 6318 // AutoRenew - If true then domain will renewed automatically 6319 AutoRenew *bool `json:"autoRenew,omitempty"` 6320 // 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 6321 ReadyForDNSRecordManagement *bool `json:"readyForDnsRecordManagement,omitempty"` 6322 // ManagedHostNames - All hostnames derived from the domain and assigned to Azure resources 6323 ManagedHostNames *[]HostName `json:"managedHostNames,omitempty"` 6324 // Consent - Legal agreement consent 6325 Consent *DomainPurchaseConsent `json:"consent,omitempty"` 6326 // DomainNotRenewableReasons - Reasons why domain is not renewable 6327 DomainNotRenewableReasons *[]string `json:"domainNotRenewableReasons,omitempty"` 6328} 6329 6330// EnabledConfig enabled configuration 6331type EnabledConfig struct { 6332 // Enabled - Enabled 6333 Enabled *bool `json:"enabled,omitempty"` 6334} 6335 6336// ExpandedParentAPIEntity expanded parent object for expansion 6337type ExpandedParentAPIEntity struct { 6338 *ExpandedParentAPIEntityProperties `json:"properties,omitempty"` 6339 // ID - Resource Id 6340 ID *string `json:"id,omitempty"` 6341 // Name - Resource Name 6342 Name *string `json:"name,omitempty"` 6343 // Kind - Kind of resource 6344 Kind *string `json:"kind,omitempty"` 6345 // Location - Resource Location 6346 Location *string `json:"location,omitempty"` 6347 // Type - Resource type 6348 Type *string `json:"type,omitempty"` 6349 // Tags - Resource tags 6350 Tags map[string]*string `json:"tags"` 6351} 6352 6353// MarshalJSON is the custom marshaler for ExpandedParentAPIEntity. 6354func (epAe ExpandedParentAPIEntity) MarshalJSON() ([]byte, error) { 6355 objectMap := make(map[string]interface{}) 6356 if epAe.ExpandedParentAPIEntityProperties != nil { 6357 objectMap["properties"] = epAe.ExpandedParentAPIEntityProperties 6358 } 6359 if epAe.ID != nil { 6360 objectMap["id"] = epAe.ID 6361 } 6362 if epAe.Name != nil { 6363 objectMap["name"] = epAe.Name 6364 } 6365 if epAe.Kind != nil { 6366 objectMap["kind"] = epAe.Kind 6367 } 6368 if epAe.Location != nil { 6369 objectMap["location"] = epAe.Location 6370 } 6371 if epAe.Type != nil { 6372 objectMap["type"] = epAe.Type 6373 } 6374 if epAe.Tags != nil { 6375 objectMap["tags"] = epAe.Tags 6376 } 6377 return json.Marshal(objectMap) 6378} 6379 6380// UnmarshalJSON is the custom unmarshaler for ExpandedParentAPIEntity struct. 6381func (epAe *ExpandedParentAPIEntity) UnmarshalJSON(body []byte) error { 6382 var m map[string]*json.RawMessage 6383 err := json.Unmarshal(body, &m) 6384 if err != nil { 6385 return err 6386 } 6387 for k, v := range m { 6388 switch k { 6389 case "properties": 6390 if v != nil { 6391 var expandedParentAPIEntityProperties ExpandedParentAPIEntityProperties 6392 err = json.Unmarshal(*v, &expandedParentAPIEntityProperties) 6393 if err != nil { 6394 return err 6395 } 6396 epAe.ExpandedParentAPIEntityProperties = &expandedParentAPIEntityProperties 6397 } 6398 case "id": 6399 if v != nil { 6400 var ID string 6401 err = json.Unmarshal(*v, &ID) 6402 if err != nil { 6403 return err 6404 } 6405 epAe.ID = &ID 6406 } 6407 case "name": 6408 if v != nil { 6409 var name string 6410 err = json.Unmarshal(*v, &name) 6411 if err != nil { 6412 return err 6413 } 6414 epAe.Name = &name 6415 } 6416 case "kind": 6417 if v != nil { 6418 var kind string 6419 err = json.Unmarshal(*v, &kind) 6420 if err != nil { 6421 return err 6422 } 6423 epAe.Kind = &kind 6424 } 6425 case "location": 6426 if v != nil { 6427 var location string 6428 err = json.Unmarshal(*v, &location) 6429 if err != nil { 6430 return err 6431 } 6432 epAe.Location = &location 6433 } 6434 case "type": 6435 if v != nil { 6436 var typeVar string 6437 err = json.Unmarshal(*v, &typeVar) 6438 if err != nil { 6439 return err 6440 } 6441 epAe.Type = &typeVar 6442 } 6443 case "tags": 6444 if v != nil { 6445 var tags map[string]*string 6446 err = json.Unmarshal(*v, &tags) 6447 if err != nil { 6448 return err 6449 } 6450 epAe.Tags = tags 6451 } 6452 } 6453 } 6454 6455 return nil 6456} 6457 6458// ExpandedParentAPIEntityProperties ... 6459type ExpandedParentAPIEntityProperties struct { 6460 // ID - Id of connection provider 6461 ID *string `json:"id,omitempty"` 6462 // Entity - Id of connection provider 6463 Entity *ResponseMessageEnvelopeAPIEntity `json:"entity,omitempty"` 6464} 6465 6466// Experiments class containing Routing in production experiments 6467type Experiments struct { 6468 // RampUpRules - List of {Microsoft.Web.Hosting.Administration.RampUpRule} objects. 6469 RampUpRules *[]RampUpRule `json:"rampUpRules,omitempty"` 6470} 6471 6472// FileSystemApplicationLogsConfig application logs to file system configuration 6473type FileSystemApplicationLogsConfig struct { 6474 // Level - Log level. Possible values include: 'LogLevelOff', 'LogLevelVerbose', 'LogLevelInformation', 'LogLevelWarning', 'LogLevelError' 6475 Level LogLevel `json:"level,omitempty"` 6476} 6477 6478// FileSystemHTTPLogsConfig http logs to file system configuration 6479type FileSystemHTTPLogsConfig struct { 6480 // RetentionInMb - Maximum size in megabytes that http log files can use. 6481 // When reached old log files will be removed to make space for new ones. 6482 // Value can range between 25 and 100. 6483 RetentionInMb *int32 `json:"retentionInMb,omitempty"` 6484 // RetentionInDays - Retention in days. 6485 // Remove files older than X days. 6486 // 0 or lower means no retention. 6487 RetentionInDays *int32 `json:"retentionInDays,omitempty"` 6488 // Enabled - Enabled 6489 Enabled *bool `json:"enabled,omitempty"` 6490} 6491 6492// GeneralAPIInformation general API information 6493type GeneralAPIInformation struct { 6494 *GeneralAPIInformationProperties `json:"properties,omitempty"` 6495 // ID - Resource Id 6496 ID *string `json:"id,omitempty"` 6497 // Name - Resource Name 6498 Name *string `json:"name,omitempty"` 6499 // Kind - Kind of resource 6500 Kind *string `json:"kind,omitempty"` 6501 // Location - Resource Location 6502 Location *string `json:"location,omitempty"` 6503 // Type - Resource type 6504 Type *string `json:"type,omitempty"` 6505 // Tags - Resource tags 6506 Tags map[string]*string `json:"tags"` 6507} 6508 6509// MarshalJSON is the custom marshaler for GeneralAPIInformation. 6510func (gai GeneralAPIInformation) MarshalJSON() ([]byte, error) { 6511 objectMap := make(map[string]interface{}) 6512 if gai.GeneralAPIInformationProperties != nil { 6513 objectMap["properties"] = gai.GeneralAPIInformationProperties 6514 } 6515 if gai.ID != nil { 6516 objectMap["id"] = gai.ID 6517 } 6518 if gai.Name != nil { 6519 objectMap["name"] = gai.Name 6520 } 6521 if gai.Kind != nil { 6522 objectMap["kind"] = gai.Kind 6523 } 6524 if gai.Location != nil { 6525 objectMap["location"] = gai.Location 6526 } 6527 if gai.Type != nil { 6528 objectMap["type"] = gai.Type 6529 } 6530 if gai.Tags != nil { 6531 objectMap["tags"] = gai.Tags 6532 } 6533 return json.Marshal(objectMap) 6534} 6535 6536// UnmarshalJSON is the custom unmarshaler for GeneralAPIInformation struct. 6537func (gai *GeneralAPIInformation) UnmarshalJSON(body []byte) error { 6538 var m map[string]*json.RawMessage 6539 err := json.Unmarshal(body, &m) 6540 if err != nil { 6541 return err 6542 } 6543 for k, v := range m { 6544 switch k { 6545 case "properties": 6546 if v != nil { 6547 var generalAPIInformationProperties GeneralAPIInformationProperties 6548 err = json.Unmarshal(*v, &generalAPIInformationProperties) 6549 if err != nil { 6550 return err 6551 } 6552 gai.GeneralAPIInformationProperties = &generalAPIInformationProperties 6553 } 6554 case "id": 6555 if v != nil { 6556 var ID string 6557 err = json.Unmarshal(*v, &ID) 6558 if err != nil { 6559 return err 6560 } 6561 gai.ID = &ID 6562 } 6563 case "name": 6564 if v != nil { 6565 var name string 6566 err = json.Unmarshal(*v, &name) 6567 if err != nil { 6568 return err 6569 } 6570 gai.Name = &name 6571 } 6572 case "kind": 6573 if v != nil { 6574 var kind string 6575 err = json.Unmarshal(*v, &kind) 6576 if err != nil { 6577 return err 6578 } 6579 gai.Kind = &kind 6580 } 6581 case "location": 6582 if v != nil { 6583 var location string 6584 err = json.Unmarshal(*v, &location) 6585 if err != nil { 6586 return err 6587 } 6588 gai.Location = &location 6589 } 6590 case "type": 6591 if v != nil { 6592 var typeVar string 6593 err = json.Unmarshal(*v, &typeVar) 6594 if err != nil { 6595 return err 6596 } 6597 gai.Type = &typeVar 6598 } 6599 case "tags": 6600 if v != nil { 6601 var tags map[string]*string 6602 err = json.Unmarshal(*v, &tags) 6603 if err != nil { 6604 return err 6605 } 6606 gai.Tags = tags 6607 } 6608 } 6609 } 6610 6611 return nil 6612} 6613 6614// GeneralAPIInformationProperties ... 6615type GeneralAPIInformationProperties struct { 6616 // IconURL - Icon Url 6617 IconURL *string `json:"iconUrl,omitempty"` 6618 // DisplayName - Display Name 6619 DisplayName *string `json:"displayName,omitempty"` 6620 // Description - Description 6621 Description *string `json:"description,omitempty"` 6622 // TermsOfUseURL - a public accessible url of the Terms Of Use Url of this API 6623 TermsOfUseURL *string `json:"termsOfUseUrl,omitempty"` 6624 // ConnectionDisplayName - DefaultConnectionNameTemplate 6625 ConnectionDisplayName *string `json:"connectionDisplayName,omitempty"` 6626 // ConnectionPortalURL - ConnectionPortalUrl 6627 ConnectionPortalURL interface{} `json:"connectionPortalUrl,omitempty"` 6628} 6629 6630// GeoRegion geographical region 6631type GeoRegion struct { 6632 *GeoRegionProperties `json:"properties,omitempty"` 6633 // ID - Resource Id 6634 ID *string `json:"id,omitempty"` 6635 // Name - Resource Name 6636 Name *string `json:"name,omitempty"` 6637 // Kind - Kind of resource 6638 Kind *string `json:"kind,omitempty"` 6639 // Location - Resource Location 6640 Location *string `json:"location,omitempty"` 6641 // Type - Resource type 6642 Type *string `json:"type,omitempty"` 6643 // Tags - Resource tags 6644 Tags map[string]*string `json:"tags"` 6645} 6646 6647// MarshalJSON is the custom marshaler for GeoRegion. 6648func (gr GeoRegion) MarshalJSON() ([]byte, error) { 6649 objectMap := make(map[string]interface{}) 6650 if gr.GeoRegionProperties != nil { 6651 objectMap["properties"] = gr.GeoRegionProperties 6652 } 6653 if gr.ID != nil { 6654 objectMap["id"] = gr.ID 6655 } 6656 if gr.Name != nil { 6657 objectMap["name"] = gr.Name 6658 } 6659 if gr.Kind != nil { 6660 objectMap["kind"] = gr.Kind 6661 } 6662 if gr.Location != nil { 6663 objectMap["location"] = gr.Location 6664 } 6665 if gr.Type != nil { 6666 objectMap["type"] = gr.Type 6667 } 6668 if gr.Tags != nil { 6669 objectMap["tags"] = gr.Tags 6670 } 6671 return json.Marshal(objectMap) 6672} 6673 6674// UnmarshalJSON is the custom unmarshaler for GeoRegion struct. 6675func (gr *GeoRegion) UnmarshalJSON(body []byte) error { 6676 var m map[string]*json.RawMessage 6677 err := json.Unmarshal(body, &m) 6678 if err != nil { 6679 return err 6680 } 6681 for k, v := range m { 6682 switch k { 6683 case "properties": 6684 if v != nil { 6685 var geoRegionProperties GeoRegionProperties 6686 err = json.Unmarshal(*v, &geoRegionProperties) 6687 if err != nil { 6688 return err 6689 } 6690 gr.GeoRegionProperties = &geoRegionProperties 6691 } 6692 case "id": 6693 if v != nil { 6694 var ID string 6695 err = json.Unmarshal(*v, &ID) 6696 if err != nil { 6697 return err 6698 } 6699 gr.ID = &ID 6700 } 6701 case "name": 6702 if v != nil { 6703 var name string 6704 err = json.Unmarshal(*v, &name) 6705 if err != nil { 6706 return err 6707 } 6708 gr.Name = &name 6709 } 6710 case "kind": 6711 if v != nil { 6712 var kind string 6713 err = json.Unmarshal(*v, &kind) 6714 if err != nil { 6715 return err 6716 } 6717 gr.Kind = &kind 6718 } 6719 case "location": 6720 if v != nil { 6721 var location string 6722 err = json.Unmarshal(*v, &location) 6723 if err != nil { 6724 return err 6725 } 6726 gr.Location = &location 6727 } 6728 case "type": 6729 if v != nil { 6730 var typeVar string 6731 err = json.Unmarshal(*v, &typeVar) 6732 if err != nil { 6733 return err 6734 } 6735 gr.Type = &typeVar 6736 } 6737 case "tags": 6738 if v != nil { 6739 var tags map[string]*string 6740 err = json.Unmarshal(*v, &tags) 6741 if err != nil { 6742 return err 6743 } 6744 gr.Tags = tags 6745 } 6746 } 6747 } 6748 6749 return nil 6750} 6751 6752// GeoRegionCollection collection of geo regions 6753type GeoRegionCollection struct { 6754 autorest.Response `json:"-"` 6755 // Value - Collection of resources 6756 Value *[]GeoRegion `json:"value,omitempty"` 6757 // NextLink - Link to next page of resources 6758 NextLink *string `json:"nextLink,omitempty"` 6759} 6760 6761// GeoRegionCollectionIterator provides access to a complete listing of GeoRegion values. 6762type GeoRegionCollectionIterator struct { 6763 i int 6764 page GeoRegionCollectionPage 6765} 6766 6767// NextWithContext advances to the next value. If there was an error making 6768// the request the iterator does not advance and the error is returned. 6769func (iter *GeoRegionCollectionIterator) NextWithContext(ctx context.Context) (err error) { 6770 if tracing.IsEnabled() { 6771 ctx = tracing.StartSpan(ctx, fqdn+"/GeoRegionCollectionIterator.NextWithContext") 6772 defer func() { 6773 sc := -1 6774 if iter.Response().Response.Response != nil { 6775 sc = iter.Response().Response.Response.StatusCode 6776 } 6777 tracing.EndSpan(ctx, sc, err) 6778 }() 6779 } 6780 iter.i++ 6781 if iter.i < len(iter.page.Values()) { 6782 return nil 6783 } 6784 err = iter.page.NextWithContext(ctx) 6785 if err != nil { 6786 iter.i-- 6787 return err 6788 } 6789 iter.i = 0 6790 return nil 6791} 6792 6793// Next advances to the next value. If there was an error making 6794// the request the iterator does not advance and the error is returned. 6795// Deprecated: Use NextWithContext() instead. 6796func (iter *GeoRegionCollectionIterator) Next() error { 6797 return iter.NextWithContext(context.Background()) 6798} 6799 6800// NotDone returns true if the enumeration should be started or is not yet complete. 6801func (iter GeoRegionCollectionIterator) NotDone() bool { 6802 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6803} 6804 6805// Response returns the raw server response from the last page request. 6806func (iter GeoRegionCollectionIterator) Response() GeoRegionCollection { 6807 return iter.page.Response() 6808} 6809 6810// Value returns the current value or a zero-initialized value if the 6811// iterator has advanced beyond the end of the collection. 6812func (iter GeoRegionCollectionIterator) Value() GeoRegion { 6813 if !iter.page.NotDone() { 6814 return GeoRegion{} 6815 } 6816 return iter.page.Values()[iter.i] 6817} 6818 6819// Creates a new instance of the GeoRegionCollectionIterator type. 6820func NewGeoRegionCollectionIterator(page GeoRegionCollectionPage) GeoRegionCollectionIterator { 6821 return GeoRegionCollectionIterator{page: page} 6822} 6823 6824// IsEmpty returns true if the ListResult contains no values. 6825func (grc GeoRegionCollection) IsEmpty() bool { 6826 return grc.Value == nil || len(*grc.Value) == 0 6827} 6828 6829// geoRegionCollectionPreparer prepares a request to retrieve the next set of results. 6830// It returns nil if no more results exist. 6831func (grc GeoRegionCollection) geoRegionCollectionPreparer(ctx context.Context) (*http.Request, error) { 6832 if grc.NextLink == nil || len(to.String(grc.NextLink)) < 1 { 6833 return nil, nil 6834 } 6835 return autorest.Prepare((&http.Request{}).WithContext(ctx), 6836 autorest.AsJSON(), 6837 autorest.AsGet(), 6838 autorest.WithBaseURL(to.String(grc.NextLink))) 6839} 6840 6841// GeoRegionCollectionPage contains a page of GeoRegion values. 6842type GeoRegionCollectionPage struct { 6843 fn func(context.Context, GeoRegionCollection) (GeoRegionCollection, error) 6844 grc GeoRegionCollection 6845} 6846 6847// NextWithContext advances to the next page of values. If there was an error making 6848// the request the page does not advance and the error is returned. 6849func (page *GeoRegionCollectionPage) NextWithContext(ctx context.Context) (err error) { 6850 if tracing.IsEnabled() { 6851 ctx = tracing.StartSpan(ctx, fqdn+"/GeoRegionCollectionPage.NextWithContext") 6852 defer func() { 6853 sc := -1 6854 if page.Response().Response.Response != nil { 6855 sc = page.Response().Response.Response.StatusCode 6856 } 6857 tracing.EndSpan(ctx, sc, err) 6858 }() 6859 } 6860 next, err := page.fn(ctx, page.grc) 6861 if err != nil { 6862 return err 6863 } 6864 page.grc = next 6865 return nil 6866} 6867 6868// Next advances to the next page of values. If there was an error making 6869// the request the page does not advance and the error is returned. 6870// Deprecated: Use NextWithContext() instead. 6871func (page *GeoRegionCollectionPage) Next() error { 6872 return page.NextWithContext(context.Background()) 6873} 6874 6875// NotDone returns true if the page enumeration should be started or is not yet complete. 6876func (page GeoRegionCollectionPage) NotDone() bool { 6877 return !page.grc.IsEmpty() 6878} 6879 6880// Response returns the raw server response from the last page request. 6881func (page GeoRegionCollectionPage) Response() GeoRegionCollection { 6882 return page.grc 6883} 6884 6885// Values returns the slice of values for the current page or nil if there are no values. 6886func (page GeoRegionCollectionPage) Values() []GeoRegion { 6887 if page.grc.IsEmpty() { 6888 return nil 6889 } 6890 return *page.grc.Value 6891} 6892 6893// Creates a new instance of the GeoRegionCollectionPage type. 6894func NewGeoRegionCollectionPage(getNextPage func(context.Context, GeoRegionCollection) (GeoRegionCollection, error)) GeoRegionCollectionPage { 6895 return GeoRegionCollectionPage{fn: getNextPage} 6896} 6897 6898// GeoRegionProperties ... 6899type GeoRegionProperties struct { 6900 // Name - Region name 6901 Name *string `json:"name,omitempty"` 6902 // Description - Region description 6903 Description *string `json:"description,omitempty"` 6904 // DisplayName - Display name for region 6905 DisplayName *string `json:"displayName,omitempty"` 6906} 6907 6908// HandlerMapping the IIS handler mappings used to define which handler processes HTTP requests with 6909// certain extension. 6910// For example it is used to configure php-cgi.exe process to handle all HTTP requests with *.php 6911// extension. 6912type HandlerMapping struct { 6913 // Extension - Requests with this extension will be handled using the specified FastCGI application. 6914 Extension *string `json:"extension,omitempty"` 6915 // ScriptProcessor - The absolute path to the FastCGI application. 6916 ScriptProcessor *string `json:"scriptProcessor,omitempty"` 6917 // Arguments - Command-line arguments to be passed to the script processor. 6918 Arguments *string `json:"arguments,omitempty"` 6919} 6920 6921// HostingEnvironment description of an hostingEnvironment (App Service Environment) 6922type HostingEnvironment struct { 6923 autorest.Response `json:"-"` 6924 *HostingEnvironmentProperties `json:"properties,omitempty"` 6925 // ID - Resource Id 6926 ID *string `json:"id,omitempty"` 6927 // Name - Resource Name 6928 Name *string `json:"name,omitempty"` 6929 // Kind - Kind of resource 6930 Kind *string `json:"kind,omitempty"` 6931 // Location - Resource Location 6932 Location *string `json:"location,omitempty"` 6933 // Type - Resource type 6934 Type *string `json:"type,omitempty"` 6935 // Tags - Resource tags 6936 Tags map[string]*string `json:"tags"` 6937} 6938 6939// MarshalJSON is the custom marshaler for HostingEnvironment. 6940func (he HostingEnvironment) MarshalJSON() ([]byte, error) { 6941 objectMap := make(map[string]interface{}) 6942 if he.HostingEnvironmentProperties != nil { 6943 objectMap["properties"] = he.HostingEnvironmentProperties 6944 } 6945 if he.ID != nil { 6946 objectMap["id"] = he.ID 6947 } 6948 if he.Name != nil { 6949 objectMap["name"] = he.Name 6950 } 6951 if he.Kind != nil { 6952 objectMap["kind"] = he.Kind 6953 } 6954 if he.Location != nil { 6955 objectMap["location"] = he.Location 6956 } 6957 if he.Type != nil { 6958 objectMap["type"] = he.Type 6959 } 6960 if he.Tags != nil { 6961 objectMap["tags"] = he.Tags 6962 } 6963 return json.Marshal(objectMap) 6964} 6965 6966// UnmarshalJSON is the custom unmarshaler for HostingEnvironment struct. 6967func (he *HostingEnvironment) UnmarshalJSON(body []byte) error { 6968 var m map[string]*json.RawMessage 6969 err := json.Unmarshal(body, &m) 6970 if err != nil { 6971 return err 6972 } 6973 for k, v := range m { 6974 switch k { 6975 case "properties": 6976 if v != nil { 6977 var hostingEnvironmentProperties HostingEnvironmentProperties 6978 err = json.Unmarshal(*v, &hostingEnvironmentProperties) 6979 if err != nil { 6980 return err 6981 } 6982 he.HostingEnvironmentProperties = &hostingEnvironmentProperties 6983 } 6984 case "id": 6985 if v != nil { 6986 var ID string 6987 err = json.Unmarshal(*v, &ID) 6988 if err != nil { 6989 return err 6990 } 6991 he.ID = &ID 6992 } 6993 case "name": 6994 if v != nil { 6995 var name string 6996 err = json.Unmarshal(*v, &name) 6997 if err != nil { 6998 return err 6999 } 7000 he.Name = &name 7001 } 7002 case "kind": 7003 if v != nil { 7004 var kind string 7005 err = json.Unmarshal(*v, &kind) 7006 if err != nil { 7007 return err 7008 } 7009 he.Kind = &kind 7010 } 7011 case "location": 7012 if v != nil { 7013 var location string 7014 err = json.Unmarshal(*v, &location) 7015 if err != nil { 7016 return err 7017 } 7018 he.Location = &location 7019 } 7020 case "type": 7021 if v != nil { 7022 var typeVar string 7023 err = json.Unmarshal(*v, &typeVar) 7024 if err != nil { 7025 return err 7026 } 7027 he.Type = &typeVar 7028 } 7029 case "tags": 7030 if v != nil { 7031 var tags map[string]*string 7032 err = json.Unmarshal(*v, &tags) 7033 if err != nil { 7034 return err 7035 } 7036 he.Tags = tags 7037 } 7038 } 7039 } 7040 7041 return nil 7042} 7043 7044// HostingEnvironmentCollection collection of hosting environments (App Service Environments) 7045type HostingEnvironmentCollection struct { 7046 autorest.Response `json:"-"` 7047 // Value - Collection of resources 7048 Value *[]HostingEnvironment `json:"value,omitempty"` 7049 // NextLink - Link to next page of resources 7050 NextLink *string `json:"nextLink,omitempty"` 7051} 7052 7053// HostingEnvironmentCollectionIterator provides access to a complete listing of HostingEnvironment values. 7054type HostingEnvironmentCollectionIterator struct { 7055 i int 7056 page HostingEnvironmentCollectionPage 7057} 7058 7059// NextWithContext advances to the next value. If there was an error making 7060// the request the iterator does not advance and the error is returned. 7061func (iter *HostingEnvironmentCollectionIterator) NextWithContext(ctx context.Context) (err error) { 7062 if tracing.IsEnabled() { 7063 ctx = tracing.StartSpan(ctx, fqdn+"/HostingEnvironmentCollectionIterator.NextWithContext") 7064 defer func() { 7065 sc := -1 7066 if iter.Response().Response.Response != nil { 7067 sc = iter.Response().Response.Response.StatusCode 7068 } 7069 tracing.EndSpan(ctx, sc, err) 7070 }() 7071 } 7072 iter.i++ 7073 if iter.i < len(iter.page.Values()) { 7074 return nil 7075 } 7076 err = iter.page.NextWithContext(ctx) 7077 if err != nil { 7078 iter.i-- 7079 return err 7080 } 7081 iter.i = 0 7082 return nil 7083} 7084 7085// Next advances to the next value. If there was an error making 7086// the request the iterator does not advance and the error is returned. 7087// Deprecated: Use NextWithContext() instead. 7088func (iter *HostingEnvironmentCollectionIterator) Next() error { 7089 return iter.NextWithContext(context.Background()) 7090} 7091 7092// NotDone returns true if the enumeration should be started or is not yet complete. 7093func (iter HostingEnvironmentCollectionIterator) NotDone() bool { 7094 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7095} 7096 7097// Response returns the raw server response from the last page request. 7098func (iter HostingEnvironmentCollectionIterator) Response() HostingEnvironmentCollection { 7099 return iter.page.Response() 7100} 7101 7102// Value returns the current value or a zero-initialized value if the 7103// iterator has advanced beyond the end of the collection. 7104func (iter HostingEnvironmentCollectionIterator) Value() HostingEnvironment { 7105 if !iter.page.NotDone() { 7106 return HostingEnvironment{} 7107 } 7108 return iter.page.Values()[iter.i] 7109} 7110 7111// Creates a new instance of the HostingEnvironmentCollectionIterator type. 7112func NewHostingEnvironmentCollectionIterator(page HostingEnvironmentCollectionPage) HostingEnvironmentCollectionIterator { 7113 return HostingEnvironmentCollectionIterator{page: page} 7114} 7115 7116// IsEmpty returns true if the ListResult contains no values. 7117func (hec HostingEnvironmentCollection) IsEmpty() bool { 7118 return hec.Value == nil || len(*hec.Value) == 0 7119} 7120 7121// hostingEnvironmentCollectionPreparer prepares a request to retrieve the next set of results. 7122// It returns nil if no more results exist. 7123func (hec HostingEnvironmentCollection) hostingEnvironmentCollectionPreparer(ctx context.Context) (*http.Request, error) { 7124 if hec.NextLink == nil || len(to.String(hec.NextLink)) < 1 { 7125 return nil, nil 7126 } 7127 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7128 autorest.AsJSON(), 7129 autorest.AsGet(), 7130 autorest.WithBaseURL(to.String(hec.NextLink))) 7131} 7132 7133// HostingEnvironmentCollectionPage contains a page of HostingEnvironment values. 7134type HostingEnvironmentCollectionPage struct { 7135 fn func(context.Context, HostingEnvironmentCollection) (HostingEnvironmentCollection, error) 7136 hec HostingEnvironmentCollection 7137} 7138 7139// NextWithContext advances to the next page of values. If there was an error making 7140// the request the page does not advance and the error is returned. 7141func (page *HostingEnvironmentCollectionPage) NextWithContext(ctx context.Context) (err error) { 7142 if tracing.IsEnabled() { 7143 ctx = tracing.StartSpan(ctx, fqdn+"/HostingEnvironmentCollectionPage.NextWithContext") 7144 defer func() { 7145 sc := -1 7146 if page.Response().Response.Response != nil { 7147 sc = page.Response().Response.Response.StatusCode 7148 } 7149 tracing.EndSpan(ctx, sc, err) 7150 }() 7151 } 7152 next, err := page.fn(ctx, page.hec) 7153 if err != nil { 7154 return err 7155 } 7156 page.hec = next 7157 return nil 7158} 7159 7160// Next advances to the next page of values. If there was an error making 7161// the request the page does not advance and the error is returned. 7162// Deprecated: Use NextWithContext() instead. 7163func (page *HostingEnvironmentCollectionPage) Next() error { 7164 return page.NextWithContext(context.Background()) 7165} 7166 7167// NotDone returns true if the page enumeration should be started or is not yet complete. 7168func (page HostingEnvironmentCollectionPage) NotDone() bool { 7169 return !page.hec.IsEmpty() 7170} 7171 7172// Response returns the raw server response from the last page request. 7173func (page HostingEnvironmentCollectionPage) Response() HostingEnvironmentCollection { 7174 return page.hec 7175} 7176 7177// Values returns the slice of values for the current page or nil if there are no values. 7178func (page HostingEnvironmentCollectionPage) Values() []HostingEnvironment { 7179 if page.hec.IsEmpty() { 7180 return nil 7181 } 7182 return *page.hec.Value 7183} 7184 7185// Creates a new instance of the HostingEnvironmentCollectionPage type. 7186func NewHostingEnvironmentCollectionPage(getNextPage func(context.Context, HostingEnvironmentCollection) (HostingEnvironmentCollection, error)) HostingEnvironmentCollectionPage { 7187 return HostingEnvironmentCollectionPage{fn: getNextPage} 7188} 7189 7190// HostingEnvironmentDiagnostics diagnostics for a hosting environment (App Service Environment) 7191type HostingEnvironmentDiagnostics struct { 7192 autorest.Response `json:"-"` 7193 // Name - Name/identifier of the diagnostics 7194 Name *string `json:"name,omitempty"` 7195 // DiagnosicsOutput - Diagnostics output 7196 DiagnosicsOutput *string `json:"diagnosicsOutput,omitempty"` 7197} 7198 7199// HostingEnvironmentProfile specification for a hostingEnvironment (App Service Environment) to use for 7200// this resource 7201type HostingEnvironmentProfile struct { 7202 // ID - Resource id of the hostingEnvironment (App Service Environment) 7203 ID *string `json:"id,omitempty"` 7204 // Name - Name of the hostingEnvironment (App Service Environment) (read only) 7205 Name *string `json:"name,omitempty"` 7206 // Type - Resource type of the hostingEnvironment (App Service Environment) (read only) 7207 Type *string `json:"type,omitempty"` 7208} 7209 7210// HostingEnvironmentProperties ... 7211type HostingEnvironmentProperties struct { 7212 // Name - Name of the hostingEnvironment (App Service Environment) 7213 Name *string `json:"name,omitempty"` 7214 // Location - Location of the hostingEnvironment (App Service Environment), e.g. "West US" 7215 Location *string `json:"location,omitempty"` 7216 // ProvisioningState - Provisioning state of the hostingEnvironment (App Service Environment). Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' 7217 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 7218 // Status - Current status of the hostingEnvironment (App Service Environment). Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting' 7219 Status HostingEnvironmentStatus `json:"status,omitempty"` 7220 // VnetName - Name of the hostingEnvironment's (App Service Environment) virtual network 7221 VnetName *string `json:"vnetName,omitempty"` 7222 // VnetResourceGroupName - Resource group of the hostingEnvironment's (App Service Environment) virtual network 7223 VnetResourceGroupName *string `json:"vnetResourceGroupName,omitempty"` 7224 // VnetSubnetName - Subnet of the hostingEnvironment's (App Service Environment) virtual network 7225 VnetSubnetName *string `json:"vnetSubnetName,omitempty"` 7226 // VirtualNetwork - Description of the hostingEnvironment's (App Service Environment) virtual network 7227 VirtualNetwork *VirtualNetworkProfile `json:"virtualNetwork,omitempty"` 7228 // InternalLoadBalancingMode - Specifies which endpoints to serve internally in the hostingEnvironment's (App Service Environment) VNET. Possible values include: 'None', 'Web', 'Publishing' 7229 InternalLoadBalancingMode InternalLoadBalancingMode `json:"internalLoadBalancingMode,omitempty"` 7230 // MultiSize - Front-end VM size, e.g. "Medium", "Large" 7231 MultiSize *string `json:"multiSize,omitempty"` 7232 // MultiRoleCount - Number of front-end instances 7233 MultiRoleCount *int32 `json:"multiRoleCount,omitempty"` 7234 // WorkerPools - Description of worker pools with worker size ids, VM sizes, and number of workers in each pool 7235 WorkerPools *[]WorkerPool `json:"workerPools,omitempty"` 7236 // IpsslAddressCount - Number of IP SSL addresses reserved for this hostingEnvironment (App Service Environment) 7237 IpsslAddressCount *int32 `json:"ipsslAddressCount,omitempty"` 7238 // DatabaseEdition - Edition of the metadata database for the hostingEnvironment (App Service Environment) e.g. "Standard" 7239 DatabaseEdition *string `json:"databaseEdition,omitempty"` 7240 // DatabaseServiceObjective - Service objective of the metadata database for the hostingEnvironment (App Service Environment) e.g. "S0" 7241 DatabaseServiceObjective *string `json:"databaseServiceObjective,omitempty"` 7242 // UpgradeDomains - Number of upgrade domains of this hostingEnvironment (App Service Environment) 7243 UpgradeDomains *int32 `json:"upgradeDomains,omitempty"` 7244 // SubscriptionID - Subscription of the hostingEnvironment (App Service Environment) 7245 SubscriptionID *string `json:"subscriptionId,omitempty"` 7246 // DNSSuffix - DNS suffix of the hostingEnvironment (App Service Environment) 7247 DNSSuffix *string `json:"dnsSuffix,omitempty"` 7248 // LastAction - Last deployment action on this hostingEnvironment (App Service Environment) 7249 LastAction *string `json:"lastAction,omitempty"` 7250 // LastActionResult - Result of the last deployment action on this hostingEnvironment (App Service Environment) 7251 LastActionResult *string `json:"lastActionResult,omitempty"` 7252 // AllowedMultiSizes - List of comma separated strings describing which VM sizes are allowed for front-ends 7253 AllowedMultiSizes *string `json:"allowedMultiSizes,omitempty"` 7254 // AllowedWorkerSizes - List of comma separated strings describing which VM sizes are allowed for workers 7255 AllowedWorkerSizes *string `json:"allowedWorkerSizes,omitempty"` 7256 // MaximumNumberOfMachines - Maximum number of VMs in this hostingEnvironment (App Service Environment) 7257 MaximumNumberOfMachines *int32 `json:"maximumNumberOfMachines,omitempty"` 7258 // VipMappings - Description of IP SSL mapping for this hostingEnvironment (App Service Environment) 7259 VipMappings *[]VirtualIPMapping `json:"vipMappings,omitempty"` 7260 // EnvironmentCapacities - Current total, used, and available worker capacities 7261 EnvironmentCapacities *[]StampCapacity `json:"environmentCapacities,omitempty"` 7262 // NetworkAccessControlList - Access control list for controlling traffic to the hostingEnvironment (App Service Environment) 7263 NetworkAccessControlList *[]NetworkAccessControlEntry `json:"networkAccessControlList,omitempty"` 7264 // EnvironmentIsHealthy - True/false indicating whether the hostingEnvironment (App Service Environment) is healthy 7265 EnvironmentIsHealthy *bool `json:"environmentIsHealthy,omitempty"` 7266 // EnvironmentStatus - Detailed message about with results of the last check of the hostingEnvironment (App Service Environment) 7267 EnvironmentStatus *string `json:"environmentStatus,omitempty"` 7268 // ResourceGroup - Resource group of the hostingEnvironment (App Service Environment) 7269 ResourceGroup *string `json:"resourceGroup,omitempty"` 7270 // APIManagementAccountID - Api Management Account associated with this Hosting Environment 7271 APIManagementAccountID *string `json:"apiManagementAccountId,omitempty"` 7272 // Suspended - True/false indicating whether the hostingEnvironment is suspended. The environment can be suspended e.g. when the management endpoint is no longer available 7273 // (most likely because NSG blocked the incoming traffic) 7274 Suspended *bool `json:"suspended,omitempty"` 7275 // ClusterSettings - Custom settings for changing the behavior of the hosting environment 7276 ClusterSettings *[]NameValuePair `json:"clusterSettings,omitempty"` 7277} 7278 7279// HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture an abstraction for monitoring and retrieving 7280// the results of a long-running operation. 7281type HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture struct { 7282 azure.Future 7283} 7284 7285// Result returns the result of the asynchronous operation. 7286// If the operation has not completed it will return an error. 7287func (future *HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture) Result(client HostingEnvironmentsClient) (he HostingEnvironment, err error) { 7288 var done bool 7289 done, err = future.DoneWithContext(context.Background(), client) 7290 if err != nil { 7291 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture", "Result", future.Response(), "Polling failure") 7292 return 7293 } 7294 if !done { 7295 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture") 7296 return 7297 } 7298 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7299 if he.Response.Response, err = future.GetResult(sender); err == nil && he.Response.Response.StatusCode != http.StatusNoContent { 7300 he, err = client.CreateOrUpdateHostingEnvironmentResponder(he.Response.Response) 7301 if err != nil { 7302 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture", "Result", he.Response.Response, "Failure responding to request") 7303 } 7304 } 7305 return 7306} 7307 7308// HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture an abstraction for monitoring and retrieving the 7309// results of a long-running operation. 7310type HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture struct { 7311 azure.Future 7312} 7313 7314// Result returns the result of the asynchronous operation. 7315// If the operation has not completed it will return an error. 7316func (future *HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture) Result(client HostingEnvironmentsClient) (wp WorkerPool, err error) { 7317 var done bool 7318 done, err = future.DoneWithContext(context.Background(), client) 7319 if err != nil { 7320 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", future.Response(), "Polling failure") 7321 return 7322 } 7323 if !done { 7324 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture") 7325 return 7326 } 7327 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7328 if wp.Response.Response, err = future.GetResult(sender); err == nil && wp.Response.Response.StatusCode != http.StatusNoContent { 7329 wp, err = client.CreateOrUpdateMultiRolePoolResponder(wp.Response.Response) 7330 if err != nil { 7331 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", wp.Response.Response, "Failure responding to request") 7332 } 7333 } 7334 return 7335} 7336 7337// HostingEnvironmentsCreateOrUpdateWorkerPoolFuture an abstraction for monitoring and retrieving the 7338// results of a long-running operation. 7339type HostingEnvironmentsCreateOrUpdateWorkerPoolFuture struct { 7340 azure.Future 7341} 7342 7343// Result returns the result of the asynchronous operation. 7344// If the operation has not completed it will return an error. 7345func (future *HostingEnvironmentsCreateOrUpdateWorkerPoolFuture) Result(client HostingEnvironmentsClient) (wp WorkerPool, err error) { 7346 var done bool 7347 done, err = future.DoneWithContext(context.Background(), client) 7348 if err != nil { 7349 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", future.Response(), "Polling failure") 7350 return 7351 } 7352 if !done { 7353 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsCreateOrUpdateWorkerPoolFuture") 7354 return 7355 } 7356 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7357 if wp.Response.Response, err = future.GetResult(sender); err == nil && wp.Response.Response.StatusCode != http.StatusNoContent { 7358 wp, err = client.CreateOrUpdateWorkerPoolResponder(wp.Response.Response) 7359 if err != nil { 7360 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", wp.Response.Response, "Failure responding to request") 7361 } 7362 } 7363 return 7364} 7365 7366// HostingEnvironmentsDeleteHostingEnvironmentFuture an abstraction for monitoring and retrieving the 7367// results of a long-running operation. 7368type HostingEnvironmentsDeleteHostingEnvironmentFuture struct { 7369 azure.Future 7370} 7371 7372// Result returns the result of the asynchronous operation. 7373// If the operation has not completed it will return an error. 7374func (future *HostingEnvironmentsDeleteHostingEnvironmentFuture) Result(client HostingEnvironmentsClient) (so SetObject, err error) { 7375 var done bool 7376 done, err = future.DoneWithContext(context.Background(), client) 7377 if err != nil { 7378 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsDeleteHostingEnvironmentFuture", "Result", future.Response(), "Polling failure") 7379 return 7380 } 7381 if !done { 7382 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsDeleteHostingEnvironmentFuture") 7383 return 7384 } 7385 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7386 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { 7387 so, err = client.DeleteHostingEnvironmentResponder(so.Response.Response) 7388 if err != nil { 7389 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsDeleteHostingEnvironmentFuture", "Result", so.Response.Response, "Failure responding to request") 7390 } 7391 } 7392 return 7393} 7394 7395// HostingEnvironmentServiceDescriptions back end service per ASE 7396type HostingEnvironmentServiceDescriptions struct { 7397 // HostingEnvironmentID - Hosting environment Id 7398 HostingEnvironmentID *string `json:"hostingEnvironmentId,omitempty"` 7399 // HostID - Host Id 7400 HostID *string `json:"hostId,omitempty"` 7401 // ServiceURL - service url to use 7402 ServiceURL *string `json:"serviceUrl,omitempty"` 7403 // UseInternalRouting - When the backend url is in same ASE, for performance reason this flag can be set to true 7404 // If WebApp.DisableHostNames is also set it improves the security by making the back end accessible only 7405 // via API calls 7406 // Note: calls will fail if this option is used but back end is not on the same ASE 7407 UseInternalRouting *bool `json:"useInternalRouting,omitempty"` 7408} 7409 7410// HostingEnvironmentsResumeHostingEnvironmentAllFuture an abstraction for monitoring and retrieving the 7411// results of a long-running operation. 7412type HostingEnvironmentsResumeHostingEnvironmentAllFuture struct { 7413 azure.Future 7414} 7415 7416// Result returns the result of the asynchronous operation. 7417// If the operation has not completed it will return an error. 7418func (future *HostingEnvironmentsResumeHostingEnvironmentAllFuture) Result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) { 7419 var done bool 7420 done, err = future.DoneWithContext(context.Background(), client) 7421 if err != nil { 7422 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentAllFuture", "Result", future.Response(), "Polling failure") 7423 return 7424 } 7425 if !done { 7426 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsResumeHostingEnvironmentAllFuture") 7427 return 7428 } 7429 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7430 if scp.sc.Response.Response, err = future.GetResult(sender); err == nil && scp.sc.Response.Response.StatusCode != http.StatusNoContent { 7431 scp, err = client.ResumeHostingEnvironmentResponder(scp.sc.Response.Response) 7432 if err != nil { 7433 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentAllFuture", "Result", scp.sc.Response.Response, "Failure responding to request") 7434 } 7435 } 7436 return 7437} 7438 7439// HostingEnvironmentsResumeHostingEnvironmentFuture an abstraction for monitoring and retrieving the 7440// results of a long-running operation. 7441type HostingEnvironmentsResumeHostingEnvironmentFuture struct { 7442 azure.Future 7443} 7444 7445// Result returns the result of the asynchronous operation. 7446// If the operation has not completed it will return an error. 7447func (future *HostingEnvironmentsResumeHostingEnvironmentFuture) Result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) { 7448 var done bool 7449 done, err = future.DoneWithContext(context.Background(), client) 7450 if err != nil { 7451 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentFuture", "Result", future.Response(), "Polling failure") 7452 return 7453 } 7454 if !done { 7455 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsResumeHostingEnvironmentFuture") 7456 return 7457 } 7458 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7459 if scp.sc.Response.Response, err = future.GetResult(sender); err == nil && scp.sc.Response.Response.StatusCode != http.StatusNoContent { 7460 scp, err = client.ResumeHostingEnvironmentResponder(scp.sc.Response.Response) 7461 if err != nil { 7462 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentFuture", "Result", scp.sc.Response.Response, "Failure responding to request") 7463 } 7464 } 7465 return 7466} 7467 7468// HostingEnvironmentsSuspendHostingEnvironmentAllFuture an abstraction for monitoring and retrieving the 7469// results of a long-running operation. 7470type HostingEnvironmentsSuspendHostingEnvironmentAllFuture struct { 7471 azure.Future 7472} 7473 7474// Result returns the result of the asynchronous operation. 7475// If the operation has not completed it will return an error. 7476func (future *HostingEnvironmentsSuspendHostingEnvironmentAllFuture) Result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) { 7477 var done bool 7478 done, err = future.DoneWithContext(context.Background(), client) 7479 if err != nil { 7480 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentAllFuture", "Result", future.Response(), "Polling failure") 7481 return 7482 } 7483 if !done { 7484 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsSuspendHostingEnvironmentAllFuture") 7485 return 7486 } 7487 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7488 if scp.sc.Response.Response, err = future.GetResult(sender); err == nil && scp.sc.Response.Response.StatusCode != http.StatusNoContent { 7489 scp, err = client.SuspendHostingEnvironmentResponder(scp.sc.Response.Response) 7490 if err != nil { 7491 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentAllFuture", "Result", scp.sc.Response.Response, "Failure responding to request") 7492 } 7493 } 7494 return 7495} 7496 7497// HostingEnvironmentsSuspendHostingEnvironmentFuture an abstraction for monitoring and retrieving the 7498// results of a long-running operation. 7499type HostingEnvironmentsSuspendHostingEnvironmentFuture struct { 7500 azure.Future 7501} 7502 7503// Result returns the result of the asynchronous operation. 7504// If the operation has not completed it will return an error. 7505func (future *HostingEnvironmentsSuspendHostingEnvironmentFuture) Result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) { 7506 var done bool 7507 done, err = future.DoneWithContext(context.Background(), client) 7508 if err != nil { 7509 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentFuture", "Result", future.Response(), "Polling failure") 7510 return 7511 } 7512 if !done { 7513 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsSuspendHostingEnvironmentFuture") 7514 return 7515 } 7516 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7517 if scp.sc.Response.Response, err = future.GetResult(sender); err == nil && scp.sc.Response.Response.StatusCode != http.StatusNoContent { 7518 scp, err = client.SuspendHostingEnvironmentResponder(scp.sc.Response.Response) 7519 if err != nil { 7520 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentFuture", "Result", scp.sc.Response.Response, "Failure responding to request") 7521 } 7522 } 7523 return 7524} 7525 7526// HostName details of a hostname derived from a domain 7527type HostName struct { 7528 // Name - Name of the hostname 7529 Name *string `json:"name,omitempty"` 7530 // 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 7531 SiteNames *[]string `json:"siteNames,omitempty"` 7532 // 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 7533 AzureResourceName *string `json:"azureResourceName,omitempty"` 7534 // AzureResourceType - Type of the Azure resource the hostname is assigned to. Possible values include: 'Website', 'TrafficManager' 7535 AzureResourceType AzureResourceType `json:"azureResourceType,omitempty"` 7536 // CustomHostNameDNSRecordType - Type of the Dns record. Possible values include: 'CName', 'A' 7537 CustomHostNameDNSRecordType CustomHostNameDNSRecordType `json:"customHostNameDnsRecordType,omitempty"` 7538 // HostNameType - Type of the hostname. Possible values include: 'Verified', 'Managed' 7539 HostNameType HostNameType `json:"hostNameType,omitempty"` 7540} 7541 7542// HostNameBinding a host name binding object 7543type HostNameBinding struct { 7544 autorest.Response `json:"-"` 7545 *HostNameBindingProperties `json:"properties,omitempty"` 7546 // ID - Resource Id 7547 ID *string `json:"id,omitempty"` 7548 // Name - Resource Name 7549 Name *string `json:"name,omitempty"` 7550 // Kind - Kind of resource 7551 Kind *string `json:"kind,omitempty"` 7552 // Location - Resource Location 7553 Location *string `json:"location,omitempty"` 7554 // Type - Resource type 7555 Type *string `json:"type,omitempty"` 7556 // Tags - Resource tags 7557 Tags map[string]*string `json:"tags"` 7558} 7559 7560// MarshalJSON is the custom marshaler for HostNameBinding. 7561func (hnb HostNameBinding) MarshalJSON() ([]byte, error) { 7562 objectMap := make(map[string]interface{}) 7563 if hnb.HostNameBindingProperties != nil { 7564 objectMap["properties"] = hnb.HostNameBindingProperties 7565 } 7566 if hnb.ID != nil { 7567 objectMap["id"] = hnb.ID 7568 } 7569 if hnb.Name != nil { 7570 objectMap["name"] = hnb.Name 7571 } 7572 if hnb.Kind != nil { 7573 objectMap["kind"] = hnb.Kind 7574 } 7575 if hnb.Location != nil { 7576 objectMap["location"] = hnb.Location 7577 } 7578 if hnb.Type != nil { 7579 objectMap["type"] = hnb.Type 7580 } 7581 if hnb.Tags != nil { 7582 objectMap["tags"] = hnb.Tags 7583 } 7584 return json.Marshal(objectMap) 7585} 7586 7587// UnmarshalJSON is the custom unmarshaler for HostNameBinding struct. 7588func (hnb *HostNameBinding) UnmarshalJSON(body []byte) error { 7589 var m map[string]*json.RawMessage 7590 err := json.Unmarshal(body, &m) 7591 if err != nil { 7592 return err 7593 } 7594 for k, v := range m { 7595 switch k { 7596 case "properties": 7597 if v != nil { 7598 var hostNameBindingProperties HostNameBindingProperties 7599 err = json.Unmarshal(*v, &hostNameBindingProperties) 7600 if err != nil { 7601 return err 7602 } 7603 hnb.HostNameBindingProperties = &hostNameBindingProperties 7604 } 7605 case "id": 7606 if v != nil { 7607 var ID string 7608 err = json.Unmarshal(*v, &ID) 7609 if err != nil { 7610 return err 7611 } 7612 hnb.ID = &ID 7613 } 7614 case "name": 7615 if v != nil { 7616 var name string 7617 err = json.Unmarshal(*v, &name) 7618 if err != nil { 7619 return err 7620 } 7621 hnb.Name = &name 7622 } 7623 case "kind": 7624 if v != nil { 7625 var kind string 7626 err = json.Unmarshal(*v, &kind) 7627 if err != nil { 7628 return err 7629 } 7630 hnb.Kind = &kind 7631 } 7632 case "location": 7633 if v != nil { 7634 var location string 7635 err = json.Unmarshal(*v, &location) 7636 if err != nil { 7637 return err 7638 } 7639 hnb.Location = &location 7640 } 7641 case "type": 7642 if v != nil { 7643 var typeVar string 7644 err = json.Unmarshal(*v, &typeVar) 7645 if err != nil { 7646 return err 7647 } 7648 hnb.Type = &typeVar 7649 } 7650 case "tags": 7651 if v != nil { 7652 var tags map[string]*string 7653 err = json.Unmarshal(*v, &tags) 7654 if err != nil { 7655 return err 7656 } 7657 hnb.Tags = tags 7658 } 7659 } 7660 } 7661 7662 return nil 7663} 7664 7665// HostNameBindingCollection collection of host name bindings 7666type HostNameBindingCollection struct { 7667 autorest.Response `json:"-"` 7668 // Value - Collection of resources 7669 Value *[]HostNameBinding `json:"value,omitempty"` 7670 // NextLink - Link to next page of resources 7671 NextLink *string `json:"nextLink,omitempty"` 7672} 7673 7674// HostNameBindingCollectionIterator provides access to a complete listing of HostNameBinding values. 7675type HostNameBindingCollectionIterator struct { 7676 i int 7677 page HostNameBindingCollectionPage 7678} 7679 7680// NextWithContext advances to the next value. If there was an error making 7681// the request the iterator does not advance and the error is returned. 7682func (iter *HostNameBindingCollectionIterator) NextWithContext(ctx context.Context) (err error) { 7683 if tracing.IsEnabled() { 7684 ctx = tracing.StartSpan(ctx, fqdn+"/HostNameBindingCollectionIterator.NextWithContext") 7685 defer func() { 7686 sc := -1 7687 if iter.Response().Response.Response != nil { 7688 sc = iter.Response().Response.Response.StatusCode 7689 } 7690 tracing.EndSpan(ctx, sc, err) 7691 }() 7692 } 7693 iter.i++ 7694 if iter.i < len(iter.page.Values()) { 7695 return nil 7696 } 7697 err = iter.page.NextWithContext(ctx) 7698 if err != nil { 7699 iter.i-- 7700 return err 7701 } 7702 iter.i = 0 7703 return nil 7704} 7705 7706// Next advances to the next value. If there was an error making 7707// the request the iterator does not advance and the error is returned. 7708// Deprecated: Use NextWithContext() instead. 7709func (iter *HostNameBindingCollectionIterator) Next() error { 7710 return iter.NextWithContext(context.Background()) 7711} 7712 7713// NotDone returns true if the enumeration should be started or is not yet complete. 7714func (iter HostNameBindingCollectionIterator) NotDone() bool { 7715 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7716} 7717 7718// Response returns the raw server response from the last page request. 7719func (iter HostNameBindingCollectionIterator) Response() HostNameBindingCollection { 7720 return iter.page.Response() 7721} 7722 7723// Value returns the current value or a zero-initialized value if the 7724// iterator has advanced beyond the end of the collection. 7725func (iter HostNameBindingCollectionIterator) Value() HostNameBinding { 7726 if !iter.page.NotDone() { 7727 return HostNameBinding{} 7728 } 7729 return iter.page.Values()[iter.i] 7730} 7731 7732// Creates a new instance of the HostNameBindingCollectionIterator type. 7733func NewHostNameBindingCollectionIterator(page HostNameBindingCollectionPage) HostNameBindingCollectionIterator { 7734 return HostNameBindingCollectionIterator{page: page} 7735} 7736 7737// IsEmpty returns true if the ListResult contains no values. 7738func (hnbc HostNameBindingCollection) IsEmpty() bool { 7739 return hnbc.Value == nil || len(*hnbc.Value) == 0 7740} 7741 7742// hostNameBindingCollectionPreparer prepares a request to retrieve the next set of results. 7743// It returns nil if no more results exist. 7744func (hnbc HostNameBindingCollection) hostNameBindingCollectionPreparer(ctx context.Context) (*http.Request, error) { 7745 if hnbc.NextLink == nil || len(to.String(hnbc.NextLink)) < 1 { 7746 return nil, nil 7747 } 7748 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7749 autorest.AsJSON(), 7750 autorest.AsGet(), 7751 autorest.WithBaseURL(to.String(hnbc.NextLink))) 7752} 7753 7754// HostNameBindingCollectionPage contains a page of HostNameBinding values. 7755type HostNameBindingCollectionPage struct { 7756 fn func(context.Context, HostNameBindingCollection) (HostNameBindingCollection, error) 7757 hnbc HostNameBindingCollection 7758} 7759 7760// NextWithContext advances to the next page of values. If there was an error making 7761// the request the page does not advance and the error is returned. 7762func (page *HostNameBindingCollectionPage) NextWithContext(ctx context.Context) (err error) { 7763 if tracing.IsEnabled() { 7764 ctx = tracing.StartSpan(ctx, fqdn+"/HostNameBindingCollectionPage.NextWithContext") 7765 defer func() { 7766 sc := -1 7767 if page.Response().Response.Response != nil { 7768 sc = page.Response().Response.Response.StatusCode 7769 } 7770 tracing.EndSpan(ctx, sc, err) 7771 }() 7772 } 7773 next, err := page.fn(ctx, page.hnbc) 7774 if err != nil { 7775 return err 7776 } 7777 page.hnbc = next 7778 return nil 7779} 7780 7781// Next advances to the next page of values. If there was an error making 7782// the request the page does not advance and the error is returned. 7783// Deprecated: Use NextWithContext() instead. 7784func (page *HostNameBindingCollectionPage) Next() error { 7785 return page.NextWithContext(context.Background()) 7786} 7787 7788// NotDone returns true if the page enumeration should be started or is not yet complete. 7789func (page HostNameBindingCollectionPage) NotDone() bool { 7790 return !page.hnbc.IsEmpty() 7791} 7792 7793// Response returns the raw server response from the last page request. 7794func (page HostNameBindingCollectionPage) Response() HostNameBindingCollection { 7795 return page.hnbc 7796} 7797 7798// Values returns the slice of values for the current page or nil if there are no values. 7799func (page HostNameBindingCollectionPage) Values() []HostNameBinding { 7800 if page.hnbc.IsEmpty() { 7801 return nil 7802 } 7803 return *page.hnbc.Value 7804} 7805 7806// Creates a new instance of the HostNameBindingCollectionPage type. 7807func NewHostNameBindingCollectionPage(getNextPage func(context.Context, HostNameBindingCollection) (HostNameBindingCollection, error)) HostNameBindingCollectionPage { 7808 return HostNameBindingCollectionPage{fn: getNextPage} 7809} 7810 7811// HostNameBindingProperties ... 7812type HostNameBindingProperties struct { 7813 // Name - Hostname 7814 Name *string `json:"name,omitempty"` 7815 // SiteName - Web app name 7816 SiteName *string `json:"siteName,omitempty"` 7817 // DomainID - Fully qualified ARM domain resource URI 7818 DomainID *string `json:"domainId,omitempty"` 7819 // AzureResourceName - Azure resource name 7820 AzureResourceName *string `json:"azureResourceName,omitempty"` 7821 // AzureResourceType - Azure resource type. Possible values include: 'Website', 'TrafficManager' 7822 AzureResourceType AzureResourceType `json:"azureResourceType,omitempty"` 7823 // CustomHostNameDNSRecordType - Custom DNS record type. Possible values include: 'CName', 'A' 7824 CustomHostNameDNSRecordType CustomHostNameDNSRecordType `json:"customHostNameDnsRecordType,omitempty"` 7825 // HostNameType - Host name type. Possible values include: 'Verified', 'Managed' 7826 HostNameType HostNameType `json:"hostNameType,omitempty"` 7827} 7828 7829// HostNameSslState object that represents a SSL-enabled host name. 7830type HostNameSslState struct { 7831 // Name - Host name 7832 Name *string `json:"name,omitempty"` 7833 // SslState - SSL type. Possible values include: 'Disabled', 'SniEnabled', 'IPBasedEnabled' 7834 SslState SslState `json:"sslState,omitempty"` 7835 // VirtualIP - Virtual IP address assigned to the host name if IP based SSL is enabled 7836 VirtualIP *string `json:"virtualIP,omitempty"` 7837 // Thumbprint - SSL cert thumbprint 7838 Thumbprint *string `json:"thumbprint,omitempty"` 7839 // ToUpdate - Set this flag to update existing host name 7840 ToUpdate *bool `json:"toUpdate,omitempty"` 7841} 7842 7843// HTTPLogsConfig http logs configuration 7844type HTTPLogsConfig struct { 7845 // FileSystem - Http logs to file system configuration 7846 FileSystem *FileSystemHTTPLogsConfig `json:"fileSystem,omitempty"` 7847 // AzureBlobStorage - Http logs to azure blob storage configuration 7848 AzureBlobStorage *AzureBlobStorageHTTPLogsConfig `json:"azureBlobStorage,omitempty"` 7849} 7850 7851// IPSecurityRestriction represents an ip security restriction on a web app. 7852type IPSecurityRestriction struct { 7853 // IPAddress - IP address the security restriction is valid for 7854 IPAddress *string `json:"ipAddress,omitempty"` 7855 // SubnetMask - Subnet mask for the range of IP addresses the restriction is valid for 7856 SubnetMask *string `json:"subnetMask,omitempty"` 7857} 7858 7859// KeyValuePairStringString ... 7860type KeyValuePairStringString struct { 7861 // Key - READ-ONLY 7862 Key *string `json:"key,omitempty"` 7863 // Value - READ-ONLY 7864 Value *string `json:"value,omitempty"` 7865} 7866 7867// ListCertificateEmail ... 7868type ListCertificateEmail struct { 7869 autorest.Response `json:"-"` 7870 Value *[]CertificateEmail `json:"value,omitempty"` 7871} 7872 7873// ListCertificateOrderAction ... 7874type ListCertificateOrderAction struct { 7875 autorest.Response `json:"-"` 7876 Value *[]CertificateOrderAction `json:"value,omitempty"` 7877} 7878 7879// ListConnectionKeysInput list Connection Keys Input payload 7880type ListConnectionKeysInput struct { 7881 *ListConnectionKeysInputProperties `json:"properties,omitempty"` 7882 // ID - Resource Id 7883 ID *string `json:"id,omitempty"` 7884 // Name - Resource Name 7885 Name *string `json:"name,omitempty"` 7886 // Kind - Kind of resource 7887 Kind *string `json:"kind,omitempty"` 7888 // Location - Resource Location 7889 Location *string `json:"location,omitempty"` 7890 // Type - Resource type 7891 Type *string `json:"type,omitempty"` 7892 // Tags - Resource tags 7893 Tags map[string]*string `json:"tags"` 7894} 7895 7896// MarshalJSON is the custom marshaler for ListConnectionKeysInput. 7897func (lcki ListConnectionKeysInput) MarshalJSON() ([]byte, error) { 7898 objectMap := make(map[string]interface{}) 7899 if lcki.ListConnectionKeysInputProperties != nil { 7900 objectMap["properties"] = lcki.ListConnectionKeysInputProperties 7901 } 7902 if lcki.ID != nil { 7903 objectMap["id"] = lcki.ID 7904 } 7905 if lcki.Name != nil { 7906 objectMap["name"] = lcki.Name 7907 } 7908 if lcki.Kind != nil { 7909 objectMap["kind"] = lcki.Kind 7910 } 7911 if lcki.Location != nil { 7912 objectMap["location"] = lcki.Location 7913 } 7914 if lcki.Type != nil { 7915 objectMap["type"] = lcki.Type 7916 } 7917 if lcki.Tags != nil { 7918 objectMap["tags"] = lcki.Tags 7919 } 7920 return json.Marshal(objectMap) 7921} 7922 7923// UnmarshalJSON is the custom unmarshaler for ListConnectionKeysInput struct. 7924func (lcki *ListConnectionKeysInput) UnmarshalJSON(body []byte) error { 7925 var m map[string]*json.RawMessage 7926 err := json.Unmarshal(body, &m) 7927 if err != nil { 7928 return err 7929 } 7930 for k, v := range m { 7931 switch k { 7932 case "properties": 7933 if v != nil { 7934 var listConnectionKeysInputProperties ListConnectionKeysInputProperties 7935 err = json.Unmarshal(*v, &listConnectionKeysInputProperties) 7936 if err != nil { 7937 return err 7938 } 7939 lcki.ListConnectionKeysInputProperties = &listConnectionKeysInputProperties 7940 } 7941 case "id": 7942 if v != nil { 7943 var ID string 7944 err = json.Unmarshal(*v, &ID) 7945 if err != nil { 7946 return err 7947 } 7948 lcki.ID = &ID 7949 } 7950 case "name": 7951 if v != nil { 7952 var name string 7953 err = json.Unmarshal(*v, &name) 7954 if err != nil { 7955 return err 7956 } 7957 lcki.Name = &name 7958 } 7959 case "kind": 7960 if v != nil { 7961 var kind string 7962 err = json.Unmarshal(*v, &kind) 7963 if err != nil { 7964 return err 7965 } 7966 lcki.Kind = &kind 7967 } 7968 case "location": 7969 if v != nil { 7970 var location string 7971 err = json.Unmarshal(*v, &location) 7972 if err != nil { 7973 return err 7974 } 7975 lcki.Location = &location 7976 } 7977 case "type": 7978 if v != nil { 7979 var typeVar string 7980 err = json.Unmarshal(*v, &typeVar) 7981 if err != nil { 7982 return err 7983 } 7984 lcki.Type = &typeVar 7985 } 7986 case "tags": 7987 if v != nil { 7988 var tags map[string]*string 7989 err = json.Unmarshal(*v, &tags) 7990 if err != nil { 7991 return err 7992 } 7993 lcki.Tags = tags 7994 } 7995 } 7996 } 7997 7998 return nil 7999} 8000 8001// ListConnectionKeysInputProperties ... 8002type ListConnectionKeysInputProperties struct { 8003 // ValidityTimeSpan - time span for how long the keys will be valid 8004 ValidityTimeSpan *string `json:"validityTimeSpan,omitempty"` 8005} 8006 8007// ListCsr ... 8008type ListCsr struct { 8009 autorest.Response `json:"-"` 8010 Value *[]Csr `json:"value,omitempty"` 8011} 8012 8013// ListHostingEnvironmentDiagnostics ... 8014type ListHostingEnvironmentDiagnostics struct { 8015 autorest.Response `json:"-"` 8016 Value *[]HostingEnvironmentDiagnostics `json:"value,omitempty"` 8017} 8018 8019// ListRecommendation ... 8020type ListRecommendation struct { 8021 autorest.Response `json:"-"` 8022 Value *[]Recommendation `json:"value,omitempty"` 8023} 8024 8025// ListVnetInfo ... 8026type ListVnetInfo struct { 8027 autorest.Response `json:"-"` 8028 Value *[]VnetInfo `json:"value,omitempty"` 8029} 8030 8031// ListVnetRoute ... 8032type ListVnetRoute struct { 8033 autorest.Response `json:"-"` 8034 Value *[]VnetRoute `json:"value,omitempty"` 8035} 8036 8037// LocalizableString localizableString object containing the name and a localized value. 8038type LocalizableString struct { 8039 // Value - Non localized name 8040 Value *string `json:"value,omitempty"` 8041 // LocalizedValue - Localized name 8042 LocalizedValue *string `json:"localizedValue,omitempty"` 8043} 8044 8045// ManagedHostingEnvironment description of a managed hosting environment 8046type ManagedHostingEnvironment struct { 8047 autorest.Response `json:"-"` 8048 *ManagedHostingEnvironmentProperties `json:"properties,omitempty"` 8049 // ID - Resource Id 8050 ID *string `json:"id,omitempty"` 8051 // Name - Resource Name 8052 Name *string `json:"name,omitempty"` 8053 // Kind - Kind of resource 8054 Kind *string `json:"kind,omitempty"` 8055 // Location - Resource Location 8056 Location *string `json:"location,omitempty"` 8057 // Type - Resource type 8058 Type *string `json:"type,omitempty"` 8059 // Tags - Resource tags 8060 Tags map[string]*string `json:"tags"` 8061} 8062 8063// MarshalJSON is the custom marshaler for ManagedHostingEnvironment. 8064func (mhe ManagedHostingEnvironment) MarshalJSON() ([]byte, error) { 8065 objectMap := make(map[string]interface{}) 8066 if mhe.ManagedHostingEnvironmentProperties != nil { 8067 objectMap["properties"] = mhe.ManagedHostingEnvironmentProperties 8068 } 8069 if mhe.ID != nil { 8070 objectMap["id"] = mhe.ID 8071 } 8072 if mhe.Name != nil { 8073 objectMap["name"] = mhe.Name 8074 } 8075 if mhe.Kind != nil { 8076 objectMap["kind"] = mhe.Kind 8077 } 8078 if mhe.Location != nil { 8079 objectMap["location"] = mhe.Location 8080 } 8081 if mhe.Type != nil { 8082 objectMap["type"] = mhe.Type 8083 } 8084 if mhe.Tags != nil { 8085 objectMap["tags"] = mhe.Tags 8086 } 8087 return json.Marshal(objectMap) 8088} 8089 8090// UnmarshalJSON is the custom unmarshaler for ManagedHostingEnvironment struct. 8091func (mhe *ManagedHostingEnvironment) UnmarshalJSON(body []byte) error { 8092 var m map[string]*json.RawMessage 8093 err := json.Unmarshal(body, &m) 8094 if err != nil { 8095 return err 8096 } 8097 for k, v := range m { 8098 switch k { 8099 case "properties": 8100 if v != nil { 8101 var managedHostingEnvironmentProperties ManagedHostingEnvironmentProperties 8102 err = json.Unmarshal(*v, &managedHostingEnvironmentProperties) 8103 if err != nil { 8104 return err 8105 } 8106 mhe.ManagedHostingEnvironmentProperties = &managedHostingEnvironmentProperties 8107 } 8108 case "id": 8109 if v != nil { 8110 var ID string 8111 err = json.Unmarshal(*v, &ID) 8112 if err != nil { 8113 return err 8114 } 8115 mhe.ID = &ID 8116 } 8117 case "name": 8118 if v != nil { 8119 var name string 8120 err = json.Unmarshal(*v, &name) 8121 if err != nil { 8122 return err 8123 } 8124 mhe.Name = &name 8125 } 8126 case "kind": 8127 if v != nil { 8128 var kind string 8129 err = json.Unmarshal(*v, &kind) 8130 if err != nil { 8131 return err 8132 } 8133 mhe.Kind = &kind 8134 } 8135 case "location": 8136 if v != nil { 8137 var location string 8138 err = json.Unmarshal(*v, &location) 8139 if err != nil { 8140 return err 8141 } 8142 mhe.Location = &location 8143 } 8144 case "type": 8145 if v != nil { 8146 var typeVar string 8147 err = json.Unmarshal(*v, &typeVar) 8148 if err != nil { 8149 return err 8150 } 8151 mhe.Type = &typeVar 8152 } 8153 case "tags": 8154 if v != nil { 8155 var tags map[string]*string 8156 err = json.Unmarshal(*v, &tags) 8157 if err != nil { 8158 return err 8159 } 8160 mhe.Tags = tags 8161 } 8162 } 8163 } 8164 8165 return nil 8166} 8167 8168// ManagedHostingEnvironmentCollection collection of managed hosting environments 8169type ManagedHostingEnvironmentCollection struct { 8170 autorest.Response `json:"-"` 8171 // Value - Collection of resources 8172 Value *[]ManagedHostingEnvironment `json:"value,omitempty"` 8173 // NextLink - Link to next page of resources 8174 NextLink *string `json:"nextLink,omitempty"` 8175} 8176 8177// ManagedHostingEnvironmentCollectionIterator provides access to a complete listing of 8178// ManagedHostingEnvironment values. 8179type ManagedHostingEnvironmentCollectionIterator struct { 8180 i int 8181 page ManagedHostingEnvironmentCollectionPage 8182} 8183 8184// NextWithContext advances to the next value. If there was an error making 8185// the request the iterator does not advance and the error is returned. 8186func (iter *ManagedHostingEnvironmentCollectionIterator) NextWithContext(ctx context.Context) (err error) { 8187 if tracing.IsEnabled() { 8188 ctx = tracing.StartSpan(ctx, fqdn+"/ManagedHostingEnvironmentCollectionIterator.NextWithContext") 8189 defer func() { 8190 sc := -1 8191 if iter.Response().Response.Response != nil { 8192 sc = iter.Response().Response.Response.StatusCode 8193 } 8194 tracing.EndSpan(ctx, sc, err) 8195 }() 8196 } 8197 iter.i++ 8198 if iter.i < len(iter.page.Values()) { 8199 return nil 8200 } 8201 err = iter.page.NextWithContext(ctx) 8202 if err != nil { 8203 iter.i-- 8204 return err 8205 } 8206 iter.i = 0 8207 return nil 8208} 8209 8210// Next advances to the next value. If there was an error making 8211// the request the iterator does not advance and the error is returned. 8212// Deprecated: Use NextWithContext() instead. 8213func (iter *ManagedHostingEnvironmentCollectionIterator) Next() error { 8214 return iter.NextWithContext(context.Background()) 8215} 8216 8217// NotDone returns true if the enumeration should be started or is not yet complete. 8218func (iter ManagedHostingEnvironmentCollectionIterator) NotDone() bool { 8219 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8220} 8221 8222// Response returns the raw server response from the last page request. 8223func (iter ManagedHostingEnvironmentCollectionIterator) Response() ManagedHostingEnvironmentCollection { 8224 return iter.page.Response() 8225} 8226 8227// Value returns the current value or a zero-initialized value if the 8228// iterator has advanced beyond the end of the collection. 8229func (iter ManagedHostingEnvironmentCollectionIterator) Value() ManagedHostingEnvironment { 8230 if !iter.page.NotDone() { 8231 return ManagedHostingEnvironment{} 8232 } 8233 return iter.page.Values()[iter.i] 8234} 8235 8236// Creates a new instance of the ManagedHostingEnvironmentCollectionIterator type. 8237func NewManagedHostingEnvironmentCollectionIterator(page ManagedHostingEnvironmentCollectionPage) ManagedHostingEnvironmentCollectionIterator { 8238 return ManagedHostingEnvironmentCollectionIterator{page: page} 8239} 8240 8241// IsEmpty returns true if the ListResult contains no values. 8242func (mhec ManagedHostingEnvironmentCollection) IsEmpty() bool { 8243 return mhec.Value == nil || len(*mhec.Value) == 0 8244} 8245 8246// managedHostingEnvironmentCollectionPreparer prepares a request to retrieve the next set of results. 8247// It returns nil if no more results exist. 8248func (mhec ManagedHostingEnvironmentCollection) managedHostingEnvironmentCollectionPreparer(ctx context.Context) (*http.Request, error) { 8249 if mhec.NextLink == nil || len(to.String(mhec.NextLink)) < 1 { 8250 return nil, nil 8251 } 8252 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8253 autorest.AsJSON(), 8254 autorest.AsGet(), 8255 autorest.WithBaseURL(to.String(mhec.NextLink))) 8256} 8257 8258// ManagedHostingEnvironmentCollectionPage contains a page of ManagedHostingEnvironment values. 8259type ManagedHostingEnvironmentCollectionPage struct { 8260 fn func(context.Context, ManagedHostingEnvironmentCollection) (ManagedHostingEnvironmentCollection, error) 8261 mhec ManagedHostingEnvironmentCollection 8262} 8263 8264// NextWithContext advances to the next page of values. If there was an error making 8265// the request the page does not advance and the error is returned. 8266func (page *ManagedHostingEnvironmentCollectionPage) NextWithContext(ctx context.Context) (err error) { 8267 if tracing.IsEnabled() { 8268 ctx = tracing.StartSpan(ctx, fqdn+"/ManagedHostingEnvironmentCollectionPage.NextWithContext") 8269 defer func() { 8270 sc := -1 8271 if page.Response().Response.Response != nil { 8272 sc = page.Response().Response.Response.StatusCode 8273 } 8274 tracing.EndSpan(ctx, sc, err) 8275 }() 8276 } 8277 next, err := page.fn(ctx, page.mhec) 8278 if err != nil { 8279 return err 8280 } 8281 page.mhec = next 8282 return nil 8283} 8284 8285// Next advances to the next page of values. If there was an error making 8286// the request the page does not advance and the error is returned. 8287// Deprecated: Use NextWithContext() instead. 8288func (page *ManagedHostingEnvironmentCollectionPage) Next() error { 8289 return page.NextWithContext(context.Background()) 8290} 8291 8292// NotDone returns true if the page enumeration should be started or is not yet complete. 8293func (page ManagedHostingEnvironmentCollectionPage) NotDone() bool { 8294 return !page.mhec.IsEmpty() 8295} 8296 8297// Response returns the raw server response from the last page request. 8298func (page ManagedHostingEnvironmentCollectionPage) Response() ManagedHostingEnvironmentCollection { 8299 return page.mhec 8300} 8301 8302// Values returns the slice of values for the current page or nil if there are no values. 8303func (page ManagedHostingEnvironmentCollectionPage) Values() []ManagedHostingEnvironment { 8304 if page.mhec.IsEmpty() { 8305 return nil 8306 } 8307 return *page.mhec.Value 8308} 8309 8310// Creates a new instance of the ManagedHostingEnvironmentCollectionPage type. 8311func NewManagedHostingEnvironmentCollectionPage(getNextPage func(context.Context, ManagedHostingEnvironmentCollection) (ManagedHostingEnvironmentCollection, error)) ManagedHostingEnvironmentCollectionPage { 8312 return ManagedHostingEnvironmentCollectionPage{fn: getNextPage} 8313} 8314 8315// ManagedHostingEnvironmentProperties ... 8316type ManagedHostingEnvironmentProperties struct { 8317 // Name - Name of the managed hosting environment 8318 Name *string `json:"name,omitempty"` 8319 // Location - Location of the managed hosting environment e.g. "West US" 8320 Location *string `json:"location,omitempty"` 8321 // Status - Current status of the managed hosting environment. Possible values include: 'ManagedHostingEnvironmentStatusPreparing', 'ManagedHostingEnvironmentStatusReady', 'ManagedHostingEnvironmentStatusDeleting' 8322 Status ManagedHostingEnvironmentStatus `json:"status,omitempty"` 8323 // VirtualNetwork - Description of the managed hosting environment's virtual network 8324 VirtualNetwork *VirtualNetworkProfile `json:"virtualNetwork,omitempty"` 8325 // IpsslAddressCount - Number of ip ssl addresses reserved for the managed hosting environment 8326 IpsslAddressCount *int32 `json:"ipsslAddressCount,omitempty"` 8327 // DNSSuffix - DNS suffix of the managed hosting environment 8328 DNSSuffix *string `json:"dnsSuffix,omitempty"` 8329 // SubscriptionID - Subscription of the managed hosting environment (read only) 8330 SubscriptionID *string `json:"subscriptionId,omitempty"` 8331 // ResourceGroup - Resource group of the managed hosting environment (read only) 8332 ResourceGroup *string `json:"resourceGroup,omitempty"` 8333 // EnvironmentIsHealthy - True/false indicating whether the managed hosting environment is healthy 8334 EnvironmentIsHealthy *bool `json:"environmentIsHealthy,omitempty"` 8335 // EnvironmentStatus - Detailed message about with results of the last check of the managed hosting environment 8336 EnvironmentStatus *string `json:"environmentStatus,omitempty"` 8337 // 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 8338 // (most likely because NSG blocked the incoming traffic) 8339 Suspended *bool `json:"suspended,omitempty"` 8340 // APIManagementAccount - Resource id of the api management account associated with this managed hosting environment (read only) 8341 APIManagementAccount *string `json:"apiManagementAccount,omitempty"` 8342} 8343 8344// ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture an abstraction for monitoring 8345// and retrieving the results of a long-running operation. 8346type ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture struct { 8347 azure.Future 8348} 8349 8350// Result returns the result of the asynchronous operation. 8351// If the operation has not completed it will return an error. 8352func (future *ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture) Result(client ManagedHostingEnvironmentsClient) (he HostingEnvironment, err error) { 8353 var done bool 8354 done, err = future.DoneWithContext(context.Background(), client) 8355 if err != nil { 8356 err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture", "Result", future.Response(), "Polling failure") 8357 return 8358 } 8359 if !done { 8360 err = azure.NewAsyncOpIncompleteError("web.ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture") 8361 return 8362 } 8363 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8364 if he.Response.Response, err = future.GetResult(sender); err == nil && he.Response.Response.StatusCode != http.StatusNoContent { 8365 he, err = client.CreateOrUpdateManagedHostingEnvironmentResponder(he.Response.Response) 8366 if err != nil { 8367 err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture", "Result", he.Response.Response, "Failure responding to request") 8368 } 8369 } 8370 return 8371} 8372 8373// ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture an abstraction for monitoring and 8374// retrieving the results of a long-running operation. 8375type ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture struct { 8376 azure.Future 8377} 8378 8379// Result returns the result of the asynchronous operation. 8380// If the operation has not completed it will return an error. 8381func (future *ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture) Result(client ManagedHostingEnvironmentsClient) (so SetObject, err error) { 8382 var done bool 8383 done, err = future.DoneWithContext(context.Background(), client) 8384 if err != nil { 8385 err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture", "Result", future.Response(), "Polling failure") 8386 return 8387 } 8388 if !done { 8389 err = azure.NewAsyncOpIncompleteError("web.ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture") 8390 return 8391 } 8392 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8393 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { 8394 so, err = client.DeleteManagedHostingEnvironmentResponder(so.Response.Response) 8395 if err != nil { 8396 err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture", "Result", so.Response.Response, "Failure responding to request") 8397 } 8398 } 8399 return 8400} 8401 8402// MetricAvailabilily class representing metrics availability and retention 8403type MetricAvailabilily struct { 8404 // TimeGrain - Time grain 8405 TimeGrain *string `json:"timeGrain,omitempty"` 8406 // Retention - Retention period for the current {Microsoft.Web.Hosting.Administration.MetricAvailabilily.TimeGrain} 8407 Retention *string `json:"retention,omitempty"` 8408} 8409 8410// MetricDefinition class representing metadata for the metrics 8411type MetricDefinition struct { 8412 autorest.Response `json:"-"` 8413 *MetricDefinitionProperties `json:"properties,omitempty"` 8414 // ID - Resource Id 8415 ID *string `json:"id,omitempty"` 8416 // Name - Resource Name 8417 Name *string `json:"name,omitempty"` 8418 // Kind - Kind of resource 8419 Kind *string `json:"kind,omitempty"` 8420 // Location - Resource Location 8421 Location *string `json:"location,omitempty"` 8422 // Type - Resource type 8423 Type *string `json:"type,omitempty"` 8424 // Tags - Resource tags 8425 Tags map[string]*string `json:"tags"` 8426} 8427 8428// MarshalJSON is the custom marshaler for MetricDefinition. 8429func (md MetricDefinition) MarshalJSON() ([]byte, error) { 8430 objectMap := make(map[string]interface{}) 8431 if md.MetricDefinitionProperties != nil { 8432 objectMap["properties"] = md.MetricDefinitionProperties 8433 } 8434 if md.ID != nil { 8435 objectMap["id"] = md.ID 8436 } 8437 if md.Name != nil { 8438 objectMap["name"] = md.Name 8439 } 8440 if md.Kind != nil { 8441 objectMap["kind"] = md.Kind 8442 } 8443 if md.Location != nil { 8444 objectMap["location"] = md.Location 8445 } 8446 if md.Type != nil { 8447 objectMap["type"] = md.Type 8448 } 8449 if md.Tags != nil { 8450 objectMap["tags"] = md.Tags 8451 } 8452 return json.Marshal(objectMap) 8453} 8454 8455// UnmarshalJSON is the custom unmarshaler for MetricDefinition struct. 8456func (md *MetricDefinition) UnmarshalJSON(body []byte) error { 8457 var m map[string]*json.RawMessage 8458 err := json.Unmarshal(body, &m) 8459 if err != nil { 8460 return err 8461 } 8462 for k, v := range m { 8463 switch k { 8464 case "properties": 8465 if v != nil { 8466 var metricDefinitionProperties MetricDefinitionProperties 8467 err = json.Unmarshal(*v, &metricDefinitionProperties) 8468 if err != nil { 8469 return err 8470 } 8471 md.MetricDefinitionProperties = &metricDefinitionProperties 8472 } 8473 case "id": 8474 if v != nil { 8475 var ID string 8476 err = json.Unmarshal(*v, &ID) 8477 if err != nil { 8478 return err 8479 } 8480 md.ID = &ID 8481 } 8482 case "name": 8483 if v != nil { 8484 var name string 8485 err = json.Unmarshal(*v, &name) 8486 if err != nil { 8487 return err 8488 } 8489 md.Name = &name 8490 } 8491 case "kind": 8492 if v != nil { 8493 var kind string 8494 err = json.Unmarshal(*v, &kind) 8495 if err != nil { 8496 return err 8497 } 8498 md.Kind = &kind 8499 } 8500 case "location": 8501 if v != nil { 8502 var location string 8503 err = json.Unmarshal(*v, &location) 8504 if err != nil { 8505 return err 8506 } 8507 md.Location = &location 8508 } 8509 case "type": 8510 if v != nil { 8511 var typeVar string 8512 err = json.Unmarshal(*v, &typeVar) 8513 if err != nil { 8514 return err 8515 } 8516 md.Type = &typeVar 8517 } 8518 case "tags": 8519 if v != nil { 8520 var tags map[string]*string 8521 err = json.Unmarshal(*v, &tags) 8522 if err != nil { 8523 return err 8524 } 8525 md.Tags = tags 8526 } 8527 } 8528 } 8529 8530 return nil 8531} 8532 8533// MetricDefinitionCollection collection of metric definitions 8534type MetricDefinitionCollection struct { 8535 autorest.Response `json:"-"` 8536 // Value - Collection of resources 8537 Value *[]MetricDefinition `json:"value,omitempty"` 8538 // NextLink - Link to next page of resources 8539 NextLink *string `json:"nextLink,omitempty"` 8540} 8541 8542// MetricDefinitionCollectionIterator provides access to a complete listing of MetricDefinition values. 8543type MetricDefinitionCollectionIterator struct { 8544 i int 8545 page MetricDefinitionCollectionPage 8546} 8547 8548// NextWithContext advances to the next value. If there was an error making 8549// the request the iterator does not advance and the error is returned. 8550func (iter *MetricDefinitionCollectionIterator) NextWithContext(ctx context.Context) (err error) { 8551 if tracing.IsEnabled() { 8552 ctx = tracing.StartSpan(ctx, fqdn+"/MetricDefinitionCollectionIterator.NextWithContext") 8553 defer func() { 8554 sc := -1 8555 if iter.Response().Response.Response != nil { 8556 sc = iter.Response().Response.Response.StatusCode 8557 } 8558 tracing.EndSpan(ctx, sc, err) 8559 }() 8560 } 8561 iter.i++ 8562 if iter.i < len(iter.page.Values()) { 8563 return nil 8564 } 8565 err = iter.page.NextWithContext(ctx) 8566 if err != nil { 8567 iter.i-- 8568 return err 8569 } 8570 iter.i = 0 8571 return nil 8572} 8573 8574// Next advances to the next value. If there was an error making 8575// the request the iterator does not advance and the error is returned. 8576// Deprecated: Use NextWithContext() instead. 8577func (iter *MetricDefinitionCollectionIterator) Next() error { 8578 return iter.NextWithContext(context.Background()) 8579} 8580 8581// NotDone returns true if the enumeration should be started or is not yet complete. 8582func (iter MetricDefinitionCollectionIterator) NotDone() bool { 8583 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8584} 8585 8586// Response returns the raw server response from the last page request. 8587func (iter MetricDefinitionCollectionIterator) Response() MetricDefinitionCollection { 8588 return iter.page.Response() 8589} 8590 8591// Value returns the current value or a zero-initialized value if the 8592// iterator has advanced beyond the end of the collection. 8593func (iter MetricDefinitionCollectionIterator) Value() MetricDefinition { 8594 if !iter.page.NotDone() { 8595 return MetricDefinition{} 8596 } 8597 return iter.page.Values()[iter.i] 8598} 8599 8600// Creates a new instance of the MetricDefinitionCollectionIterator type. 8601func NewMetricDefinitionCollectionIterator(page MetricDefinitionCollectionPage) MetricDefinitionCollectionIterator { 8602 return MetricDefinitionCollectionIterator{page: page} 8603} 8604 8605// IsEmpty returns true if the ListResult contains no values. 8606func (mdc MetricDefinitionCollection) IsEmpty() bool { 8607 return mdc.Value == nil || len(*mdc.Value) == 0 8608} 8609 8610// metricDefinitionCollectionPreparer prepares a request to retrieve the next set of results. 8611// It returns nil if no more results exist. 8612func (mdc MetricDefinitionCollection) metricDefinitionCollectionPreparer(ctx context.Context) (*http.Request, error) { 8613 if mdc.NextLink == nil || len(to.String(mdc.NextLink)) < 1 { 8614 return nil, nil 8615 } 8616 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8617 autorest.AsJSON(), 8618 autorest.AsGet(), 8619 autorest.WithBaseURL(to.String(mdc.NextLink))) 8620} 8621 8622// MetricDefinitionCollectionPage contains a page of MetricDefinition values. 8623type MetricDefinitionCollectionPage struct { 8624 fn func(context.Context, MetricDefinitionCollection) (MetricDefinitionCollection, error) 8625 mdc MetricDefinitionCollection 8626} 8627 8628// NextWithContext advances to the next page of values. If there was an error making 8629// the request the page does not advance and the error is returned. 8630func (page *MetricDefinitionCollectionPage) NextWithContext(ctx context.Context) (err error) { 8631 if tracing.IsEnabled() { 8632 ctx = tracing.StartSpan(ctx, fqdn+"/MetricDefinitionCollectionPage.NextWithContext") 8633 defer func() { 8634 sc := -1 8635 if page.Response().Response.Response != nil { 8636 sc = page.Response().Response.Response.StatusCode 8637 } 8638 tracing.EndSpan(ctx, sc, err) 8639 }() 8640 } 8641 next, err := page.fn(ctx, page.mdc) 8642 if err != nil { 8643 return err 8644 } 8645 page.mdc = next 8646 return nil 8647} 8648 8649// Next advances to the next page of values. If there was an error making 8650// the request the page does not advance and the error is returned. 8651// Deprecated: Use NextWithContext() instead. 8652func (page *MetricDefinitionCollectionPage) Next() error { 8653 return page.NextWithContext(context.Background()) 8654} 8655 8656// NotDone returns true if the page enumeration should be started or is not yet complete. 8657func (page MetricDefinitionCollectionPage) NotDone() bool { 8658 return !page.mdc.IsEmpty() 8659} 8660 8661// Response returns the raw server response from the last page request. 8662func (page MetricDefinitionCollectionPage) Response() MetricDefinitionCollection { 8663 return page.mdc 8664} 8665 8666// Values returns the slice of values for the current page or nil if there are no values. 8667func (page MetricDefinitionCollectionPage) Values() []MetricDefinition { 8668 if page.mdc.IsEmpty() { 8669 return nil 8670 } 8671 return *page.mdc.Value 8672} 8673 8674// Creates a new instance of the MetricDefinitionCollectionPage type. 8675func NewMetricDefinitionCollectionPage(getNextPage func(context.Context, MetricDefinitionCollection) (MetricDefinitionCollection, error)) MetricDefinitionCollectionPage { 8676 return MetricDefinitionCollectionPage{fn: getNextPage} 8677} 8678 8679// MetricDefinitionProperties ... 8680type MetricDefinitionProperties struct { 8681 // Name - Name of the metric 8682 Name *string `json:"name,omitempty"` 8683 // Unit - Unit of the metric 8684 Unit *string `json:"unit,omitempty"` 8685 // PrimaryAggregationType - Primary aggregation type 8686 PrimaryAggregationType *string `json:"primaryAggregationType,omitempty"` 8687 // MetricAvailabilities - List of time grains supported for the metric together with retention period 8688 MetricAvailabilities *[]MetricAvailabilily `json:"metricAvailabilities,omitempty"` 8689 // DisplayName - Friendly name shown in the UI 8690 DisplayName *string `json:"displayName,omitempty"` 8691} 8692 8693// NameIdentifier identifies an object 8694type NameIdentifier struct { 8695 // Name - Name of the object 8696 Name *string `json:"name,omitempty"` 8697} 8698 8699// NameIdentifierCollection collection of domain name identifiers 8700type NameIdentifierCollection struct { 8701 autorest.Response `json:"-"` 8702 // Value - Collection of resources 8703 Value *[]NameIdentifier `json:"value,omitempty"` 8704 // NextLink - Link to next page of resources 8705 NextLink *string `json:"nextLink,omitempty"` 8706} 8707 8708// NameIdentifierCollectionIterator provides access to a complete listing of NameIdentifier values. 8709type NameIdentifierCollectionIterator struct { 8710 i int 8711 page NameIdentifierCollectionPage 8712} 8713 8714// NextWithContext advances to the next value. If there was an error making 8715// the request the iterator does not advance and the error is returned. 8716func (iter *NameIdentifierCollectionIterator) NextWithContext(ctx context.Context) (err error) { 8717 if tracing.IsEnabled() { 8718 ctx = tracing.StartSpan(ctx, fqdn+"/NameIdentifierCollectionIterator.NextWithContext") 8719 defer func() { 8720 sc := -1 8721 if iter.Response().Response.Response != nil { 8722 sc = iter.Response().Response.Response.StatusCode 8723 } 8724 tracing.EndSpan(ctx, sc, err) 8725 }() 8726 } 8727 iter.i++ 8728 if iter.i < len(iter.page.Values()) { 8729 return nil 8730 } 8731 err = iter.page.NextWithContext(ctx) 8732 if err != nil { 8733 iter.i-- 8734 return err 8735 } 8736 iter.i = 0 8737 return nil 8738} 8739 8740// Next advances to the next value. If there was an error making 8741// the request the iterator does not advance and the error is returned. 8742// Deprecated: Use NextWithContext() instead. 8743func (iter *NameIdentifierCollectionIterator) Next() error { 8744 return iter.NextWithContext(context.Background()) 8745} 8746 8747// NotDone returns true if the enumeration should be started or is not yet complete. 8748func (iter NameIdentifierCollectionIterator) NotDone() bool { 8749 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8750} 8751 8752// Response returns the raw server response from the last page request. 8753func (iter NameIdentifierCollectionIterator) Response() NameIdentifierCollection { 8754 return iter.page.Response() 8755} 8756 8757// Value returns the current value or a zero-initialized value if the 8758// iterator has advanced beyond the end of the collection. 8759func (iter NameIdentifierCollectionIterator) Value() NameIdentifier { 8760 if !iter.page.NotDone() { 8761 return NameIdentifier{} 8762 } 8763 return iter.page.Values()[iter.i] 8764} 8765 8766// Creates a new instance of the NameIdentifierCollectionIterator type. 8767func NewNameIdentifierCollectionIterator(page NameIdentifierCollectionPage) NameIdentifierCollectionIterator { 8768 return NameIdentifierCollectionIterator{page: page} 8769} 8770 8771// IsEmpty returns true if the ListResult contains no values. 8772func (nic NameIdentifierCollection) IsEmpty() bool { 8773 return nic.Value == nil || len(*nic.Value) == 0 8774} 8775 8776// nameIdentifierCollectionPreparer prepares a request to retrieve the next set of results. 8777// It returns nil if no more results exist. 8778func (nic NameIdentifierCollection) nameIdentifierCollectionPreparer(ctx context.Context) (*http.Request, error) { 8779 if nic.NextLink == nil || len(to.String(nic.NextLink)) < 1 { 8780 return nil, nil 8781 } 8782 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8783 autorest.AsJSON(), 8784 autorest.AsGet(), 8785 autorest.WithBaseURL(to.String(nic.NextLink))) 8786} 8787 8788// NameIdentifierCollectionPage contains a page of NameIdentifier values. 8789type NameIdentifierCollectionPage struct { 8790 fn func(context.Context, NameIdentifierCollection) (NameIdentifierCollection, error) 8791 nic NameIdentifierCollection 8792} 8793 8794// NextWithContext advances to the next page of values. If there was an error making 8795// the request the page does not advance and the error is returned. 8796func (page *NameIdentifierCollectionPage) NextWithContext(ctx context.Context) (err error) { 8797 if tracing.IsEnabled() { 8798 ctx = tracing.StartSpan(ctx, fqdn+"/NameIdentifierCollectionPage.NextWithContext") 8799 defer func() { 8800 sc := -1 8801 if page.Response().Response.Response != nil { 8802 sc = page.Response().Response.Response.StatusCode 8803 } 8804 tracing.EndSpan(ctx, sc, err) 8805 }() 8806 } 8807 next, err := page.fn(ctx, page.nic) 8808 if err != nil { 8809 return err 8810 } 8811 page.nic = next 8812 return nil 8813} 8814 8815// Next advances to the next page of values. If there was an error making 8816// the request the page does not advance and the error is returned. 8817// Deprecated: Use NextWithContext() instead. 8818func (page *NameIdentifierCollectionPage) Next() error { 8819 return page.NextWithContext(context.Background()) 8820} 8821 8822// NotDone returns true if the page enumeration should be started or is not yet complete. 8823func (page NameIdentifierCollectionPage) NotDone() bool { 8824 return !page.nic.IsEmpty() 8825} 8826 8827// Response returns the raw server response from the last page request. 8828func (page NameIdentifierCollectionPage) Response() NameIdentifierCollection { 8829 return page.nic 8830} 8831 8832// Values returns the slice of values for the current page or nil if there are no values. 8833func (page NameIdentifierCollectionPage) Values() []NameIdentifier { 8834 if page.nic.IsEmpty() { 8835 return nil 8836 } 8837 return *page.nic.Value 8838} 8839 8840// Creates a new instance of the NameIdentifierCollectionPage type. 8841func NewNameIdentifierCollectionPage(getNextPage func(context.Context, NameIdentifierCollection) (NameIdentifierCollection, error)) NameIdentifierCollectionPage { 8842 return NameIdentifierCollectionPage{fn: getNextPage} 8843} 8844 8845// NameValuePair name value pair 8846type NameValuePair struct { 8847 // Name - Pair name 8848 Name *string `json:"name,omitempty"` 8849 // Value - Pair value 8850 Value *string `json:"value,omitempty"` 8851} 8852 8853// NetworkAccessControlEntry ... 8854type NetworkAccessControlEntry struct { 8855 // Action - Possible values include: 'Permit', 'Deny' 8856 Action AccessControlEntryAction `json:"action,omitempty"` 8857 Description *string `json:"description,omitempty"` 8858 Order *int32 `json:"order,omitempty"` 8859 RemoteSubnet *string `json:"remoteSubnet,omitempty"` 8860} 8861 8862// NetworkFeatures this is an object used to store a full view of network features (presently VNET 8863// integration and Hybrid Connections) 8864// for a web app. 8865type NetworkFeatures struct { 8866 autorest.Response `json:"-"` 8867 *NetworkFeaturesProperties `json:"properties,omitempty"` 8868 // ID - Resource Id 8869 ID *string `json:"id,omitempty"` 8870 // Name - Resource Name 8871 Name *string `json:"name,omitempty"` 8872 // Kind - Kind of resource 8873 Kind *string `json:"kind,omitempty"` 8874 // Location - Resource Location 8875 Location *string `json:"location,omitempty"` 8876 // Type - Resource type 8877 Type *string `json:"type,omitempty"` 8878 // Tags - Resource tags 8879 Tags map[string]*string `json:"tags"` 8880} 8881 8882// MarshalJSON is the custom marshaler for NetworkFeatures. 8883func (nf NetworkFeatures) MarshalJSON() ([]byte, error) { 8884 objectMap := make(map[string]interface{}) 8885 if nf.NetworkFeaturesProperties != nil { 8886 objectMap["properties"] = nf.NetworkFeaturesProperties 8887 } 8888 if nf.ID != nil { 8889 objectMap["id"] = nf.ID 8890 } 8891 if nf.Name != nil { 8892 objectMap["name"] = nf.Name 8893 } 8894 if nf.Kind != nil { 8895 objectMap["kind"] = nf.Kind 8896 } 8897 if nf.Location != nil { 8898 objectMap["location"] = nf.Location 8899 } 8900 if nf.Type != nil { 8901 objectMap["type"] = nf.Type 8902 } 8903 if nf.Tags != nil { 8904 objectMap["tags"] = nf.Tags 8905 } 8906 return json.Marshal(objectMap) 8907} 8908 8909// UnmarshalJSON is the custom unmarshaler for NetworkFeatures struct. 8910func (nf *NetworkFeatures) UnmarshalJSON(body []byte) error { 8911 var m map[string]*json.RawMessage 8912 err := json.Unmarshal(body, &m) 8913 if err != nil { 8914 return err 8915 } 8916 for k, v := range m { 8917 switch k { 8918 case "properties": 8919 if v != nil { 8920 var networkFeaturesProperties NetworkFeaturesProperties 8921 err = json.Unmarshal(*v, &networkFeaturesProperties) 8922 if err != nil { 8923 return err 8924 } 8925 nf.NetworkFeaturesProperties = &networkFeaturesProperties 8926 } 8927 case "id": 8928 if v != nil { 8929 var ID string 8930 err = json.Unmarshal(*v, &ID) 8931 if err != nil { 8932 return err 8933 } 8934 nf.ID = &ID 8935 } 8936 case "name": 8937 if v != nil { 8938 var name string 8939 err = json.Unmarshal(*v, &name) 8940 if err != nil { 8941 return err 8942 } 8943 nf.Name = &name 8944 } 8945 case "kind": 8946 if v != nil { 8947 var kind string 8948 err = json.Unmarshal(*v, &kind) 8949 if err != nil { 8950 return err 8951 } 8952 nf.Kind = &kind 8953 } 8954 case "location": 8955 if v != nil { 8956 var location string 8957 err = json.Unmarshal(*v, &location) 8958 if err != nil { 8959 return err 8960 } 8961 nf.Location = &location 8962 } 8963 case "type": 8964 if v != nil { 8965 var typeVar string 8966 err = json.Unmarshal(*v, &typeVar) 8967 if err != nil { 8968 return err 8969 } 8970 nf.Type = &typeVar 8971 } 8972 case "tags": 8973 if v != nil { 8974 var tags map[string]*string 8975 err = json.Unmarshal(*v, &tags) 8976 if err != nil { 8977 return err 8978 } 8979 nf.Tags = tags 8980 } 8981 } 8982 } 8983 8984 return nil 8985} 8986 8987// NetworkFeaturesProperties ... 8988type NetworkFeaturesProperties struct { 8989 // VirtualNetworkName - The Vnet Name 8990 VirtualNetworkName *string `json:"virtualNetworkName,omitempty"` 8991 // VirtualNetworkConnection - The Vnet Summary view 8992 VirtualNetworkConnection *VnetInfo `json:"virtualNetworkConnection,omitempty"` 8993 // HybridConnections - The Hybrid Connections Summary view 8994 HybridConnections *[]RelayServiceConnectionEntity `json:"hybridConnections,omitempty"` 8995} 8996 8997// ParameterCustomLoginSettingValues custom logging setting values 8998type ParameterCustomLoginSettingValues struct { 8999 *ParameterCustomLoginSettingValuesProperties `json:"properties,omitempty"` 9000 // ID - Resource Id 9001 ID *string `json:"id,omitempty"` 9002 // Name - Resource Name 9003 Name *string `json:"name,omitempty"` 9004 // Kind - Kind of resource 9005 Kind *string `json:"kind,omitempty"` 9006 // Location - Resource Location 9007 Location *string `json:"location,omitempty"` 9008 // Type - Resource type 9009 Type *string `json:"type,omitempty"` 9010 // Tags - Resource tags 9011 Tags map[string]*string `json:"tags"` 9012} 9013 9014// MarshalJSON is the custom marshaler for ParameterCustomLoginSettingValues. 9015func (pclsv ParameterCustomLoginSettingValues) MarshalJSON() ([]byte, error) { 9016 objectMap := make(map[string]interface{}) 9017 if pclsv.ParameterCustomLoginSettingValuesProperties != nil { 9018 objectMap["properties"] = pclsv.ParameterCustomLoginSettingValuesProperties 9019 } 9020 if pclsv.ID != nil { 9021 objectMap["id"] = pclsv.ID 9022 } 9023 if pclsv.Name != nil { 9024 objectMap["name"] = pclsv.Name 9025 } 9026 if pclsv.Kind != nil { 9027 objectMap["kind"] = pclsv.Kind 9028 } 9029 if pclsv.Location != nil { 9030 objectMap["location"] = pclsv.Location 9031 } 9032 if pclsv.Type != nil { 9033 objectMap["type"] = pclsv.Type 9034 } 9035 if pclsv.Tags != nil { 9036 objectMap["tags"] = pclsv.Tags 9037 } 9038 return json.Marshal(objectMap) 9039} 9040 9041// UnmarshalJSON is the custom unmarshaler for ParameterCustomLoginSettingValues struct. 9042func (pclsv *ParameterCustomLoginSettingValues) UnmarshalJSON(body []byte) error { 9043 var m map[string]*json.RawMessage 9044 err := json.Unmarshal(body, &m) 9045 if err != nil { 9046 return err 9047 } 9048 for k, v := range m { 9049 switch k { 9050 case "properties": 9051 if v != nil { 9052 var parameterCustomLoginSettingValuesProperties ParameterCustomLoginSettingValuesProperties 9053 err = json.Unmarshal(*v, ¶meterCustomLoginSettingValuesProperties) 9054 if err != nil { 9055 return err 9056 } 9057 pclsv.ParameterCustomLoginSettingValuesProperties = ¶meterCustomLoginSettingValuesProperties 9058 } 9059 case "id": 9060 if v != nil { 9061 var ID string 9062 err = json.Unmarshal(*v, &ID) 9063 if err != nil { 9064 return err 9065 } 9066 pclsv.ID = &ID 9067 } 9068 case "name": 9069 if v != nil { 9070 var name string 9071 err = json.Unmarshal(*v, &name) 9072 if err != nil { 9073 return err 9074 } 9075 pclsv.Name = &name 9076 } 9077 case "kind": 9078 if v != nil { 9079 var kind string 9080 err = json.Unmarshal(*v, &kind) 9081 if err != nil { 9082 return err 9083 } 9084 pclsv.Kind = &kind 9085 } 9086 case "location": 9087 if v != nil { 9088 var location string 9089 err = json.Unmarshal(*v, &location) 9090 if err != nil { 9091 return err 9092 } 9093 pclsv.Location = &location 9094 } 9095 case "type": 9096 if v != nil { 9097 var typeVar string 9098 err = json.Unmarshal(*v, &typeVar) 9099 if err != nil { 9100 return err 9101 } 9102 pclsv.Type = &typeVar 9103 } 9104 case "tags": 9105 if v != nil { 9106 var tags map[string]*string 9107 err = json.Unmarshal(*v, &tags) 9108 if err != nil { 9109 return err 9110 } 9111 pclsv.Tags = tags 9112 } 9113 } 9114 } 9115 9116 return nil 9117} 9118 9119// ParameterCustomLoginSettingValuesProperties ... 9120type ParameterCustomLoginSettingValuesProperties struct { 9121 // CustomParameters - Custom parameters. 9122 CustomParameters map[string]*CustomLoginSettingValue `json:"customParameters"` 9123} 9124 9125// MarshalJSON is the custom marshaler for ParameterCustomLoginSettingValuesProperties. 9126func (pclsv ParameterCustomLoginSettingValuesProperties) MarshalJSON() ([]byte, error) { 9127 objectMap := make(map[string]interface{}) 9128 if pclsv.CustomParameters != nil { 9129 objectMap["customParameters"] = pclsv.CustomParameters 9130 } 9131 return json.Marshal(objectMap) 9132} 9133 9134// PremierAddOnRequest ... 9135type PremierAddOnRequest struct { 9136 // Location - Geo region resource belongs to e.g. SouthCentralUS, SouthEastAsia 9137 Location *string `json:"location,omitempty"` 9138 // Tags - Tags associated with resource 9139 Tags map[string]*string `json:"tags"` 9140 // Plan - Azure resource manager plan 9141 Plan *ArmPlan `json:"plan,omitempty"` 9142 // Properties - Resource specific properties 9143 Properties interface{} `json:"properties,omitempty"` 9144 // Sku - Sku description of the resource 9145 Sku *SkuDescription `json:"sku,omitempty"` 9146} 9147 9148// MarshalJSON is the custom marshaler for PremierAddOnRequest. 9149func (paor PremierAddOnRequest) MarshalJSON() ([]byte, error) { 9150 objectMap := make(map[string]interface{}) 9151 if paor.Location != nil { 9152 objectMap["location"] = paor.Location 9153 } 9154 if paor.Tags != nil { 9155 objectMap["tags"] = paor.Tags 9156 } 9157 if paor.Plan != nil { 9158 objectMap["plan"] = paor.Plan 9159 } 9160 if paor.Properties != nil { 9161 objectMap["properties"] = paor.Properties 9162 } 9163 if paor.Sku != nil { 9164 objectMap["sku"] = paor.Sku 9165 } 9166 return json.Marshal(objectMap) 9167} 9168 9169// RampUpRule routing rules for ramp up testing. This rule allows to redirect static traffic % to a slot or 9170// to gradually change routing % based on performance 9171type RampUpRule struct { 9172 // ActionHostName - Hostname of a slot to which the traffic will be redirected if decided to. E.g. mysite-stage.azurewebsites.net 9173 ActionHostName *string `json:"actionHostName,omitempty"` 9174 // ReroutePercentage - Percentage of the traffic which will be redirected to {Microsoft.Web.Hosting.Administration.RampUpRule.ActionHostName} 9175 ReroutePercentage *float64 `json:"reroutePercentage,omitempty"` 9176 // ChangeStep - [Optional] In auto ramp up scenario this is the step to add/remove from {Microsoft.Web.Hosting.Administration.RampUpRule.ReroutePercentage} until it reaches 9177 // {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}. 9178 // Custom decision algorithm can be provided in TiPCallback site extension which Url can be specified in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeDecisionCallbackUrl} 9179 ChangeStep *float64 `json:"changeStep,omitempty"` 9180 // ChangeIntervalInMinutes - [Optional] Specifies interval in minutes to reevaluate ReroutePercentage 9181 ChangeIntervalInMinutes *int32 `json:"changeIntervalInMinutes,omitempty"` 9182 // MinReroutePercentage - [Optional] Specifies lower boundary above which ReroutePercentage will stay. 9183 MinReroutePercentage *float64 `json:"minReroutePercentage,omitempty"` 9184 // MaxReroutePercentage - [Optional] Specifies upper boundary below which ReroutePercentage will stay. 9185 MaxReroutePercentage *float64 `json:"maxReroutePercentage,omitempty"` 9186 // 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. 9187 // https://www.siteextensions.net/packages/TiPCallback/ 9188 ChangeDecisionCallbackURL *string `json:"changeDecisionCallbackUrl,omitempty"` 9189 // Name - Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment. 9190 Name *string `json:"name,omitempty"` 9191} 9192 9193// ReadCloser ... 9194type ReadCloser struct { 9195 autorest.Response `json:"-"` 9196 Value *io.ReadCloser `json:"value,omitempty"` 9197} 9198 9199// Recommendation represents a recommendation result generated by the recommendation engine 9200type Recommendation struct { 9201 // CreationTime - Timestamp when this instance was created. 9202 CreationTime *date.Time `json:"creationTime,omitempty"` 9203 // RecommendationID - A GUID value that each recommendation object is associated with. 9204 RecommendationID *string `json:"recommendationId,omitempty"` 9205 // ResourceID - Full ARM resource ID string that this recommendation object is associated with. 9206 ResourceID *string `json:"resourceId,omitempty"` 9207 // ResourceScope - Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. 9208 ResourceScope *string `json:"resourceScope,omitempty"` 9209 // RuleName - Unique name of the rule 9210 RuleName *string `json:"ruleName,omitempty"` 9211 // DisplayName - UI friendly name of the rule (may not be unique) 9212 DisplayName *string `json:"displayName,omitempty"` 9213 // Message - Localized text of recommendation, good for UI. 9214 Message *string `json:"message,omitempty"` 9215 // Level - Level indicating how critical this recommendation can impact. Possible values include: 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion' 9216 Level NotificationLevel `json:"level,omitempty"` 9217 // Channels - List of channels that this recommendation can apply. Possible values include: 'Notification', 'API', 'Email', 'All' 9218 Channels Channels `json:"channels,omitempty"` 9219 // Tags - The list of category tags that this recommendation belongs to. 9220 Tags *[]string `json:"tags,omitempty"` 9221 // ActionName - Name of action recommended by this object. 9222 ActionName *string `json:"actionName,omitempty"` 9223 // Enabled - On/off flag indicating the rule is currently enabled or disabled. 9224 Enabled *int32 `json:"enabled,omitempty"` 9225 // StartTime - The beginning time of a range that the recommendation refers to. 9226 StartTime *date.Time `json:"startTime,omitempty"` 9227 // EndTime - The end time of a range that the recommendation refers to. 9228 EndTime *date.Time `json:"endTime,omitempty"` 9229 // NextNotificationTime - When to notify this recommendation next. Null means that this will never be notified anymore. 9230 NextNotificationTime *date.Time `json:"nextNotificationTime,omitempty"` 9231 // NotificationExpirationTime - Date and time when this notification expires. 9232 NotificationExpirationTime *date.Time `json:"notificationExpirationTime,omitempty"` 9233 // NotifiedTime - Last timestamp this instance was actually notified. Null means that this recommendation hasn't been notified yet. 9234 NotifiedTime *date.Time `json:"notifiedTime,omitempty"` 9235 // Score - A metric value measured by the rule. 9236 Score *float64 `json:"score,omitempty"` 9237} 9238 9239// RecommendationRule represents a recommendation rule that the recommendation engine can perform 9240type RecommendationRule struct { 9241 autorest.Response `json:"-"` 9242 // Name - Unique name of the rule 9243 Name *string `json:"name,omitempty"` 9244 // DisplayName - UI friendly name of the rule 9245 DisplayName *string `json:"displayName,omitempty"` 9246 // Message - Localized name of the rule (Good for UI) 9247 Message *string `json:"message,omitempty"` 9248 // RecommendationID - Recommendation ID of an associated recommendation object tied to the rule, if exists. 9249 // If such an object doesn't exist, it is set to null. 9250 RecommendationID *string `json:"recommendationId,omitempty"` 9251 // Description - Localized detailed description of the rule 9252 Description *string `json:"description,omitempty"` 9253 // ActionName - Name of action that is recommended by this rule in string 9254 ActionName *string `json:"actionName,omitempty"` 9255 // Enabled - On/off flag indicating the rule is currently enabled or disabled. 9256 Enabled *int32 `json:"enabled,omitempty"` 9257 // Level - Level of impact indicating how critical this rule is. Possible values include: 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion' 9258 Level NotificationLevel `json:"level,omitempty"` 9259 // Channels - List of available channels that this rule applies. Possible values include: 'Notification', 'API', 'Email', 'All' 9260 Channels Channels `json:"channels,omitempty"` 9261 // Tags - An array of category tags that the rule contains. 9262 Tags *[]string `json:"tags,omitempty"` 9263} 9264 9265// ReissueCertificateOrderRequest class representing certificate reissue request 9266type ReissueCertificateOrderRequest struct { 9267 *ReissueCertificateOrderRequestProperties `json:"properties,omitempty"` 9268 // ID - Resource Id 9269 ID *string `json:"id,omitempty"` 9270 // Name - Resource Name 9271 Name *string `json:"name,omitempty"` 9272 // Kind - Kind of resource 9273 Kind *string `json:"kind,omitempty"` 9274 // Location - Resource Location 9275 Location *string `json:"location,omitempty"` 9276 // Type - Resource type 9277 Type *string `json:"type,omitempty"` 9278 // Tags - Resource tags 9279 Tags map[string]*string `json:"tags"` 9280} 9281 9282// MarshalJSON is the custom marshaler for ReissueCertificateOrderRequest. 9283func (rcor ReissueCertificateOrderRequest) MarshalJSON() ([]byte, error) { 9284 objectMap := make(map[string]interface{}) 9285 if rcor.ReissueCertificateOrderRequestProperties != nil { 9286 objectMap["properties"] = rcor.ReissueCertificateOrderRequestProperties 9287 } 9288 if rcor.ID != nil { 9289 objectMap["id"] = rcor.ID 9290 } 9291 if rcor.Name != nil { 9292 objectMap["name"] = rcor.Name 9293 } 9294 if rcor.Kind != nil { 9295 objectMap["kind"] = rcor.Kind 9296 } 9297 if rcor.Location != nil { 9298 objectMap["location"] = rcor.Location 9299 } 9300 if rcor.Type != nil { 9301 objectMap["type"] = rcor.Type 9302 } 9303 if rcor.Tags != nil { 9304 objectMap["tags"] = rcor.Tags 9305 } 9306 return json.Marshal(objectMap) 9307} 9308 9309// UnmarshalJSON is the custom unmarshaler for ReissueCertificateOrderRequest struct. 9310func (rcor *ReissueCertificateOrderRequest) UnmarshalJSON(body []byte) error { 9311 var m map[string]*json.RawMessage 9312 err := json.Unmarshal(body, &m) 9313 if err != nil { 9314 return err 9315 } 9316 for k, v := range m { 9317 switch k { 9318 case "properties": 9319 if v != nil { 9320 var reissueCertificateOrderRequestProperties ReissueCertificateOrderRequestProperties 9321 err = json.Unmarshal(*v, &reissueCertificateOrderRequestProperties) 9322 if err != nil { 9323 return err 9324 } 9325 rcor.ReissueCertificateOrderRequestProperties = &reissueCertificateOrderRequestProperties 9326 } 9327 case "id": 9328 if v != nil { 9329 var ID string 9330 err = json.Unmarshal(*v, &ID) 9331 if err != nil { 9332 return err 9333 } 9334 rcor.ID = &ID 9335 } 9336 case "name": 9337 if v != nil { 9338 var name string 9339 err = json.Unmarshal(*v, &name) 9340 if err != nil { 9341 return err 9342 } 9343 rcor.Name = &name 9344 } 9345 case "kind": 9346 if v != nil { 9347 var kind string 9348 err = json.Unmarshal(*v, &kind) 9349 if err != nil { 9350 return err 9351 } 9352 rcor.Kind = &kind 9353 } 9354 case "location": 9355 if v != nil { 9356 var location string 9357 err = json.Unmarshal(*v, &location) 9358 if err != nil { 9359 return err 9360 } 9361 rcor.Location = &location 9362 } 9363 case "type": 9364 if v != nil { 9365 var typeVar string 9366 err = json.Unmarshal(*v, &typeVar) 9367 if err != nil { 9368 return err 9369 } 9370 rcor.Type = &typeVar 9371 } 9372 case "tags": 9373 if v != nil { 9374 var tags map[string]*string 9375 err = json.Unmarshal(*v, &tags) 9376 if err != nil { 9377 return err 9378 } 9379 rcor.Tags = tags 9380 } 9381 } 9382 } 9383 9384 return nil 9385} 9386 9387// ReissueCertificateOrderRequestProperties ... 9388type ReissueCertificateOrderRequestProperties struct { 9389 // KeySize - Certificate Key Size 9390 KeySize *int32 `json:"keySize,omitempty"` 9391 // DelayExistingRevokeInHours - Delay in hours to revoke existing certificate after the new certificate is issued 9392 DelayExistingRevokeInHours *int32 `json:"delayExistingRevokeInHours,omitempty"` 9393} 9394 9395// RelayServiceConnectionEntity class that represents a BizTalk Hybrid Connection 9396type RelayServiceConnectionEntity struct { 9397 autorest.Response `json:"-"` 9398 *RelayServiceConnectionEntityProperties `json:"properties,omitempty"` 9399 // ID - Resource Id 9400 ID *string `json:"id,omitempty"` 9401 // Name - Resource Name 9402 Name *string `json:"name,omitempty"` 9403 // Kind - Kind of resource 9404 Kind *string `json:"kind,omitempty"` 9405 // Location - Resource Location 9406 Location *string `json:"location,omitempty"` 9407 // Type - Resource type 9408 Type *string `json:"type,omitempty"` 9409 // Tags - Resource tags 9410 Tags map[string]*string `json:"tags"` 9411} 9412 9413// MarshalJSON is the custom marshaler for RelayServiceConnectionEntity. 9414func (rsce RelayServiceConnectionEntity) MarshalJSON() ([]byte, error) { 9415 objectMap := make(map[string]interface{}) 9416 if rsce.RelayServiceConnectionEntityProperties != nil { 9417 objectMap["properties"] = rsce.RelayServiceConnectionEntityProperties 9418 } 9419 if rsce.ID != nil { 9420 objectMap["id"] = rsce.ID 9421 } 9422 if rsce.Name != nil { 9423 objectMap["name"] = rsce.Name 9424 } 9425 if rsce.Kind != nil { 9426 objectMap["kind"] = rsce.Kind 9427 } 9428 if rsce.Location != nil { 9429 objectMap["location"] = rsce.Location 9430 } 9431 if rsce.Type != nil { 9432 objectMap["type"] = rsce.Type 9433 } 9434 if rsce.Tags != nil { 9435 objectMap["tags"] = rsce.Tags 9436 } 9437 return json.Marshal(objectMap) 9438} 9439 9440// UnmarshalJSON is the custom unmarshaler for RelayServiceConnectionEntity struct. 9441func (rsce *RelayServiceConnectionEntity) UnmarshalJSON(body []byte) error { 9442 var m map[string]*json.RawMessage 9443 err := json.Unmarshal(body, &m) 9444 if err != nil { 9445 return err 9446 } 9447 for k, v := range m { 9448 switch k { 9449 case "properties": 9450 if v != nil { 9451 var relayServiceConnectionEntityProperties RelayServiceConnectionEntityProperties 9452 err = json.Unmarshal(*v, &relayServiceConnectionEntityProperties) 9453 if err != nil { 9454 return err 9455 } 9456 rsce.RelayServiceConnectionEntityProperties = &relayServiceConnectionEntityProperties 9457 } 9458 case "id": 9459 if v != nil { 9460 var ID string 9461 err = json.Unmarshal(*v, &ID) 9462 if err != nil { 9463 return err 9464 } 9465 rsce.ID = &ID 9466 } 9467 case "name": 9468 if v != nil { 9469 var name string 9470 err = json.Unmarshal(*v, &name) 9471 if err != nil { 9472 return err 9473 } 9474 rsce.Name = &name 9475 } 9476 case "kind": 9477 if v != nil { 9478 var kind string 9479 err = json.Unmarshal(*v, &kind) 9480 if err != nil { 9481 return err 9482 } 9483 rsce.Kind = &kind 9484 } 9485 case "location": 9486 if v != nil { 9487 var location string 9488 err = json.Unmarshal(*v, &location) 9489 if err != nil { 9490 return err 9491 } 9492 rsce.Location = &location 9493 } 9494 case "type": 9495 if v != nil { 9496 var typeVar string 9497 err = json.Unmarshal(*v, &typeVar) 9498 if err != nil { 9499 return err 9500 } 9501 rsce.Type = &typeVar 9502 } 9503 case "tags": 9504 if v != nil { 9505 var tags map[string]*string 9506 err = json.Unmarshal(*v, &tags) 9507 if err != nil { 9508 return err 9509 } 9510 rsce.Tags = tags 9511 } 9512 } 9513 } 9514 9515 return nil 9516} 9517 9518// RelayServiceConnectionEntityProperties ... 9519type RelayServiceConnectionEntityProperties struct { 9520 EntityName *string `json:"entityName,omitempty"` 9521 EntityConnectionString *string `json:"entityConnectionString,omitempty"` 9522 ResourceType *string `json:"resourceType,omitempty"` 9523 ResourceConnectionString *string `json:"resourceConnectionString,omitempty"` 9524 Hostname *string `json:"hostname,omitempty"` 9525 Port *int32 `json:"port,omitempty"` 9526 BiztalkURI *string `json:"biztalkUri,omitempty"` 9527} 9528 9529// RenewCertificateOrderRequest class representing certificate renew request 9530type RenewCertificateOrderRequest struct { 9531 *RenewCertificateOrderRequestProperties `json:"properties,omitempty"` 9532 // ID - Resource Id 9533 ID *string `json:"id,omitempty"` 9534 // Name - Resource Name 9535 Name *string `json:"name,omitempty"` 9536 // Kind - Kind of resource 9537 Kind *string `json:"kind,omitempty"` 9538 // Location - Resource Location 9539 Location *string `json:"location,omitempty"` 9540 // Type - Resource type 9541 Type *string `json:"type,omitempty"` 9542 // Tags - Resource tags 9543 Tags map[string]*string `json:"tags"` 9544} 9545 9546// MarshalJSON is the custom marshaler for RenewCertificateOrderRequest. 9547func (rcor RenewCertificateOrderRequest) MarshalJSON() ([]byte, error) { 9548 objectMap := make(map[string]interface{}) 9549 if rcor.RenewCertificateOrderRequestProperties != nil { 9550 objectMap["properties"] = rcor.RenewCertificateOrderRequestProperties 9551 } 9552 if rcor.ID != nil { 9553 objectMap["id"] = rcor.ID 9554 } 9555 if rcor.Name != nil { 9556 objectMap["name"] = rcor.Name 9557 } 9558 if rcor.Kind != nil { 9559 objectMap["kind"] = rcor.Kind 9560 } 9561 if rcor.Location != nil { 9562 objectMap["location"] = rcor.Location 9563 } 9564 if rcor.Type != nil { 9565 objectMap["type"] = rcor.Type 9566 } 9567 if rcor.Tags != nil { 9568 objectMap["tags"] = rcor.Tags 9569 } 9570 return json.Marshal(objectMap) 9571} 9572 9573// UnmarshalJSON is the custom unmarshaler for RenewCertificateOrderRequest struct. 9574func (rcor *RenewCertificateOrderRequest) UnmarshalJSON(body []byte) error { 9575 var m map[string]*json.RawMessage 9576 err := json.Unmarshal(body, &m) 9577 if err != nil { 9578 return err 9579 } 9580 for k, v := range m { 9581 switch k { 9582 case "properties": 9583 if v != nil { 9584 var renewCertificateOrderRequestProperties RenewCertificateOrderRequestProperties 9585 err = json.Unmarshal(*v, &renewCertificateOrderRequestProperties) 9586 if err != nil { 9587 return err 9588 } 9589 rcor.RenewCertificateOrderRequestProperties = &renewCertificateOrderRequestProperties 9590 } 9591 case "id": 9592 if v != nil { 9593 var ID string 9594 err = json.Unmarshal(*v, &ID) 9595 if err != nil { 9596 return err 9597 } 9598 rcor.ID = &ID 9599 } 9600 case "name": 9601 if v != nil { 9602 var name string 9603 err = json.Unmarshal(*v, &name) 9604 if err != nil { 9605 return err 9606 } 9607 rcor.Name = &name 9608 } 9609 case "kind": 9610 if v != nil { 9611 var kind string 9612 err = json.Unmarshal(*v, &kind) 9613 if err != nil { 9614 return err 9615 } 9616 rcor.Kind = &kind 9617 } 9618 case "location": 9619 if v != nil { 9620 var location string 9621 err = json.Unmarshal(*v, &location) 9622 if err != nil { 9623 return err 9624 } 9625 rcor.Location = &location 9626 } 9627 case "type": 9628 if v != nil { 9629 var typeVar string 9630 err = json.Unmarshal(*v, &typeVar) 9631 if err != nil { 9632 return err 9633 } 9634 rcor.Type = &typeVar 9635 } 9636 case "tags": 9637 if v != nil { 9638 var tags map[string]*string 9639 err = json.Unmarshal(*v, &tags) 9640 if err != nil { 9641 return err 9642 } 9643 rcor.Tags = tags 9644 } 9645 } 9646 } 9647 9648 return nil 9649} 9650 9651// RenewCertificateOrderRequestProperties ... 9652type RenewCertificateOrderRequestProperties struct { 9653 // KeySize - Certificate Key Size 9654 KeySize *int32 `json:"keySize,omitempty"` 9655} 9656 9657// RequestsBasedTrigger requestsBasedTrigger 9658type RequestsBasedTrigger struct { 9659 // Count - Count 9660 Count *int32 `json:"count,omitempty"` 9661 // TimeInterval - TimeInterval 9662 TimeInterval *string `json:"timeInterval,omitempty"` 9663} 9664 9665// Resource ... 9666type Resource struct { 9667 // ID - Resource Id 9668 ID *string `json:"id,omitempty"` 9669 // Name - Resource Name 9670 Name *string `json:"name,omitempty"` 9671 // Kind - Kind of resource 9672 Kind *string `json:"kind,omitempty"` 9673 // Location - Resource Location 9674 Location *string `json:"location,omitempty"` 9675 // Type - Resource type 9676 Type *string `json:"type,omitempty"` 9677 // Tags - Resource tags 9678 Tags map[string]*string `json:"tags"` 9679} 9680 9681// MarshalJSON is the custom marshaler for Resource. 9682func (r Resource) MarshalJSON() ([]byte, error) { 9683 objectMap := make(map[string]interface{}) 9684 if r.ID != nil { 9685 objectMap["id"] = r.ID 9686 } 9687 if r.Name != nil { 9688 objectMap["name"] = r.Name 9689 } 9690 if r.Kind != nil { 9691 objectMap["kind"] = r.Kind 9692 } 9693 if r.Location != nil { 9694 objectMap["location"] = r.Location 9695 } 9696 if r.Type != nil { 9697 objectMap["type"] = r.Type 9698 } 9699 if r.Tags != nil { 9700 objectMap["tags"] = r.Tags 9701 } 9702 return json.Marshal(objectMap) 9703} 9704 9705// ResourceMetric object representing a metric for any resource 9706type ResourceMetric struct { 9707 // Name - Name of metric 9708 Name *ResourceMetricName `json:"name,omitempty"` 9709 // Unit - Metric unit 9710 Unit *string `json:"unit,omitempty"` 9711 // TimeGrain - Metric granularity. E.g PT1H, PT5M, P1D 9712 TimeGrain *string `json:"timeGrain,omitempty"` 9713 // StartTime - Metric start time 9714 StartTime *date.Time `json:"startTime,omitempty"` 9715 // EndTime - Metric end time 9716 EndTime *date.Time `json:"endTime,omitempty"` 9717 // ResourceID - Metric resource Id 9718 ResourceID *string `json:"resourceId,omitempty"` 9719 // MetricValues - Metric values 9720 MetricValues *[]ResourceMetricValue `json:"metricValues,omitempty"` 9721 // Properties - Properties 9722 Properties *[]KeyValuePairStringString `json:"properties,omitempty"` 9723} 9724 9725// ResourceMetricCollection collection of metric responses 9726type ResourceMetricCollection struct { 9727 autorest.Response `json:"-"` 9728 // Value - Collection of resources 9729 Value *[]ResourceMetric `json:"value,omitempty"` 9730 // NextLink - Link to next page of resources 9731 NextLink *string `json:"nextLink,omitempty"` 9732} 9733 9734// ResourceMetricCollectionIterator provides access to a complete listing of ResourceMetric values. 9735type ResourceMetricCollectionIterator struct { 9736 i int 9737 page ResourceMetricCollectionPage 9738} 9739 9740// NextWithContext advances to the next value. If there was an error making 9741// the request the iterator does not advance and the error is returned. 9742func (iter *ResourceMetricCollectionIterator) NextWithContext(ctx context.Context) (err error) { 9743 if tracing.IsEnabled() { 9744 ctx = tracing.StartSpan(ctx, fqdn+"/ResourceMetricCollectionIterator.NextWithContext") 9745 defer func() { 9746 sc := -1 9747 if iter.Response().Response.Response != nil { 9748 sc = iter.Response().Response.Response.StatusCode 9749 } 9750 tracing.EndSpan(ctx, sc, err) 9751 }() 9752 } 9753 iter.i++ 9754 if iter.i < len(iter.page.Values()) { 9755 return nil 9756 } 9757 err = iter.page.NextWithContext(ctx) 9758 if err != nil { 9759 iter.i-- 9760 return err 9761 } 9762 iter.i = 0 9763 return nil 9764} 9765 9766// Next advances to the next value. If there was an error making 9767// the request the iterator does not advance and the error is returned. 9768// Deprecated: Use NextWithContext() instead. 9769func (iter *ResourceMetricCollectionIterator) Next() error { 9770 return iter.NextWithContext(context.Background()) 9771} 9772 9773// NotDone returns true if the enumeration should be started or is not yet complete. 9774func (iter ResourceMetricCollectionIterator) NotDone() bool { 9775 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9776} 9777 9778// Response returns the raw server response from the last page request. 9779func (iter ResourceMetricCollectionIterator) Response() ResourceMetricCollection { 9780 return iter.page.Response() 9781} 9782 9783// Value returns the current value or a zero-initialized value if the 9784// iterator has advanced beyond the end of the collection. 9785func (iter ResourceMetricCollectionIterator) Value() ResourceMetric { 9786 if !iter.page.NotDone() { 9787 return ResourceMetric{} 9788 } 9789 return iter.page.Values()[iter.i] 9790} 9791 9792// Creates a new instance of the ResourceMetricCollectionIterator type. 9793func NewResourceMetricCollectionIterator(page ResourceMetricCollectionPage) ResourceMetricCollectionIterator { 9794 return ResourceMetricCollectionIterator{page: page} 9795} 9796 9797// IsEmpty returns true if the ListResult contains no values. 9798func (rmc ResourceMetricCollection) IsEmpty() bool { 9799 return rmc.Value == nil || len(*rmc.Value) == 0 9800} 9801 9802// resourceMetricCollectionPreparer prepares a request to retrieve the next set of results. 9803// It returns nil if no more results exist. 9804func (rmc ResourceMetricCollection) resourceMetricCollectionPreparer(ctx context.Context) (*http.Request, error) { 9805 if rmc.NextLink == nil || len(to.String(rmc.NextLink)) < 1 { 9806 return nil, nil 9807 } 9808 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9809 autorest.AsJSON(), 9810 autorest.AsGet(), 9811 autorest.WithBaseURL(to.String(rmc.NextLink))) 9812} 9813 9814// ResourceMetricCollectionPage contains a page of ResourceMetric values. 9815type ResourceMetricCollectionPage struct { 9816 fn func(context.Context, ResourceMetricCollection) (ResourceMetricCollection, error) 9817 rmc ResourceMetricCollection 9818} 9819 9820// NextWithContext advances to the next page of values. If there was an error making 9821// the request the page does not advance and the error is returned. 9822func (page *ResourceMetricCollectionPage) NextWithContext(ctx context.Context) (err error) { 9823 if tracing.IsEnabled() { 9824 ctx = tracing.StartSpan(ctx, fqdn+"/ResourceMetricCollectionPage.NextWithContext") 9825 defer func() { 9826 sc := -1 9827 if page.Response().Response.Response != nil { 9828 sc = page.Response().Response.Response.StatusCode 9829 } 9830 tracing.EndSpan(ctx, sc, err) 9831 }() 9832 } 9833 next, err := page.fn(ctx, page.rmc) 9834 if err != nil { 9835 return err 9836 } 9837 page.rmc = next 9838 return nil 9839} 9840 9841// Next advances to the next page of values. If there was an error making 9842// the request the page does not advance and the error is returned. 9843// Deprecated: Use NextWithContext() instead. 9844func (page *ResourceMetricCollectionPage) Next() error { 9845 return page.NextWithContext(context.Background()) 9846} 9847 9848// NotDone returns true if the page enumeration should be started or is not yet complete. 9849func (page ResourceMetricCollectionPage) NotDone() bool { 9850 return !page.rmc.IsEmpty() 9851} 9852 9853// Response returns the raw server response from the last page request. 9854func (page ResourceMetricCollectionPage) Response() ResourceMetricCollection { 9855 return page.rmc 9856} 9857 9858// Values returns the slice of values for the current page or nil if there are no values. 9859func (page ResourceMetricCollectionPage) Values() []ResourceMetric { 9860 if page.rmc.IsEmpty() { 9861 return nil 9862 } 9863 return *page.rmc.Value 9864} 9865 9866// Creates a new instance of the ResourceMetricCollectionPage type. 9867func NewResourceMetricCollectionPage(getNextPage func(context.Context, ResourceMetricCollection) (ResourceMetricCollection, error)) ResourceMetricCollectionPage { 9868 return ResourceMetricCollectionPage{fn: getNextPage} 9869} 9870 9871// ResourceMetricName name of a metric for any resource 9872type ResourceMetricName struct { 9873 // Value - metric name value 9874 Value *string `json:"value,omitempty"` 9875 // LocalizedValue - Localized metric name value 9876 LocalizedValue *string `json:"localizedValue,omitempty"` 9877} 9878 9879// ResourceMetricValue value of resource metric 9880type ResourceMetricValue struct { 9881 // TimeStamp - Value timestamp 9882 TimeStamp *string `json:"timeStamp,omitempty"` 9883 // Average - Value average 9884 Average *float64 `json:"average,omitempty"` 9885 // Minimum - Value minimum 9886 Minimum *float64 `json:"minimum,omitempty"` 9887 // Maximum - Value maximum 9888 Maximum *float64 `json:"maximum,omitempty"` 9889 // Total - Value total 9890 Total *float64 `json:"total,omitempty"` 9891 // Count - Value count 9892 Count *float64 `json:"count,omitempty"` 9893} 9894 9895// ResourceNameAvailability describes if a resource name is available 9896type ResourceNameAvailability struct { 9897 autorest.Response `json:"-"` 9898 // NameAvailable - True indicates name is valid and available. False indicates the name is invalid, unavailable, or both. 9899 NameAvailable *bool `json:"nameAvailable,omitempty"` 9900 // 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. 9901 Reason *string `json:"reason,omitempty"` 9902 Message *string `json:"message,omitempty"` 9903} 9904 9905// ResourceNameAvailabilityRequest resource name availability request content 9906type ResourceNameAvailabilityRequest struct { 9907 // Name - Resource name to verify 9908 Name *string `json:"name,omitempty"` 9909 // Type - Resource type used for verification 9910 Type *string `json:"type,omitempty"` 9911 // IsFqdn - Is fully qualified domain name 9912 IsFqdn *bool `json:"isFqdn,omitempty"` 9913} 9914 9915// ResponseMessageEnvelopeAPIEntity message envelope that contains the common Azure resource manager 9916// properties and the resource provider specific content 9917type ResponseMessageEnvelopeAPIEntity struct { 9918 // ID - Resource Id. Typically id is populated only for responses to GET requests. Caller is responsible for passing in this 9919 // value for GET requests only. 9920 // For example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupId}/providers/Microsoft.Web/sites/{sitename} 9921 ID *string `json:"id,omitempty"` 9922 // Name - Name of resource 9923 Name *string `json:"name,omitempty"` 9924 // Type - Type of resource e.g Microsoft.Web/sites 9925 Type *string `json:"type,omitempty"` 9926 // Location - Geo region resource belongs to e.g. SouthCentralUS, SouthEastAsia 9927 Location *string `json:"location,omitempty"` 9928 // Tags - Tags associated with resource 9929 Tags map[string]*string `json:"tags"` 9930 // Plan - Azure resource manager plan 9931 Plan *ArmPlan `json:"plan,omitempty"` 9932 // Properties - Resource specific properties 9933 Properties *APIEntity `json:"properties,omitempty"` 9934 // Sku - Sku description of the resource 9935 Sku *SkuDescription `json:"sku,omitempty"` 9936} 9937 9938// MarshalJSON is the custom marshaler for ResponseMessageEnvelopeAPIEntity. 9939func (rmeAe ResponseMessageEnvelopeAPIEntity) MarshalJSON() ([]byte, error) { 9940 objectMap := make(map[string]interface{}) 9941 if rmeAe.ID != nil { 9942 objectMap["id"] = rmeAe.ID 9943 } 9944 if rmeAe.Name != nil { 9945 objectMap["name"] = rmeAe.Name 9946 } 9947 if rmeAe.Type != nil { 9948 objectMap["type"] = rmeAe.Type 9949 } 9950 if rmeAe.Location != nil { 9951 objectMap["location"] = rmeAe.Location 9952 } 9953 if rmeAe.Tags != nil { 9954 objectMap["tags"] = rmeAe.Tags 9955 } 9956 if rmeAe.Plan != nil { 9957 objectMap["plan"] = rmeAe.Plan 9958 } 9959 if rmeAe.Properties != nil { 9960 objectMap["properties"] = rmeAe.Properties 9961 } 9962 if rmeAe.Sku != nil { 9963 objectMap["sku"] = rmeAe.Sku 9964 } 9965 return json.Marshal(objectMap) 9966} 9967 9968// RestoreRequest description of a restore request 9969type RestoreRequest struct { 9970 autorest.Response `json:"-"` 9971 *RestoreRequestProperties `json:"properties,omitempty"` 9972 // ID - Resource Id 9973 ID *string `json:"id,omitempty"` 9974 // Name - Resource Name 9975 Name *string `json:"name,omitempty"` 9976 // Kind - Kind of resource 9977 Kind *string `json:"kind,omitempty"` 9978 // Location - Resource Location 9979 Location *string `json:"location,omitempty"` 9980 // Type - Resource type 9981 Type *string `json:"type,omitempty"` 9982 // Tags - Resource tags 9983 Tags map[string]*string `json:"tags"` 9984} 9985 9986// MarshalJSON is the custom marshaler for RestoreRequest. 9987func (rr RestoreRequest) MarshalJSON() ([]byte, error) { 9988 objectMap := make(map[string]interface{}) 9989 if rr.RestoreRequestProperties != nil { 9990 objectMap["properties"] = rr.RestoreRequestProperties 9991 } 9992 if rr.ID != nil { 9993 objectMap["id"] = rr.ID 9994 } 9995 if rr.Name != nil { 9996 objectMap["name"] = rr.Name 9997 } 9998 if rr.Kind != nil { 9999 objectMap["kind"] = rr.Kind 10000 } 10001 if rr.Location != nil { 10002 objectMap["location"] = rr.Location 10003 } 10004 if rr.Type != nil { 10005 objectMap["type"] = rr.Type 10006 } 10007 if rr.Tags != nil { 10008 objectMap["tags"] = rr.Tags 10009 } 10010 return json.Marshal(objectMap) 10011} 10012 10013// UnmarshalJSON is the custom unmarshaler for RestoreRequest struct. 10014func (rr *RestoreRequest) UnmarshalJSON(body []byte) error { 10015 var m map[string]*json.RawMessage 10016 err := json.Unmarshal(body, &m) 10017 if err != nil { 10018 return err 10019 } 10020 for k, v := range m { 10021 switch k { 10022 case "properties": 10023 if v != nil { 10024 var restoreRequestProperties RestoreRequestProperties 10025 err = json.Unmarshal(*v, &restoreRequestProperties) 10026 if err != nil { 10027 return err 10028 } 10029 rr.RestoreRequestProperties = &restoreRequestProperties 10030 } 10031 case "id": 10032 if v != nil { 10033 var ID string 10034 err = json.Unmarshal(*v, &ID) 10035 if err != nil { 10036 return err 10037 } 10038 rr.ID = &ID 10039 } 10040 case "name": 10041 if v != nil { 10042 var name string 10043 err = json.Unmarshal(*v, &name) 10044 if err != nil { 10045 return err 10046 } 10047 rr.Name = &name 10048 } 10049 case "kind": 10050 if v != nil { 10051 var kind string 10052 err = json.Unmarshal(*v, &kind) 10053 if err != nil { 10054 return err 10055 } 10056 rr.Kind = &kind 10057 } 10058 case "location": 10059 if v != nil { 10060 var location string 10061 err = json.Unmarshal(*v, &location) 10062 if err != nil { 10063 return err 10064 } 10065 rr.Location = &location 10066 } 10067 case "type": 10068 if v != nil { 10069 var typeVar string 10070 err = json.Unmarshal(*v, &typeVar) 10071 if err != nil { 10072 return err 10073 } 10074 rr.Type = &typeVar 10075 } 10076 case "tags": 10077 if v != nil { 10078 var tags map[string]*string 10079 err = json.Unmarshal(*v, &tags) 10080 if err != nil { 10081 return err 10082 } 10083 rr.Tags = tags 10084 } 10085 } 10086 } 10087 10088 return nil 10089} 10090 10091// RestoreRequestProperties ... 10092type RestoreRequestProperties struct { 10093 // StorageAccountURL - SAS URL to the container 10094 StorageAccountURL *string `json:"storageAccountUrl,omitempty"` 10095 // BlobName - Name of a blob which contains the backup 10096 BlobName *string `json:"blobName,omitempty"` 10097 // Overwrite - True if the restore operation can overwrite target site. "True" needed if trying to restore over an existing site. 10098 Overwrite *bool `json:"overwrite,omitempty"` 10099 // SiteName - Name of a site (Web App) 10100 SiteName *string `json:"siteName,omitempty"` 10101 // Databases - Collection of databases which should be restored. This list has to match the list of databases included in the backup. 10102 Databases *[]DatabaseBackupSetting `json:"databases,omitempty"` 10103 // 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 10104 // the site object when it is being restored, but that might fail due to conflicts during the operation. 10105 IgnoreConflictingHostNames *bool `json:"ignoreConflictingHostNames,omitempty"` 10106 // OperationType - Operation type. Possible values include: 'Default', 'Clone', 'Relocation' 10107 OperationType BackupRestoreOperationType `json:"operationType,omitempty"` 10108 // AdjustConnectionStrings - Gets or sets a flag showing if SiteConfig.ConnectionStrings should be set in new site 10109 AdjustConnectionStrings *bool `json:"adjustConnectionStrings,omitempty"` 10110 // HostingEnvironment - App Service Environment name, if needed (only when restoring a site to an App Service Environment) 10111 HostingEnvironment *string `json:"hostingEnvironment,omitempty"` 10112} 10113 10114// RestoreResponse response for a restore site request 10115type RestoreResponse struct { 10116 autorest.Response `json:"-"` 10117 *RestoreResponseProperties `json:"properties,omitempty"` 10118 // ID - Resource Id 10119 ID *string `json:"id,omitempty"` 10120 // Name - Resource Name 10121 Name *string `json:"name,omitempty"` 10122 // Kind - Kind of resource 10123 Kind *string `json:"kind,omitempty"` 10124 // Location - Resource Location 10125 Location *string `json:"location,omitempty"` 10126 // Type - Resource type 10127 Type *string `json:"type,omitempty"` 10128 // Tags - Resource tags 10129 Tags map[string]*string `json:"tags"` 10130} 10131 10132// MarshalJSON is the custom marshaler for RestoreResponse. 10133func (rr RestoreResponse) MarshalJSON() ([]byte, error) { 10134 objectMap := make(map[string]interface{}) 10135 if rr.RestoreResponseProperties != nil { 10136 objectMap["properties"] = rr.RestoreResponseProperties 10137 } 10138 if rr.ID != nil { 10139 objectMap["id"] = rr.ID 10140 } 10141 if rr.Name != nil { 10142 objectMap["name"] = rr.Name 10143 } 10144 if rr.Kind != nil { 10145 objectMap["kind"] = rr.Kind 10146 } 10147 if rr.Location != nil { 10148 objectMap["location"] = rr.Location 10149 } 10150 if rr.Type != nil { 10151 objectMap["type"] = rr.Type 10152 } 10153 if rr.Tags != nil { 10154 objectMap["tags"] = rr.Tags 10155 } 10156 return json.Marshal(objectMap) 10157} 10158 10159// UnmarshalJSON is the custom unmarshaler for RestoreResponse struct. 10160func (rr *RestoreResponse) UnmarshalJSON(body []byte) error { 10161 var m map[string]*json.RawMessage 10162 err := json.Unmarshal(body, &m) 10163 if err != nil { 10164 return err 10165 } 10166 for k, v := range m { 10167 switch k { 10168 case "properties": 10169 if v != nil { 10170 var restoreResponseProperties RestoreResponseProperties 10171 err = json.Unmarshal(*v, &restoreResponseProperties) 10172 if err != nil { 10173 return err 10174 } 10175 rr.RestoreResponseProperties = &restoreResponseProperties 10176 } 10177 case "id": 10178 if v != nil { 10179 var ID string 10180 err = json.Unmarshal(*v, &ID) 10181 if err != nil { 10182 return err 10183 } 10184 rr.ID = &ID 10185 } 10186 case "name": 10187 if v != nil { 10188 var name string 10189 err = json.Unmarshal(*v, &name) 10190 if err != nil { 10191 return err 10192 } 10193 rr.Name = &name 10194 } 10195 case "kind": 10196 if v != nil { 10197 var kind string 10198 err = json.Unmarshal(*v, &kind) 10199 if err != nil { 10200 return err 10201 } 10202 rr.Kind = &kind 10203 } 10204 case "location": 10205 if v != nil { 10206 var location string 10207 err = json.Unmarshal(*v, &location) 10208 if err != nil { 10209 return err 10210 } 10211 rr.Location = &location 10212 } 10213 case "type": 10214 if v != nil { 10215 var typeVar string 10216 err = json.Unmarshal(*v, &typeVar) 10217 if err != nil { 10218 return err 10219 } 10220 rr.Type = &typeVar 10221 } 10222 case "tags": 10223 if v != nil { 10224 var tags map[string]*string 10225 err = json.Unmarshal(*v, &tags) 10226 if err != nil { 10227 return err 10228 } 10229 rr.Tags = tags 10230 } 10231 } 10232 } 10233 10234 return nil 10235} 10236 10237// RestoreResponseProperties ... 10238type RestoreResponseProperties struct { 10239 // OperationID - When server starts the restore process, it will return an OperationId identifying that particular restore operation 10240 OperationID *string `json:"operationId,omitempty"` 10241} 10242 10243// RoutingRule routing rules for TiP 10244type RoutingRule struct { 10245 // Name - Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment. 10246 Name *string `json:"name,omitempty"` 10247} 10248 10249// ServerFarmCollection collection of serverfarms 10250type ServerFarmCollection struct { 10251 autorest.Response `json:"-"` 10252 // Value - Collection of resources 10253 Value *[]ServerFarmWithRichSku `json:"value,omitempty"` 10254 // NextLink - Link to next page of resources 10255 NextLink *string `json:"nextLink,omitempty"` 10256} 10257 10258// ServerFarmCollectionIterator provides access to a complete listing of ServerFarmWithRichSku values. 10259type ServerFarmCollectionIterator struct { 10260 i int 10261 page ServerFarmCollectionPage 10262} 10263 10264// NextWithContext advances to the next value. If there was an error making 10265// the request the iterator does not advance and the error is returned. 10266func (iter *ServerFarmCollectionIterator) NextWithContext(ctx context.Context) (err error) { 10267 if tracing.IsEnabled() { 10268 ctx = tracing.StartSpan(ctx, fqdn+"/ServerFarmCollectionIterator.NextWithContext") 10269 defer func() { 10270 sc := -1 10271 if iter.Response().Response.Response != nil { 10272 sc = iter.Response().Response.Response.StatusCode 10273 } 10274 tracing.EndSpan(ctx, sc, err) 10275 }() 10276 } 10277 iter.i++ 10278 if iter.i < len(iter.page.Values()) { 10279 return nil 10280 } 10281 err = iter.page.NextWithContext(ctx) 10282 if err != nil { 10283 iter.i-- 10284 return err 10285 } 10286 iter.i = 0 10287 return nil 10288} 10289 10290// Next advances to the next value. If there was an error making 10291// the request the iterator does not advance and the error is returned. 10292// Deprecated: Use NextWithContext() instead. 10293func (iter *ServerFarmCollectionIterator) Next() error { 10294 return iter.NextWithContext(context.Background()) 10295} 10296 10297// NotDone returns true if the enumeration should be started or is not yet complete. 10298func (iter ServerFarmCollectionIterator) NotDone() bool { 10299 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10300} 10301 10302// Response returns the raw server response from the last page request. 10303func (iter ServerFarmCollectionIterator) Response() ServerFarmCollection { 10304 return iter.page.Response() 10305} 10306 10307// Value returns the current value or a zero-initialized value if the 10308// iterator has advanced beyond the end of the collection. 10309func (iter ServerFarmCollectionIterator) Value() ServerFarmWithRichSku { 10310 if !iter.page.NotDone() { 10311 return ServerFarmWithRichSku{} 10312 } 10313 return iter.page.Values()[iter.i] 10314} 10315 10316// Creates a new instance of the ServerFarmCollectionIterator type. 10317func NewServerFarmCollectionIterator(page ServerFarmCollectionPage) ServerFarmCollectionIterator { 10318 return ServerFarmCollectionIterator{page: page} 10319} 10320 10321// IsEmpty returns true if the ListResult contains no values. 10322func (sfc ServerFarmCollection) IsEmpty() bool { 10323 return sfc.Value == nil || len(*sfc.Value) == 0 10324} 10325 10326// serverFarmCollectionPreparer prepares a request to retrieve the next set of results. 10327// It returns nil if no more results exist. 10328func (sfc ServerFarmCollection) serverFarmCollectionPreparer(ctx context.Context) (*http.Request, error) { 10329 if sfc.NextLink == nil || len(to.String(sfc.NextLink)) < 1 { 10330 return nil, nil 10331 } 10332 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10333 autorest.AsJSON(), 10334 autorest.AsGet(), 10335 autorest.WithBaseURL(to.String(sfc.NextLink))) 10336} 10337 10338// ServerFarmCollectionPage contains a page of ServerFarmWithRichSku values. 10339type ServerFarmCollectionPage struct { 10340 fn func(context.Context, ServerFarmCollection) (ServerFarmCollection, error) 10341 sfc ServerFarmCollection 10342} 10343 10344// NextWithContext advances to the next page of values. If there was an error making 10345// the request the page does not advance and the error is returned. 10346func (page *ServerFarmCollectionPage) NextWithContext(ctx context.Context) (err error) { 10347 if tracing.IsEnabled() { 10348 ctx = tracing.StartSpan(ctx, fqdn+"/ServerFarmCollectionPage.NextWithContext") 10349 defer func() { 10350 sc := -1 10351 if page.Response().Response.Response != nil { 10352 sc = page.Response().Response.Response.StatusCode 10353 } 10354 tracing.EndSpan(ctx, sc, err) 10355 }() 10356 } 10357 next, err := page.fn(ctx, page.sfc) 10358 if err != nil { 10359 return err 10360 } 10361 page.sfc = next 10362 return nil 10363} 10364 10365// Next advances to the next page of values. If there was an error making 10366// the request the page does not advance and the error is returned. 10367// Deprecated: Use NextWithContext() instead. 10368func (page *ServerFarmCollectionPage) Next() error { 10369 return page.NextWithContext(context.Background()) 10370} 10371 10372// NotDone returns true if the page enumeration should be started or is not yet complete. 10373func (page ServerFarmCollectionPage) NotDone() bool { 10374 return !page.sfc.IsEmpty() 10375} 10376 10377// Response returns the raw server response from the last page request. 10378func (page ServerFarmCollectionPage) Response() ServerFarmCollection { 10379 return page.sfc 10380} 10381 10382// Values returns the slice of values for the current page or nil if there are no values. 10383func (page ServerFarmCollectionPage) Values() []ServerFarmWithRichSku { 10384 if page.sfc.IsEmpty() { 10385 return nil 10386 } 10387 return *page.sfc.Value 10388} 10389 10390// Creates a new instance of the ServerFarmCollectionPage type. 10391func NewServerFarmCollectionPage(getNextPage func(context.Context, ServerFarmCollection) (ServerFarmCollection, error)) ServerFarmCollectionPage { 10392 return ServerFarmCollectionPage{fn: getNextPage} 10393} 10394 10395// ServerFarmsCreateOrUpdateServerFarmFuture an abstraction for monitoring and retrieving the results of a 10396// long-running operation. 10397type ServerFarmsCreateOrUpdateServerFarmFuture struct { 10398 azure.Future 10399} 10400 10401// Result returns the result of the asynchronous operation. 10402// If the operation has not completed it will return an error. 10403func (future *ServerFarmsCreateOrUpdateServerFarmFuture) Result(client ServerFarmsClient) (sfwrs ServerFarmWithRichSku, err error) { 10404 var done bool 10405 done, err = future.DoneWithContext(context.Background(), client) 10406 if err != nil { 10407 err = autorest.NewErrorWithError(err, "web.ServerFarmsCreateOrUpdateServerFarmFuture", "Result", future.Response(), "Polling failure") 10408 return 10409 } 10410 if !done { 10411 err = azure.NewAsyncOpIncompleteError("web.ServerFarmsCreateOrUpdateServerFarmFuture") 10412 return 10413 } 10414 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 10415 if sfwrs.Response.Response, err = future.GetResult(sender); err == nil && sfwrs.Response.Response.StatusCode != http.StatusNoContent { 10416 sfwrs, err = client.CreateOrUpdateServerFarmResponder(sfwrs.Response.Response) 10417 if err != nil { 10418 err = autorest.NewErrorWithError(err, "web.ServerFarmsCreateOrUpdateServerFarmFuture", "Result", sfwrs.Response.Response, "Failure responding to request") 10419 } 10420 } 10421 return 10422} 10423 10424// ServerFarmWithRichSku app Service Plan Model 10425type ServerFarmWithRichSku struct { 10426 autorest.Response `json:"-"` 10427 *ServerFarmWithRichSkuProperties `json:"properties,omitempty"` 10428 Sku *SkuDescription `json:"sku,omitempty"` 10429 // ID - Resource Id 10430 ID *string `json:"id,omitempty"` 10431 // Name - Resource Name 10432 Name *string `json:"name,omitempty"` 10433 // Kind - Kind of resource 10434 Kind *string `json:"kind,omitempty"` 10435 // Location - Resource Location 10436 Location *string `json:"location,omitempty"` 10437 // Type - Resource type 10438 Type *string `json:"type,omitempty"` 10439 // Tags - Resource tags 10440 Tags map[string]*string `json:"tags"` 10441} 10442 10443// MarshalJSON is the custom marshaler for ServerFarmWithRichSku. 10444func (sfwrs ServerFarmWithRichSku) MarshalJSON() ([]byte, error) { 10445 objectMap := make(map[string]interface{}) 10446 if sfwrs.ServerFarmWithRichSkuProperties != nil { 10447 objectMap["properties"] = sfwrs.ServerFarmWithRichSkuProperties 10448 } 10449 if sfwrs.Sku != nil { 10450 objectMap["sku"] = sfwrs.Sku 10451 } 10452 if sfwrs.ID != nil { 10453 objectMap["id"] = sfwrs.ID 10454 } 10455 if sfwrs.Name != nil { 10456 objectMap["name"] = sfwrs.Name 10457 } 10458 if sfwrs.Kind != nil { 10459 objectMap["kind"] = sfwrs.Kind 10460 } 10461 if sfwrs.Location != nil { 10462 objectMap["location"] = sfwrs.Location 10463 } 10464 if sfwrs.Type != nil { 10465 objectMap["type"] = sfwrs.Type 10466 } 10467 if sfwrs.Tags != nil { 10468 objectMap["tags"] = sfwrs.Tags 10469 } 10470 return json.Marshal(objectMap) 10471} 10472 10473// UnmarshalJSON is the custom unmarshaler for ServerFarmWithRichSku struct. 10474func (sfwrs *ServerFarmWithRichSku) UnmarshalJSON(body []byte) error { 10475 var m map[string]*json.RawMessage 10476 err := json.Unmarshal(body, &m) 10477 if err != nil { 10478 return err 10479 } 10480 for k, v := range m { 10481 switch k { 10482 case "properties": 10483 if v != nil { 10484 var serverFarmWithRichSkuProperties ServerFarmWithRichSkuProperties 10485 err = json.Unmarshal(*v, &serverFarmWithRichSkuProperties) 10486 if err != nil { 10487 return err 10488 } 10489 sfwrs.ServerFarmWithRichSkuProperties = &serverFarmWithRichSkuProperties 10490 } 10491 case "sku": 10492 if v != nil { 10493 var sku SkuDescription 10494 err = json.Unmarshal(*v, &sku) 10495 if err != nil { 10496 return err 10497 } 10498 sfwrs.Sku = &sku 10499 } 10500 case "id": 10501 if v != nil { 10502 var ID string 10503 err = json.Unmarshal(*v, &ID) 10504 if err != nil { 10505 return err 10506 } 10507 sfwrs.ID = &ID 10508 } 10509 case "name": 10510 if v != nil { 10511 var name string 10512 err = json.Unmarshal(*v, &name) 10513 if err != nil { 10514 return err 10515 } 10516 sfwrs.Name = &name 10517 } 10518 case "kind": 10519 if v != nil { 10520 var kind string 10521 err = json.Unmarshal(*v, &kind) 10522 if err != nil { 10523 return err 10524 } 10525 sfwrs.Kind = &kind 10526 } 10527 case "location": 10528 if v != nil { 10529 var location string 10530 err = json.Unmarshal(*v, &location) 10531 if err != nil { 10532 return err 10533 } 10534 sfwrs.Location = &location 10535 } 10536 case "type": 10537 if v != nil { 10538 var typeVar string 10539 err = json.Unmarshal(*v, &typeVar) 10540 if err != nil { 10541 return err 10542 } 10543 sfwrs.Type = &typeVar 10544 } 10545 case "tags": 10546 if v != nil { 10547 var tags map[string]*string 10548 err = json.Unmarshal(*v, &tags) 10549 if err != nil { 10550 return err 10551 } 10552 sfwrs.Tags = tags 10553 } 10554 } 10555 } 10556 10557 return nil 10558} 10559 10560// ServerFarmWithRichSkuProperties ... 10561type ServerFarmWithRichSkuProperties struct { 10562 // Name - Name for the App Service Plan 10563 Name *string `json:"name,omitempty"` 10564 // WorkerTierName - Target worker tier assigned to the App Service Plan 10565 WorkerTierName *string `json:"workerTierName,omitempty"` 10566 // Status - READ-ONLY; App Service Plan Status. Possible values include: 'StatusOptionsReady', 'StatusOptionsPending' 10567 Status StatusOptions `json:"status,omitempty"` 10568 // Subscription - READ-ONLY; App Service Plan Subscription 10569 Subscription *string `json:"subscription,omitempty"` 10570 // AdminSiteName - App Service Plan administration site 10571 AdminSiteName *string `json:"adminSiteName,omitempty"` 10572 // HostingEnvironmentProfile - Specification for the hosting environment (App Service Environment) to use for the App Service Plan 10573 HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` 10574 // MaximumNumberOfWorkers - Maximum number of instances that can be assigned to this App Service Plan 10575 MaximumNumberOfWorkers *int32 `json:"maximumNumberOfWorkers,omitempty"` 10576 // GeoRegion - READ-ONLY; Geographical location for the App Service Plan 10577 GeoRegion *string `json:"geoRegion,omitempty"` 10578 // PerSiteScaling - If True apps assigned to this App Service Plan can be scaled independently 10579 // If False apps assigned to this App Service Plan will scale to all instances of the plan 10580 PerSiteScaling *bool `json:"perSiteScaling,omitempty"` 10581 // NumberOfSites - READ-ONLY; Number of web apps assigned to this App Service Plan 10582 NumberOfSites *int32 `json:"numberOfSites,omitempty"` 10583 // ResourceGroup - READ-ONLY; Resource group of the server farm 10584 ResourceGroup *string `json:"resourceGroup,omitempty"` 10585 // Reserved - Enables creation of a Linux App Service Plan 10586 Reserved *bool `json:"reserved,omitempty"` 10587} 10588 10589// SetObject ... 10590type SetObject struct { 10591 autorest.Response `json:"-"` 10592 Value interface{} `json:"value,omitempty"` 10593} 10594 10595// Site represents a web app 10596type Site struct { 10597 autorest.Response `json:"-"` 10598 *SiteProperties `json:"properties,omitempty"` 10599 // ID - Resource Id 10600 ID *string `json:"id,omitempty"` 10601 // Name - Resource Name 10602 Name *string `json:"name,omitempty"` 10603 // Kind - Kind of resource 10604 Kind *string `json:"kind,omitempty"` 10605 // Location - Resource Location 10606 Location *string `json:"location,omitempty"` 10607 // Type - Resource type 10608 Type *string `json:"type,omitempty"` 10609 // Tags - Resource tags 10610 Tags map[string]*string `json:"tags"` 10611} 10612 10613// MarshalJSON is the custom marshaler for Site. 10614func (s Site) MarshalJSON() ([]byte, error) { 10615 objectMap := make(map[string]interface{}) 10616 if s.SiteProperties != nil { 10617 objectMap["properties"] = s.SiteProperties 10618 } 10619 if s.ID != nil { 10620 objectMap["id"] = s.ID 10621 } 10622 if s.Name != nil { 10623 objectMap["name"] = s.Name 10624 } 10625 if s.Kind != nil { 10626 objectMap["kind"] = s.Kind 10627 } 10628 if s.Location != nil { 10629 objectMap["location"] = s.Location 10630 } 10631 if s.Type != nil { 10632 objectMap["type"] = s.Type 10633 } 10634 if s.Tags != nil { 10635 objectMap["tags"] = s.Tags 10636 } 10637 return json.Marshal(objectMap) 10638} 10639 10640// UnmarshalJSON is the custom unmarshaler for Site struct. 10641func (s *Site) UnmarshalJSON(body []byte) error { 10642 var m map[string]*json.RawMessage 10643 err := json.Unmarshal(body, &m) 10644 if err != nil { 10645 return err 10646 } 10647 for k, v := range m { 10648 switch k { 10649 case "properties": 10650 if v != nil { 10651 var siteProperties SiteProperties 10652 err = json.Unmarshal(*v, &siteProperties) 10653 if err != nil { 10654 return err 10655 } 10656 s.SiteProperties = &siteProperties 10657 } 10658 case "id": 10659 if v != nil { 10660 var ID string 10661 err = json.Unmarshal(*v, &ID) 10662 if err != nil { 10663 return err 10664 } 10665 s.ID = &ID 10666 } 10667 case "name": 10668 if v != nil { 10669 var name string 10670 err = json.Unmarshal(*v, &name) 10671 if err != nil { 10672 return err 10673 } 10674 s.Name = &name 10675 } 10676 case "kind": 10677 if v != nil { 10678 var kind string 10679 err = json.Unmarshal(*v, &kind) 10680 if err != nil { 10681 return err 10682 } 10683 s.Kind = &kind 10684 } 10685 case "location": 10686 if v != nil { 10687 var location string 10688 err = json.Unmarshal(*v, &location) 10689 if err != nil { 10690 return err 10691 } 10692 s.Location = &location 10693 } 10694 case "type": 10695 if v != nil { 10696 var typeVar string 10697 err = json.Unmarshal(*v, &typeVar) 10698 if err != nil { 10699 return err 10700 } 10701 s.Type = &typeVar 10702 } 10703 case "tags": 10704 if v != nil { 10705 var tags map[string]*string 10706 err = json.Unmarshal(*v, &tags) 10707 if err != nil { 10708 return err 10709 } 10710 s.Tags = tags 10711 } 10712 } 10713 } 10714 10715 return nil 10716} 10717 10718// SiteAuthSettings configuration settings for the Azure App Service Authentication / Authorization 10719// feature. 10720type SiteAuthSettings struct { 10721 autorest.Response `json:"-"` 10722 // Enabled - Gets or sets a value indicating whether the Authentication / Authorization feature is enabled for the current app. 10723 Enabled *bool `json:"enabled,omitempty"` 10724 // HTTPAPIPrefixPath - Gets or sets the relative path prefix used by platform HTTP APIs. 10725 // Changing this value is not recommended except for compatibility reasons. 10726 HTTPAPIPrefixPath *string `json:"httpApiPrefixPath,omitempty"` 10727 // UnauthenticatedClientAction - Gets or sets the action to take when an unauthenticated client attempts to access the app. Possible values include: 'RedirectToLoginPage', 'AllowAnonymous' 10728 UnauthenticatedClientAction UnauthenticatedClientAction `json:"unauthenticatedClientAction,omitempty"` 10729 // TokenStoreEnabled - Gets or sets a value indicating whether to durably store platform-specific security tokens 10730 // obtained during login flows. This capability is disabled by default. 10731 TokenStoreEnabled *bool `json:"tokenStoreEnabled,omitempty"` 10732 // AllowedExternalRedirectUrls - Gets or sets a collection of external URLs that can be redirected to as part of logging in 10733 // or logging out of the web app. Note that the query string part of the URL is ignored. 10734 // This is an advanced setting typically only needed by Windows Store application backends. 10735 // Note that URLs within the current domain are always implicitly allowed. 10736 AllowedExternalRedirectUrls *[]string `json:"allowedExternalRedirectUrls,omitempty"` 10737 // DefaultProvider - Gets or sets the default authentication provider to use when multiple providers are configured. 10738 // This setting is only needed if multiple providers are configured and the unauthenticated client 10739 // action is set to "RedirectToLoginPage". Possible values include: 'AzureActiveDirectory', 'Facebook', 'Google', 'MicrosoftAccount', 'Twitter' 10740 DefaultProvider BuiltInAuthenticationProvider `json:"defaultProvider,omitempty"` 10741 // TokenRefreshExtensionHours - Gets or sets the number of hours after session token expiration that a session token can be used to 10742 // call the token refresh API. The default is 72 hours. 10743 TokenRefreshExtensionHours *float64 `json:"tokenRefreshExtensionHours,omitempty"` 10744 // ClientID - Gets or sets the Client ID of this relying party application, known as the client_id. 10745 // This setting is required for enabling OpenID Connection authentication with Azure Active Directory or 10746 // other 3rd party OpenID Connect providers. 10747 // More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html 10748 ClientID *string `json:"clientId,omitempty"` 10749 // ClientSecret - Gets or sets the Client Secret of this relying party application (in Azure Active Directory, this is also referred to as the Key). 10750 // This setting is optional. If no client secret is configured, the OpenID Connect implicit auth flow is used to authenticate end users. 10751 // Otherwise, the OpenID Connect Authorization Code Flow is used to authenticate end users. 10752 // More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html 10753 ClientSecret *string `json:"clientSecret,omitempty"` 10754 // Issuer - Gets or sets the OpenID Connect Issuer URI that represents the entity which issues access tokens for this application. 10755 // When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. 10756 // This URI is a case-sensitive identifier for the token issuer. 10757 // More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html 10758 Issuer *string `json:"issuer,omitempty"` 10759 // AllowedAudiences - Gets or sets a list of allowed audience values to consider when validating JWTs issued by 10760 // Azure Active Directory. Note that the {Microsoft.Web.Hosting.Administration.SiteAuthSettings.ClientId} value is always considered an 10761 // allowed audience, regardless of this setting. 10762 AllowedAudiences *[]string `json:"allowedAudiences,omitempty"` 10763 // AdditionalLoginParams - Gets or sets a list of login parameters to send to the OpenID Connect authorization endpoint when 10764 // a user logs in. Each parameter must be in the form "key=value". 10765 AdditionalLoginParams *[]string `json:"additionalLoginParams,omitempty"` 10766 AadClientID *string `json:"aadClientId,omitempty"` 10767 OpenIDIssuer *string `json:"openIdIssuer,omitempty"` 10768 // GoogleClientID - Gets or sets the OpenID Connect Client ID for the Google web application. 10769 // This setting is required for enabling Google Sign-In. 10770 // Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ 10771 GoogleClientID *string `json:"googleClientId,omitempty"` 10772 // GoogleClientSecret - Gets or sets the client secret associated with the Google web application. 10773 // This setting is required for enabling Google Sign-In. 10774 // Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ 10775 GoogleClientSecret *string `json:"googleClientSecret,omitempty"` 10776 // GoogleOAuthScopes - Gets or sets the OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. 10777 // This setting is optional. If not specified, "openid", "profile", and "email" are used as default scopes. 10778 // Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ 10779 GoogleOAuthScopes *[]string `json:"googleOAuthScopes,omitempty"` 10780 // FacebookAppID - Gets or sets the App ID of the Facebook app used for login. 10781 // This setting is required for enabling Facebook Login. 10782 // Facebook Login documentation: https://developers.facebook.com/docs/facebook-login 10783 FacebookAppID *string `json:"facebookAppId,omitempty"` 10784 // FacebookAppSecret - Gets or sets the App Secret of the Facebook app used for Facebook Login. 10785 // This setting is required for enabling Facebook Login. 10786 // Facebook Login documentation: https://developers.facebook.com/docs/facebook-login 10787 FacebookAppSecret *string `json:"facebookAppSecret,omitempty"` 10788 // FacebookOAuthScopes - Gets or sets the OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. 10789 // This setting is optional. 10790 // Facebook Login documentation: https://developers.facebook.com/docs/facebook-login 10791 FacebookOAuthScopes *[]string `json:"facebookOAuthScopes,omitempty"` 10792 // TwitterConsumerKey - Gets or sets the OAuth 1.0a consumer key of the Twitter application used for sign-in. 10793 // This setting is required for enabling Twitter Sign-In. 10794 // Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in 10795 TwitterConsumerKey *string `json:"twitterConsumerKey,omitempty"` 10796 // TwitterConsumerSecret - Gets or sets the OAuth 1.0a consumer secret of the Twitter application used for sign-in. 10797 // This setting is required for enabling Twitter Sign-In. 10798 // Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in 10799 TwitterConsumerSecret *string `json:"twitterConsumerSecret,omitempty"` 10800 // MicrosoftAccountClientID - Gets or sets the OAuth 2.0 client ID that was created for the app used for authentication. 10801 // This setting is required for enabling Microsoft Account authentication. 10802 // Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm 10803 MicrosoftAccountClientID *string `json:"microsoftAccountClientId,omitempty"` 10804 // MicrosoftAccountClientSecret - Gets or sets the OAuth 2.0 client secret that was created for the app used for authentication. 10805 // This setting is required for enabling Microsoft Account authentication. 10806 // Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm 10807 MicrosoftAccountClientSecret *string `json:"microsoftAccountClientSecret,omitempty"` 10808 // MicrosoftAccountOAuthScopes - Gets or sets the OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. 10809 // This setting is optional. If not specified, "wl.basic" is used as the default scope. 10810 // Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx 10811 MicrosoftAccountOAuthScopes *[]string `json:"microsoftAccountOAuthScopes,omitempty"` 10812} 10813 10814// SiteCloneability represents whether or not a web app is cloneable 10815type SiteCloneability struct { 10816 autorest.Response `json:"-"` 10817 // Result - Name of web app. Possible values include: 'Cloneable', 'PartiallyCloneable', 'NotCloneable' 10818 Result CloneAbilityResult `json:"result,omitempty"` 10819 // BlockingFeatures - List of features enabled on web app that prevent cloning 10820 BlockingFeatures *[]SiteCloneabilityCriterion `json:"blockingFeatures,omitempty"` 10821 // UnsupportedFeatures - List of features enabled on web app that are non-blocking but cannot be cloned. The web app can still be cloned 10822 // but the features in this list will not be set up on cloned web app. 10823 UnsupportedFeatures *[]SiteCloneabilityCriterion `json:"unsupportedFeatures,omitempty"` 10824 // BlockingCharacteristics - List of blocking application characteristics 10825 BlockingCharacteristics *[]SiteCloneabilityCriterion `json:"blockingCharacteristics,omitempty"` 10826} 10827 10828// SiteCloneabilityCriterion represents a site cloneability criterion 10829type SiteCloneabilityCriterion struct { 10830 // Name - Name of criterion 10831 Name *string `json:"name,omitempty"` 10832 // Description - Description of criterion 10833 Description *string `json:"description,omitempty"` 10834} 10835 10836// SiteCollection collection of sites 10837type SiteCollection struct { 10838 autorest.Response `json:"-"` 10839 // Value - Collection of resources 10840 Value *[]Site `json:"value,omitempty"` 10841 // NextLink - Link to next page of resources 10842 NextLink *string `json:"nextLink,omitempty"` 10843} 10844 10845// SiteCollectionIterator provides access to a complete listing of Site values. 10846type SiteCollectionIterator struct { 10847 i int 10848 page SiteCollectionPage 10849} 10850 10851// NextWithContext advances to the next value. If there was an error making 10852// the request the iterator does not advance and the error is returned. 10853func (iter *SiteCollectionIterator) NextWithContext(ctx context.Context) (err error) { 10854 if tracing.IsEnabled() { 10855 ctx = tracing.StartSpan(ctx, fqdn+"/SiteCollectionIterator.NextWithContext") 10856 defer func() { 10857 sc := -1 10858 if iter.Response().Response.Response != nil { 10859 sc = iter.Response().Response.Response.StatusCode 10860 } 10861 tracing.EndSpan(ctx, sc, err) 10862 }() 10863 } 10864 iter.i++ 10865 if iter.i < len(iter.page.Values()) { 10866 return nil 10867 } 10868 err = iter.page.NextWithContext(ctx) 10869 if err != nil { 10870 iter.i-- 10871 return err 10872 } 10873 iter.i = 0 10874 return nil 10875} 10876 10877// Next advances to the next value. If there was an error making 10878// the request the iterator does not advance and the error is returned. 10879// Deprecated: Use NextWithContext() instead. 10880func (iter *SiteCollectionIterator) Next() error { 10881 return iter.NextWithContext(context.Background()) 10882} 10883 10884// NotDone returns true if the enumeration should be started or is not yet complete. 10885func (iter SiteCollectionIterator) NotDone() bool { 10886 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10887} 10888 10889// Response returns the raw server response from the last page request. 10890func (iter SiteCollectionIterator) Response() SiteCollection { 10891 return iter.page.Response() 10892} 10893 10894// Value returns the current value or a zero-initialized value if the 10895// iterator has advanced beyond the end of the collection. 10896func (iter SiteCollectionIterator) Value() Site { 10897 if !iter.page.NotDone() { 10898 return Site{} 10899 } 10900 return iter.page.Values()[iter.i] 10901} 10902 10903// Creates a new instance of the SiteCollectionIterator type. 10904func NewSiteCollectionIterator(page SiteCollectionPage) SiteCollectionIterator { 10905 return SiteCollectionIterator{page: page} 10906} 10907 10908// IsEmpty returns true if the ListResult contains no values. 10909func (sc SiteCollection) IsEmpty() bool { 10910 return sc.Value == nil || len(*sc.Value) == 0 10911} 10912 10913// siteCollectionPreparer prepares a request to retrieve the next set of results. 10914// It returns nil if no more results exist. 10915func (sc SiteCollection) siteCollectionPreparer(ctx context.Context) (*http.Request, error) { 10916 if sc.NextLink == nil || len(to.String(sc.NextLink)) < 1 { 10917 return nil, nil 10918 } 10919 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10920 autorest.AsJSON(), 10921 autorest.AsGet(), 10922 autorest.WithBaseURL(to.String(sc.NextLink))) 10923} 10924 10925// SiteCollectionPage contains a page of Site values. 10926type SiteCollectionPage struct { 10927 fn func(context.Context, SiteCollection) (SiteCollection, error) 10928 sc SiteCollection 10929} 10930 10931// NextWithContext advances to the next page of values. If there was an error making 10932// the request the page does not advance and the error is returned. 10933func (page *SiteCollectionPage) NextWithContext(ctx context.Context) (err error) { 10934 if tracing.IsEnabled() { 10935 ctx = tracing.StartSpan(ctx, fqdn+"/SiteCollectionPage.NextWithContext") 10936 defer func() { 10937 sc := -1 10938 if page.Response().Response.Response != nil { 10939 sc = page.Response().Response.Response.StatusCode 10940 } 10941 tracing.EndSpan(ctx, sc, err) 10942 }() 10943 } 10944 next, err := page.fn(ctx, page.sc) 10945 if err != nil { 10946 return err 10947 } 10948 page.sc = next 10949 return nil 10950} 10951 10952// Next advances to the next page of values. If there was an error making 10953// the request the page does not advance and the error is returned. 10954// Deprecated: Use NextWithContext() instead. 10955func (page *SiteCollectionPage) Next() error { 10956 return page.NextWithContext(context.Background()) 10957} 10958 10959// NotDone returns true if the page enumeration should be started or is not yet complete. 10960func (page SiteCollectionPage) NotDone() bool { 10961 return !page.sc.IsEmpty() 10962} 10963 10964// Response returns the raw server response from the last page request. 10965func (page SiteCollectionPage) Response() SiteCollection { 10966 return page.sc 10967} 10968 10969// Values returns the slice of values for the current page or nil if there are no values. 10970func (page SiteCollectionPage) Values() []Site { 10971 if page.sc.IsEmpty() { 10972 return nil 10973 } 10974 return *page.sc.Value 10975} 10976 10977// Creates a new instance of the SiteCollectionPage type. 10978func NewSiteCollectionPage(getNextPage func(context.Context, SiteCollection) (SiteCollection, error)) SiteCollectionPage { 10979 return SiteCollectionPage{fn: getNextPage} 10980} 10981 10982// SiteConfig configuration of Azure web site 10983type SiteConfig struct { 10984 autorest.Response `json:"-"` 10985 *SiteConfigProperties `json:"properties,omitempty"` 10986 // ID - Resource Id 10987 ID *string `json:"id,omitempty"` 10988 // Name - Resource Name 10989 Name *string `json:"name,omitempty"` 10990 // Kind - Kind of resource 10991 Kind *string `json:"kind,omitempty"` 10992 // Location - Resource Location 10993 Location *string `json:"location,omitempty"` 10994 // Type - Resource type 10995 Type *string `json:"type,omitempty"` 10996 // Tags - Resource tags 10997 Tags map[string]*string `json:"tags"` 10998} 10999 11000// MarshalJSON is the custom marshaler for SiteConfig. 11001func (sc SiteConfig) MarshalJSON() ([]byte, error) { 11002 objectMap := make(map[string]interface{}) 11003 if sc.SiteConfigProperties != nil { 11004 objectMap["properties"] = sc.SiteConfigProperties 11005 } 11006 if sc.ID != nil { 11007 objectMap["id"] = sc.ID 11008 } 11009 if sc.Name != nil { 11010 objectMap["name"] = sc.Name 11011 } 11012 if sc.Kind != nil { 11013 objectMap["kind"] = sc.Kind 11014 } 11015 if sc.Location != nil { 11016 objectMap["location"] = sc.Location 11017 } 11018 if sc.Type != nil { 11019 objectMap["type"] = sc.Type 11020 } 11021 if sc.Tags != nil { 11022 objectMap["tags"] = sc.Tags 11023 } 11024 return json.Marshal(objectMap) 11025} 11026 11027// UnmarshalJSON is the custom unmarshaler for SiteConfig struct. 11028func (sc *SiteConfig) UnmarshalJSON(body []byte) error { 11029 var m map[string]*json.RawMessage 11030 err := json.Unmarshal(body, &m) 11031 if err != nil { 11032 return err 11033 } 11034 for k, v := range m { 11035 switch k { 11036 case "properties": 11037 if v != nil { 11038 var siteConfigProperties SiteConfigProperties 11039 err = json.Unmarshal(*v, &siteConfigProperties) 11040 if err != nil { 11041 return err 11042 } 11043 sc.SiteConfigProperties = &siteConfigProperties 11044 } 11045 case "id": 11046 if v != nil { 11047 var ID string 11048 err = json.Unmarshal(*v, &ID) 11049 if err != nil { 11050 return err 11051 } 11052 sc.ID = &ID 11053 } 11054 case "name": 11055 if v != nil { 11056 var name string 11057 err = json.Unmarshal(*v, &name) 11058 if err != nil { 11059 return err 11060 } 11061 sc.Name = &name 11062 } 11063 case "kind": 11064 if v != nil { 11065 var kind string 11066 err = json.Unmarshal(*v, &kind) 11067 if err != nil { 11068 return err 11069 } 11070 sc.Kind = &kind 11071 } 11072 case "location": 11073 if v != nil { 11074 var location string 11075 err = json.Unmarshal(*v, &location) 11076 if err != nil { 11077 return err 11078 } 11079 sc.Location = &location 11080 } 11081 case "type": 11082 if v != nil { 11083 var typeVar string 11084 err = json.Unmarshal(*v, &typeVar) 11085 if err != nil { 11086 return err 11087 } 11088 sc.Type = &typeVar 11089 } 11090 case "tags": 11091 if v != nil { 11092 var tags map[string]*string 11093 err = json.Unmarshal(*v, &tags) 11094 if err != nil { 11095 return err 11096 } 11097 sc.Tags = tags 11098 } 11099 } 11100 } 11101 11102 return nil 11103} 11104 11105// SiteConfigProperties ... 11106type SiteConfigProperties struct { 11107 // NumberOfWorkers - Number of workers 11108 NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` 11109 // DefaultDocuments - Default documents 11110 DefaultDocuments *[]string `json:"defaultDocuments,omitempty"` 11111 // NetFrameworkVersion - Net Framework Version 11112 NetFrameworkVersion *string `json:"netFrameworkVersion,omitempty"` 11113 // PhpVersion - Version of PHP 11114 PhpVersion *string `json:"phpVersion,omitempty"` 11115 // PythonVersion - Version of Python 11116 PythonVersion *string `json:"pythonVersion,omitempty"` 11117 // NodeVersion - Version of Node 11118 NodeVersion *string `json:"nodeVersion,omitempty"` 11119 // RequestTracingEnabled - Enable request tracing 11120 RequestTracingEnabled *bool `json:"requestTracingEnabled,omitempty"` 11121 // RequestTracingExpirationTime - Request tracing expiration time 11122 RequestTracingExpirationTime *date.Time `json:"requestTracingExpirationTime,omitempty"` 11123 // RemoteDebuggingEnabled - Remote Debugging Enabled 11124 RemoteDebuggingEnabled *bool `json:"remoteDebuggingEnabled,omitempty"` 11125 // RemoteDebuggingVersion - Remote Debugging Version 11126 RemoteDebuggingVersion *string `json:"remoteDebuggingVersion,omitempty"` 11127 // HTTPLoggingEnabled - HTTP logging Enabled 11128 HTTPLoggingEnabled *bool `json:"httpLoggingEnabled,omitempty"` 11129 // LogsDirectorySizeLimit - HTTP Logs Directory size limit 11130 LogsDirectorySizeLimit *int32 `json:"logsDirectorySizeLimit,omitempty"` 11131 // DetailedErrorLoggingEnabled - Detailed error logging enabled 11132 DetailedErrorLoggingEnabled *bool `json:"detailedErrorLoggingEnabled,omitempty"` 11133 // PublishingUsername - Publishing user name 11134 PublishingUsername *string `json:"publishingUsername,omitempty"` 11135 // PublishingPassword - Publishing password 11136 PublishingPassword *string `json:"publishingPassword,omitempty"` 11137 // AppSettings - Application Settings 11138 AppSettings *[]NameValuePair `json:"appSettings,omitempty"` 11139 // Metadata - Site Metadata 11140 Metadata *[]NameValuePair `json:"metadata,omitempty"` 11141 // ConnectionStrings - Connection strings 11142 ConnectionStrings *[]ConnStringInfo `json:"connectionStrings,omitempty"` 11143 // HandlerMappings - Handler mappings 11144 HandlerMappings *[]HandlerMapping `json:"handlerMappings,omitempty"` 11145 // DocumentRoot - Document root 11146 DocumentRoot *string `json:"documentRoot,omitempty"` 11147 // ScmType - SCM type 11148 ScmType *string `json:"scmType,omitempty"` 11149 // Use32BitWorkerProcess - Use 32 bit worker process 11150 Use32BitWorkerProcess *bool `json:"use32BitWorkerProcess,omitempty"` 11151 // WebSocketsEnabled - Web socket enabled. 11152 WebSocketsEnabled *bool `json:"webSocketsEnabled,omitempty"` 11153 // AlwaysOn - Always On 11154 AlwaysOn *bool `json:"alwaysOn,omitempty"` 11155 // JavaVersion - Java version 11156 JavaVersion *string `json:"javaVersion,omitempty"` 11157 // JavaContainer - Java container 11158 JavaContainer *string `json:"javaContainer,omitempty"` 11159 // JavaContainerVersion - Java container version 11160 JavaContainerVersion *string `json:"javaContainerVersion,omitempty"` 11161 // AppCommandLine - App Command Line to launch 11162 AppCommandLine *string `json:"appCommandLine,omitempty"` 11163 // ManagedPipelineMode - Managed pipeline mode. Possible values include: 'Integrated', 'Classic' 11164 ManagedPipelineMode ManagedPipelineMode `json:"managedPipelineMode,omitempty"` 11165 // VirtualApplications - Virtual applications 11166 VirtualApplications *[]VirtualApplication `json:"virtualApplications,omitempty"` 11167 // LoadBalancing - Site load balancing. Possible values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash' 11168 LoadBalancing SiteLoadBalancing `json:"loadBalancing,omitempty"` 11169 // Experiments - This is work around for polymorphic types 11170 Experiments *Experiments `json:"experiments,omitempty"` 11171 // Limits - Site limits 11172 Limits *SiteLimits `json:"limits,omitempty"` 11173 // AutoHealEnabled - Auto heal enabled 11174 AutoHealEnabled *bool `json:"autoHealEnabled,omitempty"` 11175 // AutoHealRules - Auto heal rules 11176 AutoHealRules *AutoHealRules `json:"autoHealRules,omitempty"` 11177 // TracingOptions - Tracing options 11178 TracingOptions *string `json:"tracingOptions,omitempty"` 11179 // VnetName - Vnet name 11180 VnetName *string `json:"vnetName,omitempty"` 11181 // Cors - Cross-Origin Resource Sharing (CORS) settings. 11182 Cors *CorsSettings `json:"cors,omitempty"` 11183 // APIDefinition - Information about the formal API definition for the web app. 11184 APIDefinition *APIDefinitionInfo `json:"apiDefinition,omitempty"` 11185 // AutoSwapSlotName - Auto swap slot name 11186 AutoSwapSlotName *string `json:"autoSwapSlotName,omitempty"` 11187 // LocalMySQLEnabled - Local mysql enabled 11188 LocalMySQLEnabled *bool `json:"localMySqlEnabled,omitempty"` 11189 // IPSecurityRestrictions - Ip Security restrictions 11190 IPSecurityRestrictions *[]IPSecurityRestriction `json:"ipSecurityRestrictions,omitempty"` 11191} 11192 11193// SiteInstance instance of a web app 11194type SiteInstance struct { 11195 *SiteInstanceProperties `json:"properties,omitempty"` 11196 // ID - Resource Id 11197 ID *string `json:"id,omitempty"` 11198 // Name - Resource Name 11199 Name *string `json:"name,omitempty"` 11200 // Kind - Kind of resource 11201 Kind *string `json:"kind,omitempty"` 11202 // Location - Resource Location 11203 Location *string `json:"location,omitempty"` 11204 // Type - Resource type 11205 Type *string `json:"type,omitempty"` 11206 // Tags - Resource tags 11207 Tags map[string]*string `json:"tags"` 11208} 11209 11210// MarshalJSON is the custom marshaler for SiteInstance. 11211func (si SiteInstance) MarshalJSON() ([]byte, error) { 11212 objectMap := make(map[string]interface{}) 11213 if si.SiteInstanceProperties != nil { 11214 objectMap["properties"] = si.SiteInstanceProperties 11215 } 11216 if si.ID != nil { 11217 objectMap["id"] = si.ID 11218 } 11219 if si.Name != nil { 11220 objectMap["name"] = si.Name 11221 } 11222 if si.Kind != nil { 11223 objectMap["kind"] = si.Kind 11224 } 11225 if si.Location != nil { 11226 objectMap["location"] = si.Location 11227 } 11228 if si.Type != nil { 11229 objectMap["type"] = si.Type 11230 } 11231 if si.Tags != nil { 11232 objectMap["tags"] = si.Tags 11233 } 11234 return json.Marshal(objectMap) 11235} 11236 11237// UnmarshalJSON is the custom unmarshaler for SiteInstance struct. 11238func (si *SiteInstance) UnmarshalJSON(body []byte) error { 11239 var m map[string]*json.RawMessage 11240 err := json.Unmarshal(body, &m) 11241 if err != nil { 11242 return err 11243 } 11244 for k, v := range m { 11245 switch k { 11246 case "properties": 11247 if v != nil { 11248 var siteInstanceProperties SiteInstanceProperties 11249 err = json.Unmarshal(*v, &siteInstanceProperties) 11250 if err != nil { 11251 return err 11252 } 11253 si.SiteInstanceProperties = &siteInstanceProperties 11254 } 11255 case "id": 11256 if v != nil { 11257 var ID string 11258 err = json.Unmarshal(*v, &ID) 11259 if err != nil { 11260 return err 11261 } 11262 si.ID = &ID 11263 } 11264 case "name": 11265 if v != nil { 11266 var name string 11267 err = json.Unmarshal(*v, &name) 11268 if err != nil { 11269 return err 11270 } 11271 si.Name = &name 11272 } 11273 case "kind": 11274 if v != nil { 11275 var kind string 11276 err = json.Unmarshal(*v, &kind) 11277 if err != nil { 11278 return err 11279 } 11280 si.Kind = &kind 11281 } 11282 case "location": 11283 if v != nil { 11284 var location string 11285 err = json.Unmarshal(*v, &location) 11286 if err != nil { 11287 return err 11288 } 11289 si.Location = &location 11290 } 11291 case "type": 11292 if v != nil { 11293 var typeVar string 11294 err = json.Unmarshal(*v, &typeVar) 11295 if err != nil { 11296 return err 11297 } 11298 si.Type = &typeVar 11299 } 11300 case "tags": 11301 if v != nil { 11302 var tags map[string]*string 11303 err = json.Unmarshal(*v, &tags) 11304 if err != nil { 11305 return err 11306 } 11307 si.Tags = tags 11308 } 11309 } 11310 } 11311 11312 return nil 11313} 11314 11315// SiteInstanceCollection collection of site instances 11316type SiteInstanceCollection struct { 11317 autorest.Response `json:"-"` 11318 // Value - Collection of resources 11319 Value *[]SiteInstance `json:"value,omitempty"` 11320 // NextLink - Link to next page of resources 11321 NextLink *string `json:"nextLink,omitempty"` 11322} 11323 11324// SiteInstanceCollectionIterator provides access to a complete listing of SiteInstance values. 11325type SiteInstanceCollectionIterator struct { 11326 i int 11327 page SiteInstanceCollectionPage 11328} 11329 11330// NextWithContext advances to the next value. If there was an error making 11331// the request the iterator does not advance and the error is returned. 11332func (iter *SiteInstanceCollectionIterator) NextWithContext(ctx context.Context) (err error) { 11333 if tracing.IsEnabled() { 11334 ctx = tracing.StartSpan(ctx, fqdn+"/SiteInstanceCollectionIterator.NextWithContext") 11335 defer func() { 11336 sc := -1 11337 if iter.Response().Response.Response != nil { 11338 sc = iter.Response().Response.Response.StatusCode 11339 } 11340 tracing.EndSpan(ctx, sc, err) 11341 }() 11342 } 11343 iter.i++ 11344 if iter.i < len(iter.page.Values()) { 11345 return nil 11346 } 11347 err = iter.page.NextWithContext(ctx) 11348 if err != nil { 11349 iter.i-- 11350 return err 11351 } 11352 iter.i = 0 11353 return nil 11354} 11355 11356// Next advances to the next value. If there was an error making 11357// the request the iterator does not advance and the error is returned. 11358// Deprecated: Use NextWithContext() instead. 11359func (iter *SiteInstanceCollectionIterator) Next() error { 11360 return iter.NextWithContext(context.Background()) 11361} 11362 11363// NotDone returns true if the enumeration should be started or is not yet complete. 11364func (iter SiteInstanceCollectionIterator) NotDone() bool { 11365 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11366} 11367 11368// Response returns the raw server response from the last page request. 11369func (iter SiteInstanceCollectionIterator) Response() SiteInstanceCollection { 11370 return iter.page.Response() 11371} 11372 11373// Value returns the current value or a zero-initialized value if the 11374// iterator has advanced beyond the end of the collection. 11375func (iter SiteInstanceCollectionIterator) Value() SiteInstance { 11376 if !iter.page.NotDone() { 11377 return SiteInstance{} 11378 } 11379 return iter.page.Values()[iter.i] 11380} 11381 11382// Creates a new instance of the SiteInstanceCollectionIterator type. 11383func NewSiteInstanceCollectionIterator(page SiteInstanceCollectionPage) SiteInstanceCollectionIterator { 11384 return SiteInstanceCollectionIterator{page: page} 11385} 11386 11387// IsEmpty returns true if the ListResult contains no values. 11388func (sic SiteInstanceCollection) IsEmpty() bool { 11389 return sic.Value == nil || len(*sic.Value) == 0 11390} 11391 11392// siteInstanceCollectionPreparer prepares a request to retrieve the next set of results. 11393// It returns nil if no more results exist. 11394func (sic SiteInstanceCollection) siteInstanceCollectionPreparer(ctx context.Context) (*http.Request, error) { 11395 if sic.NextLink == nil || len(to.String(sic.NextLink)) < 1 { 11396 return nil, nil 11397 } 11398 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11399 autorest.AsJSON(), 11400 autorest.AsGet(), 11401 autorest.WithBaseURL(to.String(sic.NextLink))) 11402} 11403 11404// SiteInstanceCollectionPage contains a page of SiteInstance values. 11405type SiteInstanceCollectionPage struct { 11406 fn func(context.Context, SiteInstanceCollection) (SiteInstanceCollection, error) 11407 sic SiteInstanceCollection 11408} 11409 11410// NextWithContext advances to the next page of values. If there was an error making 11411// the request the page does not advance and the error is returned. 11412func (page *SiteInstanceCollectionPage) NextWithContext(ctx context.Context) (err error) { 11413 if tracing.IsEnabled() { 11414 ctx = tracing.StartSpan(ctx, fqdn+"/SiteInstanceCollectionPage.NextWithContext") 11415 defer func() { 11416 sc := -1 11417 if page.Response().Response.Response != nil { 11418 sc = page.Response().Response.Response.StatusCode 11419 } 11420 tracing.EndSpan(ctx, sc, err) 11421 }() 11422 } 11423 next, err := page.fn(ctx, page.sic) 11424 if err != nil { 11425 return err 11426 } 11427 page.sic = next 11428 return nil 11429} 11430 11431// Next advances to the next page of values. If there was an error making 11432// the request the page does not advance and the error is returned. 11433// Deprecated: Use NextWithContext() instead. 11434func (page *SiteInstanceCollectionPage) Next() error { 11435 return page.NextWithContext(context.Background()) 11436} 11437 11438// NotDone returns true if the page enumeration should be started or is not yet complete. 11439func (page SiteInstanceCollectionPage) NotDone() bool { 11440 return !page.sic.IsEmpty() 11441} 11442 11443// Response returns the raw server response from the last page request. 11444func (page SiteInstanceCollectionPage) Response() SiteInstanceCollection { 11445 return page.sic 11446} 11447 11448// Values returns the slice of values for the current page or nil if there are no values. 11449func (page SiteInstanceCollectionPage) Values() []SiteInstance { 11450 if page.sic.IsEmpty() { 11451 return nil 11452 } 11453 return *page.sic.Value 11454} 11455 11456// Creates a new instance of the SiteInstanceCollectionPage type. 11457func NewSiteInstanceCollectionPage(getNextPage func(context.Context, SiteInstanceCollection) (SiteInstanceCollection, error)) SiteInstanceCollectionPage { 11458 return SiteInstanceCollectionPage{fn: getNextPage} 11459} 11460 11461// SiteInstanceProperties ... 11462type SiteInstanceProperties struct { 11463 // Name - Name of instance 11464 Name *string `json:"name,omitempty"` 11465} 11466 11467// SiteLimits represents metric limits set on a web app. 11468type SiteLimits struct { 11469 // MaxPercentageCPU - Maximum allowed CPU usage percentage 11470 MaxPercentageCPU *float64 `json:"maxPercentageCpu,omitempty"` 11471 // MaxMemoryInMb - Maximum allowed memory usage in MB 11472 MaxMemoryInMb *int64 `json:"maxMemoryInMb,omitempty"` 11473 // MaxDiskSizeInMb - Maximum allowed disk size usage in MB 11474 MaxDiskSizeInMb *int64 `json:"maxDiskSizeInMb,omitempty"` 11475} 11476 11477// SiteLogsConfig configuration of Azure web site 11478type SiteLogsConfig struct { 11479 autorest.Response `json:"-"` 11480 *SiteLogsConfigProperties `json:"properties,omitempty"` 11481 // ID - Resource Id 11482 ID *string `json:"id,omitempty"` 11483 // Name - Resource Name 11484 Name *string `json:"name,omitempty"` 11485 // Kind - Kind of resource 11486 Kind *string `json:"kind,omitempty"` 11487 // Location - Resource Location 11488 Location *string `json:"location,omitempty"` 11489 // Type - Resource type 11490 Type *string `json:"type,omitempty"` 11491 // Tags - Resource tags 11492 Tags map[string]*string `json:"tags"` 11493} 11494 11495// MarshalJSON is the custom marshaler for SiteLogsConfig. 11496func (slc SiteLogsConfig) MarshalJSON() ([]byte, error) { 11497 objectMap := make(map[string]interface{}) 11498 if slc.SiteLogsConfigProperties != nil { 11499 objectMap["properties"] = slc.SiteLogsConfigProperties 11500 } 11501 if slc.ID != nil { 11502 objectMap["id"] = slc.ID 11503 } 11504 if slc.Name != nil { 11505 objectMap["name"] = slc.Name 11506 } 11507 if slc.Kind != nil { 11508 objectMap["kind"] = slc.Kind 11509 } 11510 if slc.Location != nil { 11511 objectMap["location"] = slc.Location 11512 } 11513 if slc.Type != nil { 11514 objectMap["type"] = slc.Type 11515 } 11516 if slc.Tags != nil { 11517 objectMap["tags"] = slc.Tags 11518 } 11519 return json.Marshal(objectMap) 11520} 11521 11522// UnmarshalJSON is the custom unmarshaler for SiteLogsConfig struct. 11523func (slc *SiteLogsConfig) UnmarshalJSON(body []byte) error { 11524 var m map[string]*json.RawMessage 11525 err := json.Unmarshal(body, &m) 11526 if err != nil { 11527 return err 11528 } 11529 for k, v := range m { 11530 switch k { 11531 case "properties": 11532 if v != nil { 11533 var siteLogsConfigProperties SiteLogsConfigProperties 11534 err = json.Unmarshal(*v, &siteLogsConfigProperties) 11535 if err != nil { 11536 return err 11537 } 11538 slc.SiteLogsConfigProperties = &siteLogsConfigProperties 11539 } 11540 case "id": 11541 if v != nil { 11542 var ID string 11543 err = json.Unmarshal(*v, &ID) 11544 if err != nil { 11545 return err 11546 } 11547 slc.ID = &ID 11548 } 11549 case "name": 11550 if v != nil { 11551 var name string 11552 err = json.Unmarshal(*v, &name) 11553 if err != nil { 11554 return err 11555 } 11556 slc.Name = &name 11557 } 11558 case "kind": 11559 if v != nil { 11560 var kind string 11561 err = json.Unmarshal(*v, &kind) 11562 if err != nil { 11563 return err 11564 } 11565 slc.Kind = &kind 11566 } 11567 case "location": 11568 if v != nil { 11569 var location string 11570 err = json.Unmarshal(*v, &location) 11571 if err != nil { 11572 return err 11573 } 11574 slc.Location = &location 11575 } 11576 case "type": 11577 if v != nil { 11578 var typeVar string 11579 err = json.Unmarshal(*v, &typeVar) 11580 if err != nil { 11581 return err 11582 } 11583 slc.Type = &typeVar 11584 } 11585 case "tags": 11586 if v != nil { 11587 var tags map[string]*string 11588 err = json.Unmarshal(*v, &tags) 11589 if err != nil { 11590 return err 11591 } 11592 slc.Tags = tags 11593 } 11594 } 11595 } 11596 11597 return nil 11598} 11599 11600// SiteLogsConfigProperties ... 11601type SiteLogsConfigProperties struct { 11602 // ApplicationLogs - Application logs configuration 11603 ApplicationLogs *ApplicationLogsConfig `json:"applicationLogs,omitempty"` 11604 // HTTPLogs - Http logs configuration 11605 HTTPLogs *HTTPLogsConfig `json:"httpLogs,omitempty"` 11606 // FailedRequestsTracing - Failed requests tracing configuration 11607 FailedRequestsTracing *EnabledConfig `json:"failedRequestsTracing,omitempty"` 11608 // DetailedErrorMessages - Detailed error messages configuration 11609 DetailedErrorMessages *EnabledConfig `json:"detailedErrorMessages,omitempty"` 11610} 11611 11612// SiteProperties ... 11613type SiteProperties struct { 11614 // Name - Name of web app 11615 Name *string `json:"name,omitempty"` 11616 // State - READ-ONLY; State of the web app 11617 State *string `json:"state,omitempty"` 11618 // HostNames - READ-ONLY; Hostnames associated with web app 11619 HostNames *[]string `json:"hostNames,omitempty"` 11620 // RepositorySiteName - READ-ONLY; Name of repository site 11621 RepositorySiteName *string `json:"repositorySiteName,omitempty"` 11622 // UsageState - READ-ONLY; State indicating whether web app has exceeded its quota usage. Possible values include: 'UsageStateNormal', 'UsageStateExceeded' 11623 UsageState UsageState `json:"usageState,omitempty"` 11624 // Enabled - True if the site is enabled; otherwise, false. Setting this value to false disables the site (takes the site off line). 11625 Enabled *bool `json:"enabled,omitempty"` 11626 // 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 11627 // the app is not served on those hostnames 11628 EnabledHostNames *[]string `json:"enabledHostNames,omitempty"` 11629 // AvailabilityState - READ-ONLY; Management information availability state for the web app. Possible values are Normal or Limited. 11630 // Normal means that the site is running correctly and that management information for the site is available. 11631 // 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' 11632 AvailabilityState SiteAvailabilityState `json:"availabilityState,omitempty"` 11633 // HostNameSslStates - Hostname SSL states are used to manage the SSL bindings for site's hostnames. 11634 HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"` 11635 ServerFarmID *string `json:"serverFarmId,omitempty"` 11636 // LastModifiedTimeUtc - READ-ONLY; Last time web app was modified in UTC 11637 LastModifiedTimeUtc *date.Time `json:"lastModifiedTimeUtc,omitempty"` 11638 // SiteConfig - Configuration of web app 11639 SiteConfig *SiteConfig `json:"siteConfig,omitempty"` 11640 // TrafficManagerHostNames - READ-ONLY; Read-only list of Azure Traffic manager hostnames associated with web app 11641 TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"` 11642 // PremiumAppDeployed - READ-ONLY; If set indicates whether web app is deployed as a premium app 11643 PremiumAppDeployed *bool `json:"premiumAppDeployed,omitempty"` 11644 // ScmSiteAlsoStopped - If set indicates whether to stop SCM (KUDU) site when the web app is stopped. Default is false. 11645 ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` 11646 // TargetSwapSlot - READ-ONLY; Read-only property that specifies which slot this app will swap into 11647 TargetSwapSlot *string `json:"targetSwapSlot,omitempty"` 11648 // HostingEnvironmentProfile - Specification for the hosting environment (App Service Environment) to use for the web app 11649 HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` 11650 MicroService *string `json:"microService,omitempty"` 11651 // GatewaySiteName - Name of gateway app associated with web app 11652 GatewaySiteName *string `json:"gatewaySiteName,omitempty"` 11653 // ClientAffinityEnabled - Specifies if the client affinity is enabled when load balancing http request for multiple instances of the web app 11654 ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"` 11655 // ClientCertEnabled - Specifies if the client certificate is enabled for the web app 11656 ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` 11657 // HostNamesDisabled - Specifies if the public hostnames are disabled the web app. 11658 // If set to true the app is only accessible via API Management process 11659 HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"` 11660 // 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. 11661 OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"` 11662 // ContainerSize - Size of a function container 11663 ContainerSize *int32 `json:"containerSize,omitempty"` 11664 // MaxNumberOfWorkers - Maximum number of workers 11665 // This only applies to function container 11666 MaxNumberOfWorkers *int32 `json:"maxNumberOfWorkers,omitempty"` 11667 // CloningInfo - This is only valid for web app creation. If specified, web app is cloned from 11668 // a source web app 11669 CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` 11670 // ResourceGroup - READ-ONLY; Resource group web app belongs to 11671 ResourceGroup *string `json:"resourceGroup,omitempty"` 11672 // IsDefaultContainer - READ-ONLY; Site is a default container 11673 IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"` 11674 // DefaultHostName - READ-ONLY; Default hostname of the web app 11675 DefaultHostName *string `json:"defaultHostName,omitempty"` 11676} 11677 11678// SitePropertiesModel ... 11679type SitePropertiesModel struct { 11680 Metadata *[]NameValuePair `json:"metadata,omitempty"` 11681 Properties *[]NameValuePair `json:"properties,omitempty"` 11682 AppSettings *[]NameValuePair `json:"appSettings,omitempty"` 11683} 11684 11685// SitesCreateOrUpdateSiteFuture an abstraction for monitoring and retrieving the results of a long-running 11686// operation. 11687type SitesCreateOrUpdateSiteFuture struct { 11688 azure.Future 11689} 11690 11691// Result returns the result of the asynchronous operation. 11692// If the operation has not completed it will return an error. 11693func (future *SitesCreateOrUpdateSiteFuture) Result(client SitesClient) (s Site, err error) { 11694 var done bool 11695 done, err = future.DoneWithContext(context.Background(), client) 11696 if err != nil { 11697 err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteFuture", "Result", future.Response(), "Polling failure") 11698 return 11699 } 11700 if !done { 11701 err = azure.NewAsyncOpIncompleteError("web.SitesCreateOrUpdateSiteFuture") 11702 return 11703 } 11704 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11705 if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { 11706 s, err = client.CreateOrUpdateSiteResponder(s.Response.Response) 11707 if err != nil { 11708 err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteFuture", "Result", s.Response.Response, "Failure responding to request") 11709 } 11710 } 11711 return 11712} 11713 11714// SitesCreateOrUpdateSiteSlotFuture an abstraction for monitoring and retrieving the results of a 11715// long-running operation. 11716type SitesCreateOrUpdateSiteSlotFuture struct { 11717 azure.Future 11718} 11719 11720// Result returns the result of the asynchronous operation. 11721// If the operation has not completed it will return an error. 11722func (future *SitesCreateOrUpdateSiteSlotFuture) Result(client SitesClient) (s Site, err error) { 11723 var done bool 11724 done, err = future.DoneWithContext(context.Background(), client) 11725 if err != nil { 11726 err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteSlotFuture", "Result", future.Response(), "Polling failure") 11727 return 11728 } 11729 if !done { 11730 err = azure.NewAsyncOpIncompleteError("web.SitesCreateOrUpdateSiteSlotFuture") 11731 return 11732 } 11733 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11734 if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { 11735 s, err = client.CreateOrUpdateSiteSlotResponder(s.Response.Response) 11736 if err != nil { 11737 err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteSlotFuture", "Result", s.Response.Response, "Failure responding to request") 11738 } 11739 } 11740 return 11741} 11742 11743// SitesListSitePublishingCredentialsFuture an abstraction for monitoring and retrieving the results of a 11744// long-running operation. 11745type SitesListSitePublishingCredentialsFuture struct { 11746 azure.Future 11747} 11748 11749// Result returns the result of the asynchronous operation. 11750// If the operation has not completed it will return an error. 11751func (future *SitesListSitePublishingCredentialsFuture) Result(client SitesClient) (u User, err error) { 11752 var done bool 11753 done, err = future.DoneWithContext(context.Background(), client) 11754 if err != nil { 11755 err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsFuture", "Result", future.Response(), "Polling failure") 11756 return 11757 } 11758 if !done { 11759 err = azure.NewAsyncOpIncompleteError("web.SitesListSitePublishingCredentialsFuture") 11760 return 11761 } 11762 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11763 if u.Response.Response, err = future.GetResult(sender); err == nil && u.Response.Response.StatusCode != http.StatusNoContent { 11764 u, err = client.ListSitePublishingCredentialsResponder(u.Response.Response) 11765 if err != nil { 11766 err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsFuture", "Result", u.Response.Response, "Failure responding to request") 11767 } 11768 } 11769 return 11770} 11771 11772// SitesListSitePublishingCredentialsSlotFuture an abstraction for monitoring and retrieving the results of 11773// a long-running operation. 11774type SitesListSitePublishingCredentialsSlotFuture struct { 11775 azure.Future 11776} 11777 11778// Result returns the result of the asynchronous operation. 11779// If the operation has not completed it will return an error. 11780func (future *SitesListSitePublishingCredentialsSlotFuture) Result(client SitesClient) (u User, err error) { 11781 var done bool 11782 done, err = future.DoneWithContext(context.Background(), client) 11783 if err != nil { 11784 err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsSlotFuture", "Result", future.Response(), "Polling failure") 11785 return 11786 } 11787 if !done { 11788 err = azure.NewAsyncOpIncompleteError("web.SitesListSitePublishingCredentialsSlotFuture") 11789 return 11790 } 11791 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11792 if u.Response.Response, err = future.GetResult(sender); err == nil && u.Response.Response.StatusCode != http.StatusNoContent { 11793 u, err = client.ListSitePublishingCredentialsSlotResponder(u.Response.Response) 11794 if err != nil { 11795 err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsSlotFuture", "Result", u.Response.Response, "Failure responding to request") 11796 } 11797 } 11798 return 11799} 11800 11801// SiteSourceControl describes the source control configuration for web app 11802type SiteSourceControl struct { 11803 autorest.Response `json:"-"` 11804 *SiteSourceControlProperties `json:"properties,omitempty"` 11805 // ID - Resource Id 11806 ID *string `json:"id,omitempty"` 11807 // Name - Resource Name 11808 Name *string `json:"name,omitempty"` 11809 // Kind - Kind of resource 11810 Kind *string `json:"kind,omitempty"` 11811 // Location - Resource Location 11812 Location *string `json:"location,omitempty"` 11813 // Type - Resource type 11814 Type *string `json:"type,omitempty"` 11815 // Tags - Resource tags 11816 Tags map[string]*string `json:"tags"` 11817} 11818 11819// MarshalJSON is the custom marshaler for SiteSourceControl. 11820func (ssc SiteSourceControl) MarshalJSON() ([]byte, error) { 11821 objectMap := make(map[string]interface{}) 11822 if ssc.SiteSourceControlProperties != nil { 11823 objectMap["properties"] = ssc.SiteSourceControlProperties 11824 } 11825 if ssc.ID != nil { 11826 objectMap["id"] = ssc.ID 11827 } 11828 if ssc.Name != nil { 11829 objectMap["name"] = ssc.Name 11830 } 11831 if ssc.Kind != nil { 11832 objectMap["kind"] = ssc.Kind 11833 } 11834 if ssc.Location != nil { 11835 objectMap["location"] = ssc.Location 11836 } 11837 if ssc.Type != nil { 11838 objectMap["type"] = ssc.Type 11839 } 11840 if ssc.Tags != nil { 11841 objectMap["tags"] = ssc.Tags 11842 } 11843 return json.Marshal(objectMap) 11844} 11845 11846// UnmarshalJSON is the custom unmarshaler for SiteSourceControl struct. 11847func (ssc *SiteSourceControl) UnmarshalJSON(body []byte) error { 11848 var m map[string]*json.RawMessage 11849 err := json.Unmarshal(body, &m) 11850 if err != nil { 11851 return err 11852 } 11853 for k, v := range m { 11854 switch k { 11855 case "properties": 11856 if v != nil { 11857 var siteSourceControlProperties SiteSourceControlProperties 11858 err = json.Unmarshal(*v, &siteSourceControlProperties) 11859 if err != nil { 11860 return err 11861 } 11862 ssc.SiteSourceControlProperties = &siteSourceControlProperties 11863 } 11864 case "id": 11865 if v != nil { 11866 var ID string 11867 err = json.Unmarshal(*v, &ID) 11868 if err != nil { 11869 return err 11870 } 11871 ssc.ID = &ID 11872 } 11873 case "name": 11874 if v != nil { 11875 var name string 11876 err = json.Unmarshal(*v, &name) 11877 if err != nil { 11878 return err 11879 } 11880 ssc.Name = &name 11881 } 11882 case "kind": 11883 if v != nil { 11884 var kind string 11885 err = json.Unmarshal(*v, &kind) 11886 if err != nil { 11887 return err 11888 } 11889 ssc.Kind = &kind 11890 } 11891 case "location": 11892 if v != nil { 11893 var location string 11894 err = json.Unmarshal(*v, &location) 11895 if err != nil { 11896 return err 11897 } 11898 ssc.Location = &location 11899 } 11900 case "type": 11901 if v != nil { 11902 var typeVar string 11903 err = json.Unmarshal(*v, &typeVar) 11904 if err != nil { 11905 return err 11906 } 11907 ssc.Type = &typeVar 11908 } 11909 case "tags": 11910 if v != nil { 11911 var tags map[string]*string 11912 err = json.Unmarshal(*v, &tags) 11913 if err != nil { 11914 return err 11915 } 11916 ssc.Tags = tags 11917 } 11918 } 11919 } 11920 11921 return nil 11922} 11923 11924// SiteSourceControlProperties ... 11925type SiteSourceControlProperties struct { 11926 // RepoURL - Repository or source control url 11927 RepoURL *string `json:"repoUrl,omitempty"` 11928 // Branch - Name of branch to use for deployment 11929 Branch *string `json:"branch,omitempty"` 11930 // IsManualIntegration - Whether to manual or continuous integration 11931 IsManualIntegration *bool `json:"isManualIntegration,omitempty"` 11932 // DeploymentRollbackEnabled - Whether to manual or continuous integration 11933 DeploymentRollbackEnabled *bool `json:"deploymentRollbackEnabled,omitempty"` 11934 // IsMercurial - Mercurial or Git repository type 11935 IsMercurial *bool `json:"isMercurial,omitempty"` 11936} 11937 11938// SitesRecoverSiteFuture an abstraction for monitoring and retrieving the results of a long-running 11939// operation. 11940type SitesRecoverSiteFuture struct { 11941 azure.Future 11942} 11943 11944// Result returns the result of the asynchronous operation. 11945// If the operation has not completed it will return an error. 11946func (future *SitesRecoverSiteFuture) Result(client SitesClient) (s Site, err error) { 11947 var done bool 11948 done, err = future.DoneWithContext(context.Background(), client) 11949 if err != nil { 11950 err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteFuture", "Result", future.Response(), "Polling failure") 11951 return 11952 } 11953 if !done { 11954 err = azure.NewAsyncOpIncompleteError("web.SitesRecoverSiteFuture") 11955 return 11956 } 11957 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11958 if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { 11959 s, err = client.RecoverSiteResponder(s.Response.Response) 11960 if err != nil { 11961 err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteFuture", "Result", s.Response.Response, "Failure responding to request") 11962 } 11963 } 11964 return 11965} 11966 11967// SitesRecoverSiteSlotFuture an abstraction for monitoring and retrieving the results of a long-running 11968// operation. 11969type SitesRecoverSiteSlotFuture struct { 11970 azure.Future 11971} 11972 11973// Result returns the result of the asynchronous operation. 11974// If the operation has not completed it will return an error. 11975func (future *SitesRecoverSiteSlotFuture) Result(client SitesClient) (s Site, err error) { 11976 var done bool 11977 done, err = future.DoneWithContext(context.Background(), client) 11978 if err != nil { 11979 err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteSlotFuture", "Result", future.Response(), "Polling failure") 11980 return 11981 } 11982 if !done { 11983 err = azure.NewAsyncOpIncompleteError("web.SitesRecoverSiteSlotFuture") 11984 return 11985 } 11986 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11987 if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { 11988 s, err = client.RecoverSiteSlotResponder(s.Response.Response) 11989 if err != nil { 11990 err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteSlotFuture", "Result", s.Response.Response, "Failure responding to request") 11991 } 11992 } 11993 return 11994} 11995 11996// SitesRestoreSiteFuture an abstraction for monitoring and retrieving the results of a long-running 11997// operation. 11998type SitesRestoreSiteFuture struct { 11999 azure.Future 12000} 12001 12002// Result returns the result of the asynchronous operation. 12003// If the operation has not completed it will return an error. 12004func (future *SitesRestoreSiteFuture) Result(client SitesClient) (rr RestoreResponse, err error) { 12005 var done bool 12006 done, err = future.DoneWithContext(context.Background(), client) 12007 if err != nil { 12008 err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteFuture", "Result", future.Response(), "Polling failure") 12009 return 12010 } 12011 if !done { 12012 err = azure.NewAsyncOpIncompleteError("web.SitesRestoreSiteFuture") 12013 return 12014 } 12015 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12016 if rr.Response.Response, err = future.GetResult(sender); err == nil && rr.Response.Response.StatusCode != http.StatusNoContent { 12017 rr, err = client.RestoreSiteResponder(rr.Response.Response) 12018 if err != nil { 12019 err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteFuture", "Result", rr.Response.Response, "Failure responding to request") 12020 } 12021 } 12022 return 12023} 12024 12025// SitesRestoreSiteSlotFuture an abstraction for monitoring and retrieving the results of a long-running 12026// operation. 12027type SitesRestoreSiteSlotFuture struct { 12028 azure.Future 12029} 12030 12031// Result returns the result of the asynchronous operation. 12032// If the operation has not completed it will return an error. 12033func (future *SitesRestoreSiteSlotFuture) Result(client SitesClient) (rr RestoreResponse, err error) { 12034 var done bool 12035 done, err = future.DoneWithContext(context.Background(), client) 12036 if err != nil { 12037 err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteSlotFuture", "Result", future.Response(), "Polling failure") 12038 return 12039 } 12040 if !done { 12041 err = azure.NewAsyncOpIncompleteError("web.SitesRestoreSiteSlotFuture") 12042 return 12043 } 12044 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12045 if rr.Response.Response, err = future.GetResult(sender); err == nil && rr.Response.Response.StatusCode != http.StatusNoContent { 12046 rr, err = client.RestoreSiteSlotResponder(rr.Response.Response) 12047 if err != nil { 12048 err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteSlotFuture", "Result", rr.Response.Response, "Failure responding to request") 12049 } 12050 } 12051 return 12052} 12053 12054// SitesSwapSlotsSlotFuture an abstraction for monitoring and retrieving the results of a long-running 12055// operation. 12056type SitesSwapSlotsSlotFuture struct { 12057 azure.Future 12058} 12059 12060// Result returns the result of the asynchronous operation. 12061// If the operation has not completed it will return an error. 12062func (future *SitesSwapSlotsSlotFuture) Result(client SitesClient) (so SetObject, err error) { 12063 var done bool 12064 done, err = future.DoneWithContext(context.Background(), client) 12065 if err != nil { 12066 err = autorest.NewErrorWithError(err, "web.SitesSwapSlotsSlotFuture", "Result", future.Response(), "Polling failure") 12067 return 12068 } 12069 if !done { 12070 err = azure.NewAsyncOpIncompleteError("web.SitesSwapSlotsSlotFuture") 12071 return 12072 } 12073 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12074 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { 12075 so, err = client.SwapSlotsSlotResponder(so.Response.Response) 12076 if err != nil { 12077 err = autorest.NewErrorWithError(err, "web.SitesSwapSlotsSlotFuture", "Result", so.Response.Response, "Failure responding to request") 12078 } 12079 } 12080 return 12081} 12082 12083// SitesSwapSlotWithProductionFuture an abstraction for monitoring and retrieving the results of a 12084// long-running operation. 12085type SitesSwapSlotWithProductionFuture struct { 12086 azure.Future 12087} 12088 12089// Result returns the result of the asynchronous operation. 12090// If the operation has not completed it will return an error. 12091func (future *SitesSwapSlotWithProductionFuture) Result(client SitesClient) (so SetObject, err error) { 12092 var done bool 12093 done, err = future.DoneWithContext(context.Background(), client) 12094 if err != nil { 12095 err = autorest.NewErrorWithError(err, "web.SitesSwapSlotWithProductionFuture", "Result", future.Response(), "Polling failure") 12096 return 12097 } 12098 if !done { 12099 err = azure.NewAsyncOpIncompleteError("web.SitesSwapSlotWithProductionFuture") 12100 return 12101 } 12102 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12103 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { 12104 so, err = client.SwapSlotWithProductionResponder(so.Response.Response) 12105 if err != nil { 12106 err = autorest.NewErrorWithError(err, "web.SitesSwapSlotWithProductionFuture", "Result", so.Response.Response, "Failure responding to request") 12107 } 12108 } 12109 return 12110} 12111 12112// SkuCapacity description of the App Service Plan scale options 12113type SkuCapacity struct { 12114 // Minimum - Minimum number of Workers for this App Service Plan SKU 12115 Minimum *int32 `json:"minimum,omitempty"` 12116 // Maximum - Maximum number of Workers for this App Service Plan SKU 12117 Maximum *int32 `json:"maximum,omitempty"` 12118 // Default - Default number of Workers for this App Service Plan SKU 12119 Default *int32 `json:"default,omitempty"` 12120 // ScaleType - Available scale configurations for an App Service Plan 12121 ScaleType *string `json:"scaleType,omitempty"` 12122} 12123 12124// SkuDescription describes a sku for a scalable resource 12125type SkuDescription struct { 12126 // Name - Name of the resource sku 12127 Name *string `json:"name,omitempty"` 12128 // Tier - Service Tier of the resource sku 12129 Tier *string `json:"tier,omitempty"` 12130 // Size - Size specifier of the resource sku 12131 Size *string `json:"size,omitempty"` 12132 // Family - Family code of the resource sku 12133 Family *string `json:"family,omitempty"` 12134 // Capacity - Current number of instances assigned to the resource 12135 Capacity *int32 `json:"capacity,omitempty"` 12136} 12137 12138// SkuInfo sku discovery information 12139type SkuInfo struct { 12140 // ResourceType - Resource type that this sku applies to 12141 ResourceType *string `json:"resourceType,omitempty"` 12142 // Sku - Name and tier of the sku 12143 Sku *SkuDescription `json:"sku,omitempty"` 12144 // Capacity - Min, max, and default scale values of the sku 12145 Capacity *SkuCapacity `json:"capacity,omitempty"` 12146} 12147 12148// SkuInfoCollection collection of SkuInfos 12149type SkuInfoCollection struct { 12150 autorest.Response `json:"-"` 12151 // Value - Collection of resources 12152 Value *[]SkuInfo `json:"value,omitempty"` 12153 // NextLink - Link to next page of resources 12154 NextLink *string `json:"nextLink,omitempty"` 12155} 12156 12157// SkuInfoCollectionIterator provides access to a complete listing of SkuInfo values. 12158type SkuInfoCollectionIterator struct { 12159 i int 12160 page SkuInfoCollectionPage 12161} 12162 12163// NextWithContext advances to the next value. If there was an error making 12164// the request the iterator does not advance and the error is returned. 12165func (iter *SkuInfoCollectionIterator) NextWithContext(ctx context.Context) (err error) { 12166 if tracing.IsEnabled() { 12167 ctx = tracing.StartSpan(ctx, fqdn+"/SkuInfoCollectionIterator.NextWithContext") 12168 defer func() { 12169 sc := -1 12170 if iter.Response().Response.Response != nil { 12171 sc = iter.Response().Response.Response.StatusCode 12172 } 12173 tracing.EndSpan(ctx, sc, err) 12174 }() 12175 } 12176 iter.i++ 12177 if iter.i < len(iter.page.Values()) { 12178 return nil 12179 } 12180 err = iter.page.NextWithContext(ctx) 12181 if err != nil { 12182 iter.i-- 12183 return err 12184 } 12185 iter.i = 0 12186 return nil 12187} 12188 12189// Next advances to the next value. If there was an error making 12190// the request the iterator does not advance and the error is returned. 12191// Deprecated: Use NextWithContext() instead. 12192func (iter *SkuInfoCollectionIterator) Next() error { 12193 return iter.NextWithContext(context.Background()) 12194} 12195 12196// NotDone returns true if the enumeration should be started or is not yet complete. 12197func (iter SkuInfoCollectionIterator) NotDone() bool { 12198 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12199} 12200 12201// Response returns the raw server response from the last page request. 12202func (iter SkuInfoCollectionIterator) Response() SkuInfoCollection { 12203 return iter.page.Response() 12204} 12205 12206// Value returns the current value or a zero-initialized value if the 12207// iterator has advanced beyond the end of the collection. 12208func (iter SkuInfoCollectionIterator) Value() SkuInfo { 12209 if !iter.page.NotDone() { 12210 return SkuInfo{} 12211 } 12212 return iter.page.Values()[iter.i] 12213} 12214 12215// Creates a new instance of the SkuInfoCollectionIterator type. 12216func NewSkuInfoCollectionIterator(page SkuInfoCollectionPage) SkuInfoCollectionIterator { 12217 return SkuInfoCollectionIterator{page: page} 12218} 12219 12220// IsEmpty returns true if the ListResult contains no values. 12221func (sic SkuInfoCollection) IsEmpty() bool { 12222 return sic.Value == nil || len(*sic.Value) == 0 12223} 12224 12225// skuInfoCollectionPreparer prepares a request to retrieve the next set of results. 12226// It returns nil if no more results exist. 12227func (sic SkuInfoCollection) skuInfoCollectionPreparer(ctx context.Context) (*http.Request, error) { 12228 if sic.NextLink == nil || len(to.String(sic.NextLink)) < 1 { 12229 return nil, nil 12230 } 12231 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12232 autorest.AsJSON(), 12233 autorest.AsGet(), 12234 autorest.WithBaseURL(to.String(sic.NextLink))) 12235} 12236 12237// SkuInfoCollectionPage contains a page of SkuInfo values. 12238type SkuInfoCollectionPage struct { 12239 fn func(context.Context, SkuInfoCollection) (SkuInfoCollection, error) 12240 sic SkuInfoCollection 12241} 12242 12243// NextWithContext advances to the next page of values. If there was an error making 12244// the request the page does not advance and the error is returned. 12245func (page *SkuInfoCollectionPage) NextWithContext(ctx context.Context) (err error) { 12246 if tracing.IsEnabled() { 12247 ctx = tracing.StartSpan(ctx, fqdn+"/SkuInfoCollectionPage.NextWithContext") 12248 defer func() { 12249 sc := -1 12250 if page.Response().Response.Response != nil { 12251 sc = page.Response().Response.Response.StatusCode 12252 } 12253 tracing.EndSpan(ctx, sc, err) 12254 }() 12255 } 12256 next, err := page.fn(ctx, page.sic) 12257 if err != nil { 12258 return err 12259 } 12260 page.sic = next 12261 return nil 12262} 12263 12264// Next advances to the next page of values. If there was an error making 12265// the request the page does not advance and the error is returned. 12266// Deprecated: Use NextWithContext() instead. 12267func (page *SkuInfoCollectionPage) Next() error { 12268 return page.NextWithContext(context.Background()) 12269} 12270 12271// NotDone returns true if the page enumeration should be started or is not yet complete. 12272func (page SkuInfoCollectionPage) NotDone() bool { 12273 return !page.sic.IsEmpty() 12274} 12275 12276// Response returns the raw server response from the last page request. 12277func (page SkuInfoCollectionPage) Response() SkuInfoCollection { 12278 return page.sic 12279} 12280 12281// Values returns the slice of values for the current page or nil if there are no values. 12282func (page SkuInfoCollectionPage) Values() []SkuInfo { 12283 if page.sic.IsEmpty() { 12284 return nil 12285 } 12286 return *page.sic.Value 12287} 12288 12289// Creates a new instance of the SkuInfoCollectionPage type. 12290func NewSkuInfoCollectionPage(getNextPage func(context.Context, SkuInfoCollection) (SkuInfoCollection, error)) SkuInfoCollectionPage { 12291 return SkuInfoCollectionPage{fn: getNextPage} 12292} 12293 12294// SlotConfigNames class containing names for connection strings and application settings to be marked as 12295// sticky to the slot 12296// and not moved during swap operation 12297// This is valid for all deployment slots under the site 12298type SlotConfigNames struct { 12299 // ConnectionStringNames - List of connection string names 12300 ConnectionStringNames *[]string `json:"connectionStringNames,omitempty"` 12301 // AppSettingNames - List of application settings names 12302 AppSettingNames *[]string `json:"appSettingNames,omitempty"` 12303} 12304 12305// SlotConfigNamesResource slot Config names azure resource 12306type SlotConfigNamesResource struct { 12307 autorest.Response `json:"-"` 12308 *SlotConfigNamesResourceProperties `json:"properties,omitempty"` 12309 // ID - Resource Id 12310 ID *string `json:"id,omitempty"` 12311 // Name - Resource Name 12312 Name *string `json:"name,omitempty"` 12313 // Kind - Kind of resource 12314 Kind *string `json:"kind,omitempty"` 12315 // Location - Resource Location 12316 Location *string `json:"location,omitempty"` 12317 // Type - Resource type 12318 Type *string `json:"type,omitempty"` 12319 // Tags - Resource tags 12320 Tags map[string]*string `json:"tags"` 12321} 12322 12323// MarshalJSON is the custom marshaler for SlotConfigNamesResource. 12324func (scnr SlotConfigNamesResource) MarshalJSON() ([]byte, error) { 12325 objectMap := make(map[string]interface{}) 12326 if scnr.SlotConfigNamesResourceProperties != nil { 12327 objectMap["properties"] = scnr.SlotConfigNamesResourceProperties 12328 } 12329 if scnr.ID != nil { 12330 objectMap["id"] = scnr.ID 12331 } 12332 if scnr.Name != nil { 12333 objectMap["name"] = scnr.Name 12334 } 12335 if scnr.Kind != nil { 12336 objectMap["kind"] = scnr.Kind 12337 } 12338 if scnr.Location != nil { 12339 objectMap["location"] = scnr.Location 12340 } 12341 if scnr.Type != nil { 12342 objectMap["type"] = scnr.Type 12343 } 12344 if scnr.Tags != nil { 12345 objectMap["tags"] = scnr.Tags 12346 } 12347 return json.Marshal(objectMap) 12348} 12349 12350// UnmarshalJSON is the custom unmarshaler for SlotConfigNamesResource struct. 12351func (scnr *SlotConfigNamesResource) UnmarshalJSON(body []byte) error { 12352 var m map[string]*json.RawMessage 12353 err := json.Unmarshal(body, &m) 12354 if err != nil { 12355 return err 12356 } 12357 for k, v := range m { 12358 switch k { 12359 case "properties": 12360 if v != nil { 12361 var slotConfigNamesResourceProperties SlotConfigNamesResourceProperties 12362 err = json.Unmarshal(*v, &slotConfigNamesResourceProperties) 12363 if err != nil { 12364 return err 12365 } 12366 scnr.SlotConfigNamesResourceProperties = &slotConfigNamesResourceProperties 12367 } 12368 case "id": 12369 if v != nil { 12370 var ID string 12371 err = json.Unmarshal(*v, &ID) 12372 if err != nil { 12373 return err 12374 } 12375 scnr.ID = &ID 12376 } 12377 case "name": 12378 if v != nil { 12379 var name string 12380 err = json.Unmarshal(*v, &name) 12381 if err != nil { 12382 return err 12383 } 12384 scnr.Name = &name 12385 } 12386 case "kind": 12387 if v != nil { 12388 var kind string 12389 err = json.Unmarshal(*v, &kind) 12390 if err != nil { 12391 return err 12392 } 12393 scnr.Kind = &kind 12394 } 12395 case "location": 12396 if v != nil { 12397 var location string 12398 err = json.Unmarshal(*v, &location) 12399 if err != nil { 12400 return err 12401 } 12402 scnr.Location = &location 12403 } 12404 case "type": 12405 if v != nil { 12406 var typeVar string 12407 err = json.Unmarshal(*v, &typeVar) 12408 if err != nil { 12409 return err 12410 } 12411 scnr.Type = &typeVar 12412 } 12413 case "tags": 12414 if v != nil { 12415 var tags map[string]*string 12416 err = json.Unmarshal(*v, &tags) 12417 if err != nil { 12418 return err 12419 } 12420 scnr.Tags = tags 12421 } 12422 } 12423 } 12424 12425 return nil 12426} 12427 12428// SlotConfigNamesResourceProperties ... 12429type SlotConfigNamesResourceProperties struct { 12430 // ConnectionStringNames - List of connection string names 12431 ConnectionStringNames *[]string `json:"connectionStringNames,omitempty"` 12432 // AppSettingNames - List of application settings names 12433 AppSettingNames *[]string `json:"appSettingNames,omitempty"` 12434} 12435 12436// SlotDifference an object describing the difference in setting values between two web app slots 12437type SlotDifference struct { 12438 *SlotDifferenceProperties `json:"properties,omitempty"` 12439 // ID - Resource Id 12440 ID *string `json:"id,omitempty"` 12441 // Name - Resource Name 12442 Name *string `json:"name,omitempty"` 12443 // Kind - Kind of resource 12444 Kind *string `json:"kind,omitempty"` 12445 // Location - Resource Location 12446 Location *string `json:"location,omitempty"` 12447 // Type - Resource type 12448 Type *string `json:"type,omitempty"` 12449 // Tags - Resource tags 12450 Tags map[string]*string `json:"tags"` 12451} 12452 12453// MarshalJSON is the custom marshaler for SlotDifference. 12454func (sd SlotDifference) MarshalJSON() ([]byte, error) { 12455 objectMap := make(map[string]interface{}) 12456 if sd.SlotDifferenceProperties != nil { 12457 objectMap["properties"] = sd.SlotDifferenceProperties 12458 } 12459 if sd.ID != nil { 12460 objectMap["id"] = sd.ID 12461 } 12462 if sd.Name != nil { 12463 objectMap["name"] = sd.Name 12464 } 12465 if sd.Kind != nil { 12466 objectMap["kind"] = sd.Kind 12467 } 12468 if sd.Location != nil { 12469 objectMap["location"] = sd.Location 12470 } 12471 if sd.Type != nil { 12472 objectMap["type"] = sd.Type 12473 } 12474 if sd.Tags != nil { 12475 objectMap["tags"] = sd.Tags 12476 } 12477 return json.Marshal(objectMap) 12478} 12479 12480// UnmarshalJSON is the custom unmarshaler for SlotDifference struct. 12481func (sd *SlotDifference) UnmarshalJSON(body []byte) error { 12482 var m map[string]*json.RawMessage 12483 err := json.Unmarshal(body, &m) 12484 if err != nil { 12485 return err 12486 } 12487 for k, v := range m { 12488 switch k { 12489 case "properties": 12490 if v != nil { 12491 var slotDifferenceProperties SlotDifferenceProperties 12492 err = json.Unmarshal(*v, &slotDifferenceProperties) 12493 if err != nil { 12494 return err 12495 } 12496 sd.SlotDifferenceProperties = &slotDifferenceProperties 12497 } 12498 case "id": 12499 if v != nil { 12500 var ID string 12501 err = json.Unmarshal(*v, &ID) 12502 if err != nil { 12503 return err 12504 } 12505 sd.ID = &ID 12506 } 12507 case "name": 12508 if v != nil { 12509 var name string 12510 err = json.Unmarshal(*v, &name) 12511 if err != nil { 12512 return err 12513 } 12514 sd.Name = &name 12515 } 12516 case "kind": 12517 if v != nil { 12518 var kind string 12519 err = json.Unmarshal(*v, &kind) 12520 if err != nil { 12521 return err 12522 } 12523 sd.Kind = &kind 12524 } 12525 case "location": 12526 if v != nil { 12527 var location string 12528 err = json.Unmarshal(*v, &location) 12529 if err != nil { 12530 return err 12531 } 12532 sd.Location = &location 12533 } 12534 case "type": 12535 if v != nil { 12536 var typeVar string 12537 err = json.Unmarshal(*v, &typeVar) 12538 if err != nil { 12539 return err 12540 } 12541 sd.Type = &typeVar 12542 } 12543 case "tags": 12544 if v != nil { 12545 var tags map[string]*string 12546 err = json.Unmarshal(*v, &tags) 12547 if err != nil { 12548 return err 12549 } 12550 sd.Tags = tags 12551 } 12552 } 12553 } 12554 12555 return nil 12556} 12557 12558// SlotDifferenceCollection collection of Slot Differences 12559type SlotDifferenceCollection struct { 12560 autorest.Response `json:"-"` 12561 // Value - Collection of resources 12562 Value *[]SlotDifference `json:"value,omitempty"` 12563 // NextLink - Link to next page of resources 12564 NextLink *string `json:"nextLink,omitempty"` 12565} 12566 12567// SlotDifferenceCollectionIterator provides access to a complete listing of SlotDifference values. 12568type SlotDifferenceCollectionIterator struct { 12569 i int 12570 page SlotDifferenceCollectionPage 12571} 12572 12573// NextWithContext advances to the next value. If there was an error making 12574// the request the iterator does not advance and the error is returned. 12575func (iter *SlotDifferenceCollectionIterator) NextWithContext(ctx context.Context) (err error) { 12576 if tracing.IsEnabled() { 12577 ctx = tracing.StartSpan(ctx, fqdn+"/SlotDifferenceCollectionIterator.NextWithContext") 12578 defer func() { 12579 sc := -1 12580 if iter.Response().Response.Response != nil { 12581 sc = iter.Response().Response.Response.StatusCode 12582 } 12583 tracing.EndSpan(ctx, sc, err) 12584 }() 12585 } 12586 iter.i++ 12587 if iter.i < len(iter.page.Values()) { 12588 return nil 12589 } 12590 err = iter.page.NextWithContext(ctx) 12591 if err != nil { 12592 iter.i-- 12593 return err 12594 } 12595 iter.i = 0 12596 return nil 12597} 12598 12599// Next advances to the next value. If there was an error making 12600// the request the iterator does not advance and the error is returned. 12601// Deprecated: Use NextWithContext() instead. 12602func (iter *SlotDifferenceCollectionIterator) Next() error { 12603 return iter.NextWithContext(context.Background()) 12604} 12605 12606// NotDone returns true if the enumeration should be started or is not yet complete. 12607func (iter SlotDifferenceCollectionIterator) NotDone() bool { 12608 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12609} 12610 12611// Response returns the raw server response from the last page request. 12612func (iter SlotDifferenceCollectionIterator) Response() SlotDifferenceCollection { 12613 return iter.page.Response() 12614} 12615 12616// Value returns the current value or a zero-initialized value if the 12617// iterator has advanced beyond the end of the collection. 12618func (iter SlotDifferenceCollectionIterator) Value() SlotDifference { 12619 if !iter.page.NotDone() { 12620 return SlotDifference{} 12621 } 12622 return iter.page.Values()[iter.i] 12623} 12624 12625// Creates a new instance of the SlotDifferenceCollectionIterator type. 12626func NewSlotDifferenceCollectionIterator(page SlotDifferenceCollectionPage) SlotDifferenceCollectionIterator { 12627 return SlotDifferenceCollectionIterator{page: page} 12628} 12629 12630// IsEmpty returns true if the ListResult contains no values. 12631func (sdc SlotDifferenceCollection) IsEmpty() bool { 12632 return sdc.Value == nil || len(*sdc.Value) == 0 12633} 12634 12635// slotDifferenceCollectionPreparer prepares a request to retrieve the next set of results. 12636// It returns nil if no more results exist. 12637func (sdc SlotDifferenceCollection) slotDifferenceCollectionPreparer(ctx context.Context) (*http.Request, error) { 12638 if sdc.NextLink == nil || len(to.String(sdc.NextLink)) < 1 { 12639 return nil, nil 12640 } 12641 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12642 autorest.AsJSON(), 12643 autorest.AsGet(), 12644 autorest.WithBaseURL(to.String(sdc.NextLink))) 12645} 12646 12647// SlotDifferenceCollectionPage contains a page of SlotDifference values. 12648type SlotDifferenceCollectionPage struct { 12649 fn func(context.Context, SlotDifferenceCollection) (SlotDifferenceCollection, error) 12650 sdc SlotDifferenceCollection 12651} 12652 12653// NextWithContext advances to the next page of values. If there was an error making 12654// the request the page does not advance and the error is returned. 12655func (page *SlotDifferenceCollectionPage) NextWithContext(ctx context.Context) (err error) { 12656 if tracing.IsEnabled() { 12657 ctx = tracing.StartSpan(ctx, fqdn+"/SlotDifferenceCollectionPage.NextWithContext") 12658 defer func() { 12659 sc := -1 12660 if page.Response().Response.Response != nil { 12661 sc = page.Response().Response.Response.StatusCode 12662 } 12663 tracing.EndSpan(ctx, sc, err) 12664 }() 12665 } 12666 next, err := page.fn(ctx, page.sdc) 12667 if err != nil { 12668 return err 12669 } 12670 page.sdc = next 12671 return nil 12672} 12673 12674// Next advances to the next page of values. If there was an error making 12675// the request the page does not advance and the error is returned. 12676// Deprecated: Use NextWithContext() instead. 12677func (page *SlotDifferenceCollectionPage) Next() error { 12678 return page.NextWithContext(context.Background()) 12679} 12680 12681// NotDone returns true if the page enumeration should be started or is not yet complete. 12682func (page SlotDifferenceCollectionPage) NotDone() bool { 12683 return !page.sdc.IsEmpty() 12684} 12685 12686// Response returns the raw server response from the last page request. 12687func (page SlotDifferenceCollectionPage) Response() SlotDifferenceCollection { 12688 return page.sdc 12689} 12690 12691// Values returns the slice of values for the current page or nil if there are no values. 12692func (page SlotDifferenceCollectionPage) Values() []SlotDifference { 12693 if page.sdc.IsEmpty() { 12694 return nil 12695 } 12696 return *page.sdc.Value 12697} 12698 12699// Creates a new instance of the SlotDifferenceCollectionPage type. 12700func NewSlotDifferenceCollectionPage(getNextPage func(context.Context, SlotDifferenceCollection) (SlotDifferenceCollection, error)) SlotDifferenceCollectionPage { 12701 return SlotDifferenceCollectionPage{fn: getNextPage} 12702} 12703 12704// SlotDifferenceProperties ... 12705type SlotDifferenceProperties struct { 12706 // Type - Indicates the type of the difference: Information, Warning or Error. 12707 Type *string `json:"type,omitempty"` 12708 // SettingType - The type of the settings: General, AppSetting or ConnectionString 12709 SettingType *string `json:"settingType,omitempty"` 12710 // DiffRule - Rule that describes how to process the difference in settings during web app slot swap. 12711 DiffRule *string `json:"diffRule,omitempty"` 12712 // SettingName - Name of the setting 12713 SettingName *string `json:"settingName,omitempty"` 12714 // ValueInCurrentSlot - Value of the setting in the current web app slot 12715 ValueInCurrentSlot *string `json:"valueInCurrentSlot,omitempty"` 12716 // ValueInTargetSlot - Value of the setting in the target web app slot 12717 ValueInTargetSlot *string `json:"valueInTargetSlot,omitempty"` 12718 // Description - Description of the difference 12719 Description *string `json:"description,omitempty"` 12720} 12721 12722// SlowRequestsBasedTrigger slowRequestsBasedTrigger 12723type SlowRequestsBasedTrigger struct { 12724 // TimeTaken - TimeTaken 12725 TimeTaken *string `json:"timeTaken,omitempty"` 12726 // Count - Count 12727 Count *int32 `json:"count,omitempty"` 12728 // TimeInterval - TimeInterval 12729 TimeInterval *string `json:"timeInterval,omitempty"` 12730} 12731 12732// SourceControl describes the Source Control OAuth Token 12733type SourceControl struct { 12734 autorest.Response `json:"-"` 12735 *SourceControlProperties `json:"properties,omitempty"` 12736 // ID - Resource Id 12737 ID *string `json:"id,omitempty"` 12738 // Name - Resource Name 12739 Name *string `json:"name,omitempty"` 12740 // Kind - Kind of resource 12741 Kind *string `json:"kind,omitempty"` 12742 // Location - Resource Location 12743 Location *string `json:"location,omitempty"` 12744 // Type - Resource type 12745 Type *string `json:"type,omitempty"` 12746 // Tags - Resource tags 12747 Tags map[string]*string `json:"tags"` 12748} 12749 12750// MarshalJSON is the custom marshaler for SourceControl. 12751func (sc SourceControl) MarshalJSON() ([]byte, error) { 12752 objectMap := make(map[string]interface{}) 12753 if sc.SourceControlProperties != nil { 12754 objectMap["properties"] = sc.SourceControlProperties 12755 } 12756 if sc.ID != nil { 12757 objectMap["id"] = sc.ID 12758 } 12759 if sc.Name != nil { 12760 objectMap["name"] = sc.Name 12761 } 12762 if sc.Kind != nil { 12763 objectMap["kind"] = sc.Kind 12764 } 12765 if sc.Location != nil { 12766 objectMap["location"] = sc.Location 12767 } 12768 if sc.Type != nil { 12769 objectMap["type"] = sc.Type 12770 } 12771 if sc.Tags != nil { 12772 objectMap["tags"] = sc.Tags 12773 } 12774 return json.Marshal(objectMap) 12775} 12776 12777// UnmarshalJSON is the custom unmarshaler for SourceControl struct. 12778func (sc *SourceControl) UnmarshalJSON(body []byte) error { 12779 var m map[string]*json.RawMessage 12780 err := json.Unmarshal(body, &m) 12781 if err != nil { 12782 return err 12783 } 12784 for k, v := range m { 12785 switch k { 12786 case "properties": 12787 if v != nil { 12788 var sourceControlProperties SourceControlProperties 12789 err = json.Unmarshal(*v, &sourceControlProperties) 12790 if err != nil { 12791 return err 12792 } 12793 sc.SourceControlProperties = &sourceControlProperties 12794 } 12795 case "id": 12796 if v != nil { 12797 var ID string 12798 err = json.Unmarshal(*v, &ID) 12799 if err != nil { 12800 return err 12801 } 12802 sc.ID = &ID 12803 } 12804 case "name": 12805 if v != nil { 12806 var name string 12807 err = json.Unmarshal(*v, &name) 12808 if err != nil { 12809 return err 12810 } 12811 sc.Name = &name 12812 } 12813 case "kind": 12814 if v != nil { 12815 var kind string 12816 err = json.Unmarshal(*v, &kind) 12817 if err != nil { 12818 return err 12819 } 12820 sc.Kind = &kind 12821 } 12822 case "location": 12823 if v != nil { 12824 var location string 12825 err = json.Unmarshal(*v, &location) 12826 if err != nil { 12827 return err 12828 } 12829 sc.Location = &location 12830 } 12831 case "type": 12832 if v != nil { 12833 var typeVar string 12834 err = json.Unmarshal(*v, &typeVar) 12835 if err != nil { 12836 return err 12837 } 12838 sc.Type = &typeVar 12839 } 12840 case "tags": 12841 if v != nil { 12842 var tags map[string]*string 12843 err = json.Unmarshal(*v, &tags) 12844 if err != nil { 12845 return err 12846 } 12847 sc.Tags = tags 12848 } 12849 } 12850 } 12851 12852 return nil 12853} 12854 12855// SourceControlCollection collection of source controls 12856type SourceControlCollection struct { 12857 autorest.Response `json:"-"` 12858 // Value - Collection of resources 12859 Value *[]SourceControl `json:"value,omitempty"` 12860 // NextLink - Link to next page of resources 12861 NextLink *string `json:"nextLink,omitempty"` 12862} 12863 12864// SourceControlCollectionIterator provides access to a complete listing of SourceControl values. 12865type SourceControlCollectionIterator struct { 12866 i int 12867 page SourceControlCollectionPage 12868} 12869 12870// NextWithContext advances to the next value. If there was an error making 12871// the request the iterator does not advance and the error is returned. 12872func (iter *SourceControlCollectionIterator) NextWithContext(ctx context.Context) (err error) { 12873 if tracing.IsEnabled() { 12874 ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlCollectionIterator.NextWithContext") 12875 defer func() { 12876 sc := -1 12877 if iter.Response().Response.Response != nil { 12878 sc = iter.Response().Response.Response.StatusCode 12879 } 12880 tracing.EndSpan(ctx, sc, err) 12881 }() 12882 } 12883 iter.i++ 12884 if iter.i < len(iter.page.Values()) { 12885 return nil 12886 } 12887 err = iter.page.NextWithContext(ctx) 12888 if err != nil { 12889 iter.i-- 12890 return err 12891 } 12892 iter.i = 0 12893 return nil 12894} 12895 12896// Next advances to the next value. If there was an error making 12897// the request the iterator does not advance and the error is returned. 12898// Deprecated: Use NextWithContext() instead. 12899func (iter *SourceControlCollectionIterator) Next() error { 12900 return iter.NextWithContext(context.Background()) 12901} 12902 12903// NotDone returns true if the enumeration should be started or is not yet complete. 12904func (iter SourceControlCollectionIterator) NotDone() bool { 12905 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12906} 12907 12908// Response returns the raw server response from the last page request. 12909func (iter SourceControlCollectionIterator) Response() SourceControlCollection { 12910 return iter.page.Response() 12911} 12912 12913// Value returns the current value or a zero-initialized value if the 12914// iterator has advanced beyond the end of the collection. 12915func (iter SourceControlCollectionIterator) Value() SourceControl { 12916 if !iter.page.NotDone() { 12917 return SourceControl{} 12918 } 12919 return iter.page.Values()[iter.i] 12920} 12921 12922// Creates a new instance of the SourceControlCollectionIterator type. 12923func NewSourceControlCollectionIterator(page SourceControlCollectionPage) SourceControlCollectionIterator { 12924 return SourceControlCollectionIterator{page: page} 12925} 12926 12927// IsEmpty returns true if the ListResult contains no values. 12928func (scc SourceControlCollection) IsEmpty() bool { 12929 return scc.Value == nil || len(*scc.Value) == 0 12930} 12931 12932// sourceControlCollectionPreparer prepares a request to retrieve the next set of results. 12933// It returns nil if no more results exist. 12934func (scc SourceControlCollection) sourceControlCollectionPreparer(ctx context.Context) (*http.Request, error) { 12935 if scc.NextLink == nil || len(to.String(scc.NextLink)) < 1 { 12936 return nil, nil 12937 } 12938 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12939 autorest.AsJSON(), 12940 autorest.AsGet(), 12941 autorest.WithBaseURL(to.String(scc.NextLink))) 12942} 12943 12944// SourceControlCollectionPage contains a page of SourceControl values. 12945type SourceControlCollectionPage struct { 12946 fn func(context.Context, SourceControlCollection) (SourceControlCollection, error) 12947 scc SourceControlCollection 12948} 12949 12950// NextWithContext advances to the next page of values. If there was an error making 12951// the request the page does not advance and the error is returned. 12952func (page *SourceControlCollectionPage) NextWithContext(ctx context.Context) (err error) { 12953 if tracing.IsEnabled() { 12954 ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlCollectionPage.NextWithContext") 12955 defer func() { 12956 sc := -1 12957 if page.Response().Response.Response != nil { 12958 sc = page.Response().Response.Response.StatusCode 12959 } 12960 tracing.EndSpan(ctx, sc, err) 12961 }() 12962 } 12963 next, err := page.fn(ctx, page.scc) 12964 if err != nil { 12965 return err 12966 } 12967 page.scc = next 12968 return nil 12969} 12970 12971// Next advances to the next page of values. If there was an error making 12972// the request the page does not advance and the error is returned. 12973// Deprecated: Use NextWithContext() instead. 12974func (page *SourceControlCollectionPage) Next() error { 12975 return page.NextWithContext(context.Background()) 12976} 12977 12978// NotDone returns true if the page enumeration should be started or is not yet complete. 12979func (page SourceControlCollectionPage) NotDone() bool { 12980 return !page.scc.IsEmpty() 12981} 12982 12983// Response returns the raw server response from the last page request. 12984func (page SourceControlCollectionPage) Response() SourceControlCollection { 12985 return page.scc 12986} 12987 12988// Values returns the slice of values for the current page or nil if there are no values. 12989func (page SourceControlCollectionPage) Values() []SourceControl { 12990 if page.scc.IsEmpty() { 12991 return nil 12992 } 12993 return *page.scc.Value 12994} 12995 12996// Creates a new instance of the SourceControlCollectionPage type. 12997func NewSourceControlCollectionPage(getNextPage func(context.Context, SourceControlCollection) (SourceControlCollection, error)) SourceControlCollectionPage { 12998 return SourceControlCollectionPage{fn: getNextPage} 12999} 13000 13001// SourceControlProperties ... 13002type SourceControlProperties struct { 13003 // Name - Name or Source Control Type 13004 Name *string `json:"name,omitempty"` 13005 // Token - OAuth Access Token 13006 Token *string `json:"token,omitempty"` 13007 // TokenSecret - OAuth Access Token Secret 13008 TokenSecret *string `json:"tokenSecret,omitempty"` 13009 // RefreshToken - OAuth Refresh Token 13010 RefreshToken *string `json:"refreshToken,omitempty"` 13011 // ExpirationTime - OAuth Token Expiration 13012 ExpirationTime *date.Time `json:"expirationTime,omitempty"` 13013} 13014 13015// StampCapacity class containing stamp capacity information 13016type StampCapacity struct { 13017 // Name - Name of the stamp 13018 Name *string `json:"name,omitempty"` 13019 // AvailableCapacity - Available capacity (# of machines, bytes of storage etc...) 13020 AvailableCapacity *int64 `json:"availableCapacity,omitempty"` 13021 // TotalCapacity - Total capacity (# of machines, bytes of storage etc...) 13022 TotalCapacity *int64 `json:"totalCapacity,omitempty"` 13023 // Unit - Name of the unit 13024 Unit *string `json:"unit,omitempty"` 13025 // ComputeMode - Shared/Dedicated workers. Possible values include: 'Shared', 'Dedicated', 'Dynamic' 13026 ComputeMode ComputeModeOptions `json:"computeMode,omitempty"` 13027 // WorkerSize - Size of the machines. Possible values include: 'WorkerSizeOptionsDefault', 'WorkerSizeOptionsSmall', 'WorkerSizeOptionsMedium', 'WorkerSizeOptionsLarge' 13028 WorkerSize WorkerSizeOptions `json:"workerSize,omitempty"` 13029 // WorkerSizeID - Size Id of machines: 13030 // 0 - Small 13031 // 1 - Medium 13032 // 2 - Large 13033 WorkerSizeID *int32 `json:"workerSizeId,omitempty"` 13034 // ExcludeFromCapacityAllocation - If true it includes basic sites 13035 // Basic sites are not used for capacity allocation. 13036 ExcludeFromCapacityAllocation *bool `json:"excludeFromCapacityAllocation,omitempty"` 13037 // IsApplicableForAllComputeModes - Is capacity applicable for all sites? 13038 IsApplicableForAllComputeModes *bool `json:"isApplicableForAllComputeModes,omitempty"` 13039 // SiteMode - Shared or Dedicated 13040 SiteMode *string `json:"siteMode,omitempty"` 13041} 13042 13043// StampCapacityCollection collection of stamp capacities 13044type StampCapacityCollection struct { 13045 autorest.Response `json:"-"` 13046 // Value - Collection of resources 13047 Value *[]StampCapacity `json:"value,omitempty"` 13048 // NextLink - Link to next page of resources 13049 NextLink *string `json:"nextLink,omitempty"` 13050} 13051 13052// StampCapacityCollectionIterator provides access to a complete listing of StampCapacity values. 13053type StampCapacityCollectionIterator struct { 13054 i int 13055 page StampCapacityCollectionPage 13056} 13057 13058// NextWithContext advances to the next value. If there was an error making 13059// the request the iterator does not advance and the error is returned. 13060func (iter *StampCapacityCollectionIterator) NextWithContext(ctx context.Context) (err error) { 13061 if tracing.IsEnabled() { 13062 ctx = tracing.StartSpan(ctx, fqdn+"/StampCapacityCollectionIterator.NextWithContext") 13063 defer func() { 13064 sc := -1 13065 if iter.Response().Response.Response != nil { 13066 sc = iter.Response().Response.Response.StatusCode 13067 } 13068 tracing.EndSpan(ctx, sc, err) 13069 }() 13070 } 13071 iter.i++ 13072 if iter.i < len(iter.page.Values()) { 13073 return nil 13074 } 13075 err = iter.page.NextWithContext(ctx) 13076 if err != nil { 13077 iter.i-- 13078 return err 13079 } 13080 iter.i = 0 13081 return nil 13082} 13083 13084// Next advances to the next value. If there was an error making 13085// the request the iterator does not advance and the error is returned. 13086// Deprecated: Use NextWithContext() instead. 13087func (iter *StampCapacityCollectionIterator) Next() error { 13088 return iter.NextWithContext(context.Background()) 13089} 13090 13091// NotDone returns true if the enumeration should be started or is not yet complete. 13092func (iter StampCapacityCollectionIterator) NotDone() bool { 13093 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13094} 13095 13096// Response returns the raw server response from the last page request. 13097func (iter StampCapacityCollectionIterator) Response() StampCapacityCollection { 13098 return iter.page.Response() 13099} 13100 13101// Value returns the current value or a zero-initialized value if the 13102// iterator has advanced beyond the end of the collection. 13103func (iter StampCapacityCollectionIterator) Value() StampCapacity { 13104 if !iter.page.NotDone() { 13105 return StampCapacity{} 13106 } 13107 return iter.page.Values()[iter.i] 13108} 13109 13110// Creates a new instance of the StampCapacityCollectionIterator type. 13111func NewStampCapacityCollectionIterator(page StampCapacityCollectionPage) StampCapacityCollectionIterator { 13112 return StampCapacityCollectionIterator{page: page} 13113} 13114 13115// IsEmpty returns true if the ListResult contains no values. 13116func (scc StampCapacityCollection) IsEmpty() bool { 13117 return scc.Value == nil || len(*scc.Value) == 0 13118} 13119 13120// stampCapacityCollectionPreparer prepares a request to retrieve the next set of results. 13121// It returns nil if no more results exist. 13122func (scc StampCapacityCollection) stampCapacityCollectionPreparer(ctx context.Context) (*http.Request, error) { 13123 if scc.NextLink == nil || len(to.String(scc.NextLink)) < 1 { 13124 return nil, nil 13125 } 13126 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13127 autorest.AsJSON(), 13128 autorest.AsGet(), 13129 autorest.WithBaseURL(to.String(scc.NextLink))) 13130} 13131 13132// StampCapacityCollectionPage contains a page of StampCapacity values. 13133type StampCapacityCollectionPage struct { 13134 fn func(context.Context, StampCapacityCollection) (StampCapacityCollection, error) 13135 scc StampCapacityCollection 13136} 13137 13138// NextWithContext advances to the next page of values. If there was an error making 13139// the request the page does not advance and the error is returned. 13140func (page *StampCapacityCollectionPage) NextWithContext(ctx context.Context) (err error) { 13141 if tracing.IsEnabled() { 13142 ctx = tracing.StartSpan(ctx, fqdn+"/StampCapacityCollectionPage.NextWithContext") 13143 defer func() { 13144 sc := -1 13145 if page.Response().Response.Response != nil { 13146 sc = page.Response().Response.Response.StatusCode 13147 } 13148 tracing.EndSpan(ctx, sc, err) 13149 }() 13150 } 13151 next, err := page.fn(ctx, page.scc) 13152 if err != nil { 13153 return err 13154 } 13155 page.scc = next 13156 return nil 13157} 13158 13159// Next advances to the next page of values. If there was an error making 13160// the request the page does not advance and the error is returned. 13161// Deprecated: Use NextWithContext() instead. 13162func (page *StampCapacityCollectionPage) Next() error { 13163 return page.NextWithContext(context.Background()) 13164} 13165 13166// NotDone returns true if the page enumeration should be started or is not yet complete. 13167func (page StampCapacityCollectionPage) NotDone() bool { 13168 return !page.scc.IsEmpty() 13169} 13170 13171// Response returns the raw server response from the last page request. 13172func (page StampCapacityCollectionPage) Response() StampCapacityCollection { 13173 return page.scc 13174} 13175 13176// Values returns the slice of values for the current page or nil if there are no values. 13177func (page StampCapacityCollectionPage) Values() []StampCapacity { 13178 if page.scc.IsEmpty() { 13179 return nil 13180 } 13181 return *page.scc.Value 13182} 13183 13184// Creates a new instance of the StampCapacityCollectionPage type. 13185func NewStampCapacityCollectionPage(getNextPage func(context.Context, StampCapacityCollection) (StampCapacityCollection, error)) StampCapacityCollectionPage { 13186 return StampCapacityCollectionPage{fn: getNextPage} 13187} 13188 13189// StatusCodesBasedTrigger statusCodeBasedTrigger 13190type StatusCodesBasedTrigger struct { 13191 // Status - HTTP status code 13192 Status *int32 `json:"status,omitempty"` 13193 // SubStatus - SubStatus 13194 SubStatus *int32 `json:"subStatus,omitempty"` 13195 // Win32Status - Win32 error code 13196 Win32Status *int32 `json:"win32Status,omitempty"` 13197 // Count - Count 13198 Count *int32 `json:"count,omitempty"` 13199 // TimeInterval - TimeInterval 13200 TimeInterval *string `json:"timeInterval,omitempty"` 13201} 13202 13203// StringDictionary string dictionary resource 13204type StringDictionary struct { 13205 autorest.Response `json:"-"` 13206 // Properties - Settings 13207 Properties map[string]*string `json:"properties"` 13208 // ID - Resource Id 13209 ID *string `json:"id,omitempty"` 13210 // Name - Resource Name 13211 Name *string `json:"name,omitempty"` 13212 // Kind - Kind of resource 13213 Kind *string `json:"kind,omitempty"` 13214 // Location - Resource Location 13215 Location *string `json:"location,omitempty"` 13216 // Type - Resource type 13217 Type *string `json:"type,omitempty"` 13218 // Tags - Resource tags 13219 Tags map[string]*string `json:"tags"` 13220} 13221 13222// MarshalJSON is the custom marshaler for StringDictionary. 13223func (sd StringDictionary) MarshalJSON() ([]byte, error) { 13224 objectMap := make(map[string]interface{}) 13225 if sd.Properties != nil { 13226 objectMap["properties"] = sd.Properties 13227 } 13228 if sd.ID != nil { 13229 objectMap["id"] = sd.ID 13230 } 13231 if sd.Name != nil { 13232 objectMap["name"] = sd.Name 13233 } 13234 if sd.Kind != nil { 13235 objectMap["kind"] = sd.Kind 13236 } 13237 if sd.Location != nil { 13238 objectMap["location"] = sd.Location 13239 } 13240 if sd.Type != nil { 13241 objectMap["type"] = sd.Type 13242 } 13243 if sd.Tags != nil { 13244 objectMap["tags"] = sd.Tags 13245 } 13246 return json.Marshal(objectMap) 13247} 13248 13249// TldLegalAgreement represents a legal agreement for top level domain 13250type TldLegalAgreement struct { 13251 // AgreementKey - Unique identifier for the agreement 13252 AgreementKey *string `json:"agreementKey,omitempty"` 13253 // Title - Agreement title 13254 Title *string `json:"title,omitempty"` 13255 // Content - Agreement details 13256 Content *string `json:"content,omitempty"` 13257 // URL - Url where a copy of the agreement details is hosted 13258 URL *string `json:"url,omitempty"` 13259} 13260 13261// TldLegalAgreementCollection collection of Tld Legal Agreements 13262type TldLegalAgreementCollection struct { 13263 autorest.Response `json:"-"` 13264 // Value - Collection of resources 13265 Value *[]TldLegalAgreement `json:"value,omitempty"` 13266 // NextLink - Link to next page of resources 13267 NextLink *string `json:"nextLink,omitempty"` 13268} 13269 13270// TldLegalAgreementCollectionIterator provides access to a complete listing of TldLegalAgreement values. 13271type TldLegalAgreementCollectionIterator struct { 13272 i int 13273 page TldLegalAgreementCollectionPage 13274} 13275 13276// NextWithContext advances to the next value. If there was an error making 13277// the request the iterator does not advance and the error is returned. 13278func (iter *TldLegalAgreementCollectionIterator) NextWithContext(ctx context.Context) (err error) { 13279 if tracing.IsEnabled() { 13280 ctx = tracing.StartSpan(ctx, fqdn+"/TldLegalAgreementCollectionIterator.NextWithContext") 13281 defer func() { 13282 sc := -1 13283 if iter.Response().Response.Response != nil { 13284 sc = iter.Response().Response.Response.StatusCode 13285 } 13286 tracing.EndSpan(ctx, sc, err) 13287 }() 13288 } 13289 iter.i++ 13290 if iter.i < len(iter.page.Values()) { 13291 return nil 13292 } 13293 err = iter.page.NextWithContext(ctx) 13294 if err != nil { 13295 iter.i-- 13296 return err 13297 } 13298 iter.i = 0 13299 return nil 13300} 13301 13302// Next advances to the next value. If there was an error making 13303// the request the iterator does not advance and the error is returned. 13304// Deprecated: Use NextWithContext() instead. 13305func (iter *TldLegalAgreementCollectionIterator) Next() error { 13306 return iter.NextWithContext(context.Background()) 13307} 13308 13309// NotDone returns true if the enumeration should be started or is not yet complete. 13310func (iter TldLegalAgreementCollectionIterator) NotDone() bool { 13311 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13312} 13313 13314// Response returns the raw server response from the last page request. 13315func (iter TldLegalAgreementCollectionIterator) Response() TldLegalAgreementCollection { 13316 return iter.page.Response() 13317} 13318 13319// Value returns the current value or a zero-initialized value if the 13320// iterator has advanced beyond the end of the collection. 13321func (iter TldLegalAgreementCollectionIterator) Value() TldLegalAgreement { 13322 if !iter.page.NotDone() { 13323 return TldLegalAgreement{} 13324 } 13325 return iter.page.Values()[iter.i] 13326} 13327 13328// Creates a new instance of the TldLegalAgreementCollectionIterator type. 13329func NewTldLegalAgreementCollectionIterator(page TldLegalAgreementCollectionPage) TldLegalAgreementCollectionIterator { 13330 return TldLegalAgreementCollectionIterator{page: page} 13331} 13332 13333// IsEmpty returns true if the ListResult contains no values. 13334func (tlac TldLegalAgreementCollection) IsEmpty() bool { 13335 return tlac.Value == nil || len(*tlac.Value) == 0 13336} 13337 13338// tldLegalAgreementCollectionPreparer prepares a request to retrieve the next set of results. 13339// It returns nil if no more results exist. 13340func (tlac TldLegalAgreementCollection) tldLegalAgreementCollectionPreparer(ctx context.Context) (*http.Request, error) { 13341 if tlac.NextLink == nil || len(to.String(tlac.NextLink)) < 1 { 13342 return nil, nil 13343 } 13344 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13345 autorest.AsJSON(), 13346 autorest.AsGet(), 13347 autorest.WithBaseURL(to.String(tlac.NextLink))) 13348} 13349 13350// TldLegalAgreementCollectionPage contains a page of TldLegalAgreement values. 13351type TldLegalAgreementCollectionPage struct { 13352 fn func(context.Context, TldLegalAgreementCollection) (TldLegalAgreementCollection, error) 13353 tlac TldLegalAgreementCollection 13354} 13355 13356// NextWithContext advances to the next page of values. If there was an error making 13357// the request the page does not advance and the error is returned. 13358func (page *TldLegalAgreementCollectionPage) NextWithContext(ctx context.Context) (err error) { 13359 if tracing.IsEnabled() { 13360 ctx = tracing.StartSpan(ctx, fqdn+"/TldLegalAgreementCollectionPage.NextWithContext") 13361 defer func() { 13362 sc := -1 13363 if page.Response().Response.Response != nil { 13364 sc = page.Response().Response.Response.StatusCode 13365 } 13366 tracing.EndSpan(ctx, sc, err) 13367 }() 13368 } 13369 next, err := page.fn(ctx, page.tlac) 13370 if err != nil { 13371 return err 13372 } 13373 page.tlac = next 13374 return nil 13375} 13376 13377// Next advances to the next page of values. If there was an error making 13378// the request the page does not advance and the error is returned. 13379// Deprecated: Use NextWithContext() instead. 13380func (page *TldLegalAgreementCollectionPage) Next() error { 13381 return page.NextWithContext(context.Background()) 13382} 13383 13384// NotDone returns true if the page enumeration should be started or is not yet complete. 13385func (page TldLegalAgreementCollectionPage) NotDone() bool { 13386 return !page.tlac.IsEmpty() 13387} 13388 13389// Response returns the raw server response from the last page request. 13390func (page TldLegalAgreementCollectionPage) Response() TldLegalAgreementCollection { 13391 return page.tlac 13392} 13393 13394// Values returns the slice of values for the current page or nil if there are no values. 13395func (page TldLegalAgreementCollectionPage) Values() []TldLegalAgreement { 13396 if page.tlac.IsEmpty() { 13397 return nil 13398 } 13399 return *page.tlac.Value 13400} 13401 13402// Creates a new instance of the TldLegalAgreementCollectionPage type. 13403func NewTldLegalAgreementCollectionPage(getNextPage func(context.Context, TldLegalAgreementCollection) (TldLegalAgreementCollection, error)) TldLegalAgreementCollectionPage { 13404 return TldLegalAgreementCollectionPage{fn: getNextPage} 13405} 13406 13407// TopLevelDomain a top level domain object 13408type TopLevelDomain struct { 13409 autorest.Response `json:"-"` 13410 *TopLevelDomainProperties `json:"properties,omitempty"` 13411 // ID - Resource Id 13412 ID *string `json:"id,omitempty"` 13413 // Name - Resource Name 13414 Name *string `json:"name,omitempty"` 13415 // Kind - Kind of resource 13416 Kind *string `json:"kind,omitempty"` 13417 // Location - Resource Location 13418 Location *string `json:"location,omitempty"` 13419 // Type - Resource type 13420 Type *string `json:"type,omitempty"` 13421 // Tags - Resource tags 13422 Tags map[string]*string `json:"tags"` 13423} 13424 13425// MarshalJSON is the custom marshaler for TopLevelDomain. 13426func (tld TopLevelDomain) MarshalJSON() ([]byte, error) { 13427 objectMap := make(map[string]interface{}) 13428 if tld.TopLevelDomainProperties != nil { 13429 objectMap["properties"] = tld.TopLevelDomainProperties 13430 } 13431 if tld.ID != nil { 13432 objectMap["id"] = tld.ID 13433 } 13434 if tld.Name != nil { 13435 objectMap["name"] = tld.Name 13436 } 13437 if tld.Kind != nil { 13438 objectMap["kind"] = tld.Kind 13439 } 13440 if tld.Location != nil { 13441 objectMap["location"] = tld.Location 13442 } 13443 if tld.Type != nil { 13444 objectMap["type"] = tld.Type 13445 } 13446 if tld.Tags != nil { 13447 objectMap["tags"] = tld.Tags 13448 } 13449 return json.Marshal(objectMap) 13450} 13451 13452// UnmarshalJSON is the custom unmarshaler for TopLevelDomain struct. 13453func (tld *TopLevelDomain) UnmarshalJSON(body []byte) error { 13454 var m map[string]*json.RawMessage 13455 err := json.Unmarshal(body, &m) 13456 if err != nil { 13457 return err 13458 } 13459 for k, v := range m { 13460 switch k { 13461 case "properties": 13462 if v != nil { 13463 var topLevelDomainProperties TopLevelDomainProperties 13464 err = json.Unmarshal(*v, &topLevelDomainProperties) 13465 if err != nil { 13466 return err 13467 } 13468 tld.TopLevelDomainProperties = &topLevelDomainProperties 13469 } 13470 case "id": 13471 if v != nil { 13472 var ID string 13473 err = json.Unmarshal(*v, &ID) 13474 if err != nil { 13475 return err 13476 } 13477 tld.ID = &ID 13478 } 13479 case "name": 13480 if v != nil { 13481 var name string 13482 err = json.Unmarshal(*v, &name) 13483 if err != nil { 13484 return err 13485 } 13486 tld.Name = &name 13487 } 13488 case "kind": 13489 if v != nil { 13490 var kind string 13491 err = json.Unmarshal(*v, &kind) 13492 if err != nil { 13493 return err 13494 } 13495 tld.Kind = &kind 13496 } 13497 case "location": 13498 if v != nil { 13499 var location string 13500 err = json.Unmarshal(*v, &location) 13501 if err != nil { 13502 return err 13503 } 13504 tld.Location = &location 13505 } 13506 case "type": 13507 if v != nil { 13508 var typeVar string 13509 err = json.Unmarshal(*v, &typeVar) 13510 if err != nil { 13511 return err 13512 } 13513 tld.Type = &typeVar 13514 } 13515 case "tags": 13516 if v != nil { 13517 var tags map[string]*string 13518 err = json.Unmarshal(*v, &tags) 13519 if err != nil { 13520 return err 13521 } 13522 tld.Tags = tags 13523 } 13524 } 13525 } 13526 13527 return nil 13528} 13529 13530// TopLevelDomainAgreementOption options for retrieving the list of top level domain legal agreements 13531type TopLevelDomainAgreementOption struct { 13532 // IncludePrivacy - If true then the list of agreements will include agreements for domain privacy as well. 13533 IncludePrivacy *bool `json:"includePrivacy,omitempty"` 13534} 13535 13536// TopLevelDomainCollection collection of Top Level Domains 13537type TopLevelDomainCollection struct { 13538 autorest.Response `json:"-"` 13539 // Value - Collection of resources 13540 Value *[]TopLevelDomain `json:"value,omitempty"` 13541 // NextLink - Link to next page of resources 13542 NextLink *string `json:"nextLink,omitempty"` 13543} 13544 13545// TopLevelDomainCollectionIterator provides access to a complete listing of TopLevelDomain values. 13546type TopLevelDomainCollectionIterator struct { 13547 i int 13548 page TopLevelDomainCollectionPage 13549} 13550 13551// NextWithContext advances to the next value. If there was an error making 13552// the request the iterator does not advance and the error is returned. 13553func (iter *TopLevelDomainCollectionIterator) NextWithContext(ctx context.Context) (err error) { 13554 if tracing.IsEnabled() { 13555 ctx = tracing.StartSpan(ctx, fqdn+"/TopLevelDomainCollectionIterator.NextWithContext") 13556 defer func() { 13557 sc := -1 13558 if iter.Response().Response.Response != nil { 13559 sc = iter.Response().Response.Response.StatusCode 13560 } 13561 tracing.EndSpan(ctx, sc, err) 13562 }() 13563 } 13564 iter.i++ 13565 if iter.i < len(iter.page.Values()) { 13566 return nil 13567 } 13568 err = iter.page.NextWithContext(ctx) 13569 if err != nil { 13570 iter.i-- 13571 return err 13572 } 13573 iter.i = 0 13574 return nil 13575} 13576 13577// Next advances to the next value. If there was an error making 13578// the request the iterator does not advance and the error is returned. 13579// Deprecated: Use NextWithContext() instead. 13580func (iter *TopLevelDomainCollectionIterator) Next() error { 13581 return iter.NextWithContext(context.Background()) 13582} 13583 13584// NotDone returns true if the enumeration should be started or is not yet complete. 13585func (iter TopLevelDomainCollectionIterator) NotDone() bool { 13586 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13587} 13588 13589// Response returns the raw server response from the last page request. 13590func (iter TopLevelDomainCollectionIterator) Response() TopLevelDomainCollection { 13591 return iter.page.Response() 13592} 13593 13594// Value returns the current value or a zero-initialized value if the 13595// iterator has advanced beyond the end of the collection. 13596func (iter TopLevelDomainCollectionIterator) Value() TopLevelDomain { 13597 if !iter.page.NotDone() { 13598 return TopLevelDomain{} 13599 } 13600 return iter.page.Values()[iter.i] 13601} 13602 13603// Creates a new instance of the TopLevelDomainCollectionIterator type. 13604func NewTopLevelDomainCollectionIterator(page TopLevelDomainCollectionPage) TopLevelDomainCollectionIterator { 13605 return TopLevelDomainCollectionIterator{page: page} 13606} 13607 13608// IsEmpty returns true if the ListResult contains no values. 13609func (tldc TopLevelDomainCollection) IsEmpty() bool { 13610 return tldc.Value == nil || len(*tldc.Value) == 0 13611} 13612 13613// topLevelDomainCollectionPreparer prepares a request to retrieve the next set of results. 13614// It returns nil if no more results exist. 13615func (tldc TopLevelDomainCollection) topLevelDomainCollectionPreparer(ctx context.Context) (*http.Request, error) { 13616 if tldc.NextLink == nil || len(to.String(tldc.NextLink)) < 1 { 13617 return nil, nil 13618 } 13619 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13620 autorest.AsJSON(), 13621 autorest.AsGet(), 13622 autorest.WithBaseURL(to.String(tldc.NextLink))) 13623} 13624 13625// TopLevelDomainCollectionPage contains a page of TopLevelDomain values. 13626type TopLevelDomainCollectionPage struct { 13627 fn func(context.Context, TopLevelDomainCollection) (TopLevelDomainCollection, error) 13628 tldc TopLevelDomainCollection 13629} 13630 13631// NextWithContext advances to the next page of values. If there was an error making 13632// the request the page does not advance and the error is returned. 13633func (page *TopLevelDomainCollectionPage) NextWithContext(ctx context.Context) (err error) { 13634 if tracing.IsEnabled() { 13635 ctx = tracing.StartSpan(ctx, fqdn+"/TopLevelDomainCollectionPage.NextWithContext") 13636 defer func() { 13637 sc := -1 13638 if page.Response().Response.Response != nil { 13639 sc = page.Response().Response.Response.StatusCode 13640 } 13641 tracing.EndSpan(ctx, sc, err) 13642 }() 13643 } 13644 next, err := page.fn(ctx, page.tldc) 13645 if err != nil { 13646 return err 13647 } 13648 page.tldc = next 13649 return nil 13650} 13651 13652// Next advances to the next page of values. If there was an error making 13653// the request the page does not advance and the error is returned. 13654// Deprecated: Use NextWithContext() instead. 13655func (page *TopLevelDomainCollectionPage) Next() error { 13656 return page.NextWithContext(context.Background()) 13657} 13658 13659// NotDone returns true if the page enumeration should be started or is not yet complete. 13660func (page TopLevelDomainCollectionPage) NotDone() bool { 13661 return !page.tldc.IsEmpty() 13662} 13663 13664// Response returns the raw server response from the last page request. 13665func (page TopLevelDomainCollectionPage) Response() TopLevelDomainCollection { 13666 return page.tldc 13667} 13668 13669// Values returns the slice of values for the current page or nil if there are no values. 13670func (page TopLevelDomainCollectionPage) Values() []TopLevelDomain { 13671 if page.tldc.IsEmpty() { 13672 return nil 13673 } 13674 return *page.tldc.Value 13675} 13676 13677// Creates a new instance of the TopLevelDomainCollectionPage type. 13678func NewTopLevelDomainCollectionPage(getNextPage func(context.Context, TopLevelDomainCollection) (TopLevelDomainCollection, error)) TopLevelDomainCollectionPage { 13679 return TopLevelDomainCollectionPage{fn: getNextPage} 13680} 13681 13682// TopLevelDomainProperties ... 13683type TopLevelDomainProperties struct { 13684 // Name - Name of the top level domain 13685 Name *string `json:"name,omitempty"` 13686 // Privacy - If true then the top level domain supports domain privacy 13687 Privacy *bool `json:"privacy,omitempty"` 13688} 13689 13690// Usage class that represents usage of the quota resource. 13691type Usage struct { 13692 *UsageProperties `json:"properties,omitempty"` 13693 // ID - Resource Id 13694 ID *string `json:"id,omitempty"` 13695 // Name - Resource Name 13696 Name *string `json:"name,omitempty"` 13697 // Kind - Kind of resource 13698 Kind *string `json:"kind,omitempty"` 13699 // Location - Resource Location 13700 Location *string `json:"location,omitempty"` 13701 // Type - Resource type 13702 Type *string `json:"type,omitempty"` 13703 // Tags - Resource tags 13704 Tags map[string]*string `json:"tags"` 13705} 13706 13707// MarshalJSON is the custom marshaler for Usage. 13708func (u Usage) MarshalJSON() ([]byte, error) { 13709 objectMap := make(map[string]interface{}) 13710 if u.UsageProperties != nil { 13711 objectMap["properties"] = u.UsageProperties 13712 } 13713 if u.ID != nil { 13714 objectMap["id"] = u.ID 13715 } 13716 if u.Name != nil { 13717 objectMap["name"] = u.Name 13718 } 13719 if u.Kind != nil { 13720 objectMap["kind"] = u.Kind 13721 } 13722 if u.Location != nil { 13723 objectMap["location"] = u.Location 13724 } 13725 if u.Type != nil { 13726 objectMap["type"] = u.Type 13727 } 13728 if u.Tags != nil { 13729 objectMap["tags"] = u.Tags 13730 } 13731 return json.Marshal(objectMap) 13732} 13733 13734// UnmarshalJSON is the custom unmarshaler for Usage struct. 13735func (u *Usage) UnmarshalJSON(body []byte) error { 13736 var m map[string]*json.RawMessage 13737 err := json.Unmarshal(body, &m) 13738 if err != nil { 13739 return err 13740 } 13741 for k, v := range m { 13742 switch k { 13743 case "properties": 13744 if v != nil { 13745 var usageProperties UsageProperties 13746 err = json.Unmarshal(*v, &usageProperties) 13747 if err != nil { 13748 return err 13749 } 13750 u.UsageProperties = &usageProperties 13751 } 13752 case "id": 13753 if v != nil { 13754 var ID string 13755 err = json.Unmarshal(*v, &ID) 13756 if err != nil { 13757 return err 13758 } 13759 u.ID = &ID 13760 } 13761 case "name": 13762 if v != nil { 13763 var name string 13764 err = json.Unmarshal(*v, &name) 13765 if err != nil { 13766 return err 13767 } 13768 u.Name = &name 13769 } 13770 case "kind": 13771 if v != nil { 13772 var kind string 13773 err = json.Unmarshal(*v, &kind) 13774 if err != nil { 13775 return err 13776 } 13777 u.Kind = &kind 13778 } 13779 case "location": 13780 if v != nil { 13781 var location string 13782 err = json.Unmarshal(*v, &location) 13783 if err != nil { 13784 return err 13785 } 13786 u.Location = &location 13787 } 13788 case "type": 13789 if v != nil { 13790 var typeVar string 13791 err = json.Unmarshal(*v, &typeVar) 13792 if err != nil { 13793 return err 13794 } 13795 u.Type = &typeVar 13796 } 13797 case "tags": 13798 if v != nil { 13799 var tags map[string]*string 13800 err = json.Unmarshal(*v, &tags) 13801 if err != nil { 13802 return err 13803 } 13804 u.Tags = tags 13805 } 13806 } 13807 } 13808 13809 return nil 13810} 13811 13812// UsageCollection collection of usages 13813type UsageCollection struct { 13814 autorest.Response `json:"-"` 13815 // Value - Collection of resources 13816 Value *[]Usage `json:"value,omitempty"` 13817 // NextLink - Link to next page of resources 13818 NextLink *string `json:"nextLink,omitempty"` 13819} 13820 13821// UsageCollectionIterator provides access to a complete listing of Usage values. 13822type UsageCollectionIterator struct { 13823 i int 13824 page UsageCollectionPage 13825} 13826 13827// NextWithContext advances to the next value. If there was an error making 13828// the request the iterator does not advance and the error is returned. 13829func (iter *UsageCollectionIterator) NextWithContext(ctx context.Context) (err error) { 13830 if tracing.IsEnabled() { 13831 ctx = tracing.StartSpan(ctx, fqdn+"/UsageCollectionIterator.NextWithContext") 13832 defer func() { 13833 sc := -1 13834 if iter.Response().Response.Response != nil { 13835 sc = iter.Response().Response.Response.StatusCode 13836 } 13837 tracing.EndSpan(ctx, sc, err) 13838 }() 13839 } 13840 iter.i++ 13841 if iter.i < len(iter.page.Values()) { 13842 return nil 13843 } 13844 err = iter.page.NextWithContext(ctx) 13845 if err != nil { 13846 iter.i-- 13847 return err 13848 } 13849 iter.i = 0 13850 return nil 13851} 13852 13853// Next advances to the next value. If there was an error making 13854// the request the iterator does not advance and the error is returned. 13855// Deprecated: Use NextWithContext() instead. 13856func (iter *UsageCollectionIterator) Next() error { 13857 return iter.NextWithContext(context.Background()) 13858} 13859 13860// NotDone returns true if the enumeration should be started or is not yet complete. 13861func (iter UsageCollectionIterator) NotDone() bool { 13862 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13863} 13864 13865// Response returns the raw server response from the last page request. 13866func (iter UsageCollectionIterator) Response() UsageCollection { 13867 return iter.page.Response() 13868} 13869 13870// Value returns the current value or a zero-initialized value if the 13871// iterator has advanced beyond the end of the collection. 13872func (iter UsageCollectionIterator) Value() Usage { 13873 if !iter.page.NotDone() { 13874 return Usage{} 13875 } 13876 return iter.page.Values()[iter.i] 13877} 13878 13879// Creates a new instance of the UsageCollectionIterator type. 13880func NewUsageCollectionIterator(page UsageCollectionPage) UsageCollectionIterator { 13881 return UsageCollectionIterator{page: page} 13882} 13883 13884// IsEmpty returns true if the ListResult contains no values. 13885func (uc UsageCollection) IsEmpty() bool { 13886 return uc.Value == nil || len(*uc.Value) == 0 13887} 13888 13889// usageCollectionPreparer prepares a request to retrieve the next set of results. 13890// It returns nil if no more results exist. 13891func (uc UsageCollection) usageCollectionPreparer(ctx context.Context) (*http.Request, error) { 13892 if uc.NextLink == nil || len(to.String(uc.NextLink)) < 1 { 13893 return nil, nil 13894 } 13895 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13896 autorest.AsJSON(), 13897 autorest.AsGet(), 13898 autorest.WithBaseURL(to.String(uc.NextLink))) 13899} 13900 13901// UsageCollectionPage contains a page of Usage values. 13902type UsageCollectionPage struct { 13903 fn func(context.Context, UsageCollection) (UsageCollection, error) 13904 uc UsageCollection 13905} 13906 13907// NextWithContext advances to the next page of values. If there was an error making 13908// the request the page does not advance and the error is returned. 13909func (page *UsageCollectionPage) NextWithContext(ctx context.Context) (err error) { 13910 if tracing.IsEnabled() { 13911 ctx = tracing.StartSpan(ctx, fqdn+"/UsageCollectionPage.NextWithContext") 13912 defer func() { 13913 sc := -1 13914 if page.Response().Response.Response != nil { 13915 sc = page.Response().Response.Response.StatusCode 13916 } 13917 tracing.EndSpan(ctx, sc, err) 13918 }() 13919 } 13920 next, err := page.fn(ctx, page.uc) 13921 if err != nil { 13922 return err 13923 } 13924 page.uc = next 13925 return nil 13926} 13927 13928// Next advances to the next page of values. If there was an error making 13929// the request the page does not advance and the error is returned. 13930// Deprecated: Use NextWithContext() instead. 13931func (page *UsageCollectionPage) Next() error { 13932 return page.NextWithContext(context.Background()) 13933} 13934 13935// NotDone returns true if the page enumeration should be started or is not yet complete. 13936func (page UsageCollectionPage) NotDone() bool { 13937 return !page.uc.IsEmpty() 13938} 13939 13940// Response returns the raw server response from the last page request. 13941func (page UsageCollectionPage) Response() UsageCollection { 13942 return page.uc 13943} 13944 13945// Values returns the slice of values for the current page or nil if there are no values. 13946func (page UsageCollectionPage) Values() []Usage { 13947 if page.uc.IsEmpty() { 13948 return nil 13949 } 13950 return *page.uc.Value 13951} 13952 13953// Creates a new instance of the UsageCollectionPage type. 13954func NewUsageCollectionPage(getNextPage func(context.Context, UsageCollection) (UsageCollection, error)) UsageCollectionPage { 13955 return UsageCollectionPage{fn: getNextPage} 13956} 13957 13958// UsageProperties ... 13959type UsageProperties struct { 13960 // DisplayName - Friendly name shown in the UI 13961 DisplayName *string `json:"displayName,omitempty"` 13962 // Name - Name of the quota 13963 Name *string `json:"name,omitempty"` 13964 // ResourceName - Name of the quota resource 13965 ResourceName *string `json:"resourceName,omitempty"` 13966 // Unit - Units of measurement for the quota resource 13967 Unit *string `json:"unit,omitempty"` 13968 // CurrentValue - The current value of the resource counter 13969 CurrentValue *int64 `json:"currentValue,omitempty"` 13970 // Limit - The resource limit 13971 Limit *int64 `json:"limit,omitempty"` 13972 // NextResetTime - Next reset time for the resource counter 13973 NextResetTime *date.Time `json:"nextResetTime,omitempty"` 13974 // ComputeMode - ComputeMode used for this usage. Possible values include: 'Shared', 'Dedicated', 'Dynamic' 13975 ComputeMode ComputeModeOptions `json:"computeMode,omitempty"` 13976 // SiteMode - SiteMode used for this usage 13977 SiteMode *string `json:"siteMode,omitempty"` 13978} 13979 13980// User represents user credentials used for publishing activity 13981type User struct { 13982 autorest.Response `json:"-"` 13983 *UserProperties `json:"properties,omitempty"` 13984 // ID - Resource Id 13985 ID *string `json:"id,omitempty"` 13986 // Name - Resource Name 13987 Name *string `json:"name,omitempty"` 13988 // Kind - Kind of resource 13989 Kind *string `json:"kind,omitempty"` 13990 // Location - Resource Location 13991 Location *string `json:"location,omitempty"` 13992 // Type - Resource type 13993 Type *string `json:"type,omitempty"` 13994 // Tags - Resource tags 13995 Tags map[string]*string `json:"tags"` 13996} 13997 13998// MarshalJSON is the custom marshaler for User. 13999func (u User) MarshalJSON() ([]byte, error) { 14000 objectMap := make(map[string]interface{}) 14001 if u.UserProperties != nil { 14002 objectMap["properties"] = u.UserProperties 14003 } 14004 if u.ID != nil { 14005 objectMap["id"] = u.ID 14006 } 14007 if u.Name != nil { 14008 objectMap["name"] = u.Name 14009 } 14010 if u.Kind != nil { 14011 objectMap["kind"] = u.Kind 14012 } 14013 if u.Location != nil { 14014 objectMap["location"] = u.Location 14015 } 14016 if u.Type != nil { 14017 objectMap["type"] = u.Type 14018 } 14019 if u.Tags != nil { 14020 objectMap["tags"] = u.Tags 14021 } 14022 return json.Marshal(objectMap) 14023} 14024 14025// UnmarshalJSON is the custom unmarshaler for User struct. 14026func (u *User) UnmarshalJSON(body []byte) error { 14027 var m map[string]*json.RawMessage 14028 err := json.Unmarshal(body, &m) 14029 if err != nil { 14030 return err 14031 } 14032 for k, v := range m { 14033 switch k { 14034 case "properties": 14035 if v != nil { 14036 var userProperties UserProperties 14037 err = json.Unmarshal(*v, &userProperties) 14038 if err != nil { 14039 return err 14040 } 14041 u.UserProperties = &userProperties 14042 } 14043 case "id": 14044 if v != nil { 14045 var ID string 14046 err = json.Unmarshal(*v, &ID) 14047 if err != nil { 14048 return err 14049 } 14050 u.ID = &ID 14051 } 14052 case "name": 14053 if v != nil { 14054 var name string 14055 err = json.Unmarshal(*v, &name) 14056 if err != nil { 14057 return err 14058 } 14059 u.Name = &name 14060 } 14061 case "kind": 14062 if v != nil { 14063 var kind string 14064 err = json.Unmarshal(*v, &kind) 14065 if err != nil { 14066 return err 14067 } 14068 u.Kind = &kind 14069 } 14070 case "location": 14071 if v != nil { 14072 var location string 14073 err = json.Unmarshal(*v, &location) 14074 if err != nil { 14075 return err 14076 } 14077 u.Location = &location 14078 } 14079 case "type": 14080 if v != nil { 14081 var typeVar string 14082 err = json.Unmarshal(*v, &typeVar) 14083 if err != nil { 14084 return err 14085 } 14086 u.Type = &typeVar 14087 } 14088 case "tags": 14089 if v != nil { 14090 var tags map[string]*string 14091 err = json.Unmarshal(*v, &tags) 14092 if err != nil { 14093 return err 14094 } 14095 u.Tags = tags 14096 } 14097 } 14098 } 14099 14100 return nil 14101} 14102 14103// UserProperties ... 14104type UserProperties struct { 14105 // Name - Username (internal) 14106 Name *string `json:"name,omitempty"` 14107 // PublishingUserName - Username used for publishing 14108 PublishingUserName *string `json:"publishingUserName,omitempty"` 14109 // PublishingPassword - Password used for publishing 14110 PublishingPassword *string `json:"publishingPassword,omitempty"` 14111 // ScmURI - Service Control Manager URI, including username and password 14112 ScmURI *string `json:"scmUri,omitempty"` 14113} 14114 14115// VirtualApplication ... 14116type VirtualApplication struct { 14117 VirtualPath *string `json:"virtualPath,omitempty"` 14118 PhysicalPath *string `json:"physicalPath,omitempty"` 14119 PreloadEnabled *bool `json:"preloadEnabled,omitempty"` 14120 VirtualDirectories *[]VirtualDirectory `json:"virtualDirectories,omitempty"` 14121} 14122 14123// VirtualDirectory ... 14124type VirtualDirectory struct { 14125 VirtualPath *string `json:"virtualPath,omitempty"` 14126 PhysicalPath *string `json:"physicalPath,omitempty"` 14127} 14128 14129// VirtualIPMapping class that represents a VIP mapping 14130type VirtualIPMapping struct { 14131 // VirtualIP - Virtual IP address 14132 VirtualIP *string `json:"virtualIP,omitempty"` 14133 // InternalHTTPPort - Internal HTTP port 14134 InternalHTTPPort *int32 `json:"internalHttpPort,omitempty"` 14135 // InternalHTTPSPort - Internal HTTPS port 14136 InternalHTTPSPort *int32 `json:"internalHttpsPort,omitempty"` 14137 // InUse - Is VIP mapping in use 14138 InUse *bool `json:"inUse,omitempty"` 14139} 14140 14141// VirtualNetworkProfile specification for using a virtual network 14142type VirtualNetworkProfile struct { 14143 // ID - Resource id of the virtual network 14144 ID *string `json:"id,omitempty"` 14145 // Name - Name of the virtual network (read-only) 14146 Name *string `json:"name,omitempty"` 14147 // Type - Resource type of the virtual network (read-only) 14148 Type *string `json:"type,omitempty"` 14149 // Subnet - Subnet within the virtual network 14150 Subnet *string `json:"subnet,omitempty"` 14151} 14152 14153// VnetGateway the VnetGateway contract. This is used to give the vnet gateway access to the VPN package. 14154type VnetGateway struct { 14155 autorest.Response `json:"-"` 14156 *VnetGatewayProperties `json:"properties,omitempty"` 14157 // ID - Resource Id 14158 ID *string `json:"id,omitempty"` 14159 // Name - Resource Name 14160 Name *string `json:"name,omitempty"` 14161 // Kind - Kind of resource 14162 Kind *string `json:"kind,omitempty"` 14163 // Location - Resource Location 14164 Location *string `json:"location,omitempty"` 14165 // Type - Resource type 14166 Type *string `json:"type,omitempty"` 14167 // Tags - Resource tags 14168 Tags map[string]*string `json:"tags"` 14169} 14170 14171// MarshalJSON is the custom marshaler for VnetGateway. 14172func (vg VnetGateway) MarshalJSON() ([]byte, error) { 14173 objectMap := make(map[string]interface{}) 14174 if vg.VnetGatewayProperties != nil { 14175 objectMap["properties"] = vg.VnetGatewayProperties 14176 } 14177 if vg.ID != nil { 14178 objectMap["id"] = vg.ID 14179 } 14180 if vg.Name != nil { 14181 objectMap["name"] = vg.Name 14182 } 14183 if vg.Kind != nil { 14184 objectMap["kind"] = vg.Kind 14185 } 14186 if vg.Location != nil { 14187 objectMap["location"] = vg.Location 14188 } 14189 if vg.Type != nil { 14190 objectMap["type"] = vg.Type 14191 } 14192 if vg.Tags != nil { 14193 objectMap["tags"] = vg.Tags 14194 } 14195 return json.Marshal(objectMap) 14196} 14197 14198// UnmarshalJSON is the custom unmarshaler for VnetGateway struct. 14199func (vg *VnetGateway) UnmarshalJSON(body []byte) error { 14200 var m map[string]*json.RawMessage 14201 err := json.Unmarshal(body, &m) 14202 if err != nil { 14203 return err 14204 } 14205 for k, v := range m { 14206 switch k { 14207 case "properties": 14208 if v != nil { 14209 var vnetGatewayProperties VnetGatewayProperties 14210 err = json.Unmarshal(*v, &vnetGatewayProperties) 14211 if err != nil { 14212 return err 14213 } 14214 vg.VnetGatewayProperties = &vnetGatewayProperties 14215 } 14216 case "id": 14217 if v != nil { 14218 var ID string 14219 err = json.Unmarshal(*v, &ID) 14220 if err != nil { 14221 return err 14222 } 14223 vg.ID = &ID 14224 } 14225 case "name": 14226 if v != nil { 14227 var name string 14228 err = json.Unmarshal(*v, &name) 14229 if err != nil { 14230 return err 14231 } 14232 vg.Name = &name 14233 } 14234 case "kind": 14235 if v != nil { 14236 var kind string 14237 err = json.Unmarshal(*v, &kind) 14238 if err != nil { 14239 return err 14240 } 14241 vg.Kind = &kind 14242 } 14243 case "location": 14244 if v != nil { 14245 var location string 14246 err = json.Unmarshal(*v, &location) 14247 if err != nil { 14248 return err 14249 } 14250 vg.Location = &location 14251 } 14252 case "type": 14253 if v != nil { 14254 var typeVar string 14255 err = json.Unmarshal(*v, &typeVar) 14256 if err != nil { 14257 return err 14258 } 14259 vg.Type = &typeVar 14260 } 14261 case "tags": 14262 if v != nil { 14263 var tags map[string]*string 14264 err = json.Unmarshal(*v, &tags) 14265 if err != nil { 14266 return err 14267 } 14268 vg.Tags = tags 14269 } 14270 } 14271 } 14272 14273 return nil 14274} 14275 14276// VnetGatewayProperties ... 14277type VnetGatewayProperties struct { 14278 // VnetName - The VNET name. 14279 VnetName *string `json:"vnetName,omitempty"` 14280 // VpnPackageURI - The URI where the Vpn package can be downloaded 14281 VpnPackageURI *string `json:"vpnPackageUri,omitempty"` 14282} 14283 14284// VnetInfo vNETInfo contract. This contract is public and is a stripped down version of VNETInfoInternal 14285type VnetInfo struct { 14286 autorest.Response `json:"-"` 14287 *VnetInfoProperties `json:"properties,omitempty"` 14288 // ID - Resource Id 14289 ID *string `json:"id,omitempty"` 14290 // Name - Resource Name 14291 Name *string `json:"name,omitempty"` 14292 // Kind - Kind of resource 14293 Kind *string `json:"kind,omitempty"` 14294 // Location - Resource Location 14295 Location *string `json:"location,omitempty"` 14296 // Type - Resource type 14297 Type *string `json:"type,omitempty"` 14298 // Tags - Resource tags 14299 Tags map[string]*string `json:"tags"` 14300} 14301 14302// MarshalJSON is the custom marshaler for VnetInfo. 14303func (vi VnetInfo) MarshalJSON() ([]byte, error) { 14304 objectMap := make(map[string]interface{}) 14305 if vi.VnetInfoProperties != nil { 14306 objectMap["properties"] = vi.VnetInfoProperties 14307 } 14308 if vi.ID != nil { 14309 objectMap["id"] = vi.ID 14310 } 14311 if vi.Name != nil { 14312 objectMap["name"] = vi.Name 14313 } 14314 if vi.Kind != nil { 14315 objectMap["kind"] = vi.Kind 14316 } 14317 if vi.Location != nil { 14318 objectMap["location"] = vi.Location 14319 } 14320 if vi.Type != nil { 14321 objectMap["type"] = vi.Type 14322 } 14323 if vi.Tags != nil { 14324 objectMap["tags"] = vi.Tags 14325 } 14326 return json.Marshal(objectMap) 14327} 14328 14329// UnmarshalJSON is the custom unmarshaler for VnetInfo struct. 14330func (vi *VnetInfo) UnmarshalJSON(body []byte) error { 14331 var m map[string]*json.RawMessage 14332 err := json.Unmarshal(body, &m) 14333 if err != nil { 14334 return err 14335 } 14336 for k, v := range m { 14337 switch k { 14338 case "properties": 14339 if v != nil { 14340 var vnetInfoProperties VnetInfoProperties 14341 err = json.Unmarshal(*v, &vnetInfoProperties) 14342 if err != nil { 14343 return err 14344 } 14345 vi.VnetInfoProperties = &vnetInfoProperties 14346 } 14347 case "id": 14348 if v != nil { 14349 var ID string 14350 err = json.Unmarshal(*v, &ID) 14351 if err != nil { 14352 return err 14353 } 14354 vi.ID = &ID 14355 } 14356 case "name": 14357 if v != nil { 14358 var name string 14359 err = json.Unmarshal(*v, &name) 14360 if err != nil { 14361 return err 14362 } 14363 vi.Name = &name 14364 } 14365 case "kind": 14366 if v != nil { 14367 var kind string 14368 err = json.Unmarshal(*v, &kind) 14369 if err != nil { 14370 return err 14371 } 14372 vi.Kind = &kind 14373 } 14374 case "location": 14375 if v != nil { 14376 var location string 14377 err = json.Unmarshal(*v, &location) 14378 if err != nil { 14379 return err 14380 } 14381 vi.Location = &location 14382 } 14383 case "type": 14384 if v != nil { 14385 var typeVar string 14386 err = json.Unmarshal(*v, &typeVar) 14387 if err != nil { 14388 return err 14389 } 14390 vi.Type = &typeVar 14391 } 14392 case "tags": 14393 if v != nil { 14394 var tags map[string]*string 14395 err = json.Unmarshal(*v, &tags) 14396 if err != nil { 14397 return err 14398 } 14399 vi.Tags = tags 14400 } 14401 } 14402 } 14403 14404 return nil 14405} 14406 14407// VnetInfoProperties ... 14408type VnetInfoProperties struct { 14409 // VnetResourceID - The vnet resource id 14410 VnetResourceID *string `json:"vnetResourceId,omitempty"` 14411 // CertThumbprint - The client certificate thumbprint 14412 CertThumbprint *string `json:"certThumbprint,omitempty"` 14413 // CertBlob - A certificate file (.cer) blob containing the public key of the private key used to authenticate a 14414 // Point-To-Site VPN connection. 14415 CertBlob *string `json:"certBlob,omitempty"` 14416 // Routes - The routes that this virtual network connection uses. 14417 Routes *[]VnetRoute `json:"routes,omitempty"` 14418 // ResyncRequired - Flag to determine if a resync is required 14419 ResyncRequired *bool `json:"resyncRequired,omitempty"` 14420 // DNSServers - Dns servers to be used by this VNET. This should be a comma-separated list of IP addresses. 14421 DNSServers *string `json:"dnsServers,omitempty"` 14422} 14423 14424// VnetRoute vnetRoute contract used to pass routing information for a vnet. 14425type VnetRoute struct { 14426 autorest.Response `json:"-"` 14427 *VnetRouteProperties `json:"properties,omitempty"` 14428 // ID - Resource Id 14429 ID *string `json:"id,omitempty"` 14430 // Name - Resource Name 14431 Name *string `json:"name,omitempty"` 14432 // Kind - Kind of resource 14433 Kind *string `json:"kind,omitempty"` 14434 // Location - Resource Location 14435 Location *string `json:"location,omitempty"` 14436 // Type - Resource type 14437 Type *string `json:"type,omitempty"` 14438 // Tags - Resource tags 14439 Tags map[string]*string `json:"tags"` 14440} 14441 14442// MarshalJSON is the custom marshaler for VnetRoute. 14443func (vr VnetRoute) MarshalJSON() ([]byte, error) { 14444 objectMap := make(map[string]interface{}) 14445 if vr.VnetRouteProperties != nil { 14446 objectMap["properties"] = vr.VnetRouteProperties 14447 } 14448 if vr.ID != nil { 14449 objectMap["id"] = vr.ID 14450 } 14451 if vr.Name != nil { 14452 objectMap["name"] = vr.Name 14453 } 14454 if vr.Kind != nil { 14455 objectMap["kind"] = vr.Kind 14456 } 14457 if vr.Location != nil { 14458 objectMap["location"] = vr.Location 14459 } 14460 if vr.Type != nil { 14461 objectMap["type"] = vr.Type 14462 } 14463 if vr.Tags != nil { 14464 objectMap["tags"] = vr.Tags 14465 } 14466 return json.Marshal(objectMap) 14467} 14468 14469// UnmarshalJSON is the custom unmarshaler for VnetRoute struct. 14470func (vr *VnetRoute) UnmarshalJSON(body []byte) error { 14471 var m map[string]*json.RawMessage 14472 err := json.Unmarshal(body, &m) 14473 if err != nil { 14474 return err 14475 } 14476 for k, v := range m { 14477 switch k { 14478 case "properties": 14479 if v != nil { 14480 var vnetRouteProperties VnetRouteProperties 14481 err = json.Unmarshal(*v, &vnetRouteProperties) 14482 if err != nil { 14483 return err 14484 } 14485 vr.VnetRouteProperties = &vnetRouteProperties 14486 } 14487 case "id": 14488 if v != nil { 14489 var ID string 14490 err = json.Unmarshal(*v, &ID) 14491 if err != nil { 14492 return err 14493 } 14494 vr.ID = &ID 14495 } 14496 case "name": 14497 if v != nil { 14498 var name string 14499 err = json.Unmarshal(*v, &name) 14500 if err != nil { 14501 return err 14502 } 14503 vr.Name = &name 14504 } 14505 case "kind": 14506 if v != nil { 14507 var kind string 14508 err = json.Unmarshal(*v, &kind) 14509 if err != nil { 14510 return err 14511 } 14512 vr.Kind = &kind 14513 } 14514 case "location": 14515 if v != nil { 14516 var location string 14517 err = json.Unmarshal(*v, &location) 14518 if err != nil { 14519 return err 14520 } 14521 vr.Location = &location 14522 } 14523 case "type": 14524 if v != nil { 14525 var typeVar string 14526 err = json.Unmarshal(*v, &typeVar) 14527 if err != nil { 14528 return err 14529 } 14530 vr.Type = &typeVar 14531 } 14532 case "tags": 14533 if v != nil { 14534 var tags map[string]*string 14535 err = json.Unmarshal(*v, &tags) 14536 if err != nil { 14537 return err 14538 } 14539 vr.Tags = tags 14540 } 14541 } 14542 } 14543 14544 return nil 14545} 14546 14547// VnetRouteProperties ... 14548type VnetRouteProperties struct { 14549 // Name - The name of this route. This is only returned by the server and does not need to be set by the client. 14550 Name *string `json:"name,omitempty"` 14551 // StartAddress - The starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified. 14552 StartAddress *string `json:"startAddress,omitempty"` 14553 // EndAddress - The ending address for this route. If the start address is specified in CIDR notation, this must be omitted. 14554 EndAddress *string `json:"endAddress,omitempty"` 14555 // RouteType - The type of route this is: 14556 // DEFAULT - By default, every web app has routes to the local address ranges specified by RFC1918 14557 // INHERITED - Routes inherited from the real Virtual Network routes 14558 // STATIC - Static route set on the web app only 14559 // 14560 // 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 14561 // with new INHERITED routes. 14562 RouteType *string `json:"routeType,omitempty"` 14563} 14564 14565// WorkerPool worker pool of a hostingEnvironment (App Service Environment) 14566type WorkerPool struct { 14567 autorest.Response `json:"-"` 14568 *WorkerPoolProperties `json:"properties,omitempty"` 14569 Sku *SkuDescription `json:"sku,omitempty"` 14570 // ID - Resource Id 14571 ID *string `json:"id,omitempty"` 14572 // Name - Resource Name 14573 Name *string `json:"name,omitempty"` 14574 // Kind - Kind of resource 14575 Kind *string `json:"kind,omitempty"` 14576 // Location - Resource Location 14577 Location *string `json:"location,omitempty"` 14578 // Type - Resource type 14579 Type *string `json:"type,omitempty"` 14580 // Tags - Resource tags 14581 Tags map[string]*string `json:"tags"` 14582} 14583 14584// MarshalJSON is the custom marshaler for WorkerPool. 14585func (wp WorkerPool) MarshalJSON() ([]byte, error) { 14586 objectMap := make(map[string]interface{}) 14587 if wp.WorkerPoolProperties != nil { 14588 objectMap["properties"] = wp.WorkerPoolProperties 14589 } 14590 if wp.Sku != nil { 14591 objectMap["sku"] = wp.Sku 14592 } 14593 if wp.ID != nil { 14594 objectMap["id"] = wp.ID 14595 } 14596 if wp.Name != nil { 14597 objectMap["name"] = wp.Name 14598 } 14599 if wp.Kind != nil { 14600 objectMap["kind"] = wp.Kind 14601 } 14602 if wp.Location != nil { 14603 objectMap["location"] = wp.Location 14604 } 14605 if wp.Type != nil { 14606 objectMap["type"] = wp.Type 14607 } 14608 if wp.Tags != nil { 14609 objectMap["tags"] = wp.Tags 14610 } 14611 return json.Marshal(objectMap) 14612} 14613 14614// UnmarshalJSON is the custom unmarshaler for WorkerPool struct. 14615func (wp *WorkerPool) UnmarshalJSON(body []byte) error { 14616 var m map[string]*json.RawMessage 14617 err := json.Unmarshal(body, &m) 14618 if err != nil { 14619 return err 14620 } 14621 for k, v := range m { 14622 switch k { 14623 case "properties": 14624 if v != nil { 14625 var workerPoolProperties WorkerPoolProperties 14626 err = json.Unmarshal(*v, &workerPoolProperties) 14627 if err != nil { 14628 return err 14629 } 14630 wp.WorkerPoolProperties = &workerPoolProperties 14631 } 14632 case "sku": 14633 if v != nil { 14634 var sku SkuDescription 14635 err = json.Unmarshal(*v, &sku) 14636 if err != nil { 14637 return err 14638 } 14639 wp.Sku = &sku 14640 } 14641 case "id": 14642 if v != nil { 14643 var ID string 14644 err = json.Unmarshal(*v, &ID) 14645 if err != nil { 14646 return err 14647 } 14648 wp.ID = &ID 14649 } 14650 case "name": 14651 if v != nil { 14652 var name string 14653 err = json.Unmarshal(*v, &name) 14654 if err != nil { 14655 return err 14656 } 14657 wp.Name = &name 14658 } 14659 case "kind": 14660 if v != nil { 14661 var kind string 14662 err = json.Unmarshal(*v, &kind) 14663 if err != nil { 14664 return err 14665 } 14666 wp.Kind = &kind 14667 } 14668 case "location": 14669 if v != nil { 14670 var location string 14671 err = json.Unmarshal(*v, &location) 14672 if err != nil { 14673 return err 14674 } 14675 wp.Location = &location 14676 } 14677 case "type": 14678 if v != nil { 14679 var typeVar string 14680 err = json.Unmarshal(*v, &typeVar) 14681 if err != nil { 14682 return err 14683 } 14684 wp.Type = &typeVar 14685 } 14686 case "tags": 14687 if v != nil { 14688 var tags map[string]*string 14689 err = json.Unmarshal(*v, &tags) 14690 if err != nil { 14691 return err 14692 } 14693 wp.Tags = tags 14694 } 14695 } 14696 } 14697 14698 return nil 14699} 14700 14701// WorkerPoolCollection collection of worker pools 14702type WorkerPoolCollection struct { 14703 autorest.Response `json:"-"` 14704 // Value - Collection of resources 14705 Value *[]WorkerPool `json:"value,omitempty"` 14706 // NextLink - Link to next page of resources 14707 NextLink *string `json:"nextLink,omitempty"` 14708} 14709 14710// WorkerPoolCollectionIterator provides access to a complete listing of WorkerPool values. 14711type WorkerPoolCollectionIterator struct { 14712 i int 14713 page WorkerPoolCollectionPage 14714} 14715 14716// NextWithContext advances to the next value. If there was an error making 14717// the request the iterator does not advance and the error is returned. 14718func (iter *WorkerPoolCollectionIterator) NextWithContext(ctx context.Context) (err error) { 14719 if tracing.IsEnabled() { 14720 ctx = tracing.StartSpan(ctx, fqdn+"/WorkerPoolCollectionIterator.NextWithContext") 14721 defer func() { 14722 sc := -1 14723 if iter.Response().Response.Response != nil { 14724 sc = iter.Response().Response.Response.StatusCode 14725 } 14726 tracing.EndSpan(ctx, sc, err) 14727 }() 14728 } 14729 iter.i++ 14730 if iter.i < len(iter.page.Values()) { 14731 return nil 14732 } 14733 err = iter.page.NextWithContext(ctx) 14734 if err != nil { 14735 iter.i-- 14736 return err 14737 } 14738 iter.i = 0 14739 return nil 14740} 14741 14742// Next advances to the next value. If there was an error making 14743// the request the iterator does not advance and the error is returned. 14744// Deprecated: Use NextWithContext() instead. 14745func (iter *WorkerPoolCollectionIterator) Next() error { 14746 return iter.NextWithContext(context.Background()) 14747} 14748 14749// NotDone returns true if the enumeration should be started or is not yet complete. 14750func (iter WorkerPoolCollectionIterator) NotDone() bool { 14751 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 14752} 14753 14754// Response returns the raw server response from the last page request. 14755func (iter WorkerPoolCollectionIterator) Response() WorkerPoolCollection { 14756 return iter.page.Response() 14757} 14758 14759// Value returns the current value or a zero-initialized value if the 14760// iterator has advanced beyond the end of the collection. 14761func (iter WorkerPoolCollectionIterator) Value() WorkerPool { 14762 if !iter.page.NotDone() { 14763 return WorkerPool{} 14764 } 14765 return iter.page.Values()[iter.i] 14766} 14767 14768// Creates a new instance of the WorkerPoolCollectionIterator type. 14769func NewWorkerPoolCollectionIterator(page WorkerPoolCollectionPage) WorkerPoolCollectionIterator { 14770 return WorkerPoolCollectionIterator{page: page} 14771} 14772 14773// IsEmpty returns true if the ListResult contains no values. 14774func (wpc WorkerPoolCollection) IsEmpty() bool { 14775 return wpc.Value == nil || len(*wpc.Value) == 0 14776} 14777 14778// workerPoolCollectionPreparer prepares a request to retrieve the next set of results. 14779// It returns nil if no more results exist. 14780func (wpc WorkerPoolCollection) workerPoolCollectionPreparer(ctx context.Context) (*http.Request, error) { 14781 if wpc.NextLink == nil || len(to.String(wpc.NextLink)) < 1 { 14782 return nil, nil 14783 } 14784 return autorest.Prepare((&http.Request{}).WithContext(ctx), 14785 autorest.AsJSON(), 14786 autorest.AsGet(), 14787 autorest.WithBaseURL(to.String(wpc.NextLink))) 14788} 14789 14790// WorkerPoolCollectionPage contains a page of WorkerPool values. 14791type WorkerPoolCollectionPage struct { 14792 fn func(context.Context, WorkerPoolCollection) (WorkerPoolCollection, error) 14793 wpc WorkerPoolCollection 14794} 14795 14796// NextWithContext advances to the next page of values. If there was an error making 14797// the request the page does not advance and the error is returned. 14798func (page *WorkerPoolCollectionPage) NextWithContext(ctx context.Context) (err error) { 14799 if tracing.IsEnabled() { 14800 ctx = tracing.StartSpan(ctx, fqdn+"/WorkerPoolCollectionPage.NextWithContext") 14801 defer func() { 14802 sc := -1 14803 if page.Response().Response.Response != nil { 14804 sc = page.Response().Response.Response.StatusCode 14805 } 14806 tracing.EndSpan(ctx, sc, err) 14807 }() 14808 } 14809 next, err := page.fn(ctx, page.wpc) 14810 if err != nil { 14811 return err 14812 } 14813 page.wpc = next 14814 return nil 14815} 14816 14817// Next advances to the next page of values. If there was an error making 14818// the request the page does not advance and the error is returned. 14819// Deprecated: Use NextWithContext() instead. 14820func (page *WorkerPoolCollectionPage) Next() error { 14821 return page.NextWithContext(context.Background()) 14822} 14823 14824// NotDone returns true if the page enumeration should be started or is not yet complete. 14825func (page WorkerPoolCollectionPage) NotDone() bool { 14826 return !page.wpc.IsEmpty() 14827} 14828 14829// Response returns the raw server response from the last page request. 14830func (page WorkerPoolCollectionPage) Response() WorkerPoolCollection { 14831 return page.wpc 14832} 14833 14834// Values returns the slice of values for the current page or nil if there are no values. 14835func (page WorkerPoolCollectionPage) Values() []WorkerPool { 14836 if page.wpc.IsEmpty() { 14837 return nil 14838 } 14839 return *page.wpc.Value 14840} 14841 14842// Creates a new instance of the WorkerPoolCollectionPage type. 14843func NewWorkerPoolCollectionPage(getNextPage func(context.Context, WorkerPoolCollection) (WorkerPoolCollection, error)) WorkerPoolCollectionPage { 14844 return WorkerPoolCollectionPage{fn: getNextPage} 14845} 14846 14847// WorkerPoolProperties ... 14848type WorkerPoolProperties struct { 14849 // WorkerSizeID - Worker size id for referencing this worker pool 14850 WorkerSizeID *int32 `json:"workerSizeId,omitempty"` 14851 // ComputeMode - Shared or dedicated web app hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic' 14852 ComputeMode ComputeModeOptions `json:"computeMode,omitempty"` 14853 // WorkerSize - VM size of the worker pool instances 14854 WorkerSize *string `json:"workerSize,omitempty"` 14855 // WorkerCount - Number of instances in the worker pool 14856 WorkerCount *int32 `json:"workerCount,omitempty"` 14857 // InstanceNames - Names of all instances in the worker pool (read only) 14858 InstanceNames *[]string `json:"instanceNames,omitempty"` 14859} 14860