diff --git a/profiles/preview/datamigration/mgmt/datamigration/models.go b/profiles/preview/datamigration/mgmt/datamigration/models.go index 1cb4538e451f..60ea5041adff 100644 --- a/profiles/preview/datamigration/mgmt/datamigration/models.go +++ b/profiles/preview/datamigration/mgmt/datamigration/models.go @@ -39,6 +39,55 @@ const ( WindowsAuthentication AuthenticationType = original.WindowsAuthentication ) +type BackupFileStatus = original.BackupFileStatus + +const ( + Arrived BackupFileStatus = original.Arrived + Cancelled BackupFileStatus = original.Cancelled + Queued BackupFileStatus = original.Queued + Restored BackupFileStatus = original.Restored + Restoring BackupFileStatus = original.Restoring + Uploaded BackupFileStatus = original.Uploaded + Uploading BackupFileStatus = original.Uploading +) + +type BackupMode = original.BackupMode + +const ( + CreateBackup BackupMode = original.CreateBackup + ExistingBackup BackupMode = original.ExistingBackup +) + +type BackupType = original.BackupType + +const ( + BackupTypeDatabase BackupType = original.BackupTypeDatabase + BackupTypeDifferentialDatabase BackupType = original.BackupTypeDifferentialDatabase + BackupTypeDifferentialFile BackupType = original.BackupTypeDifferentialFile + BackupTypeDifferentialPartial BackupType = original.BackupTypeDifferentialPartial + BackupTypeFile BackupType = original.BackupTypeFile + BackupTypePartial BackupType = original.BackupTypePartial + BackupTypeTransactionLog BackupType = original.BackupTypeTransactionLog +) + +type CommandState = original.CommandState + +const ( + Accepted CommandState = original.Accepted + Failed CommandState = original.Failed + Running CommandState = original.Running + Succeeded CommandState = original.Succeeded + Unknown CommandState = original.Unknown +) + +type CommandType = original.CommandType + +const ( + CommandTypeMigrateSQLServerAzureDbSQLMiComplete CommandType = original.CommandTypeMigrateSQLServerAzureDbSQLMiComplete + CommandTypeMigrateSyncCompleteDatabase CommandType = original.CommandTypeMigrateSyncCompleteDatabase + CommandTypeUnknown CommandType = original.CommandTypeUnknown +) + type DatabaseCompatLevel = original.DatabaseCompatLevel const ( @@ -72,18 +121,33 @@ const ( DatabaseMigrationStageRestore DatabaseMigrationStage = original.DatabaseMigrationStageRestore ) +type DatabaseMigrationState = original.DatabaseMigrationState + +const ( + CANCELLED DatabaseMigrationState = original.CANCELLED + COMPLETED DatabaseMigrationState = original.COMPLETED + CUTOVERSTART DatabaseMigrationState = original.CUTOVERSTART + FAILED DatabaseMigrationState = original.FAILED + FULLBACKUPUPLOADSTART DatabaseMigrationState = original.FULLBACKUPUPLOADSTART + INITIAL DatabaseMigrationState = original.INITIAL + LOGSHIPPINGSTART DatabaseMigrationState = original.LOGSHIPPINGSTART + POSTCUTOVERCOMPLETE DatabaseMigrationState = original.POSTCUTOVERCOMPLETE + UNDEFINED DatabaseMigrationState = original.UNDEFINED + UPLOADLOGFILESSTART DatabaseMigrationState = original.UPLOADLOGFILESSTART +) + type DatabaseState = original.DatabaseState const ( - Copying DatabaseState = original.Copying - Emergency DatabaseState = original.Emergency - Offline DatabaseState = original.Offline - OfflineSecondary DatabaseState = original.OfflineSecondary - Online DatabaseState = original.Online - Recovering DatabaseState = original.Recovering - RecoveryPending DatabaseState = original.RecoveryPending - Restoring DatabaseState = original.Restoring - Suspect DatabaseState = original.Suspect + DatabaseStateCopying DatabaseState = original.DatabaseStateCopying + DatabaseStateEmergency DatabaseState = original.DatabaseStateEmergency + DatabaseStateOffline DatabaseState = original.DatabaseStateOffline + DatabaseStateOfflineSecondary DatabaseState = original.DatabaseStateOfflineSecondary + DatabaseStateOnline DatabaseState = original.DatabaseStateOnline + DatabaseStateRecovering DatabaseState = original.DatabaseStateRecovering + DatabaseStateRecoveryPending DatabaseState = original.DatabaseStateRecoveryPending + DatabaseStateRestoring DatabaseState = original.DatabaseStateRestoring + DatabaseStateSuspect DatabaseState = original.DatabaseStateSuspect ) type ErrorType = original.ErrorType @@ -147,6 +211,13 @@ const ( MigrationStatusStopped MigrationStatus = original.MigrationStatusStopped ) +type MySQLTargetPlatformType = original.MySQLTargetPlatformType + +const ( + AzureDbForMySQL MySQLTargetPlatformType = original.AzureDbForMySQL + SQLServer MySQLTargetPlatformType = original.SQLServer +) + type NameCheckFailureReason = original.NameCheckFailureReason const ( @@ -167,15 +238,15 @@ const ( type ProjectProvisioningState = original.ProjectProvisioningState const ( - Deleting ProjectProvisioningState = original.Deleting - Succeeded ProjectProvisioningState = original.Succeeded + ProjectProvisioningStateDeleting ProjectProvisioningState = original.ProjectProvisioningStateDeleting + ProjectProvisioningStateSucceeded ProjectProvisioningState = original.ProjectProvisioningStateSucceeded ) type ProjectSourcePlatform = original.ProjectSourcePlatform const ( - SQL ProjectSourcePlatform = original.SQL - Unknown ProjectSourcePlatform = original.Unknown + ProjectSourcePlatformSQL ProjectSourcePlatform = original.ProjectSourcePlatformSQL + ProjectSourcePlatformUnknown ProjectSourcePlatform = original.ProjectSourcePlatformUnknown ) type ProjectTargetPlatform = original.ProjectTargetPlatform @@ -206,16 +277,26 @@ const ( Location ResourceSkuRestrictionsType = original.Location ) +type ResultCode = original.ResultCode + +const ( + Completed ResultCode = original.Completed + FatalError ResultCode = original.FatalError + Initial ResultCode = original.Initial + ObjectNotExistsInSource ResultCode = original.ObjectNotExistsInSource + ObjectNotExistsInTarget ResultCode = original.ObjectNotExistsInTarget + TargetObjectIsInaccessible ResultCode = original.TargetObjectIsInaccessible +) + type ResultType = original.ResultType const ( - ResultTypeDatabaseLevelOutput ResultType = original.ResultTypeDatabaseLevelOutput - ResultTypeErrorOutput ResultType = original.ResultTypeErrorOutput - ResultTypeMigrateSQLServerSQLDbTaskOutput ResultType = original.ResultTypeMigrateSQLServerSQLDbTaskOutput - ResultTypeMigrationDatabaseLevelValidationOutput ResultType = original.ResultTypeMigrationDatabaseLevelValidationOutput - ResultTypeMigrationLevelOutput ResultType = original.ResultTypeMigrationLevelOutput - ResultTypeMigrationValidationOutput ResultType = original.ResultTypeMigrationValidationOutput - ResultTypeTableLevelOutput ResultType = original.ResultTypeTableLevelOutput + ResultTypeDatabaseLevelErrorOutput ResultType = original.ResultTypeDatabaseLevelErrorOutput + ResultTypeDatabaseLevelOutput ResultType = original.ResultTypeDatabaseLevelOutput + ResultTypeErrorOutput ResultType = original.ResultTypeErrorOutput + ResultTypeMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput ResultType = original.ResultTypeMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput + ResultTypeMigrationLevelOutput ResultType = original.ResultTypeMigrationLevelOutput + ResultTypeTableLevelOutput ResultType = original.ResultTypeTableLevelOutput ) type ResultTypeBasicConnectToSourceSQLServerTaskOutput = original.ResultTypeBasicConnectToSourceSQLServerTaskOutput @@ -228,11 +309,88 @@ const ( ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput ResultTypeBasicConnectToSourceSQLServerTaskOutput = original.ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput ) +type ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = original.ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput + +const ( + ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelErrorOutput ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = original.ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelErrorOutput + ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelOutput ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = original.ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelOutput + ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeErrorOutput ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = original.ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeErrorOutput + ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrateMySQLAzureDbForMySQLSyncTaskOutput ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = original.ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrateMySQLAzureDbForMySQLSyncTaskOutput + ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrationLevelOutput ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = original.ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrationLevelOutput + ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeTableLevelOutput ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = original.ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeTableLevelOutput +) + +type ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput + +const ( + ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelErrorOutput ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelErrorOutput + ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelOutput ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelOutput + ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeErrorOutput ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeErrorOutput + ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrateSQLServerSQLDbSyncTaskOutput ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrateSQLServerSQLDbSyncTaskOutput + ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrationLevelOutput ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrationLevelOutput + ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeTableLevelOutput ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeTableLevelOutput +) + +type ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbTaskOutput + +const ( + ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput + ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput + ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput + ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationDatabaseLevelValidationOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationDatabaseLevelValidationOutput + ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput + ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationValidationOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationValidationOutput + ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput +) + +type ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput + +const ( + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput +) + +type ResultTypeBasicMigrateSQLServerSQLMITaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMITaskOutput + +const ( + ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput ResultTypeBasicMigrateSQLServerSQLMITaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput + ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput ResultTypeBasicMigrateSQLServerSQLMITaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput + ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput ResultTypeBasicMigrateSQLServerSQLMITaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput + ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput ResultTypeBasicMigrateSQLServerSQLMITaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput + ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput ResultTypeBasicMigrateSQLServerSQLMITaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput + ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput ResultTypeBasicMigrateSQLServerSQLMITaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput +) + +type SQLSourcePlatform = original.SQLSourcePlatform + +const ( + SQLOnPrem SQLSourcePlatform = original.SQLOnPrem +) + +type SchemaMigrationStage = original.SchemaMigrationStage + +const ( + SchemaMigrationStageCollectingObjects SchemaMigrationStage = original.SchemaMigrationStageCollectingObjects + SchemaMigrationStageCompleted SchemaMigrationStage = original.SchemaMigrationStageCompleted + SchemaMigrationStageCompletedWithWarnings SchemaMigrationStage = original.SchemaMigrationStageCompletedWithWarnings + SchemaMigrationStageDeployingSchema SchemaMigrationStage = original.SchemaMigrationStageDeployingSchema + SchemaMigrationStageDownloadingScript SchemaMigrationStage = original.SchemaMigrationStageDownloadingScript + SchemaMigrationStageFailed SchemaMigrationStage = original.SchemaMigrationStageFailed + SchemaMigrationStageGeneratingScript SchemaMigrationStage = original.SchemaMigrationStageGeneratingScript + SchemaMigrationStageNotStarted SchemaMigrationStage = original.SchemaMigrationStageNotStarted + SchemaMigrationStageUploadingScript SchemaMigrationStage = original.SchemaMigrationStageUploadingScript + SchemaMigrationStageValidatingInputs SchemaMigrationStage = original.SchemaMigrationStageValidatingInputs +) + type ServerLevelPermissionsGroup = original.ServerLevelPermissionsGroup const ( - Default ServerLevelPermissionsGroup = original.Default - MigrationFromSQLServerToAzureDB ServerLevelPermissionsGroup = original.MigrationFromSQLServerToAzureDB + Default ServerLevelPermissionsGroup = original.Default + MigrationFromMySQLToAzureDBForMySQL ServerLevelPermissionsGroup = original.MigrationFromMySQLToAzureDBForMySQL + MigrationFromSQLServerToAzureDB ServerLevelPermissionsGroup = original.MigrationFromSQLServerToAzureDB + MigrationFromSQLServerToAzureMI ServerLevelPermissionsGroup = original.MigrationFromSQLServerToAzureMI ) type ServiceProvisioningState = original.ServiceProvisioningState @@ -266,6 +424,33 @@ const ( SeverityWarning Severity = original.SeverityWarning ) +type SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingState + +const ( + SyncDatabaseMigrationReportingStateCANCELLED SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateCANCELLED + SyncDatabaseMigrationReportingStateCANCELLING SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateCANCELLING + SyncDatabaseMigrationReportingStateCOMPLETE SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateCOMPLETE + SyncDatabaseMigrationReportingStateCOMPLETING SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateCOMPLETING + SyncDatabaseMigrationReportingStateCONFIGURING SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateCONFIGURING + SyncDatabaseMigrationReportingStateFAILED SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateFAILED + SyncDatabaseMigrationReportingStateINITIALIAZING SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateINITIALIAZING + SyncDatabaseMigrationReportingStateREADYTOCOMPLETE SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateREADYTOCOMPLETE + SyncDatabaseMigrationReportingStateRUNNING SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateRUNNING + SyncDatabaseMigrationReportingStateSTARTING SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateSTARTING + SyncDatabaseMigrationReportingStateUNDEFINED SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateUNDEFINED +) + +type SyncTableMigrationState = original.SyncTableMigrationState + +const ( + SyncTableMigrationStateBEFORELOAD SyncTableMigrationState = original.SyncTableMigrationStateBEFORELOAD + SyncTableMigrationStateCANCELED SyncTableMigrationState = original.SyncTableMigrationStateCANCELED + SyncTableMigrationStateCOMPLETED SyncTableMigrationState = original.SyncTableMigrationStateCOMPLETED + SyncTableMigrationStateERROR SyncTableMigrationState = original.SyncTableMigrationStateERROR + SyncTableMigrationStateFAILED SyncTableMigrationState = original.SyncTableMigrationStateFAILED + SyncTableMigrationStateFULLLOAD SyncTableMigrationState = original.SyncTableMigrationStateFULLLOAD +) + type TaskState = original.TaskState const ( @@ -282,18 +467,39 @@ const ( type TaskType = original.TaskType const ( - TaskTypeConnectToSourceSQLServer TaskType = original.TaskTypeConnectToSourceSQLServer - TaskTypeConnectToTargetSQLDb TaskType = original.TaskTypeConnectToTargetSQLDb - TaskTypeGetUserTablesSQL TaskType = original.TaskTypeGetUserTablesSQL - TaskTypeMigrateSQLServerSQLDb TaskType = original.TaskTypeMigrateSQLServerSQLDb - TaskTypeUnknown TaskType = original.TaskTypeUnknown + TaskTypeConnectToSourceMySQL TaskType = original.TaskTypeConnectToSourceMySQL + TaskTypeConnectToSourcePostgreSQLSync TaskType = original.TaskTypeConnectToSourcePostgreSQLSync + TaskTypeConnectToSourceSQLServer TaskType = original.TaskTypeConnectToSourceSQLServer + TaskTypeConnectToSourceSQLServerSync TaskType = original.TaskTypeConnectToSourceSQLServerSync + TaskTypeConnectToTargetAzureDbForMySQL TaskType = original.TaskTypeConnectToTargetAzureDbForMySQL + TaskTypeConnectToTargetAzureDbForPostgreSQLSync TaskType = original.TaskTypeConnectToTargetAzureDbForPostgreSQLSync + TaskTypeConnectToTargetAzureSQLDbMI TaskType = original.TaskTypeConnectToTargetAzureSQLDbMI + TaskTypeConnectToTargetAzureSQLDbMISyncLRS TaskType = original.TaskTypeConnectToTargetAzureSQLDbMISyncLRS + TaskTypeConnectToTargetSQLDb TaskType = original.TaskTypeConnectToTargetSQLDb + TaskTypeConnectToTargetSQLDbSync TaskType = original.TaskTypeConnectToTargetSQLDbSync + TaskTypeGetTDECertificatesSQL TaskType = original.TaskTypeGetTDECertificatesSQL + TaskTypeGetUserTablesAzureSQLDbSync TaskType = original.TaskTypeGetUserTablesAzureSQLDbSync + TaskTypeGetUserTablesSQL TaskType = original.TaskTypeGetUserTablesSQL + TaskTypeMigrateMySQLAzureDbForMySQLSync TaskType = original.TaskTypeMigrateMySQLAzureDbForMySQLSync + TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync TaskType = original.TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync + TaskTypeMigrateSQLServerAzureSQLDbMI TaskType = original.TaskTypeMigrateSQLServerAzureSQLDbMI + TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS TaskType = original.TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS + TaskTypeMigrateSQLServerAzureSQLDbSync TaskType = original.TaskTypeMigrateSQLServerAzureSQLDbSync + TaskTypeMigrateSQLServerSQLDb TaskType = original.TaskTypeMigrateSQLServerSQLDb + TaskTypeUnknown TaskType = original.TaskTypeUnknown + TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI TaskType = original.TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI + TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS TaskType = original.TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS + TaskTypeValidateMigrationInputSQLServerSQLDbSync TaskType = original.TaskTypeValidateMigrationInputSQLServerSQLDbSync ) type Type = original.Type const ( - TypeSQLConnectionInfo Type = original.TypeSQLConnectionInfo - TypeUnknown Type = original.TypeUnknown + TypeMiSQLConnectionInfo Type = original.TypeMiSQLConnectionInfo + TypeMySQLConnectionInfo Type = original.TypeMySQLConnectionInfo + TypePostgreSQLConnectionInfo Type = original.TypePostgreSQLConnectionInfo + TypeSQLConnectionInfo Type = original.TypeSQLConnectionInfo + TypeUnknown Type = original.TypeUnknown ) type UpdateActionType = original.UpdateActionType @@ -321,12 +527,29 @@ type APIError = original.APIError type AvailableServiceSku = original.AvailableServiceSku type AvailableServiceSkuCapacity = original.AvailableServiceSkuCapacity type AvailableServiceSkuSku = original.AvailableServiceSkuSku +type AzureActiveDirectoryApp = original.AzureActiveDirectoryApp +type BackupFileInfo = original.BackupFileInfo +type BackupSetInfo = original.BackupSetInfo type BaseClient = original.BaseClient +type BasicCommandProperties = original.BasicCommandProperties type BasicConnectToSourceSQLServerTaskOutput = original.BasicConnectToSourceSQLServerTaskOutput type BasicConnectionInfo = original.BasicConnectionInfo +type BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = original.BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput +type BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput = original.BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput +type BasicMigrateSQLServerSQLDbSyncTaskOutput = original.BasicMigrateSQLServerSQLDbSyncTaskOutput type BasicMigrateSQLServerSQLDbTaskOutput = original.BasicMigrateSQLServerSQLDbTaskOutput +type BasicMigrateSQLServerSQLMISyncTaskOutput = original.BasicMigrateSQLServerSQLMISyncTaskOutput +type BasicMigrateSQLServerSQLMITaskOutput = original.BasicMigrateSQLServerSQLMITaskOutput type BasicProjectTaskProperties = original.BasicProjectTaskProperties type BlobShare = original.BlobShare +type CommandProperties = original.CommandProperties +type ConnectToSourceMySQLTaskInput = original.ConnectToSourceMySQLTaskInput +type ConnectToSourceMySQLTaskProperties = original.ConnectToSourceMySQLTaskProperties +type ConnectToSourceNonSQLTaskOutput = original.ConnectToSourceNonSQLTaskOutput +type ConnectToSourcePostgreSQLSyncTaskInput = original.ConnectToSourcePostgreSQLSyncTaskInput +type ConnectToSourcePostgreSQLSyncTaskOutput = original.ConnectToSourcePostgreSQLSyncTaskOutput +type ConnectToSourcePostgreSQLSyncTaskProperties = original.ConnectToSourcePostgreSQLSyncTaskProperties +type ConnectToSourceSQLServerSyncTaskProperties = original.ConnectToSourceSQLServerSyncTaskProperties type ConnectToSourceSQLServerTaskInput = original.ConnectToSourceSQLServerTaskInput type ConnectToSourceSQLServerTaskOutput = original.ConnectToSourceSQLServerTaskOutput type ConnectToSourceSQLServerTaskOutputAgentJobLevel = original.ConnectToSourceSQLServerTaskOutputAgentJobLevel @@ -334,13 +557,28 @@ type ConnectToSourceSQLServerTaskOutputDatabaseLevel = original.ConnectToSourceS type ConnectToSourceSQLServerTaskOutputLoginLevel = original.ConnectToSourceSQLServerTaskOutputLoginLevel type ConnectToSourceSQLServerTaskOutputTaskLevel = original.ConnectToSourceSQLServerTaskOutputTaskLevel type ConnectToSourceSQLServerTaskProperties = original.ConnectToSourceSQLServerTaskProperties +type ConnectToTargetAzureDbForMySQLTaskInput = original.ConnectToTargetAzureDbForMySQLTaskInput +type ConnectToTargetAzureDbForMySQLTaskOutput = original.ConnectToTargetAzureDbForMySQLTaskOutput +type ConnectToTargetAzureDbForMySQLTaskProperties = original.ConnectToTargetAzureDbForMySQLTaskProperties +type ConnectToTargetAzureDbForPostgreSQLSyncTaskInput = original.ConnectToTargetAzureDbForPostgreSQLSyncTaskInput +type ConnectToTargetAzureDbForPostgreSQLSyncTaskOutput = original.ConnectToTargetAzureDbForPostgreSQLSyncTaskOutput +type ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties = original.ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties type ConnectToTargetSQLDbTaskInput = original.ConnectToTargetSQLDbTaskInput type ConnectToTargetSQLDbTaskOutput = original.ConnectToTargetSQLDbTaskOutput type ConnectToTargetSQLDbTaskProperties = original.ConnectToTargetSQLDbTaskProperties +type ConnectToTargetSQLMISyncTaskInput = original.ConnectToTargetSQLMISyncTaskInput +type ConnectToTargetSQLMISyncTaskOutput = original.ConnectToTargetSQLMISyncTaskOutput +type ConnectToTargetSQLMISyncTaskProperties = original.ConnectToTargetSQLMISyncTaskProperties +type ConnectToTargetSQLMITaskInput = original.ConnectToTargetSQLMITaskInput +type ConnectToTargetSQLMITaskOutput = original.ConnectToTargetSQLMITaskOutput +type ConnectToTargetSQLMITaskProperties = original.ConnectToTargetSQLMITaskProperties +type ConnectToTargetSQLSQLDbSyncTaskInput = original.ConnectToTargetSQLSQLDbSyncTaskInput +type ConnectToTargetSQLSQLDbSyncTaskProperties = original.ConnectToTargetSQLSQLDbSyncTaskProperties type ConnectionInfo = original.ConnectionInfo type DataIntegrityValidationResult = original.DataIntegrityValidationResult type DataItemMigrationSummaryResult = original.DataItemMigrationSummaryResult type Database = original.Database +type DatabaseBackupInfo = original.DatabaseBackupInfo type DatabaseFileInfo = original.DatabaseFileInfo type DatabaseFileInput = original.DatabaseFileInput type DatabaseInfo = original.DatabaseInfo @@ -350,10 +588,48 @@ type DatabaseTable = original.DatabaseTable type Error = original.Error type ExecutionStatistics = original.ExecutionStatistics type FileShare = original.FileShare +type GetProjectDetailsNonSQLTaskInput = original.GetProjectDetailsNonSQLTaskInput +type GetTdeCertificatesSQLTaskInput = original.GetTdeCertificatesSQLTaskInput +type GetTdeCertificatesSQLTaskOutput = original.GetTdeCertificatesSQLTaskOutput +type GetTdeCertificatesSQLTaskProperties = original.GetTdeCertificatesSQLTaskProperties +type GetUserTablesSQLSyncTaskInput = original.GetUserTablesSQLSyncTaskInput +type GetUserTablesSQLSyncTaskOutput = original.GetUserTablesSQLSyncTaskOutput +type GetUserTablesSQLSyncTaskProperties = original.GetUserTablesSQLSyncTaskProperties type GetUserTablesSQLTaskInput = original.GetUserTablesSQLTaskInput type GetUserTablesSQLTaskOutput = original.GetUserTablesSQLTaskOutput type GetUserTablesSQLTaskProperties = original.GetUserTablesSQLTaskProperties +type MiSQLConnectionInfo = original.MiSQLConnectionInfo +type MigrateMISyncCompleteCommandInput = original.MigrateMISyncCompleteCommandInput +type MigrateMISyncCompleteCommandOutput = original.MigrateMISyncCompleteCommandOutput +type MigrateMISyncCompleteCommandProperties = original.MigrateMISyncCompleteCommandProperties +type MigrateMySQLAzureDbForMySQLSyncDatabaseInput = original.MigrateMySQLAzureDbForMySQLSyncDatabaseInput +type MigrateMySQLAzureDbForMySQLSyncTaskInput = original.MigrateMySQLAzureDbForMySQLSyncTaskInput +type MigrateMySQLAzureDbForMySQLSyncTaskOutput = original.MigrateMySQLAzureDbForMySQLSyncTaskOutput +type MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError = original.MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError +type MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel = original.MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel +type MigrateMySQLAzureDbForMySQLSyncTaskOutputError = original.MigrateMySQLAzureDbForMySQLSyncTaskOutputError +type MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel = original.MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel +type MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel = original.MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel +type MigrateMySQLAzureDbForMySQLSyncTaskProperties = original.MigrateMySQLAzureDbForMySQLSyncTaskProperties +type MigratePostgreSQLAzureDbForPostgreSQLSyncDatabaseInput = original.MigratePostgreSQLAzureDbForPostgreSQLSyncDatabaseInput +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskInput = original.MigratePostgreSQLAzureDbForPostgreSQLSyncTaskInput +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput = original.MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError = original.MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel = original.MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError = original.MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel = original.MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel = original.MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties = original.MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties type MigrateSQLServerSQLDbDatabaseInput = original.MigrateSQLServerSQLDbDatabaseInput +type MigrateSQLServerSQLDbSyncDatabaseInput = original.MigrateSQLServerSQLDbSyncDatabaseInput +type MigrateSQLServerSQLDbSyncTaskInput = original.MigrateSQLServerSQLDbSyncTaskInput +type MigrateSQLServerSQLDbSyncTaskOutput = original.MigrateSQLServerSQLDbSyncTaskOutput +type MigrateSQLServerSQLDbSyncTaskOutputDatabaseError = original.MigrateSQLServerSQLDbSyncTaskOutputDatabaseError +type MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel = original.MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel +type MigrateSQLServerSQLDbSyncTaskOutputError = original.MigrateSQLServerSQLDbSyncTaskOutputError +type MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel = original.MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel +type MigrateSQLServerSQLDbSyncTaskOutputTableLevel = original.MigrateSQLServerSQLDbSyncTaskOutputTableLevel +type MigrateSQLServerSQLDbSyncTaskProperties = original.MigrateSQLServerSQLDbSyncTaskProperties type MigrateSQLServerSQLDbTaskInput = original.MigrateSQLServerSQLDbTaskInput type MigrateSQLServerSQLDbTaskOutput = original.MigrateSQLServerSQLDbTaskOutput type MigrateSQLServerSQLDbTaskOutputDatabaseLevel = original.MigrateSQLServerSQLDbTaskOutputDatabaseLevel @@ -363,16 +639,41 @@ type MigrateSQLServerSQLDbTaskOutputMigrationLevel = original.MigrateSQLServerSQ type MigrateSQLServerSQLDbTaskOutputTableLevel = original.MigrateSQLServerSQLDbTaskOutputTableLevel type MigrateSQLServerSQLDbTaskOutputValidationResult = original.MigrateSQLServerSQLDbTaskOutputValidationResult type MigrateSQLServerSQLDbTaskProperties = original.MigrateSQLServerSQLDbTaskProperties +type MigrateSQLServerSQLMIDatabaseInput = original.MigrateSQLServerSQLMIDatabaseInput +type MigrateSQLServerSQLMISyncTaskInput = original.MigrateSQLServerSQLMISyncTaskInput +type MigrateSQLServerSQLMISyncTaskOutput = original.MigrateSQLServerSQLMISyncTaskOutput +type MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel = original.MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel +type MigrateSQLServerSQLMISyncTaskOutputError = original.MigrateSQLServerSQLMISyncTaskOutputError +type MigrateSQLServerSQLMISyncTaskOutputMigrationLevel = original.MigrateSQLServerSQLMISyncTaskOutputMigrationLevel +type MigrateSQLServerSQLMISyncTaskProperties = original.MigrateSQLServerSQLMISyncTaskProperties +type MigrateSQLServerSQLMITaskInput = original.MigrateSQLServerSQLMITaskInput +type MigrateSQLServerSQLMITaskOutput = original.MigrateSQLServerSQLMITaskOutput +type MigrateSQLServerSQLMITaskOutputAgentJobLevel = original.MigrateSQLServerSQLMITaskOutputAgentJobLevel +type MigrateSQLServerSQLMITaskOutputDatabaseLevel = original.MigrateSQLServerSQLMITaskOutputDatabaseLevel +type MigrateSQLServerSQLMITaskOutputError = original.MigrateSQLServerSQLMITaskOutputError +type MigrateSQLServerSQLMITaskOutputLoginLevel = original.MigrateSQLServerSQLMITaskOutputLoginLevel +type MigrateSQLServerSQLMITaskOutputMigrationLevel = original.MigrateSQLServerSQLMITaskOutputMigrationLevel +type MigrateSQLServerSQLMITaskProperties = original.MigrateSQLServerSQLMITaskProperties type MigrateSQLServerSQLServerDatabaseInput = original.MigrateSQLServerSQLServerDatabaseInput +type MigrateSyncCompleteCommandInput = original.MigrateSyncCompleteCommandInput +type MigrateSyncCompleteCommandOutput = original.MigrateSyncCompleteCommandOutput +type MigrateSyncCompleteCommandProperties = original.MigrateSyncCompleteCommandProperties type MigrationEligibilityInfo = original.MigrationEligibilityInfo type MigrationReportResult = original.MigrationReportResult type MigrationTableMetadata = original.MigrationTableMetadata type MigrationValidationDatabaseSummaryResult = original.MigrationValidationDatabaseSummaryResult type MigrationValidationOptions = original.MigrationValidationOptions +type MySQLConnectionInfo = original.MySQLConnectionInfo type NameAvailabilityRequest = original.NameAvailabilityRequest type NameAvailabilityResponse = original.NameAvailabilityResponse +type NonSQLDataMigrationTable = original.NonSQLDataMigrationTable +type NonSQLDataMigrationTableResult = original.NonSQLDataMigrationTableResult +type NonSQLMigrationTaskInput = original.NonSQLMigrationTaskInput +type NonSQLMigrationTaskOutput = original.NonSQLMigrationTaskOutput type ODataError = original.ODataError type OperationsClient = original.OperationsClient +type OrphanedUserInfo = original.OrphanedUserInfo +type PostgreSQLConnectionInfo = original.PostgreSQLConnectionInfo type Project = original.Project type ProjectList = original.ProjectList type ProjectListIterator = original.ProjectListIterator @@ -402,8 +703,11 @@ type ResourceSkusResultIterator = original.ResourceSkusResultIterator type ResourceSkusResultPage = original.ResourceSkusResultPage type SQLConnectionInfo = original.SQLConnectionInfo type SQLMigrationTaskInput = original.SQLMigrationTaskInput +type SQLServerSQLMISyncTaskInput = original.SQLServerSQLMISyncTaskInput type SchemaComparisonValidationResult = original.SchemaComparisonValidationResult type SchemaComparisonValidationResultType = original.SchemaComparisonValidationResultType +type SelectedCertificateInput = original.SelectedCertificateInput +type ServerProperties = original.ServerProperties type Service = original.Service type ServiceList = original.ServiceList type ServiceListIterator = original.ServiceListIterator @@ -426,12 +730,22 @@ type ServicesStartFuture = original.ServicesStartFuture type ServicesStopFuture = original.ServicesStopFuture type ServicesUpdateFuture = original.ServicesUpdateFuture type StartMigrationScenarioServerRoleResult = original.StartMigrationScenarioServerRoleResult +type SyncMigrationDatabaseErrorEvent = original.SyncMigrationDatabaseErrorEvent type TaskList = original.TaskList type TaskListIterator = original.TaskListIterator type TaskListPage = original.TaskListPage type TasksClient = original.TasksClient type TrackedResource = original.TrackedResource type UsagesClient = original.UsagesClient +type ValidateMigrationInputSQLServerSQLDbSyncTaskProperties = original.ValidateMigrationInputSQLServerSQLDbSyncTaskProperties +type ValidateMigrationInputSQLServerSQLMISyncTaskInput = original.ValidateMigrationInputSQLServerSQLMISyncTaskInput +type ValidateMigrationInputSQLServerSQLMISyncTaskOutput = original.ValidateMigrationInputSQLServerSQLMISyncTaskOutput +type ValidateMigrationInputSQLServerSQLMISyncTaskProperties = original.ValidateMigrationInputSQLServerSQLMISyncTaskProperties +type ValidateMigrationInputSQLServerSQLMITaskInput = original.ValidateMigrationInputSQLServerSQLMITaskInput +type ValidateMigrationInputSQLServerSQLMITaskOutput = original.ValidateMigrationInputSQLServerSQLMITaskOutput +type ValidateMigrationInputSQLServerSQLMITaskProperties = original.ValidateMigrationInputSQLServerSQLMITaskProperties +type ValidateSyncMigrationInputSQLServerTaskInput = original.ValidateSyncMigrationInputSQLServerTaskInput +type ValidateSyncMigrationInputSQLServerTaskOutput = original.ValidateSyncMigrationInputSQLServerTaskOutput type ValidationError = original.ValidationError type WaitStatistics = original.WaitStatistics @@ -522,6 +836,21 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func PossibleAuthenticationTypeValues() []AuthenticationType { return original.PossibleAuthenticationTypeValues() } +func PossibleBackupFileStatusValues() []BackupFileStatus { + return original.PossibleBackupFileStatusValues() +} +func PossibleBackupModeValues() []BackupMode { + return original.PossibleBackupModeValues() +} +func PossibleBackupTypeValues() []BackupType { + return original.PossibleBackupTypeValues() +} +func PossibleCommandStateValues() []CommandState { + return original.PossibleCommandStateValues() +} +func PossibleCommandTypeValues() []CommandType { + return original.PossibleCommandTypeValues() +} func PossibleDatabaseCompatLevelValues() []DatabaseCompatLevel { return original.PossibleDatabaseCompatLevelValues() } @@ -531,6 +860,9 @@ func PossibleDatabaseFileTypeValues() []DatabaseFileType { func PossibleDatabaseMigrationStageValues() []DatabaseMigrationStage { return original.PossibleDatabaseMigrationStageValues() } +func PossibleDatabaseMigrationStateValues() []DatabaseMigrationState { + return original.PossibleDatabaseMigrationStateValues() +} func PossibleDatabaseStateValues() []DatabaseState { return original.PossibleDatabaseStateValues() } @@ -549,6 +881,9 @@ func PossibleMigrationStateValues() []MigrationState { func PossibleMigrationStatusValues() []MigrationStatus { return original.PossibleMigrationStatusValues() } +func PossibleMySQLTargetPlatformTypeValues() []MySQLTargetPlatformType { + return original.PossibleMySQLTargetPlatformTypeValues() +} func PossibleNameCheckFailureReasonValues() []NameCheckFailureReason { return original.PossibleNameCheckFailureReasonValues() } @@ -573,12 +908,36 @@ func PossibleResourceSkuRestrictionsReasonCodeValues() []ResourceSkuRestrictions func PossibleResourceSkuRestrictionsTypeValues() []ResourceSkuRestrictionsType { return original.PossibleResourceSkuRestrictionsTypeValues() } +func PossibleResultCodeValues() []ResultCode { + return original.PossibleResultCodeValues() +} func PossibleResultTypeBasicConnectToSourceSQLServerTaskOutputValues() []ResultTypeBasicConnectToSourceSQLServerTaskOutput { return original.PossibleResultTypeBasicConnectToSourceSQLServerTaskOutputValues() } +func PossibleResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputValues() []ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput { + return original.PossibleResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputValues() +} +func PossibleResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputValues() []ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput { + return original.PossibleResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputValues() +} +func PossibleResultTypeBasicMigrateSQLServerSQLDbTaskOutputValues() []ResultTypeBasicMigrateSQLServerSQLDbTaskOutput { + return original.PossibleResultTypeBasicMigrateSQLServerSQLDbTaskOutputValues() +} +func PossibleResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputValues() []ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput { + return original.PossibleResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputValues() +} +func PossibleResultTypeBasicMigrateSQLServerSQLMITaskOutputValues() []ResultTypeBasicMigrateSQLServerSQLMITaskOutput { + return original.PossibleResultTypeBasicMigrateSQLServerSQLMITaskOutputValues() +} func PossibleResultTypeValues() []ResultType { return original.PossibleResultTypeValues() } +func PossibleSQLSourcePlatformValues() []SQLSourcePlatform { + return original.PossibleSQLSourcePlatformValues() +} +func PossibleSchemaMigrationStageValues() []SchemaMigrationStage { + return original.PossibleSchemaMigrationStageValues() +} func PossibleServerLevelPermissionsGroupValues() []ServerLevelPermissionsGroup { return original.PossibleServerLevelPermissionsGroupValues() } @@ -591,6 +950,12 @@ func PossibleServiceScalabilityValues() []ServiceScalability { func PossibleSeverityValues() []Severity { return original.PossibleSeverityValues() } +func PossibleSyncDatabaseMigrationReportingStateValues() []SyncDatabaseMigrationReportingState { + return original.PossibleSyncDatabaseMigrationReportingStateValues() +} +func PossibleSyncTableMigrationStateValues() []SyncTableMigrationState { + return original.PossibleSyncTableMigrationStateValues() +} func PossibleTaskStateValues() []TaskState { return original.PossibleTaskStateValues() } diff --git a/profiles/preview/preview/datamigration/mgmt/datamigration/models.go b/profiles/preview/preview/datamigration/mgmt/datamigration/models.go index f3d36f2bca27..55eb6ee15d46 100644 --- a/profiles/preview/preview/datamigration/mgmt/datamigration/models.go +++ b/profiles/preview/preview/datamigration/mgmt/datamigration/models.go @@ -39,6 +39,18 @@ const ( WindowsAuthentication AuthenticationType = original.WindowsAuthentication ) +type BackupFileStatus = original.BackupFileStatus + +const ( + Arrived BackupFileStatus = original.Arrived + Cancelled BackupFileStatus = original.Cancelled + Queued BackupFileStatus = original.Queued + Restored BackupFileStatus = original.Restored + Restoring BackupFileStatus = original.Restoring + Uploaded BackupFileStatus = original.Uploaded + Uploading BackupFileStatus = original.Uploading +) + type BackupMode = original.BackupMode const ( @@ -71,11 +83,12 @@ const ( type CommandType = original.CommandType const ( - CommandTypeCancel CommandType = original.CommandTypeCancel - CommandTypeFinish CommandType = original.CommandTypeFinish - CommandTypeMigrateSyncCompleteDatabase CommandType = original.CommandTypeMigrateSyncCompleteDatabase - CommandTypeRestart CommandType = original.CommandTypeRestart - CommandTypeUnknown CommandType = original.CommandTypeUnknown + CommandTypeCancel CommandType = original.CommandTypeCancel + CommandTypeFinish CommandType = original.CommandTypeFinish + CommandTypeMigrateSQLServerAzureDbSQLMiComplete CommandType = original.CommandTypeMigrateSQLServerAzureDbSQLMiComplete + CommandTypeMigrateSyncCompleteDatabase CommandType = original.CommandTypeMigrateSyncCompleteDatabase + CommandTypeRestart CommandType = original.CommandTypeRestart + CommandTypeUnknown CommandType = original.CommandTypeUnknown ) type DatabaseCompatLevel = original.DatabaseCompatLevel @@ -111,18 +124,33 @@ const ( DatabaseMigrationStageRestore DatabaseMigrationStage = original.DatabaseMigrationStageRestore ) +type DatabaseMigrationState = original.DatabaseMigrationState + +const ( + CANCELLED DatabaseMigrationState = original.CANCELLED + COMPLETED DatabaseMigrationState = original.COMPLETED + CUTOVERSTART DatabaseMigrationState = original.CUTOVERSTART + FAILED DatabaseMigrationState = original.FAILED + FULLBACKUPUPLOADSTART DatabaseMigrationState = original.FULLBACKUPUPLOADSTART + INITIAL DatabaseMigrationState = original.INITIAL + LOGSHIPPINGSTART DatabaseMigrationState = original.LOGSHIPPINGSTART + POSTCUTOVERCOMPLETE DatabaseMigrationState = original.POSTCUTOVERCOMPLETE + UNDEFINED DatabaseMigrationState = original.UNDEFINED + UPLOADLOGFILESSTART DatabaseMigrationState = original.UPLOADLOGFILESSTART +) + type DatabaseState = original.DatabaseState const ( - Copying DatabaseState = original.Copying - Emergency DatabaseState = original.Emergency - Offline DatabaseState = original.Offline - OfflineSecondary DatabaseState = original.OfflineSecondary - Online DatabaseState = original.Online - Recovering DatabaseState = original.Recovering - RecoveryPending DatabaseState = original.RecoveryPending - Restoring DatabaseState = original.Restoring - Suspect DatabaseState = original.Suspect + DatabaseStateCopying DatabaseState = original.DatabaseStateCopying + DatabaseStateEmergency DatabaseState = original.DatabaseStateEmergency + DatabaseStateOffline DatabaseState = original.DatabaseStateOffline + DatabaseStateOfflineSecondary DatabaseState = original.DatabaseStateOfflineSecondary + DatabaseStateOnline DatabaseState = original.DatabaseStateOnline + DatabaseStateRecovering DatabaseState = original.DatabaseStateRecovering + DatabaseStateRecoveryPending DatabaseState = original.DatabaseStateRecoveryPending + DatabaseStateRestoring DatabaseState = original.DatabaseStateRestoring + DatabaseStateSuspect DatabaseState = original.DatabaseStateSuspect ) type ErrorType = original.ErrorType @@ -238,6 +266,7 @@ type MySQLTargetPlatformType = original.MySQLTargetPlatformType const ( AzureDbForMySQL MySQLTargetPlatformType = original.AzureDbForMySQL + SQLServer MySQLTargetPlatformType = original.SQLServer ) type NameCheckFailureReason = original.NameCheckFailureReason @@ -378,6 +407,15 @@ const ( ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput ) +type ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput + +const ( + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput +) + type ResultTypeBasicMigrateSQLServerSQLMITaskOutput = original.ResultTypeBasicMigrateSQLServerSQLMITaskOutput const ( @@ -471,17 +509,17 @@ const ( type SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingState const ( - CANCELLED SyncDatabaseMigrationReportingState = original.CANCELLED - CANCELLING SyncDatabaseMigrationReportingState = original.CANCELLING - COMPLETE SyncDatabaseMigrationReportingState = original.COMPLETE - COMPLETING SyncDatabaseMigrationReportingState = original.COMPLETING - CONFIGURING SyncDatabaseMigrationReportingState = original.CONFIGURING - FAILED SyncDatabaseMigrationReportingState = original.FAILED - INITIALIAZING SyncDatabaseMigrationReportingState = original.INITIALIAZING - READYTOCOMPLETE SyncDatabaseMigrationReportingState = original.READYTOCOMPLETE - RUNNING SyncDatabaseMigrationReportingState = original.RUNNING - STARTING SyncDatabaseMigrationReportingState = original.STARTING - UNDEFINED SyncDatabaseMigrationReportingState = original.UNDEFINED + SyncDatabaseMigrationReportingStateCANCELLED SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateCANCELLED + SyncDatabaseMigrationReportingStateCANCELLING SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateCANCELLING + SyncDatabaseMigrationReportingStateCOMPLETE SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateCOMPLETE + SyncDatabaseMigrationReportingStateCOMPLETING SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateCOMPLETING + SyncDatabaseMigrationReportingStateCONFIGURING SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateCONFIGURING + SyncDatabaseMigrationReportingStateFAILED SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateFAILED + SyncDatabaseMigrationReportingStateINITIALIAZING SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateINITIALIAZING + SyncDatabaseMigrationReportingStateREADYTOCOMPLETE SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateREADYTOCOMPLETE + SyncDatabaseMigrationReportingStateRUNNING SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateRUNNING + SyncDatabaseMigrationReportingStateSTARTING SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateSTARTING + SyncDatabaseMigrationReportingStateUNDEFINED SyncDatabaseMigrationReportingState = original.SyncDatabaseMigrationReportingStateUNDEFINED ) type SyncTableMigrationState = original.SyncTableMigrationState @@ -511,33 +549,39 @@ const ( type TaskType = original.TaskType const ( - TaskTypeConnectMongoDb TaskType = original.TaskTypeConnectMongoDb - TaskTypeConnectToSourceMySQL TaskType = original.TaskTypeConnectToSourceMySQL - TaskTypeConnectToSourceSQLServer TaskType = original.TaskTypeConnectToSourceSQLServer - TaskTypeConnectToSourceSQLServerSync TaskType = original.TaskTypeConnectToSourceSQLServerSync - TaskTypeConnectToTargetAzureDbForMySQL TaskType = original.TaskTypeConnectToTargetAzureDbForMySQL - TaskTypeConnectToTargetAzureSQLDbMI TaskType = original.TaskTypeConnectToTargetAzureSQLDbMI - TaskTypeConnectToTargetSQLDb TaskType = original.TaskTypeConnectToTargetSQLDb - TaskTypeConnectToTargetSQLDbSync TaskType = original.TaskTypeConnectToTargetSQLDbSync - TaskTypeGetTDECertificatesSQL TaskType = original.TaskTypeGetTDECertificatesSQL - TaskTypeGetUserTablesAzureSQLDbSync TaskType = original.TaskTypeGetUserTablesAzureSQLDbSync - TaskTypeGetUserTablesSQL TaskType = original.TaskTypeGetUserTablesSQL - TaskTypeMigrateMongoDb TaskType = original.TaskTypeMigrateMongoDb - TaskTypeMigrateMySQLAzureDbForMySQLSync TaskType = original.TaskTypeMigrateMySQLAzureDbForMySQLSync - TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync TaskType = original.TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync - TaskTypeMigrateSchemaSQLServerSQLDb TaskType = original.TaskTypeMigrateSchemaSQLServerSQLDb - TaskTypeMigrateSQLServerAzureSQLDbMI TaskType = original.TaskTypeMigrateSQLServerAzureSQLDbMI - TaskTypeMigrateSQLServerAzureSQLDbSync TaskType = original.TaskTypeMigrateSQLServerAzureSQLDbSync - TaskTypeMigrateSQLServerSQLDb TaskType = original.TaskTypeMigrateSQLServerSQLDb - TaskTypeUnknown TaskType = original.TaskTypeUnknown - TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI TaskType = original.TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI - TaskTypeValidateMigrationInputSQLServerSQLDbSync TaskType = original.TaskTypeValidateMigrationInputSQLServerSQLDbSync - TaskTypeValidateMongoDb TaskType = original.TaskTypeValidateMongoDb + TaskTypeConnectMongoDb TaskType = original.TaskTypeConnectMongoDb + TaskTypeConnectToSourceMySQL TaskType = original.TaskTypeConnectToSourceMySQL + TaskTypeConnectToSourcePostgreSQLSync TaskType = original.TaskTypeConnectToSourcePostgreSQLSync + TaskTypeConnectToSourceSQLServer TaskType = original.TaskTypeConnectToSourceSQLServer + TaskTypeConnectToSourceSQLServerSync TaskType = original.TaskTypeConnectToSourceSQLServerSync + TaskTypeConnectToTargetAzureDbForMySQL TaskType = original.TaskTypeConnectToTargetAzureDbForMySQL + TaskTypeConnectToTargetAzureDbForPostgreSQLSync TaskType = original.TaskTypeConnectToTargetAzureDbForPostgreSQLSync + TaskTypeConnectToTargetAzureSQLDbMI TaskType = original.TaskTypeConnectToTargetAzureSQLDbMI + TaskTypeConnectToTargetAzureSQLDbMISyncLRS TaskType = original.TaskTypeConnectToTargetAzureSQLDbMISyncLRS + TaskTypeConnectToTargetSQLDb TaskType = original.TaskTypeConnectToTargetSQLDb + TaskTypeConnectToTargetSQLDbSync TaskType = original.TaskTypeConnectToTargetSQLDbSync + TaskTypeGetTDECertificatesSQL TaskType = original.TaskTypeGetTDECertificatesSQL + TaskTypeGetUserTablesAzureSQLDbSync TaskType = original.TaskTypeGetUserTablesAzureSQLDbSync + TaskTypeGetUserTablesSQL TaskType = original.TaskTypeGetUserTablesSQL + TaskTypeMigrateMongoDb TaskType = original.TaskTypeMigrateMongoDb + TaskTypeMigrateMySQLAzureDbForMySQLSync TaskType = original.TaskTypeMigrateMySQLAzureDbForMySQLSync + TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync TaskType = original.TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync + TaskTypeMigrateSchemaSQLServerSQLDb TaskType = original.TaskTypeMigrateSchemaSQLServerSQLDb + TaskTypeMigrateSQLServerAzureSQLDbMI TaskType = original.TaskTypeMigrateSQLServerAzureSQLDbMI + TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS TaskType = original.TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS + TaskTypeMigrateSQLServerAzureSQLDbSync TaskType = original.TaskTypeMigrateSQLServerAzureSQLDbSync + TaskTypeMigrateSQLServerSQLDb TaskType = original.TaskTypeMigrateSQLServerSQLDb + TaskTypeUnknown TaskType = original.TaskTypeUnknown + TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI TaskType = original.TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI + TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS TaskType = original.TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS + TaskTypeValidateMigrationInputSQLServerSQLDbSync TaskType = original.TaskTypeValidateMigrationInputSQLServerSQLDbSync + TaskTypeValidateMongoDb TaskType = original.TaskTypeValidateMongoDb ) type Type = original.Type const ( + TypeMiSQLConnectionInfo Type = original.TypeMiSQLConnectionInfo TypeMongoDbConnectionInfo Type = original.TypeMongoDbConnectionInfo TypeMySQLConnectionInfo Type = original.TypeMySQLConnectionInfo TypePostgreSQLConnectionInfo Type = original.TypePostgreSQLConnectionInfo @@ -570,6 +614,9 @@ type APIError = original.APIError type AvailableServiceSku = original.AvailableServiceSku type AvailableServiceSkuCapacity = original.AvailableServiceSkuCapacity type AvailableServiceSkuSku = original.AvailableServiceSkuSku +type AzureActiveDirectoryApp = original.AzureActiveDirectoryApp +type BackupFileInfo = original.BackupFileInfo +type BackupSetInfo = original.BackupSetInfo type BaseClient = original.BaseClient type BasicCommandProperties = original.BasicCommandProperties type BasicConnectToSourceSQLServerTaskOutput = original.BasicConnectToSourceSQLServerTaskOutput @@ -578,6 +625,7 @@ type BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = original.BasicMigrateMySQL type BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput = original.BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput type BasicMigrateSQLServerSQLDbSyncTaskOutput = original.BasicMigrateSQLServerSQLDbSyncTaskOutput type BasicMigrateSQLServerSQLDbTaskOutput = original.BasicMigrateSQLServerSQLDbTaskOutput +type BasicMigrateSQLServerSQLMISyncTaskOutput = original.BasicMigrateSQLServerSQLMISyncTaskOutput type BasicMigrateSQLServerSQLMITaskOutput = original.BasicMigrateSQLServerSQLMITaskOutput type BasicMigrateSchemaSQLServerSQLDbTaskOutput = original.BasicMigrateSchemaSQLServerSQLDbTaskOutput type BasicProjectTaskProperties = original.BasicProjectTaskProperties @@ -588,6 +636,9 @@ type ConnectToMongoDbTaskProperties = original.ConnectToMongoDbTaskProperties type ConnectToSourceMySQLTaskInput = original.ConnectToSourceMySQLTaskInput type ConnectToSourceMySQLTaskProperties = original.ConnectToSourceMySQLTaskProperties type ConnectToSourceNonSQLTaskOutput = original.ConnectToSourceNonSQLTaskOutput +type ConnectToSourcePostgreSQLSyncTaskInput = original.ConnectToSourcePostgreSQLSyncTaskInput +type ConnectToSourcePostgreSQLSyncTaskOutput = original.ConnectToSourcePostgreSQLSyncTaskOutput +type ConnectToSourcePostgreSQLSyncTaskProperties = original.ConnectToSourcePostgreSQLSyncTaskProperties type ConnectToSourceSQLServerSyncTaskProperties = original.ConnectToSourceSQLServerSyncTaskProperties type ConnectToSourceSQLServerTaskInput = original.ConnectToSourceSQLServerTaskInput type ConnectToSourceSQLServerTaskOutput = original.ConnectToSourceSQLServerTaskOutput @@ -599,9 +650,15 @@ type ConnectToSourceSQLServerTaskProperties = original.ConnectToSourceSQLServerT type ConnectToTargetAzureDbForMySQLTaskInput = original.ConnectToTargetAzureDbForMySQLTaskInput type ConnectToTargetAzureDbForMySQLTaskOutput = original.ConnectToTargetAzureDbForMySQLTaskOutput type ConnectToTargetAzureDbForMySQLTaskProperties = original.ConnectToTargetAzureDbForMySQLTaskProperties +type ConnectToTargetAzureDbForPostgreSQLSyncTaskInput = original.ConnectToTargetAzureDbForPostgreSQLSyncTaskInput +type ConnectToTargetAzureDbForPostgreSQLSyncTaskOutput = original.ConnectToTargetAzureDbForPostgreSQLSyncTaskOutput +type ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties = original.ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties type ConnectToTargetSQLDbTaskInput = original.ConnectToTargetSQLDbTaskInput type ConnectToTargetSQLDbTaskOutput = original.ConnectToTargetSQLDbTaskOutput type ConnectToTargetSQLDbTaskProperties = original.ConnectToTargetSQLDbTaskProperties +type ConnectToTargetSQLMISyncTaskInput = original.ConnectToTargetSQLMISyncTaskInput +type ConnectToTargetSQLMISyncTaskOutput = original.ConnectToTargetSQLMISyncTaskOutput +type ConnectToTargetSQLMISyncTaskProperties = original.ConnectToTargetSQLMISyncTaskProperties type ConnectToTargetSQLMITaskInput = original.ConnectToTargetSQLMITaskInput type ConnectToTargetSQLMITaskOutput = original.ConnectToTargetSQLMITaskOutput type ConnectToTargetSQLMITaskProperties = original.ConnectToTargetSQLMITaskProperties @@ -636,6 +693,10 @@ type GetUserTablesSQLSyncTaskProperties = original.GetUserTablesSQLSyncTaskPrope type GetUserTablesSQLTaskInput = original.GetUserTablesSQLTaskInput type GetUserTablesSQLTaskOutput = original.GetUserTablesSQLTaskOutput type GetUserTablesSQLTaskProperties = original.GetUserTablesSQLTaskProperties +type MiSQLConnectionInfo = original.MiSQLConnectionInfo +type MigrateMISyncCompleteCommandInput = original.MigrateMISyncCompleteCommandInput +type MigrateMISyncCompleteCommandOutput = original.MigrateMISyncCompleteCommandOutput +type MigrateMISyncCompleteCommandProperties = original.MigrateMISyncCompleteCommandProperties type MigrateMongoDbTaskProperties = original.MigrateMongoDbTaskProperties type MigrateMySQLAzureDbForMySQLSyncDatabaseInput = original.MigrateMySQLAzureDbForMySQLSyncDatabaseInput type MigrateMySQLAzureDbForMySQLSyncTaskInput = original.MigrateMySQLAzureDbForMySQLSyncTaskInput @@ -673,6 +734,12 @@ type MigrateSQLServerSQLDbTaskOutputMigrationLevel = original.MigrateSQLServerSQ type MigrateSQLServerSQLDbTaskOutputTableLevel = original.MigrateSQLServerSQLDbTaskOutputTableLevel type MigrateSQLServerSQLDbTaskProperties = original.MigrateSQLServerSQLDbTaskProperties type MigrateSQLServerSQLMIDatabaseInput = original.MigrateSQLServerSQLMIDatabaseInput +type MigrateSQLServerSQLMISyncTaskInput = original.MigrateSQLServerSQLMISyncTaskInput +type MigrateSQLServerSQLMISyncTaskOutput = original.MigrateSQLServerSQLMISyncTaskOutput +type MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel = original.MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel +type MigrateSQLServerSQLMISyncTaskOutputError = original.MigrateSQLServerSQLMISyncTaskOutputError +type MigrateSQLServerSQLMISyncTaskOutputMigrationLevel = original.MigrateSQLServerSQLMISyncTaskOutputMigrationLevel +type MigrateSQLServerSQLMISyncTaskProperties = original.MigrateSQLServerSQLMISyncTaskProperties type MigrateSQLServerSQLMITaskInput = original.MigrateSQLServerSQLMITaskInput type MigrateSQLServerSQLMITaskOutput = original.MigrateSQLServerSQLMITaskOutput type MigrateSQLServerSQLMITaskOutputAgentJobLevel = original.MigrateSQLServerSQLMITaskOutputAgentJobLevel @@ -731,6 +798,7 @@ type NonSQLMigrationTaskInput = original.NonSQLMigrationTaskInput type NonSQLMigrationTaskOutput = original.NonSQLMigrationTaskOutput type ODataError = original.ODataError type OperationsClient = original.OperationsClient +type OrphanedUserInfo = original.OrphanedUserInfo type PostgreSQLConnectionInfo = original.PostgreSQLConnectionInfo type Project = original.Project type ProjectFile = original.ProjectFile @@ -763,6 +831,7 @@ type ResourceSkusResultIterator = original.ResourceSkusResultIterator type ResourceSkusResultPage = original.ResourceSkusResultPage type SQLConnectionInfo = original.SQLConnectionInfo type SQLMigrationTaskInput = original.SQLMigrationTaskInput +type SQLServerSQLMISyncTaskInput = original.SQLServerSQLMISyncTaskInput type SchemaComparisonValidationResult = original.SchemaComparisonValidationResult type SchemaComparisonValidationResultType = original.SchemaComparisonValidationResultType type SchemaMigrationSetting = original.SchemaMigrationSetting @@ -798,6 +867,9 @@ type TasksClient = original.TasksClient type TrackedResource = original.TrackedResource type UsagesClient = original.UsagesClient type ValidateMigrationInputSQLServerSQLDbSyncTaskProperties = original.ValidateMigrationInputSQLServerSQLDbSyncTaskProperties +type ValidateMigrationInputSQLServerSQLMISyncTaskInput = original.ValidateMigrationInputSQLServerSQLMISyncTaskInput +type ValidateMigrationInputSQLServerSQLMISyncTaskOutput = original.ValidateMigrationInputSQLServerSQLMISyncTaskOutput +type ValidateMigrationInputSQLServerSQLMISyncTaskProperties = original.ValidateMigrationInputSQLServerSQLMISyncTaskProperties type ValidateMigrationInputSQLServerSQLMITaskInput = original.ValidateMigrationInputSQLServerSQLMITaskInput type ValidateMigrationInputSQLServerSQLMITaskOutput = original.ValidateMigrationInputSQLServerSQLMITaskOutput type ValidateMigrationInputSQLServerSQLMITaskProperties = original.ValidateMigrationInputSQLServerSQLMITaskProperties @@ -906,6 +978,9 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func PossibleAuthenticationTypeValues() []AuthenticationType { return original.PossibleAuthenticationTypeValues() } +func PossibleBackupFileStatusValues() []BackupFileStatus { + return original.PossibleBackupFileStatusValues() +} func PossibleBackupModeValues() []BackupMode { return original.PossibleBackupModeValues() } @@ -927,6 +1002,9 @@ func PossibleDatabaseFileTypeValues() []DatabaseFileType { func PossibleDatabaseMigrationStageValues() []DatabaseMigrationStage { return original.PossibleDatabaseMigrationStageValues() } +func PossibleDatabaseMigrationStateValues() []DatabaseMigrationState { + return original.PossibleDatabaseMigrationStateValues() +} func PossibleDatabaseStateValues() []DatabaseState { return original.PossibleDatabaseStateValues() } @@ -1005,6 +1083,9 @@ func PossibleResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputValues() []Result func PossibleResultTypeBasicMigrateSQLServerSQLDbTaskOutputValues() []ResultTypeBasicMigrateSQLServerSQLDbTaskOutput { return original.PossibleResultTypeBasicMigrateSQLServerSQLDbTaskOutputValues() } +func PossibleResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputValues() []ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput { + return original.PossibleResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputValues() +} func PossibleResultTypeBasicMigrateSQLServerSQLMITaskOutputValues() []ResultTypeBasicMigrateSQLServerSQLMITaskOutput { return original.PossibleResultTypeBasicMigrateSQLServerSQLMITaskOutputValues() } diff --git a/services/datamigration/mgmt/2018-04-19/datamigration/client.go b/services/datamigration/mgmt/2018-04-19/datamigration/client.go index 898cc1ada833..a32a8533f370 100644 --- a/services/datamigration/mgmt/2018-04-19/datamigration/client.go +++ b/services/datamigration/mgmt/2018-04-19/datamigration/client.go @@ -1,4 +1,4 @@ -// Package datamigration implements the Azure ARM Datamigration service API version 2018-04-19. +// Package datamigration implements the Azure ARM Datamigration service API version . // // Data Migration Client package datamigration diff --git a/services/datamigration/mgmt/2018-04-19/datamigration/models.go b/services/datamigration/mgmt/2018-04-19/datamigration/models.go index a1ccc9eac15a..6df6f2e897a2 100644 --- a/services/datamigration/mgmt/2018-04-19/datamigration/models.go +++ b/services/datamigration/mgmt/2018-04-19/datamigration/models.go @@ -52,6 +52,109 @@ func PossibleAuthenticationTypeValues() []AuthenticationType { return []AuthenticationType{ActiveDirectoryIntegrated, ActiveDirectoryPassword, None, SQLAuthentication, WindowsAuthentication} } +// BackupFileStatus enumerates the values for backup file status. +type BackupFileStatus string + +const ( + // Arrived ... + Arrived BackupFileStatus = "Arrived" + // Cancelled ... + Cancelled BackupFileStatus = "Cancelled" + // Queued ... + Queued BackupFileStatus = "Queued" + // Restored ... + Restored BackupFileStatus = "Restored" + // Restoring ... + Restoring BackupFileStatus = "Restoring" + // Uploaded ... + Uploaded BackupFileStatus = "Uploaded" + // Uploading ... + Uploading BackupFileStatus = "Uploading" +) + +// PossibleBackupFileStatusValues returns an array of possible values for the BackupFileStatus const type. +func PossibleBackupFileStatusValues() []BackupFileStatus { + return []BackupFileStatus{Arrived, Cancelled, Queued, Restored, Restoring, Uploaded, Uploading} +} + +// BackupMode enumerates the values for backup mode. +type BackupMode string + +const ( + // CreateBackup ... + CreateBackup BackupMode = "CreateBackup" + // ExistingBackup ... + ExistingBackup BackupMode = "ExistingBackup" +) + +// PossibleBackupModeValues returns an array of possible values for the BackupMode const type. +func PossibleBackupModeValues() []BackupMode { + return []BackupMode{CreateBackup, ExistingBackup} +} + +// BackupType enumerates the values for backup type. +type BackupType string + +const ( + // BackupTypeDatabase ... + BackupTypeDatabase BackupType = "Database" + // BackupTypeDifferentialDatabase ... + BackupTypeDifferentialDatabase BackupType = "DifferentialDatabase" + // BackupTypeDifferentialFile ... + BackupTypeDifferentialFile BackupType = "DifferentialFile" + // BackupTypeDifferentialPartial ... + BackupTypeDifferentialPartial BackupType = "DifferentialPartial" + // BackupTypeFile ... + BackupTypeFile BackupType = "File" + // BackupTypePartial ... + BackupTypePartial BackupType = "Partial" + // BackupTypeTransactionLog ... + BackupTypeTransactionLog BackupType = "TransactionLog" +) + +// PossibleBackupTypeValues returns an array of possible values for the BackupType const type. +func PossibleBackupTypeValues() []BackupType { + return []BackupType{BackupTypeDatabase, BackupTypeDifferentialDatabase, BackupTypeDifferentialFile, BackupTypeDifferentialPartial, BackupTypeFile, BackupTypePartial, BackupTypeTransactionLog} +} + +// CommandState enumerates the values for command state. +type CommandState string + +const ( + // Accepted ... + Accepted CommandState = "Accepted" + // Failed ... + Failed CommandState = "Failed" + // Running ... + Running CommandState = "Running" + // Succeeded ... + Succeeded CommandState = "Succeeded" + // Unknown ... + Unknown CommandState = "Unknown" +) + +// PossibleCommandStateValues returns an array of possible values for the CommandState const type. +func PossibleCommandStateValues() []CommandState { + return []CommandState{Accepted, Failed, Running, Succeeded, Unknown} +} + +// CommandType enumerates the values for command type. +type CommandType string + +const ( + // CommandTypeMigrateSQLServerAzureDbSQLMiComplete ... + CommandTypeMigrateSQLServerAzureDbSQLMiComplete CommandType = "Migrate.SqlServer.AzureDbSqlMi.Complete" + // CommandTypeMigrateSyncCompleteDatabase ... + CommandTypeMigrateSyncCompleteDatabase CommandType = "Migrate.Sync.Complete.Database" + // CommandTypeUnknown ... + CommandTypeUnknown CommandType = "Unknown" +) + +// PossibleCommandTypeValues returns an array of possible values for the CommandType const type. +func PossibleCommandTypeValues() []CommandType { + return []CommandType{CommandTypeMigrateSQLServerAzureDbSQLMiComplete, CommandTypeMigrateSyncCompleteDatabase, CommandTypeUnknown} +} + // DatabaseCompatLevel enumerates the values for database compat level. type DatabaseCompatLevel string @@ -121,33 +224,64 @@ func PossibleDatabaseMigrationStageValues() []DatabaseMigrationStage { return []DatabaseMigrationStage{DatabaseMigrationStageBackup, DatabaseMigrationStageCompleted, DatabaseMigrationStageFileCopy, DatabaseMigrationStageInitialize, DatabaseMigrationStageNone, DatabaseMigrationStageRestore} } +// DatabaseMigrationState enumerates the values for database migration state. +type DatabaseMigrationState string + +const ( + // CANCELLED ... + CANCELLED DatabaseMigrationState = "CANCELLED" + // COMPLETED ... + COMPLETED DatabaseMigrationState = "COMPLETED" + // CUTOVERSTART ... + CUTOVERSTART DatabaseMigrationState = "CUTOVER_START" + // FAILED ... + FAILED DatabaseMigrationState = "FAILED" + // FULLBACKUPUPLOADSTART ... + FULLBACKUPUPLOADSTART DatabaseMigrationState = "FULL_BACKUP_UPLOAD_START" + // INITIAL ... + INITIAL DatabaseMigrationState = "INITIAL" + // LOGSHIPPINGSTART ... + LOGSHIPPINGSTART DatabaseMigrationState = "LOG_SHIPPING_START" + // POSTCUTOVERCOMPLETE ... + POSTCUTOVERCOMPLETE DatabaseMigrationState = "POST_CUTOVER_COMPLETE" + // UNDEFINED ... + UNDEFINED DatabaseMigrationState = "UNDEFINED" + // UPLOADLOGFILESSTART ... + UPLOADLOGFILESSTART DatabaseMigrationState = "UPLOAD_LOG_FILES_START" +) + +// PossibleDatabaseMigrationStateValues returns an array of possible values for the DatabaseMigrationState const type. +func PossibleDatabaseMigrationStateValues() []DatabaseMigrationState { + return []DatabaseMigrationState{CANCELLED, COMPLETED, CUTOVERSTART, FAILED, FULLBACKUPUPLOADSTART, INITIAL, LOGSHIPPINGSTART, POSTCUTOVERCOMPLETE, UNDEFINED, UPLOADLOGFILESSTART} +} + // DatabaseState enumerates the values for database state. type DatabaseState string const ( - // Copying ... - Copying DatabaseState = "Copying" - // Emergency ... - Emergency DatabaseState = "Emergency" - // Offline ... - Offline DatabaseState = "Offline" - // OfflineSecondary ... - OfflineSecondary DatabaseState = "OfflineSecondary" - // Online ... - Online DatabaseState = "Online" - // Recovering ... - Recovering DatabaseState = "Recovering" - // RecoveryPending ... - RecoveryPending DatabaseState = "RecoveryPending" - // Restoring ... - Restoring DatabaseState = "Restoring" - // Suspect ... - Suspect DatabaseState = "Suspect" + // DatabaseStateCopying ... + DatabaseStateCopying DatabaseState = "Copying" + // DatabaseStateEmergency ... + DatabaseStateEmergency DatabaseState = "Emergency" + // DatabaseStateOffline ... + DatabaseStateOffline DatabaseState = "Offline" + // DatabaseStateOfflineSecondary ... + DatabaseStateOfflineSecondary DatabaseState = "OfflineSecondary" + // DatabaseStateOnline ... + DatabaseStateOnline DatabaseState = "Online" + // DatabaseStateRecovering ... + DatabaseStateRecovering DatabaseState = "Recovering" + // DatabaseStateRecoveryPending ... + DatabaseStateRecoveryPending DatabaseState = "RecoveryPending" + // DatabaseStateRestoring ... + DatabaseStateRestoring DatabaseState = "Restoring" + // DatabaseStateSuspect ... + DatabaseStateSuspect DatabaseState = "Suspect" ) // PossibleDatabaseStateValues returns an array of possible values for the DatabaseState const type. func PossibleDatabaseStateValues() []DatabaseState { - return []DatabaseState{Copying, Emergency, Offline, OfflineSecondary, Online, Recovering, RecoveryPending, Restoring, Suspect} + return []DatabaseState{DatabaseStateCopying, DatabaseStateEmergency, DatabaseStateOffline, DatabaseStateOfflineSecondary, DatabaseStateOnline, DatabaseStateRecovering, DatabaseStateRecoveryPending, DatabaseStateRestoring, DatabaseStateSuspect} } // ErrorType enumerates the values for error type. @@ -277,6 +411,21 @@ func PossibleMigrationStatusValues() []MigrationStatus { return []MigrationStatus{MigrationStatusCompleted, MigrationStatusCompletedWithWarnings, MigrationStatusConfigured, MigrationStatusConnecting, MigrationStatusDefault, MigrationStatusError, MigrationStatusRunning, MigrationStatusSelectLogins, MigrationStatusSourceAndTargetSelected, MigrationStatusStopped} } +// MySQLTargetPlatformType enumerates the values for my sql target platform type. +type MySQLTargetPlatformType string + +const ( + // AzureDbForMySQL ... + AzureDbForMySQL MySQLTargetPlatformType = "AzureDbForMySQL" + // SQLServer ... + SQLServer MySQLTargetPlatformType = "SqlServer" +) + +// PossibleMySQLTargetPlatformTypeValues returns an array of possible values for the MySQLTargetPlatformType const type. +func PossibleMySQLTargetPlatformTypeValues() []MySQLTargetPlatformType { + return []MySQLTargetPlatformType{AzureDbForMySQL, SQLServer} +} + // NameCheckFailureReason enumerates the values for name check failure reason. type NameCheckFailureReason string @@ -317,30 +466,30 @@ func PossibleObjectTypeValues() []ObjectType { type ProjectProvisioningState string const ( - // Deleting ... - Deleting ProjectProvisioningState = "Deleting" - // Succeeded ... - Succeeded ProjectProvisioningState = "Succeeded" + // ProjectProvisioningStateDeleting ... + ProjectProvisioningStateDeleting ProjectProvisioningState = "Deleting" + // ProjectProvisioningStateSucceeded ... + ProjectProvisioningStateSucceeded ProjectProvisioningState = "Succeeded" ) // PossibleProjectProvisioningStateValues returns an array of possible values for the ProjectProvisioningState const type. func PossibleProjectProvisioningStateValues() []ProjectProvisioningState { - return []ProjectProvisioningState{Deleting, Succeeded} + return []ProjectProvisioningState{ProjectProvisioningStateDeleting, ProjectProvisioningStateSucceeded} } // ProjectSourcePlatform enumerates the values for project source platform. type ProjectSourcePlatform string const ( - // SQL ... - SQL ProjectSourcePlatform = "SQL" - // Unknown ... - Unknown ProjectSourcePlatform = "Unknown" + // ProjectSourcePlatformSQL ... + ProjectSourcePlatformSQL ProjectSourcePlatform = "SQL" + // ProjectSourcePlatformUnknown ... + ProjectSourcePlatformUnknown ProjectSourcePlatform = "Unknown" ) // PossibleProjectSourcePlatformValues returns an array of possible values for the ProjectSourcePlatform const type. func PossibleProjectSourcePlatformValues() []ProjectSourcePlatform { - return []ProjectSourcePlatform{SQL, Unknown} + return []ProjectSourcePlatform{ProjectSourcePlatformSQL, ProjectSourcePlatformUnknown} } // ProjectTargetPlatform enumerates the values for project target platform. @@ -403,29 +552,50 @@ func PossibleResourceSkuRestrictionsTypeValues() []ResourceSkuRestrictionsType { return []ResourceSkuRestrictionsType{Location} } +// ResultCode enumerates the values for result code. +type ResultCode string + +const ( + // Completed ... + Completed ResultCode = "Completed" + // FatalError ... + FatalError ResultCode = "FatalError" + // Initial ... + Initial ResultCode = "Initial" + // ObjectNotExistsInSource ... + ObjectNotExistsInSource ResultCode = "ObjectNotExistsInSource" + // ObjectNotExistsInTarget ... + ObjectNotExistsInTarget ResultCode = "ObjectNotExistsInTarget" + // TargetObjectIsInaccessible ... + TargetObjectIsInaccessible ResultCode = "TargetObjectIsInaccessible" +) + +// PossibleResultCodeValues returns an array of possible values for the ResultCode const type. +func PossibleResultCodeValues() []ResultCode { + return []ResultCode{Completed, FatalError, Initial, ObjectNotExistsInSource, ObjectNotExistsInTarget, TargetObjectIsInaccessible} +} + // ResultType enumerates the values for result type. type ResultType string const ( + // ResultTypeDatabaseLevelErrorOutput ... + ResultTypeDatabaseLevelErrorOutput ResultType = "DatabaseLevelErrorOutput" // ResultTypeDatabaseLevelOutput ... ResultTypeDatabaseLevelOutput ResultType = "DatabaseLevelOutput" // ResultTypeErrorOutput ... ResultTypeErrorOutput ResultType = "ErrorOutput" - // ResultTypeMigrateSQLServerSQLDbTaskOutput ... - ResultTypeMigrateSQLServerSQLDbTaskOutput ResultType = "MigrateSqlServerSqlDbTaskOutput" - // ResultTypeMigrationDatabaseLevelValidationOutput ... - ResultTypeMigrationDatabaseLevelValidationOutput ResultType = "MigrationDatabaseLevelValidationOutput" + // ResultTypeMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput ... + ResultTypeMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput ResultType = "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput" // ResultTypeMigrationLevelOutput ... ResultTypeMigrationLevelOutput ResultType = "MigrationLevelOutput" - // ResultTypeMigrationValidationOutput ... - ResultTypeMigrationValidationOutput ResultType = "MigrationValidationOutput" // ResultTypeTableLevelOutput ... ResultTypeTableLevelOutput ResultType = "TableLevelOutput" ) // PossibleResultTypeValues returns an array of possible values for the ResultType const type. func PossibleResultTypeValues() []ResultType { - return []ResultType{ResultTypeDatabaseLevelOutput, ResultTypeErrorOutput, ResultTypeMigrateSQLServerSQLDbTaskOutput, ResultTypeMigrationDatabaseLevelValidationOutput, ResultTypeMigrationLevelOutput, ResultTypeMigrationValidationOutput, ResultTypeTableLevelOutput} + return []ResultType{ResultTypeDatabaseLevelErrorOutput, ResultTypeDatabaseLevelOutput, ResultTypeErrorOutput, ResultTypeMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, ResultTypeMigrationLevelOutput, ResultTypeTableLevelOutput} } // ResultTypeBasicConnectToSourceSQLServerTaskOutput enumerates the values for result type basic connect to @@ -450,19 +620,172 @@ func PossibleResultTypeBasicConnectToSourceSQLServerTaskOutputValues() []ResultT return []ResultTypeBasicConnectToSourceSQLServerTaskOutput{ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput, ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput, ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput, ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput, ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput} } +// ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput enumerates the values for result type basic migrate +// my sql azure db for my sql sync task output. +type ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput string + +const ( + // ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelErrorOutput ... + ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelErrorOutput ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = "DatabaseLevelErrorOutput" + // ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelOutput ... + ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelOutput ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = "DatabaseLevelOutput" + // ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeErrorOutput ... + ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeErrorOutput ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = "ErrorOutput" + // ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrateMySQLAzureDbForMySQLSyncTaskOutput ... + ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrateMySQLAzureDbForMySQLSyncTaskOutput ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = "MigrateMySqlAzureDbForMySqlSyncTaskOutput" + // ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrationLevelOutput ... + ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrationLevelOutput ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = "MigrationLevelOutput" + // ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeTableLevelOutput ... + ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeTableLevelOutput ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput = "TableLevelOutput" +) + +// PossibleResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputValues returns an array of possible values for the ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput const type. +func PossibleResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputValues() []ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput { + return []ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput{ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelErrorOutput, ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelOutput, ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeErrorOutput, ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrateMySQLAzureDbForMySQLSyncTaskOutput, ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrationLevelOutput, ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeTableLevelOutput} +} + +// ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput enumerates the values for result type basic migrate sql +// server sql db sync task output. +type ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput string + +const ( + // ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelErrorOutput ... + ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelErrorOutput ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput = "DatabaseLevelErrorOutput" + // ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelOutput ... + ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelOutput ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput = "DatabaseLevelOutput" + // ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeErrorOutput ... + ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeErrorOutput ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput = "ErrorOutput" + // ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrateSQLServerSQLDbSyncTaskOutput ... + ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrateSQLServerSQLDbSyncTaskOutput ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput = "MigrateSqlServerSqlDbSyncTaskOutput" + // ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrationLevelOutput ... + ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrationLevelOutput ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput = "MigrationLevelOutput" + // ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeTableLevelOutput ... + ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeTableLevelOutput ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput = "TableLevelOutput" +) + +// PossibleResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputValues returns an array of possible values for the ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput const type. +func PossibleResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputValues() []ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput { + return []ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput{ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelErrorOutput, ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelOutput, ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeErrorOutput, ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrateSQLServerSQLDbSyncTaskOutput, ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrationLevelOutput, ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeTableLevelOutput} +} + +// ResultTypeBasicMigrateSQLServerSQLDbTaskOutput enumerates the values for result type basic migrate sql +// server sql db task output. +type ResultTypeBasicMigrateSQLServerSQLDbTaskOutput string + +const ( + // ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput ... + ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = "DatabaseLevelOutput" + // ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput ... + ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = "ErrorOutput" + // ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput ... + ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = "MigrateSqlServerSqlDbTaskOutput" + // ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationDatabaseLevelValidationOutput ... + ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationDatabaseLevelValidationOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = "MigrationDatabaseLevelValidationOutput" + // ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput ... + ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = "MigrationLevelOutput" + // ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationValidationOutput ... + ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationValidationOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = "MigrationValidationOutput" + // ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput ... + ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput ResultTypeBasicMigrateSQLServerSQLDbTaskOutput = "TableLevelOutput" +) + +// PossibleResultTypeBasicMigrateSQLServerSQLDbTaskOutputValues returns an array of possible values for the ResultTypeBasicMigrateSQLServerSQLDbTaskOutput const type. +func PossibleResultTypeBasicMigrateSQLServerSQLDbTaskOutputValues() []ResultTypeBasicMigrateSQLServerSQLDbTaskOutput { + return []ResultTypeBasicMigrateSQLServerSQLDbTaskOutput{ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput, ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput, ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput, ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationDatabaseLevelValidationOutput, ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput, ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationValidationOutput, ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput} +} + +// ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput enumerates the values for result type basic migrate sql +// server sqlmi sync task output. +type ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput string + +const ( + // ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput ... + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = "DatabaseLevelOutput" + // ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput ... + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = "ErrorOutput" + // ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput ... + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = "MigrateSqlServerSqlMISyncTaskOutput" + // ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput ... + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = "MigrationLevelOutput" +) + +// PossibleResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputValues returns an array of possible values for the ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput const type. +func PossibleResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputValues() []ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput { + return []ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput{ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput, ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput, ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput, ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput} +} + +// ResultTypeBasicMigrateSQLServerSQLMITaskOutput enumerates the values for result type basic migrate sql +// server sqlmi task output. +type ResultTypeBasicMigrateSQLServerSQLMITaskOutput string + +const ( + // ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput ... + ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput ResultTypeBasicMigrateSQLServerSQLMITaskOutput = "AgentJobLevelOutput" + // ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput ... + ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput ResultTypeBasicMigrateSQLServerSQLMITaskOutput = "DatabaseLevelOutput" + // ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput ... + ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput ResultTypeBasicMigrateSQLServerSQLMITaskOutput = "ErrorOutput" + // ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput ... + ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput ResultTypeBasicMigrateSQLServerSQLMITaskOutput = "LoginLevelOutput" + // ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput ... + ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput ResultTypeBasicMigrateSQLServerSQLMITaskOutput = "MigrateSqlServerSqlMITaskOutput" + // ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput ... + ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput ResultTypeBasicMigrateSQLServerSQLMITaskOutput = "MigrationLevelOutput" +) + +// PossibleResultTypeBasicMigrateSQLServerSQLMITaskOutputValues returns an array of possible values for the ResultTypeBasicMigrateSQLServerSQLMITaskOutput const type. +func PossibleResultTypeBasicMigrateSQLServerSQLMITaskOutputValues() []ResultTypeBasicMigrateSQLServerSQLMITaskOutput { + return []ResultTypeBasicMigrateSQLServerSQLMITaskOutput{ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput, ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput, ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput, ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput, ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput, ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput} +} + +// SchemaMigrationStage enumerates the values for schema migration stage. +type SchemaMigrationStage string + +const ( + // SchemaMigrationStageCollectingObjects ... + SchemaMigrationStageCollectingObjects SchemaMigrationStage = "CollectingObjects" + // SchemaMigrationStageCompleted ... + SchemaMigrationStageCompleted SchemaMigrationStage = "Completed" + // SchemaMigrationStageCompletedWithWarnings ... + SchemaMigrationStageCompletedWithWarnings SchemaMigrationStage = "CompletedWithWarnings" + // SchemaMigrationStageDeployingSchema ... + SchemaMigrationStageDeployingSchema SchemaMigrationStage = "DeployingSchema" + // SchemaMigrationStageDownloadingScript ... + SchemaMigrationStageDownloadingScript SchemaMigrationStage = "DownloadingScript" + // SchemaMigrationStageFailed ... + SchemaMigrationStageFailed SchemaMigrationStage = "Failed" + // SchemaMigrationStageGeneratingScript ... + SchemaMigrationStageGeneratingScript SchemaMigrationStage = "GeneratingScript" + // SchemaMigrationStageNotStarted ... + SchemaMigrationStageNotStarted SchemaMigrationStage = "NotStarted" + // SchemaMigrationStageUploadingScript ... + SchemaMigrationStageUploadingScript SchemaMigrationStage = "UploadingScript" + // SchemaMigrationStageValidatingInputs ... + SchemaMigrationStageValidatingInputs SchemaMigrationStage = "ValidatingInputs" +) + +// PossibleSchemaMigrationStageValues returns an array of possible values for the SchemaMigrationStage const type. +func PossibleSchemaMigrationStageValues() []SchemaMigrationStage { + return []SchemaMigrationStage{SchemaMigrationStageCollectingObjects, SchemaMigrationStageCompleted, SchemaMigrationStageCompletedWithWarnings, SchemaMigrationStageDeployingSchema, SchemaMigrationStageDownloadingScript, SchemaMigrationStageFailed, SchemaMigrationStageGeneratingScript, SchemaMigrationStageNotStarted, SchemaMigrationStageUploadingScript, SchemaMigrationStageValidatingInputs} +} + // ServerLevelPermissionsGroup enumerates the values for server level permissions group. type ServerLevelPermissionsGroup string const ( // Default ... Default ServerLevelPermissionsGroup = "Default" + // MigrationFromMySQLToAzureDBForMySQL ... + MigrationFromMySQLToAzureDBForMySQL ServerLevelPermissionsGroup = "MigrationFromMySQLToAzureDBForMySQL" // MigrationFromSQLServerToAzureDB ... MigrationFromSQLServerToAzureDB ServerLevelPermissionsGroup = "MigrationFromSqlServerToAzureDB" + // MigrationFromSQLServerToAzureMI ... + MigrationFromSQLServerToAzureMI ServerLevelPermissionsGroup = "MigrationFromSqlServerToAzureMI" ) // PossibleServerLevelPermissionsGroupValues returns an array of possible values for the ServerLevelPermissionsGroup const type. func PossibleServerLevelPermissionsGroupValues() []ServerLevelPermissionsGroup { - return []ServerLevelPermissionsGroup{Default, MigrationFromSQLServerToAzureDB} + return []ServerLevelPermissionsGroup{Default, MigrationFromMySQLToAzureDBForMySQL, MigrationFromSQLServerToAzureDB, MigrationFromSQLServerToAzureMI} } // ServiceProvisioningState enumerates the values for service provisioning state. @@ -530,6 +853,75 @@ func PossibleSeverityValues() []Severity { return []Severity{SeverityError, SeverityMessage, SeverityWarning} } +// SQLSourcePlatform enumerates the values for sql source platform. +type SQLSourcePlatform string + +const ( + // SQLOnPrem ... + SQLOnPrem SQLSourcePlatform = "SqlOnPrem" +) + +// PossibleSQLSourcePlatformValues returns an array of possible values for the SQLSourcePlatform const type. +func PossibleSQLSourcePlatformValues() []SQLSourcePlatform { + return []SQLSourcePlatform{SQLOnPrem} +} + +// SyncDatabaseMigrationReportingState enumerates the values for sync database migration reporting state. +type SyncDatabaseMigrationReportingState string + +const ( + // SyncDatabaseMigrationReportingStateCANCELLED ... + SyncDatabaseMigrationReportingStateCANCELLED SyncDatabaseMigrationReportingState = "CANCELLED" + // SyncDatabaseMigrationReportingStateCANCELLING ... + SyncDatabaseMigrationReportingStateCANCELLING SyncDatabaseMigrationReportingState = "CANCELLING" + // SyncDatabaseMigrationReportingStateCOMPLETE ... + SyncDatabaseMigrationReportingStateCOMPLETE SyncDatabaseMigrationReportingState = "COMPLETE" + // SyncDatabaseMigrationReportingStateCOMPLETING ... + SyncDatabaseMigrationReportingStateCOMPLETING SyncDatabaseMigrationReportingState = "COMPLETING" + // SyncDatabaseMigrationReportingStateCONFIGURING ... + SyncDatabaseMigrationReportingStateCONFIGURING SyncDatabaseMigrationReportingState = "CONFIGURING" + // SyncDatabaseMigrationReportingStateFAILED ... + SyncDatabaseMigrationReportingStateFAILED SyncDatabaseMigrationReportingState = "FAILED" + // SyncDatabaseMigrationReportingStateINITIALIAZING ... + SyncDatabaseMigrationReportingStateINITIALIAZING SyncDatabaseMigrationReportingState = "INITIALIAZING" + // SyncDatabaseMigrationReportingStateREADYTOCOMPLETE ... + SyncDatabaseMigrationReportingStateREADYTOCOMPLETE SyncDatabaseMigrationReportingState = "READY_TO_COMPLETE" + // SyncDatabaseMigrationReportingStateRUNNING ... + SyncDatabaseMigrationReportingStateRUNNING SyncDatabaseMigrationReportingState = "RUNNING" + // SyncDatabaseMigrationReportingStateSTARTING ... + SyncDatabaseMigrationReportingStateSTARTING SyncDatabaseMigrationReportingState = "STARTING" + // SyncDatabaseMigrationReportingStateUNDEFINED ... + SyncDatabaseMigrationReportingStateUNDEFINED SyncDatabaseMigrationReportingState = "UNDEFINED" +) + +// PossibleSyncDatabaseMigrationReportingStateValues returns an array of possible values for the SyncDatabaseMigrationReportingState const type. +func PossibleSyncDatabaseMigrationReportingStateValues() []SyncDatabaseMigrationReportingState { + return []SyncDatabaseMigrationReportingState{SyncDatabaseMigrationReportingStateCANCELLED, SyncDatabaseMigrationReportingStateCANCELLING, SyncDatabaseMigrationReportingStateCOMPLETE, SyncDatabaseMigrationReportingStateCOMPLETING, SyncDatabaseMigrationReportingStateCONFIGURING, SyncDatabaseMigrationReportingStateFAILED, SyncDatabaseMigrationReportingStateINITIALIAZING, SyncDatabaseMigrationReportingStateREADYTOCOMPLETE, SyncDatabaseMigrationReportingStateRUNNING, SyncDatabaseMigrationReportingStateSTARTING, SyncDatabaseMigrationReportingStateUNDEFINED} +} + +// SyncTableMigrationState enumerates the values for sync table migration state. +type SyncTableMigrationState string + +const ( + // SyncTableMigrationStateBEFORELOAD ... + SyncTableMigrationStateBEFORELOAD SyncTableMigrationState = "BEFORE_LOAD" + // SyncTableMigrationStateCANCELED ... + SyncTableMigrationStateCANCELED SyncTableMigrationState = "CANCELED" + // SyncTableMigrationStateCOMPLETED ... + SyncTableMigrationStateCOMPLETED SyncTableMigrationState = "COMPLETED" + // SyncTableMigrationStateERROR ... + SyncTableMigrationStateERROR SyncTableMigrationState = "ERROR" + // SyncTableMigrationStateFAILED ... + SyncTableMigrationStateFAILED SyncTableMigrationState = "FAILED" + // SyncTableMigrationStateFULLLOAD ... + SyncTableMigrationStateFULLLOAD SyncTableMigrationState = "FULL_LOAD" +) + +// PossibleSyncTableMigrationStateValues returns an array of possible values for the SyncTableMigrationState const type. +func PossibleSyncTableMigrationStateValues() []SyncTableMigrationState { + return []SyncTableMigrationState{SyncTableMigrationStateBEFORELOAD, SyncTableMigrationStateCANCELED, SyncTableMigrationStateCOMPLETED, SyncTableMigrationStateERROR, SyncTableMigrationStateFAILED, SyncTableMigrationStateFULLLOAD} +} + // TaskState enumerates the values for task state. type TaskState string @@ -561,27 +953,69 @@ func PossibleTaskStateValues() []TaskState { type TaskType string const ( + // TaskTypeConnectToSourceMySQL ... + TaskTypeConnectToSourceMySQL TaskType = "ConnectToSource.MySql" + // TaskTypeConnectToSourcePostgreSQLSync ... + TaskTypeConnectToSourcePostgreSQLSync TaskType = "ConnectToSource.PostgreSql.Sync" // TaskTypeConnectToSourceSQLServer ... TaskTypeConnectToSourceSQLServer TaskType = "ConnectToSource.SqlServer" + // TaskTypeConnectToSourceSQLServerSync ... + TaskTypeConnectToSourceSQLServerSync TaskType = "ConnectToSource.SqlServer.Sync" + // TaskTypeConnectToTargetAzureDbForMySQL ... + TaskTypeConnectToTargetAzureDbForMySQL TaskType = "ConnectToTarget.AzureDbForMySql" + // TaskTypeConnectToTargetAzureDbForPostgreSQLSync ... + TaskTypeConnectToTargetAzureDbForPostgreSQLSync TaskType = "ConnectToTarget.AzureDbForPostgreSql.Sync" + // TaskTypeConnectToTargetAzureSQLDbMI ... + TaskTypeConnectToTargetAzureSQLDbMI TaskType = "ConnectToTarget.AzureSqlDbMI" + // TaskTypeConnectToTargetAzureSQLDbMISyncLRS ... + TaskTypeConnectToTargetAzureSQLDbMISyncLRS TaskType = "ConnectToTarget.AzureSqlDbMI.Sync.LRS" // TaskTypeConnectToTargetSQLDb ... TaskTypeConnectToTargetSQLDb TaskType = "ConnectToTarget.SqlDb" + // TaskTypeConnectToTargetSQLDbSync ... + TaskTypeConnectToTargetSQLDbSync TaskType = "ConnectToTarget.SqlDb.Sync" + // TaskTypeGetTDECertificatesSQL ... + TaskTypeGetTDECertificatesSQL TaskType = "GetTDECertificates.Sql" + // TaskTypeGetUserTablesAzureSQLDbSync ... + TaskTypeGetUserTablesAzureSQLDbSync TaskType = "GetUserTables.AzureSqlDb.Sync" // TaskTypeGetUserTablesSQL ... TaskTypeGetUserTablesSQL TaskType = "GetUserTables.Sql" + // TaskTypeMigrateMySQLAzureDbForMySQLSync ... + TaskTypeMigrateMySQLAzureDbForMySQLSync TaskType = "Migrate.MySql.AzureDbForMySql.Sync" + // TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync ... + TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync TaskType = "Migrate.PostgreSql.AzureDbForPostgreSql.Sync" + // TaskTypeMigrateSQLServerAzureSQLDbMI ... + TaskTypeMigrateSQLServerAzureSQLDbMI TaskType = "Migrate.SqlServer.AzureSqlDbMI" + // TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS ... + TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS TaskType = "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS" + // TaskTypeMigrateSQLServerAzureSQLDbSync ... + TaskTypeMigrateSQLServerAzureSQLDbSync TaskType = "Migrate.SqlServer.AzureSqlDb.Sync" // TaskTypeMigrateSQLServerSQLDb ... TaskTypeMigrateSQLServerSQLDb TaskType = "Migrate.SqlServer.SqlDb" // TaskTypeUnknown ... TaskTypeUnknown TaskType = "Unknown" + // TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI ... + TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI TaskType = "ValidateMigrationInput.SqlServer.AzureSqlDbMI" + // TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS ... + TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS TaskType = "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS" + // TaskTypeValidateMigrationInputSQLServerSQLDbSync ... + TaskTypeValidateMigrationInputSQLServerSQLDbSync TaskType = "ValidateMigrationInput.SqlServer.SqlDb.Sync" ) // PossibleTaskTypeValues returns an array of possible values for the TaskType const type. func PossibleTaskTypeValues() []TaskType { - return []TaskType{TaskTypeConnectToSourceSQLServer, TaskTypeConnectToTargetSQLDb, TaskTypeGetUserTablesSQL, TaskTypeMigrateSQLServerSQLDb, TaskTypeUnknown} + return []TaskType{TaskTypeConnectToSourceMySQL, TaskTypeConnectToSourcePostgreSQLSync, TaskTypeConnectToSourceSQLServer, TaskTypeConnectToSourceSQLServerSync, TaskTypeConnectToTargetAzureDbForMySQL, TaskTypeConnectToTargetAzureDbForPostgreSQLSync, TaskTypeConnectToTargetAzureSQLDbMI, TaskTypeConnectToTargetAzureSQLDbMISyncLRS, TaskTypeConnectToTargetSQLDb, TaskTypeConnectToTargetSQLDbSync, TaskTypeGetTDECertificatesSQL, TaskTypeGetUserTablesAzureSQLDbSync, TaskTypeGetUserTablesSQL, TaskTypeMigrateMySQLAzureDbForMySQLSync, TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync, TaskTypeMigrateSQLServerAzureSQLDbMI, TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS, TaskTypeMigrateSQLServerAzureSQLDbSync, TaskTypeMigrateSQLServerSQLDb, TaskTypeUnknown, TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI, TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS, TaskTypeValidateMigrationInputSQLServerSQLDbSync} } // Type enumerates the values for type. type Type string const ( + // TypeMiSQLConnectionInfo ... + TypeMiSQLConnectionInfo Type = "MiSqlConnectionInfo" + // TypeMySQLConnectionInfo ... + TypeMySQLConnectionInfo Type = "MySqlConnectionInfo" + // TypePostgreSQLConnectionInfo ... + TypePostgreSQLConnectionInfo Type = "PostgreSqlConnectionInfo" // TypeSQLConnectionInfo ... TypeSQLConnectionInfo Type = "SqlConnectionInfo" // TypeUnknown ... @@ -590,7 +1024,7 @@ const ( // PossibleTypeValues returns an array of possible values for the Type const type. func PossibleTypeValues() []Type { - return []Type{TypeSQLConnectionInfo, TypeUnknown} + return []Type{TypeMiSQLConnectionInfo, TypeMySQLConnectionInfo, TypePostgreSQLConnectionInfo, TypeSQLConnectionInfo, TypeUnknown} } // UpdateActionType enumerates the values for update action type. @@ -677,14 +1111,157 @@ type AvailableServiceSkuSku struct { Tier *string `json:"tier,omitempty"` } +// AzureActiveDirectoryApp azure Active Directory Application +type AzureActiveDirectoryApp struct { + // ApplicationID - Application ID of the Azure Active Directory Application + ApplicationID *string `json:"applicationId,omitempty"` + // AppKey - Key used to authenticate to the Azure Active Directory Application + AppKey *string `json:"appKey,omitempty"` + // TenantID - Tenant id of the customer + TenantID *string `json:"tenantId,omitempty"` +} + +// BackupFileInfo information of the backup file +type BackupFileInfo struct { + // FileLocation - Location of the backup file in shared folder + FileLocation *string `json:"fileLocation,omitempty"` + // FamilySequenceNumber - Sequence number of the backup file in the backup set + FamilySequenceNumber *int32 `json:"familySequenceNumber,omitempty"` + // Status - Status of the backup file during migration. Possible values include: 'Arrived', 'Queued', 'Uploading', 'Uploaded', 'Restoring', 'Restored', 'Cancelled' + Status BackupFileStatus `json:"status,omitempty"` +} + +// BackupSetInfo information of backup set +type BackupSetInfo struct { + // BackupSetID - Id for the set of backup files + BackupSetID *string `json:"backupSetId,omitempty"` + // FirstLsn - First log sequence number of the backup file + FirstLsn *string `json:"firstLsn,omitempty"` + // LastLsn - Last log sequence number of the backup file + LastLsn *string `json:"lastLsn,omitempty"` + // LastModifiedTime - Last modified time of the backup file in share location + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // BackupType - Enum of the different backup types. Possible values include: 'BackupTypeDatabase', 'BackupTypeTransactionLog', 'BackupTypeFile', 'BackupTypeDifferentialDatabase', 'BackupTypeDifferentialFile', 'BackupTypePartial', 'BackupTypeDifferentialPartial' + BackupType BackupType `json:"backupType,omitempty"` + // ListOfBackupFiles - List of files in the backup set + ListOfBackupFiles *[]BackupFileInfo `json:"listOfBackupFiles,omitempty"` + // DatabaseName - Name of the database to which the backup set belongs + DatabaseName *string `json:"databaseName,omitempty"` + // BackupStartDate - Date and time that the backup operation began + BackupStartDate *date.Time `json:"backupStartDate,omitempty"` + // BackupFinishedDate - Date and time that the backup operation finished + BackupFinishedDate *date.Time `json:"backupFinishedDate,omitempty"` + // IsBackupRestored - Whether the backup set is restored or not + IsBackupRestored *bool `json:"isBackupRestored,omitempty"` +} + // BlobShare blob container storage information. type BlobShare struct { // SasURI - SAS URI of Azure Storage Account Container. SasURI *string `json:"sasUri,omitempty"` } +// BasicCommandProperties base class for all types of DMS command properties. If command is not supported by current +// client, this object is returned. +type BasicCommandProperties interface { + AsMigrateMISyncCompleteCommandProperties() (*MigrateMISyncCompleteCommandProperties, bool) + AsMigrateSyncCompleteCommandProperties() (*MigrateSyncCompleteCommandProperties, bool) + AsCommandProperties() (*CommandProperties, bool) +} + +// CommandProperties base class for all types of DMS command properties. If command is not supported by current +// client, this object is returned. +type CommandProperties struct { + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the command. This is ignored if submitted. Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', 'Failed' + State CommandState `json:"state,omitempty"` + // CommandType - Possible values include: 'CommandTypeUnknown', 'CommandTypeMigrateSQLServerAzureDbSQLMiComplete', 'CommandTypeMigrateSyncCompleteDatabase' + CommandType CommandType `json:"commandType,omitempty"` +} + +func unmarshalBasicCommandProperties(body []byte) (BasicCommandProperties, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["commandType"] { + case string(CommandTypeMigrateSQLServerAzureDbSQLMiComplete): + var mmsccp MigrateMISyncCompleteCommandProperties + err := json.Unmarshal(body, &mmsccp) + return mmsccp, err + case string(CommandTypeMigrateSyncCompleteDatabase): + var msccp MigrateSyncCompleteCommandProperties + err := json.Unmarshal(body, &msccp) + return msccp, err + default: + var cp CommandProperties + err := json.Unmarshal(body, &cp) + return cp, err + } +} +func unmarshalBasicCommandPropertiesArray(body []byte) ([]BasicCommandProperties, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + cpArray := make([]BasicCommandProperties, len(rawMessages)) + + for index, rawMessage := range rawMessages { + cp, err := unmarshalBasicCommandProperties(*rawMessage) + if err != nil { + return nil, err + } + cpArray[index] = cp + } + return cpArray, nil +} + +// MarshalJSON is the custom marshaler for CommandProperties. +func (cp CommandProperties) MarshalJSON() ([]byte, error) { + cp.CommandType = CommandTypeUnknown + objectMap := make(map[string]interface{}) + if cp.Errors != nil { + objectMap["errors"] = cp.Errors + } + if cp.State != "" { + objectMap["state"] = cp.State + } + if cp.CommandType != "" { + objectMap["commandType"] = cp.CommandType + } + return json.Marshal(objectMap) +} + +// AsMigrateMISyncCompleteCommandProperties is the BasicCommandProperties implementation for CommandProperties. +func (cp CommandProperties) AsMigrateMISyncCompleteCommandProperties() (*MigrateMISyncCompleteCommandProperties, bool) { + return nil, false +} + +// AsMigrateSyncCompleteCommandProperties is the BasicCommandProperties implementation for CommandProperties. +func (cp CommandProperties) AsMigrateSyncCompleteCommandProperties() (*MigrateSyncCompleteCommandProperties, bool) { + return nil, false +} + +// AsCommandProperties is the BasicCommandProperties implementation for CommandProperties. +func (cp CommandProperties) AsCommandProperties() (*CommandProperties, bool) { + return &cp, true +} + +// AsBasicCommandProperties is the BasicCommandProperties implementation for CommandProperties. +func (cp CommandProperties) AsBasicCommandProperties() (BasicCommandProperties, bool) { + return &cp, true +} + // BasicConnectionInfo defines the connection properties of a server type BasicConnectionInfo interface { + AsMiSQLConnectionInfo() (*MiSQLConnectionInfo, bool) + AsPostgreSQLConnectionInfo() (*PostgreSQLConnectionInfo, bool) + AsMySQLConnectionInfo() (*MySQLConnectionInfo, bool) AsSQLConnectionInfo() (*SQLConnectionInfo, bool) AsConnectionInfo() (*ConnectionInfo, bool) } @@ -695,7 +1272,7 @@ type ConnectionInfo struct { UserName *string `json:"userName,omitempty"` // Password - Password credential. Password *string `json:"password,omitempty"` - // Type - Possible values include: 'TypeUnknown', 'TypeSQLConnectionInfo' + // Type - Possible values include: 'TypeUnknown', 'TypeMiSQLConnectionInfo', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeSQLConnectionInfo' Type Type `json:"type,omitempty"` } @@ -707,6 +1284,18 @@ func unmarshalBasicConnectionInfo(body []byte) (BasicConnectionInfo, error) { } switch m["type"] { + case string(TypeMiSQLConnectionInfo): + var msci MiSQLConnectionInfo + err := json.Unmarshal(body, &msci) + return msci, err + case string(TypePostgreSQLConnectionInfo): + var psci PostgreSQLConnectionInfo + err := json.Unmarshal(body, &psci) + return psci, err + case string(TypeMySQLConnectionInfo): + var msci MySQLConnectionInfo + err := json.Unmarshal(body, &msci) + return msci, err case string(TypeSQLConnectionInfo): var sci SQLConnectionInfo err := json.Unmarshal(body, &sci) @@ -752,6 +1341,21 @@ func (ci ConnectionInfo) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsMiSQLConnectionInfo is the BasicConnectionInfo implementation for ConnectionInfo. +func (ci ConnectionInfo) AsMiSQLConnectionInfo() (*MiSQLConnectionInfo, bool) { + return nil, false +} + +// AsPostgreSQLConnectionInfo is the BasicConnectionInfo implementation for ConnectionInfo. +func (ci ConnectionInfo) AsPostgreSQLConnectionInfo() (*PostgreSQLConnectionInfo, bool) { + return nil, false +} + +// AsMySQLConnectionInfo is the BasicConnectionInfo implementation for ConnectionInfo. +func (ci ConnectionInfo) AsMySQLConnectionInfo() (*MySQLConnectionInfo, bool) { + return nil, false +} + // AsSQLConnectionInfo is the BasicConnectionInfo implementation for ConnectionInfo. func (ci ConnectionInfo) AsSQLConnectionInfo() (*SQLConnectionInfo, bool) { return nil, false @@ -767,517 +1371,445 @@ func (ci ConnectionInfo) AsBasicConnectionInfo() (BasicConnectionInfo, bool) { return &ci, true } -// ConnectToSourceSQLServerTaskInput input for the task that validates connection to SQL Server and also -// validates source server requirements -type ConnectToSourceSQLServerTaskInput struct { - // SourceConnectionInfo - Connection information for Source SQL Server - SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` - // CheckPermissionsGroup - Permission group for validations. Possible values include: 'Default', 'MigrationFromSQLServerToAzureDB' +// ConnectToSourceMySQLTaskInput input for the task that validates MySQL database connection +type ConnectToSourceMySQLTaskInput struct { + // SourceConnectionInfo - Information for connecting to MySQL source + SourceConnectionInfo *MySQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetPlatform - Target Platform for the migration. Possible values include: 'SQLServer', 'AzureDbForMySQL' + TargetPlatform MySQLTargetPlatformType `json:"targetPlatform,omitempty"` + // CheckPermissionsGroup - Permission group for validations. Possible values include: 'Default', 'MigrationFromSQLServerToAzureDB', 'MigrationFromSQLServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL' CheckPermissionsGroup ServerLevelPermissionsGroup `json:"checkPermissionsGroup,omitempty"` - // CollectLogins - Flag for whether to collect logins from source server. - CollectLogins *bool `json:"collectLogins,omitempty"` - // CollectAgentJobs - Flag for whether to collect agent jobs from source server. - CollectAgentJobs *bool `json:"collectAgentJobs,omitempty"` -} - -// BasicConnectToSourceSQLServerTaskOutput output for the task that validates connection to SQL Server and also -// validates source server requirements -type BasicConnectToSourceSQLServerTaskOutput interface { - AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) - AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) - AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) - AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) - AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) } -// ConnectToSourceSQLServerTaskOutput output for the task that validates connection to SQL Server and also -// validates source server requirements -type ConnectToSourceSQLServerTaskOutput struct { - // ID - Result identifier - ID *string `json:"id,omitempty"` - // ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput' - ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"` +// ConnectToSourceMySQLTaskProperties properties for the task that validates MySQL database connection +type ConnectToSourceMySQLTaskProperties struct { + // Input - Task input + Input *ConnectToSourceMySQLTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]ConnectToSourceNonSQLTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` } -func unmarshalBasicConnectToSourceSQLServerTaskOutput(body []byte) (BasicConnectToSourceSQLServerTaskOutput, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err +// MarshalJSON is the custom marshaler for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) MarshalJSON() ([]byte, error) { + ctsmstp.TaskType = TaskTypeConnectToSourceMySQL + objectMap := make(map[string]interface{}) + if ctsmstp.Input != nil { + objectMap["input"] = ctsmstp.Input } - - switch m["resultType"] { - case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput): - var ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel - err := json.Unmarshal(body, &ctssstoajl) - return ctssstoajl, err - case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput): - var ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel - err := json.Unmarshal(body, &ctssstoll) - return ctssstoll, err - case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput): - var ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel - err := json.Unmarshal(body, &ctssstodl) - return ctssstodl, err - case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput): - var ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel - err := json.Unmarshal(body, &ctssstotl) - return ctssstotl, err - default: - var ctsssto ConnectToSourceSQLServerTaskOutput - err := json.Unmarshal(body, &ctsssto) - return ctsssto, err + if ctsmstp.Output != nil { + objectMap["output"] = ctsmstp.Output } -} -func unmarshalBasicConnectToSourceSQLServerTaskOutputArray(body []byte) ([]BasicConnectToSourceSQLServerTaskOutput, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err + if ctsmstp.Errors != nil { + objectMap["errors"] = ctsmstp.Errors } - - ctssstoArray := make([]BasicConnectToSourceSQLServerTaskOutput, len(rawMessages)) - - for index, rawMessage := range rawMessages { - ctsssto, err := unmarshalBasicConnectToSourceSQLServerTaskOutput(*rawMessage) - if err != nil { - return nil, err - } - ctssstoArray[index] = ctsssto + if ctsmstp.State != "" { + objectMap["state"] = ctsmstp.State } - return ctssstoArray, nil -} - -// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutput. -func (ctsssto ConnectToSourceSQLServerTaskOutput) MarshalJSON() ([]byte, error) { - ctsssto.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput - objectMap := make(map[string]interface{}) - if ctsssto.ID != nil { - objectMap["id"] = ctsssto.ID + if ctsmstp.Commands != nil { + objectMap["commands"] = ctsmstp.Commands } - if ctsssto.ResultType != "" { - objectMap["resultType"] = ctsssto.ResultType + if ctsmstp.TaskType != "" { + objectMap["taskType"] = ctsmstp.TaskType } return json.Marshal(objectMap) } -// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput. -func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) { +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput. -func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) { +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput. -func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) { +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput. -func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) { +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput. -func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) { - return &ctsssto, true +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput. -func (ctsssto ConnectToSourceSQLServerTaskOutput) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) { - return &ctsssto, true +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false } -// ConnectToSourceSQLServerTaskOutputAgentJobLevel agentJob level output for the task that validates -// connection to SQL Server and also validates source server requirements -type ConnectToSourceSQLServerTaskOutputAgentJobLevel struct { - // Name - AgentJob name - Name *string `json:"name,omitempty"` - // JobCategory - The type of AgentJob. - JobCategory *string `json:"jobCategory,omitempty"` - // IsEnabled - The state of the original AgentJob. - IsEnabled *bool `json:"isEnabled,omitempty"` - // JobOwner - The owner of the AgentJob - JobOwner *string `json:"jobOwner,omitempty"` - // LastExecutedOn - UTC Date and time when the AgentJob was last executed. - LastExecutedOn *date.Time `json:"lastExecutedOn,omitempty"` - // MigrationEligibility - Information about eligibility of agent job for migration. - MigrationEligibility *MigrationEligibilityInfo `json:"migrationEligibility,omitempty"` - // ID - Result identifier - ID *string `json:"id,omitempty"` - // ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput' - ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"` +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputAgentJobLevel. -func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) MarshalJSON() ([]byte, error) { - ctssstoajl.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput - objectMap := make(map[string]interface{}) - if ctssstoajl.Name != nil { - objectMap["name"] = ctssstoajl.Name - } - if ctssstoajl.JobCategory != nil { - objectMap["jobCategory"] = ctssstoajl.JobCategory - } - if ctssstoajl.IsEnabled != nil { - objectMap["isEnabled"] = ctssstoajl.IsEnabled - } - if ctssstoajl.JobOwner != nil { - objectMap["jobOwner"] = ctssstoajl.JobOwner - } - if ctssstoajl.LastExecutedOn != nil { - objectMap["lastExecutedOn"] = ctssstoajl.LastExecutedOn - } - if ctssstoajl.MigrationEligibility != nil { - objectMap["migrationEligibility"] = ctssstoajl.MigrationEligibility - } - if ctssstoajl.ID != nil { - objectMap["id"] = ctssstoajl.ID - } - if ctssstoajl.ResultType != "" { - objectMap["resultType"] = ctssstoajl.ResultType - } - return json.Marshal(objectMap) +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false } -// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel. -func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) { - return &ctssstoajl, true +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false } -// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel. -func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) { +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel. -func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) { +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel. -func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) { +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel. -func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) { +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false } -// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel. -func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) { - return &ctssstoajl, true +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false } -// ConnectToSourceSQLServerTaskOutputDatabaseLevel database level output for the task that validates -// connection to SQL Server and also validates source server requirements -type ConnectToSourceSQLServerTaskOutputDatabaseLevel struct { - // Name - Database name - Name *string `json:"name,omitempty"` - // SizeMB - Size of the file in megabytes - SizeMB *float64 `json:"sizeMB,omitempty"` - // DatabaseFiles - The list of database files - DatabaseFiles *[]DatabaseFileInfo `json:"databaseFiles,omitempty"` - // CompatibilityLevel - SQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140' - CompatibilityLevel DatabaseCompatLevel `json:"compatibilityLevel,omitempty"` - // DatabaseState - State of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary' - DatabaseState DatabaseState `json:"databaseState,omitempty"` - // ID - Result identifier - ID *string `json:"id,omitempty"` - // ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput' - ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"` +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputDatabaseLevel. -func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - ctssstodl.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput - objectMap := make(map[string]interface{}) - if ctssstodl.Name != nil { - objectMap["name"] = ctssstodl.Name - } - if ctssstodl.SizeMB != nil { - objectMap["sizeMB"] = ctssstodl.SizeMB - } - if ctssstodl.DatabaseFiles != nil { - objectMap["databaseFiles"] = ctssstodl.DatabaseFiles - } - if ctssstodl.CompatibilityLevel != "" { - objectMap["compatibilityLevel"] = ctssstodl.CompatibilityLevel - } - if ctssstodl.DatabaseState != "" { - objectMap["databaseState"] = ctssstodl.DatabaseState - } - if ctssstodl.ID != nil { - objectMap["id"] = ctssstodl.ID - } - if ctssstodl.ResultType != "" { - objectMap["resultType"] = ctssstodl.ResultType - } - return json.Marshal(objectMap) +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel. -func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) { +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel. -func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) { +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel. -func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) { - return &ctssstodl, true +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false } -// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel. -func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) { +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel. -func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) { +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { return nil, false } -// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel. -func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) { - return &ctssstodl, true +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return &ctsmstp, true } -// ConnectToSourceSQLServerTaskOutputLoginLevel login level output for the task that validates connection -// to SQL Server and also validates source server requirements -type ConnectToSourceSQLServerTaskOutputLoginLevel struct { - // Name - Login name. - Name *string `json:"name,omitempty"` - // LoginType - The type of login. Possible values include: 'WindowsUser', 'WindowsGroup', 'SQLLogin', 'Certificate', 'AsymmetricKey', 'ExternalUser', 'ExternalGroup' - LoginType LoginType `json:"loginType,omitempty"` - // DefaultDatabase - The default database for the login. - DefaultDatabase *string `json:"defaultDatabase,omitempty"` - // IsEnabled - The state of the login. - IsEnabled *bool `json:"isEnabled,omitempty"` - // MigrationEligibility - Information about eligibility of login for migration. - MigrationEligibility *MigrationEligibilityInfo `json:"migrationEligibility,omitempty"` +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &ctsmstp, true +} + +// UnmarshalJSON is the custom unmarshaler for ConnectToSourceMySQLTaskProperties struct. +func (ctsmstp *ConnectToSourceMySQLTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input ConnectToSourceMySQLTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + ctsmstp.Input = &input + } + case "output": + if v != nil { + var output []ConnectToSourceNonSQLTaskOutput + err = json.Unmarshal(*v, &output) + if err != nil { + return err + } + ctsmstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + ctsmstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + ctsmstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + ctsmstp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + ctsmstp.TaskType = taskType + } + } + } + + return nil +} + +// ConnectToSourceNonSQLTaskOutput output for connect to Oracle, MySQL type source +type ConnectToSourceNonSQLTaskOutput struct { // ID - Result identifier ID *string `json:"id,omitempty"` - // ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput' - ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"` + // SourceServerBrandVersion - Server brand version + SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` + // ServerProperties - Server properties + ServerProperties *ServerProperties `json:"serverProperties,omitempty"` + // Databases - List of databases on the server + Databases *[]string `json:"databases,omitempty"` + // ValidationErrors - Validation errors associated with the task + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` } -// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputLoginLevel. -func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) MarshalJSON() ([]byte, error) { - ctssstoll.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput +// ConnectToSourcePostgreSQLSyncTaskInput input for the task that validates connection to PostgreSQL and +// source server requirements +type ConnectToSourcePostgreSQLSyncTaskInput struct { + // SourceConnectionInfo - Connection information for source PostgreSQL server + SourceConnectionInfo *PostgreSQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` +} + +// ConnectToSourcePostgreSQLSyncTaskOutput output for the task that validates connection to PostgreSQL and +// source server requirements +type ConnectToSourcePostgreSQLSyncTaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // SourceServerVersion - Version of the source server + SourceServerVersion *string `json:"sourceServerVersion,omitempty"` + // Databases - List of databases on source server + Databases *[]string `json:"databases,omitempty"` + // SourceServerBrandVersion - Source server brand version + SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` + // ValidationErrors - Validation errors associated with the task + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` +} + +// ConnectToSourcePostgreSQLSyncTaskProperties properties for the task that validates connection to +// PostgreSQL server and source server requirements for online migration +type ConnectToSourcePostgreSQLSyncTaskProperties struct { + // Input - Task input + Input *ConnectToSourcePostgreSQLSyncTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]ConnectToSourcePostgreSQLSyncTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) MarshalJSON() ([]byte, error) { + ctspsstp.TaskType = TaskTypeConnectToSourcePostgreSQLSync objectMap := make(map[string]interface{}) - if ctssstoll.Name != nil { - objectMap["name"] = ctssstoll.Name - } - if ctssstoll.LoginType != "" { - objectMap["loginType"] = ctssstoll.LoginType + if ctspsstp.Input != nil { + objectMap["input"] = ctspsstp.Input } - if ctssstoll.DefaultDatabase != nil { - objectMap["defaultDatabase"] = ctssstoll.DefaultDatabase + if ctspsstp.Output != nil { + objectMap["output"] = ctspsstp.Output } - if ctssstoll.IsEnabled != nil { - objectMap["isEnabled"] = ctssstoll.IsEnabled + if ctspsstp.Errors != nil { + objectMap["errors"] = ctspsstp.Errors } - if ctssstoll.MigrationEligibility != nil { - objectMap["migrationEligibility"] = ctssstoll.MigrationEligibility + if ctspsstp.State != "" { + objectMap["state"] = ctspsstp.State } - if ctssstoll.ID != nil { - objectMap["id"] = ctssstoll.ID + if ctspsstp.Commands != nil { + objectMap["commands"] = ctspsstp.Commands } - if ctssstoll.ResultType != "" { - objectMap["resultType"] = ctssstoll.ResultType + if ctspsstp.TaskType != "" { + objectMap["taskType"] = ctspsstp.TaskType } return json.Marshal(objectMap) } -// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel. -func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) { +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel. -func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) { - return &ctssstoll, true +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false } -// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel. -func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) { +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel. -func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) { +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel. -func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) { +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { return nil, false } -// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel. -func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) { - return &ctssstoll, true +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false } -// ConnectToSourceSQLServerTaskOutputTaskLevel task level output for the task that validates connection to -// SQL Server and also validates source server requirements -type ConnectToSourceSQLServerTaskOutputTaskLevel struct { - // Databases - Source databases as a map from database name to database id - Databases map[string]*string `json:"databases"` - // Logins - Source logins as a map from login name to login id. - Logins map[string]*string `json:"logins"` - // AgentJobs - Source agent jobs as a map from agent job name to id. - AgentJobs map[string]*string `json:"agentJobs"` - // SourceServerVersion - Source server version - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - // SourceServerBrandVersion - Source server brand version - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - // ValidationErrors - Validation errors - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` - // ID - Result identifier - ID *string `json:"id,omitempty"` - // ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput' - ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"` +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputTaskLevel. -func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) MarshalJSON() ([]byte, error) { - ctssstotl.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput - objectMap := make(map[string]interface{}) - if ctssstotl.Databases != nil { - objectMap["databases"] = ctssstotl.Databases - } - if ctssstotl.Logins != nil { - objectMap["logins"] = ctssstotl.Logins - } - if ctssstotl.AgentJobs != nil { - objectMap["agentJobs"] = ctssstotl.AgentJobs - } - if ctssstotl.SourceServerVersion != nil { - objectMap["sourceServerVersion"] = ctssstotl.SourceServerVersion - } - if ctssstotl.SourceServerBrandVersion != nil { - objectMap["sourceServerBrandVersion"] = ctssstotl.SourceServerBrandVersion - } - if ctssstotl.ValidationErrors != nil { - objectMap["validationErrors"] = ctssstotl.ValidationErrors - } - if ctssstotl.ID != nil { - objectMap["id"] = ctssstotl.ID - } - if ctssstotl.ResultType != "" { - objectMap["resultType"] = ctssstotl.ResultType - } - return json.Marshal(objectMap) +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false } -// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel. -func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) { +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel. -func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) { +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel. -func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) { +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel. -func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) { - return &ctssstotl, true +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false } -// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel. -func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) { +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false } -// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel. -func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) { - return &ctssstotl, true +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false } -// ConnectToSourceSQLServerTaskProperties properties for the task that validates connection to SQL Server -// and also validates source server requirements -type ConnectToSourceSQLServerTaskProperties struct { - // Input - Task input - Input *ConnectToSourceSQLServerTaskInput `json:"input,omitempty"` - // Output - Task output. This is ignored if submitted. - Output *[]BasicConnectToSourceSQLServerTaskOutput `json:"output,omitempty"` - // Errors - Array of errors. This is ignored if submitted. - Errors *[]ODataError `json:"errors,omitempty"` - // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' - State TaskState `json:"state,omitempty"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServer' - TaskType TaskType `json:"taskType,omitempty"` +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskProperties. -func (ctssstp ConnectToSourceSQLServerTaskProperties) MarshalJSON() ([]byte, error) { - ctssstp.TaskType = TaskTypeConnectToSourceSQLServer - objectMap := make(map[string]interface{}) - if ctssstp.Input != nil { - objectMap["input"] = ctssstp.Input - } - if ctssstp.Output != nil { - objectMap["output"] = ctssstp.Output - } - if ctssstp.Errors != nil { - objectMap["errors"] = ctssstp.Errors - } - if ctssstp.State != "" { - objectMap["state"] = ctssstp.State - } - if ctssstp.TaskType != "" { - objectMap["taskType"] = ctssstp.TaskType - } - return json.Marshal(objectMap) +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. -func (ctssstp ConnectToSourceSQLServerTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false } -// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. -func (ctssstp ConnectToSourceSQLServerTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { return nil, false } -// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. -func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return &ctspsstp, true +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. -func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { - return &ctssstp, true +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false } -// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. -func (ctssstp ConnectToSourceSQLServerTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { return nil, false } -// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. -func (ctssstp ConnectToSourceSQLServerTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { - return &ctssstp, true +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false } -// UnmarshalJSON is the custom unmarshaler for ConnectToSourceSQLServerTaskProperties struct. -func (ctssstp *ConnectToSourceSQLServerTaskProperties) UnmarshalJSON(body []byte) error { +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &ctspsstp, true +} + +// UnmarshalJSON is the custom unmarshaler for ConnectToSourcePostgreSQLSyncTaskProperties struct. +func (ctspsstp *ConnectToSourcePostgreSQLSyncTaskProperties) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -1287,20 +1819,21 @@ func (ctssstp *ConnectToSourceSQLServerTaskProperties) UnmarshalJSON(body []byte switch k { case "input": if v != nil { - var input ConnectToSourceSQLServerTaskInput + var input ConnectToSourcePostgreSQLSyncTaskInput err = json.Unmarshal(*v, &input) if err != nil { return err } - ctssstp.Input = &input + ctspsstp.Input = &input } case "output": if v != nil { - output, err := unmarshalBasicConnectToSourceSQLServerTaskOutputArray(*v) + var output []ConnectToSourcePostgreSQLSyncTaskOutput + err = json.Unmarshal(*v, &output) if err != nil { return err } - ctssstp.Output = &output + ctspsstp.Output = &output } case "errors": if v != nil { @@ -1309,7 +1842,7 @@ func (ctssstp *ConnectToSourceSQLServerTaskProperties) UnmarshalJSON(body []byte if err != nil { return err } - ctssstp.Errors = &errorsVar + ctspsstp.Errors = &errorsVar } case "state": if v != nil { @@ -1318,7 +1851,15 @@ func (ctssstp *ConnectToSourceSQLServerTaskProperties) UnmarshalJSON(body []byte if err != nil { return err } - ctssstp.State = state + ctspsstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + ctspsstp.Commands = &commands } case "taskType": if v != nil { @@ -1327,7 +1868,7 @@ func (ctssstp *ConnectToSourceSQLServerTaskProperties) UnmarshalJSON(body []byte if err != nil { return err } - ctssstp.TaskType = taskType + ctspsstp.TaskType = taskType } } } @@ -1335,499 +1876,268 @@ func (ctssstp *ConnectToSourceSQLServerTaskProperties) UnmarshalJSON(body []byte return nil } -// ConnectToTargetSQLDbTaskInput input for the task that validates connection to SQL DB and target server -// requirements -type ConnectToTargetSQLDbTaskInput struct { - // TargetConnectionInfo - Connection information for target SQL DB - TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` -} - -// ConnectToTargetSQLDbTaskOutput output for the task that validates connection to SQL DB and target server -// requirements -type ConnectToTargetSQLDbTaskOutput struct { - // ID - Result identifier - ID *string `json:"id,omitempty"` - // Databases - Source databases as a map from database name to database id - Databases map[string]*string `json:"databases"` - // TargetServerVersion - Version of the target server - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - // TargetServerBrandVersion - Target server brand version - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` -} - -// MarshalJSON is the custom marshaler for ConnectToTargetSQLDbTaskOutput. -func (cttsdto ConnectToTargetSQLDbTaskOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cttsdto.ID != nil { - objectMap["id"] = cttsdto.ID - } - if cttsdto.Databases != nil { - objectMap["databases"] = cttsdto.Databases - } - if cttsdto.TargetServerVersion != nil { - objectMap["targetServerVersion"] = cttsdto.TargetServerVersion - } - if cttsdto.TargetServerBrandVersion != nil { - objectMap["targetServerBrandVersion"] = cttsdto.TargetServerBrandVersion - } - return json.Marshal(objectMap) -} - -// ConnectToTargetSQLDbTaskProperties properties for the task that validates connection to SQL DB and -// target server requirements -type ConnectToTargetSQLDbTaskProperties struct { +// ConnectToSourceSQLServerSyncTaskProperties properties for the task that validates connection to SQL +// Server and source server requirements for online migration +type ConnectToSourceSQLServerSyncTaskProperties struct { // Input - Task input - Input *ConnectToTargetSQLDbTaskInput `json:"input,omitempty"` + Input *ConnectToSourceSQLServerTaskInput `json:"input,omitempty"` // Output - Task output. This is ignored if submitted. - Output *[]ConnectToTargetSQLDbTaskOutput `json:"output,omitempty"` + Output *[]BasicConnectToSourceSQLServerTaskOutput `json:"output,omitempty"` // Errors - Array of errors. This is ignored if submitted. Errors *[]ODataError `json:"errors,omitempty"` // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' State TaskState `json:"state,omitempty"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServer' + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' TaskType TaskType `json:"taskType,omitempty"` } -// MarshalJSON is the custom marshaler for ConnectToTargetSQLDbTaskProperties. -func (cttsdtp ConnectToTargetSQLDbTaskProperties) MarshalJSON() ([]byte, error) { - cttsdtp.TaskType = TaskTypeConnectToTargetSQLDb +// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) MarshalJSON() ([]byte, error) { + ctsssstp.TaskType = TaskTypeConnectToSourceSQLServerSync objectMap := make(map[string]interface{}) - if cttsdtp.Input != nil { - objectMap["input"] = cttsdtp.Input + if ctsssstp.Input != nil { + objectMap["input"] = ctsssstp.Input } - if cttsdtp.Output != nil { - objectMap["output"] = cttsdtp.Output + if ctsssstp.Output != nil { + objectMap["output"] = ctsssstp.Output } - if cttsdtp.Errors != nil { - objectMap["errors"] = cttsdtp.Errors + if ctsssstp.Errors != nil { + objectMap["errors"] = ctsssstp.Errors } - if cttsdtp.State != "" { - objectMap["state"] = cttsdtp.State + if ctsssstp.State != "" { + objectMap["state"] = ctsssstp.State } - if cttsdtp.TaskType != "" { - objectMap["taskType"] = cttsdtp.TaskType + if ctsssstp.Commands != nil { + objectMap["commands"] = ctsssstp.Commands + } + if ctsssstp.TaskType != "" { + objectMap["taskType"] = ctsssstp.TaskType } return json.Marshal(objectMap) } -// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. -func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { return nil, false } -// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. -func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { return nil, false } -// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. -func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { - return &cttsdtp, true +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false } -// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. -func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { return nil, false } -// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. -func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { return nil, false } -// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. -func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { - return &cttsdtp, true +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false } -// Database information about a single database -type Database struct { - // ID - Unique identifier for the database - ID *string `json:"id,omitempty"` - // Name - Name of the database - Name *string `json:"name,omitempty"` - // CompatibilityLevel - SQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140' - CompatibilityLevel DatabaseCompatLevel `json:"compatibilityLevel,omitempty"` - // Collation - Collation name of the database - Collation *string `json:"collation,omitempty"` - // ServerName - Name of the server - ServerName *string `json:"serverName,omitempty"` - // Fqdn - Fully qualified name - Fqdn *string `json:"fqdn,omitempty"` - // InstallID - Install id of the database - InstallID *string `json:"installId,omitempty"` - // ServerVersion - Version of the server - ServerVersion *string `json:"serverVersion,omitempty"` - // ServerEdition - Edition of the server - ServerEdition *string `json:"serverEdition,omitempty"` - // ServerLevel - Product level of the server (RTM, SP, CTP). - ServerLevel *string `json:"serverLevel,omitempty"` - // ServerDefaultDataPath - Default path of the data files - ServerDefaultDataPath *string `json:"serverDefaultDataPath,omitempty"` - // ServerDefaultLogPath - Default path of the log files - ServerDefaultLogPath *string `json:"serverDefaultLogPath,omitempty"` - // ServerDefaultBackupPath - Default path of the backup folder - ServerDefaultBackupPath *string `json:"serverDefaultBackupPath,omitempty"` - // ServerCoreCount - Number of cores on the server - ServerCoreCount *int32 `json:"serverCoreCount,omitempty"` - // ServerVisibleOnlineCoreCount - Number of cores on the server that have VISIBLE ONLINE status - ServerVisibleOnlineCoreCount *int32 `json:"serverVisibleOnlineCoreCount,omitempty"` - // DatabaseState - State of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary' - DatabaseState DatabaseState `json:"databaseState,omitempty"` - // ServerID - The unique Server Id - ServerID *string `json:"serverId,omitempty"` -} - -// DatabaseFileInfo database file specific information -type DatabaseFileInfo struct { - // DatabaseName - Name of the database - DatabaseName *string `json:"databaseName,omitempty"` - // ID - Unique identifier for database file - ID *string `json:"id,omitempty"` - // LogicalName - Logical name of the file - LogicalName *string `json:"logicalName,omitempty"` - // PhysicalFullName - Operating-system full path of the file - PhysicalFullName *string `json:"physicalFullName,omitempty"` - // RestoreFullName - Suggested full path of the file for restoring - RestoreFullName *string `json:"restoreFullName,omitempty"` - // FileType - Database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext' - FileType DatabaseFileType `json:"fileType,omitempty"` - // SizeMB - Size of the file in megabytes - SizeMB *float64 `json:"sizeMB,omitempty"` -} - -// DatabaseFileInput database file specific information for input -type DatabaseFileInput struct { - // ID - Unique identifier for database file - ID *string `json:"id,omitempty"` - // LogicalName - Logical name of the file - LogicalName *string `json:"logicalName,omitempty"` - // PhysicalFullName - Operating-system full path of the file - PhysicalFullName *string `json:"physicalFullName,omitempty"` - // RestoreFullName - Suggested full path of the file for restoring - RestoreFullName *string `json:"restoreFullName,omitempty"` - // FileType - Database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext' - FileType DatabaseFileType `json:"fileType,omitempty"` -} - -// DatabaseInfo project Database Details -type DatabaseInfo struct { - // SourceDatabaseName - Name of the database - SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` -} - -// DatabaseObjectName a representation of the name of an object in a database -type DatabaseObjectName struct { - // DatabaseName - The unescaped name of the database containing the object - DatabaseName *string `json:"databaseName,omitempty"` - // ObjectName - The unescaped name of the object - ObjectName *string `json:"objectName,omitempty"` - // SchemaName - The unescaped name of the schema containing the object - SchemaName *string `json:"schemaName,omitempty"` - // ObjectType - Type of the object in the database. Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function' - ObjectType ObjectType `json:"objectType,omitempty"` -} - -// DatabaseSummaryResult summary of database results in the migration -type DatabaseSummaryResult struct { - // SizeMB - Size of the database in megabytes - SizeMB *float64 `json:"sizeMB,omitempty"` - // Name - Name of the item - Name *string `json:"name,omitempty"` - // StartedOn - Migration start time - StartedOn *date.Time `json:"startedOn,omitempty"` - // EndedOn - Migration end time - EndedOn *date.Time `json:"endedOn,omitempty"` - // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' - State MigrationState `json:"state,omitempty"` - // StatusMessage - Status message - StatusMessage *string `json:"statusMessage,omitempty"` - // ItemsCount - Number of items - ItemsCount *int64 `json:"itemsCount,omitempty"` - // ItemsCompletedCount - Number of successfully completed items - ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` - // ErrorPrefix - Wildcard string prefix to use for querying all errors of the item - ErrorPrefix *string `json:"errorPrefix,omitempty"` - // ResultPrefix - Wildcard string prefix to use for querying all sub-tem results of the item - ResultPrefix *string `json:"resultPrefix,omitempty"` +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false } -// DatabaseTable table properties -type DatabaseTable struct { - // HasRows - Indicates whether table is empty or not - HasRows *bool `json:"hasRows,omitempty"` - // Name - Schema-qualified name of the table - Name *string `json:"name,omitempty"` +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false } -// DataIntegrityValidationResult results for checksum based Data Integrity validation results -type DataIntegrityValidationResult struct { - // FailedObjects - List of failed table names of source and target pair - FailedObjects map[string]*string `json:"failedObjects"` - // ValidationErrors - List of errors that happened while performing data integrity validation - ValidationErrors *ValidationError `json:"validationErrors,omitempty"` +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for DataIntegrityValidationResult. -func (divr DataIntegrityValidationResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if divr.FailedObjects != nil { - objectMap["failedObjects"] = divr.FailedObjects - } - if divr.ValidationErrors != nil { - objectMap["validationErrors"] = divr.ValidationErrors - } - return json.Marshal(objectMap) +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false } -// DataItemMigrationSummaryResult basic summary of a data item migration -type DataItemMigrationSummaryResult struct { - // Name - Name of the item - Name *string `json:"name,omitempty"` - // StartedOn - Migration start time - StartedOn *date.Time `json:"startedOn,omitempty"` - // EndedOn - Migration end time - EndedOn *date.Time `json:"endedOn,omitempty"` - // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' - State MigrationState `json:"state,omitempty"` - // StatusMessage - Status message - StatusMessage *string `json:"statusMessage,omitempty"` - // ItemsCount - Number of items - ItemsCount *int64 `json:"itemsCount,omitempty"` - // ItemsCompletedCount - Number of successfully completed items - ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` - // ErrorPrefix - Wildcard string prefix to use for querying all errors of the item - ErrorPrefix *string `json:"errorPrefix,omitempty"` - // ResultPrefix - Wildcard string prefix to use for querying all sub-tem results of the item - ResultPrefix *string `json:"resultPrefix,omitempty"` +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false } -// Error migration Task errors -type Error struct { - // Message - Error description - Message *string `json:"message,omitempty"` - // Type - Type of error. Possible values include: 'ErrorTypeDefault', 'ErrorTypeWarning', 'ErrorTypeError' - Type ErrorType `json:"type,omitempty"` +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false } -// ExecutionStatistics description about the errors happen while performing migration validation -type ExecutionStatistics struct { - // ExecutionCount - No. of query executions - ExecutionCount *int64 `json:"executionCount,omitempty"` - // CPUTimeMs - CPU Time in millisecond(s) for the query execution - CPUTimeMs *float64 `json:"cpuTimeMs,omitempty"` - // ElapsedTimeMs - Time taken in millisecond(s) for executing the query - ElapsedTimeMs *float64 `json:"elapsedTimeMs,omitempty"` - // WaitStats - Dictionary of sql query execution wait types and the respective statistics - WaitStats map[string]*WaitStatistics `json:"waitStats"` - // HasErrors - Indicates whether the query resulted in an error - HasErrors *bool `json:"hasErrors,omitempty"` - // SQLErrors - List of sql Errors - SQLErrors *[]string `json:"sqlErrors,omitempty"` +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for ExecutionStatistics. -func (es ExecutionStatistics) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if es.ExecutionCount != nil { - objectMap["executionCount"] = es.ExecutionCount - } - if es.CPUTimeMs != nil { - objectMap["cpuTimeMs"] = es.CPUTimeMs - } - if es.ElapsedTimeMs != nil { - objectMap["elapsedTimeMs"] = es.ElapsedTimeMs - } - if es.WaitStats != nil { - objectMap["waitStats"] = es.WaitStats - } - if es.HasErrors != nil { - objectMap["hasErrors"] = es.HasErrors - } - if es.SQLErrors != nil { - objectMap["sqlErrors"] = es.SQLErrors - } - return json.Marshal(objectMap) +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false } -// FileShare file share information with Path, Username, and Password. -type FileShare struct { - // UserName - User name credential to connect to the share location - UserName *string `json:"userName,omitempty"` - // Password - Password credential used to connect to the share location. - Password *string `json:"password,omitempty"` - // Path - The folder path for this share. - Path *string `json:"path,omitempty"` +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false } -// GetUserTablesSQLTaskInput input for the task that collects user tables for the given list of databases -type GetUserTablesSQLTaskInput struct { - // ConnectionInfo - Connection information for SQL Server - ConnectionInfo *SQLConnectionInfo `json:"connectionInfo,omitempty"` - // SelectedDatabases - List of database names to collect tables for - SelectedDatabases *[]string `json:"selectedDatabases,omitempty"` +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// GetUserTablesSQLTaskOutput output of the task that collects user tables for the given list of databases -type GetUserTablesSQLTaskOutput struct { - // ID - Result identifier - ID *string `json:"id,omitempty"` - // DatabasesToTables - Mapping from database name to list of tables - DatabasesToTables map[string][]DatabaseTable `json:"databasesToTables"` - // ValidationErrors - Validation errors - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for GetUserTablesSQLTaskOutput. -func (gutsto GetUserTablesSQLTaskOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if gutsto.ID != nil { - objectMap["id"] = gutsto.ID - } - if gutsto.DatabasesToTables != nil { - objectMap["databasesToTables"] = gutsto.DatabasesToTables - } - if gutsto.ValidationErrors != nil { - objectMap["validationErrors"] = gutsto.ValidationErrors - } - return json.Marshal(objectMap) +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false } -// GetUserTablesSQLTaskProperties properties for the task that collects user tables for the given list of -// databases -type GetUserTablesSQLTaskProperties struct { - // Input - Task input - Input *GetUserTablesSQLTaskInput `json:"input,omitempty"` - // Output - Task output. This is ignored if submitted. - Output *[]GetUserTablesSQLTaskOutput `json:"output,omitempty"` - // Errors - Array of errors. This is ignored if submitted. - Errors *[]ODataError `json:"errors,omitempty"` - // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' - State TaskState `json:"state,omitempty"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServer' - TaskType TaskType `json:"taskType,omitempty"` +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for GetUserTablesSQLTaskProperties. -func (gutstp GetUserTablesSQLTaskProperties) MarshalJSON() ([]byte, error) { - gutstp.TaskType = TaskTypeGetUserTablesSQL - objectMap := make(map[string]interface{}) - if gutstp.Input != nil { - objectMap["input"] = gutstp.Input - } - if gutstp.Output != nil { - objectMap["output"] = gutstp.Output - } - if gutstp.Errors != nil { - objectMap["errors"] = gutstp.Errors - } - if gutstp.State != "" { - objectMap["state"] = gutstp.State - } - if gutstp.TaskType != "" { - objectMap["taskType"] = gutstp.TaskType - } - return json.Marshal(objectMap) +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return &ctsssstp, true } -// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. -func (gutstp GetUserTablesSQLTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { return nil, false } -// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. -func (gutstp GetUserTablesSQLTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { - return &gutstp, true -} - -// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. -func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. -func (gutstp GetUserTablesSQLTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { return nil, false } -// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. -func (gutstp GetUserTablesSQLTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { - return nil, false +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &ctsssstp, true } -// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. -func (gutstp GetUserTablesSQLTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { - return &gutstp, true -} - -// MigrateSQLServerSQLDbDatabaseInput database specific information for SQL to Azure SQL DB migration task -// inputs -type MigrateSQLServerSQLDbDatabaseInput struct { - // Name - Name of the database - Name *string `json:"name,omitempty"` - // TargetDatabaseName - Name of target database. Note: Target database will be truncated before starting migration. - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` - // MakeSourceDbReadOnly - Whether to set database read only before migration - MakeSourceDbReadOnly *bool `json:"makeSourceDbReadOnly,omitempty"` - // TableMap - Mapping of source to target tables - TableMap map[string]*string `json:"tableMap"` -} - -// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbDatabaseInput. -func (msssddi MigrateSQLServerSQLDbDatabaseInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if msssddi.Name != nil { - objectMap["name"] = msssddi.Name - } - if msssddi.TargetDatabaseName != nil { - objectMap["targetDatabaseName"] = msssddi.TargetDatabaseName - } - if msssddi.MakeSourceDbReadOnly != nil { - objectMap["makeSourceDbReadOnly"] = msssddi.MakeSourceDbReadOnly +// UnmarshalJSON is the custom unmarshaler for ConnectToSourceSQLServerSyncTaskProperties struct. +func (ctsssstp *ConnectToSourceSQLServerSyncTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err } - if msssddi.TableMap != nil { - objectMap["tableMap"] = msssddi.TableMap + for k, v := range m { + switch k { + case "input": + if v != nil { + var input ConnectToSourceSQLServerTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + ctsssstp.Input = &input + } + case "output": + if v != nil { + output, err := unmarshalBasicConnectToSourceSQLServerTaskOutputArray(*v) + if err != nil { + return err + } + ctsssstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + ctsssstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + ctsssstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + ctsssstp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + ctsssstp.TaskType = taskType + } + } } - return json.Marshal(objectMap) + + return nil } -// MigrateSQLServerSQLDbTaskInput input for the task that migrates on-prem SQL Server databases to Azure -// SQL Database -type MigrateSQLServerSQLDbTaskInput struct { - // SelectedDatabases - Databases to migrate - SelectedDatabases *[]MigrateSQLServerSQLDbDatabaseInput `json:"selectedDatabases,omitempty"` - // ValidationOptions - Options for enabling various post migration validations. Available options, - // 1.) Data Integrity Check: Performs a checksum based comparison on source and target tables after the migration to ensure the correctness of the data. - // 2.) Schema Validation: Performs a thorough schema comparison between the source and target tables and provides a list of differences between the source and target database, 3.) Query Analysis: Executes a set of queries picked up automatically either from the Query Plan Cache or Query Store and execute them and compares the execution time between the source and target database. - ValidationOptions *MigrationValidationOptions `json:"validationOptions,omitempty"` - // SourceConnectionInfo - Information for connecting to source +// ConnectToSourceSQLServerTaskInput input for the task that validates connection to SQL Server and also +// validates source server requirements +type ConnectToSourceSQLServerTaskInput struct { + // SourceConnectionInfo - Connection information for Source SQL Server SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` - // TargetConnectionInfo - Information for connecting to target - TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // CheckPermissionsGroup - Permission group for validations. Possible values include: 'Default', 'MigrationFromSQLServerToAzureDB', 'MigrationFromSQLServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL' + CheckPermissionsGroup ServerLevelPermissionsGroup `json:"checkPermissionsGroup,omitempty"` + // CollectLogins - Flag for whether to collect logins from source server. + CollectLogins *bool `json:"collectLogins,omitempty"` + // CollectAgentJobs - Flag for whether to collect agent jobs from source server. + CollectAgentJobs *bool `json:"collectAgentJobs,omitempty"` } -// BasicMigrateSQLServerSQLDbTaskOutput output for the task that migrates on-prem SQL Server databases to Azure SQL -// Database -type BasicMigrateSQLServerSQLDbTaskOutput interface { - AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) - AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) - AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) - AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) - AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) - AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) - AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) +// BasicConnectToSourceSQLServerTaskOutput output for the task that validates connection to SQL Server and also +// validates source server requirements +type BasicConnectToSourceSQLServerTaskOutput interface { + AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) + AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) + AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) + AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) + AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) } -// MigrateSQLServerSQLDbTaskOutput output for the task that migrates on-prem SQL Server databases to Azure SQL -// Database -type MigrateSQLServerSQLDbTaskOutput struct { +// ConnectToSourceSQLServerTaskOutput output for the task that validates connection to SQL Server and also +// validates source server requirements +type ConnectToSourceSQLServerTaskOutput struct { // ID - Result identifier ID *string `json:"id,omitempty"` - // ResultType - Possible values include: 'ResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeMigrationDatabaseLevelValidationOutput', 'ResultTypeMigrationValidationOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput' - ResultType ResultType `json:"resultType,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput' + ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"` } -func unmarshalBasicMigrateSQLServerSQLDbTaskOutput(body []byte) (BasicMigrateSQLServerSQLDbTaskOutput, error) { +func unmarshalBasicConnectToSourceSQLServerTaskOutput(body []byte) (BasicConnectToSourceSQLServerTaskOutput, error) { var m map[string]interface{} err := json.Unmarshal(body, &m) if err != nil { @@ -1835,797 +2145,572 @@ func unmarshalBasicMigrateSQLServerSQLDbTaskOutput(body []byte) (BasicMigrateSQL } switch m["resultType"] { - case string(ResultTypeMigrationDatabaseLevelValidationOutput): - var msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult - err := json.Unmarshal(body, &msssdtodlvr) - return msssdtodlvr, err - case string(ResultTypeMigrationValidationOutput): - var msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult - err := json.Unmarshal(body, &msssdtovr) - return msssdtovr, err - case string(ResultTypeErrorOutput): - var msssdtoe MigrateSQLServerSQLDbTaskOutputError - err := json.Unmarshal(body, &msssdtoe) - return msssdtoe, err - case string(ResultTypeTableLevelOutput): - var msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel - err := json.Unmarshal(body, &msssdtotl) - return msssdtotl, err - case string(ResultTypeDatabaseLevelOutput): - var msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel - err := json.Unmarshal(body, &msssdtodl) - return msssdtodl, err - case string(ResultTypeMigrationLevelOutput): - var msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel - err := json.Unmarshal(body, &msssdtoml) - return msssdtoml, err + case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput): + var ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel + err := json.Unmarshal(body, &ctssstoajl) + return ctssstoajl, err + case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput): + var ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel + err := json.Unmarshal(body, &ctssstoll) + return ctssstoll, err + case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput): + var ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel + err := json.Unmarshal(body, &ctssstodl) + return ctssstodl, err + case string(ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput): + var ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel + err := json.Unmarshal(body, &ctssstotl) + return ctssstotl, err default: - var msssdto MigrateSQLServerSQLDbTaskOutput - err := json.Unmarshal(body, &msssdto) - return msssdto, err + var ctsssto ConnectToSourceSQLServerTaskOutput + err := json.Unmarshal(body, &ctsssto) + return ctsssto, err } } -func unmarshalBasicMigrateSQLServerSQLDbTaskOutputArray(body []byte) ([]BasicMigrateSQLServerSQLDbTaskOutput, error) { +func unmarshalBasicConnectToSourceSQLServerTaskOutputArray(body []byte) ([]BasicConnectToSourceSQLServerTaskOutput, error) { var rawMessages []*json.RawMessage err := json.Unmarshal(body, &rawMessages) if err != nil { return nil, err } - msssdtoArray := make([]BasicMigrateSQLServerSQLDbTaskOutput, len(rawMessages)) + ctssstoArray := make([]BasicConnectToSourceSQLServerTaskOutput, len(rawMessages)) for index, rawMessage := range rawMessages { - msssdto, err := unmarshalBasicMigrateSQLServerSQLDbTaskOutput(*rawMessage) + ctsssto, err := unmarshalBasicConnectToSourceSQLServerTaskOutput(*rawMessage) if err != nil { return nil, err } - msssdtoArray[index] = msssdto + ctssstoArray[index] = ctsssto } - return msssdtoArray, nil + return ctssstoArray, nil } -// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutput. -func (msssdto MigrateSQLServerSQLDbTaskOutput) MarshalJSON() ([]byte, error) { - msssdto.ResultType = ResultTypeMigrateSQLServerSQLDbTaskOutput +// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutput. +func (ctsssto ConnectToSourceSQLServerTaskOutput) MarshalJSON() ([]byte, error) { + ctsssto.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput objectMap := make(map[string]interface{}) - if msssdto.ID != nil { - objectMap["id"] = msssdto.ID + if ctsssto.ID != nil { + objectMap["id"] = ctsssto.ID } - if msssdto.ResultType != "" { - objectMap["resultType"] = msssdto.ResultType + if ctsssto.ResultType != "" { + objectMap["resultType"] = ctsssto.ResultType } return json.Marshal(objectMap) } -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. -func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) { - return nil, false -} - -// AsMigrateSQLServerSQLDbTaskOutputValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. -func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) { +// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput. +func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. -func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { +// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput. +func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. -func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { +// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput. +func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. -func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { +// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput. +func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. -func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { - return nil, false +// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput. +func (ctsssto ConnectToSourceSQLServerTaskOutput) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) { + return &ctsssto, true } -// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. -func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { - return &msssdto, true +// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutput. +func (ctsssto ConnectToSourceSQLServerTaskOutput) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) { + return &ctsssto, true } -// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. -func (msssdto MigrateSQLServerSQLDbTaskOutput) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { - return &msssdto, true +// ConnectToSourceSQLServerTaskOutputAgentJobLevel agentJob level output for the task that validates +// connection to SQL Server and also validates source server requirements +type ConnectToSourceSQLServerTaskOutputAgentJobLevel struct { + // Name - AgentJob name + Name *string `json:"name,omitempty"` + // JobCategory - The type of AgentJob. + JobCategory *string `json:"jobCategory,omitempty"` + // IsEnabled - The state of the original AgentJob. + IsEnabled *bool `json:"isEnabled,omitempty"` + // JobOwner - The owner of the AgentJob + JobOwner *string `json:"jobOwner,omitempty"` + // LastExecutedOn - UTC Date and time when the AgentJob was last executed. + LastExecutedOn *date.Time `json:"lastExecutedOn,omitempty"` + // MigrationEligibility - Information about eligibility of agent job for migration. + MigrationEligibility *MigrationEligibilityInfo `json:"migrationEligibility,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput' + ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"` } -// MigrateSQLServerSQLDbTaskOutputDatabaseLevel database level result for Sql Server to Azure Sql DB -// migration. -type MigrateSQLServerSQLDbTaskOutputDatabaseLevel struct { - // DatabaseName - Name of the item - DatabaseName *string `json:"databaseName,omitempty"` - // StartedOn - Migration start time - StartedOn *date.Time `json:"startedOn,omitempty"` - // EndedOn - Migration end time - EndedOn *date.Time `json:"endedOn,omitempty"` - // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' - State MigrationState `json:"state,omitempty"` - // Stage - Migration stage that this database is in. Possible values include: 'DatabaseMigrationStageNone', 'DatabaseMigrationStageInitialize', 'DatabaseMigrationStageBackup', 'DatabaseMigrationStageFileCopy', 'DatabaseMigrationStageRestore', 'DatabaseMigrationStageCompleted' - Stage DatabaseMigrationStage `json:"stage,omitempty"` - // StatusMessage - Status message - StatusMessage *string `json:"statusMessage,omitempty"` - // Message - Migration progress message - Message *string `json:"message,omitempty"` - // NumberOfObjects - Number of objects - NumberOfObjects *int64 `json:"numberOfObjects,omitempty"` - // NumberOfObjectsCompleted - Number of successfully completed objects - NumberOfObjectsCompleted *int64 `json:"numberOfObjectsCompleted,omitempty"` - // ErrorCount - Number of database/object errors. - ErrorCount *int64 `json:"errorCount,omitempty"` - // ErrorPrefix - Wildcard string prefix to use for querying all errors of the item - ErrorPrefix *string `json:"errorPrefix,omitempty"` - // ResultPrefix - Wildcard string prefix to use for querying all sub-tem results of the item - ResultPrefix *string `json:"resultPrefix,omitempty"` - // ExceptionsAndWarnings - Migration exceptions and warnings. - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - // ObjectSummary - Summary of object results in the migration - ObjectSummary map[string]*DataItemMigrationSummaryResult `json:"objectSummary"` - // ID - Result identifier - ID *string `json:"id,omitempty"` - // ResultType - Possible values include: 'ResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeMigrationDatabaseLevelValidationOutput', 'ResultTypeMigrationValidationOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput' - ResultType ResultType `json:"resultType,omitempty"` -} - -// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. -func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - msssdtodl.ResultType = ResultTypeDatabaseLevelOutput +// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputAgentJobLevel. +func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) MarshalJSON() ([]byte, error) { + ctssstoajl.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput objectMap := make(map[string]interface{}) - if msssdtodl.DatabaseName != nil { - objectMap["databaseName"] = msssdtodl.DatabaseName - } - if msssdtodl.StartedOn != nil { - objectMap["startedOn"] = msssdtodl.StartedOn - } - if msssdtodl.EndedOn != nil { - objectMap["endedOn"] = msssdtodl.EndedOn - } - if msssdtodl.State != "" { - objectMap["state"] = msssdtodl.State - } - if msssdtodl.Stage != "" { - objectMap["stage"] = msssdtodl.Stage - } - if msssdtodl.StatusMessage != nil { - objectMap["statusMessage"] = msssdtodl.StatusMessage - } - if msssdtodl.Message != nil { - objectMap["message"] = msssdtodl.Message - } - if msssdtodl.NumberOfObjects != nil { - objectMap["numberOfObjects"] = msssdtodl.NumberOfObjects - } - if msssdtodl.NumberOfObjectsCompleted != nil { - objectMap["numberOfObjectsCompleted"] = msssdtodl.NumberOfObjectsCompleted + if ctssstoajl.Name != nil { + objectMap["name"] = ctssstoajl.Name } - if msssdtodl.ErrorCount != nil { - objectMap["errorCount"] = msssdtodl.ErrorCount + if ctssstoajl.JobCategory != nil { + objectMap["jobCategory"] = ctssstoajl.JobCategory } - if msssdtodl.ErrorPrefix != nil { - objectMap["errorPrefix"] = msssdtodl.ErrorPrefix + if ctssstoajl.IsEnabled != nil { + objectMap["isEnabled"] = ctssstoajl.IsEnabled } - if msssdtodl.ResultPrefix != nil { - objectMap["resultPrefix"] = msssdtodl.ResultPrefix + if ctssstoajl.JobOwner != nil { + objectMap["jobOwner"] = ctssstoajl.JobOwner } - if msssdtodl.ExceptionsAndWarnings != nil { - objectMap["exceptionsAndWarnings"] = msssdtodl.ExceptionsAndWarnings + if ctssstoajl.LastExecutedOn != nil { + objectMap["lastExecutedOn"] = ctssstoajl.LastExecutedOn } - if msssdtodl.ObjectSummary != nil { - objectMap["objectSummary"] = msssdtodl.ObjectSummary + if ctssstoajl.MigrationEligibility != nil { + objectMap["migrationEligibility"] = ctssstoajl.MigrationEligibility } - if msssdtodl.ID != nil { - objectMap["id"] = msssdtodl.ID + if ctssstoajl.ID != nil { + objectMap["id"] = ctssstoajl.ID } - if msssdtodl.ResultType != "" { - objectMap["resultType"] = msssdtodl.ResultType + if ctssstoajl.ResultType != "" { + objectMap["resultType"] = ctssstoajl.ResultType } return json.Marshal(objectMap) } -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. -func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) { - return nil, false -} - -// AsMigrateSQLServerSQLDbTaskOutputValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. -func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) { - return nil, false +// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel. +func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) { + return &ctssstoajl, true } -// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. -func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { +// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel. +func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. -func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { +// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel. +func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. -func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { - return &msssdtodl, true -} - -// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. -func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { +// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel. +func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. -func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { +// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel. +func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) { return nil, false } -// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. -func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { - return &msssdtodl, true +// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputAgentJobLevel. +func (ctssstoajl ConnectToSourceSQLServerTaskOutputAgentJobLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) { + return &ctssstoajl, true } -// MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult database validation result for Sql Server -// to Azure Sql DB migration. -type MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult struct { - // MigrationID - Migration Identifier - MigrationID *string `json:"migrationId,omitempty"` - // SourceDatabaseName - Name of the source database - SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` - // TargetDatabaseName - Name of the target database - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` - // StartedOn - Validation start time - StartedOn *date.Time `json:"startedOn,omitempty"` - // EndedOn - Validation end time - EndedOn *date.Time `json:"endedOn,omitempty"` - // DataIntegrityValidationResult - Provides data integrity validation result between the source and target tables that are migrated. - DataIntegrityValidationResult *DataIntegrityValidationResult `json:"dataIntegrityValidationResult,omitempty"` - // SchemaValidationResult - Provides schema comparison result between source and target database - SchemaValidationResult *SchemaComparisonValidationResult `json:"schemaValidationResult,omitempty"` - // QueryAnalysisValidationResult - Results of some of the query execution result between source and target database - QueryAnalysisValidationResult *QueryAnalysisValidationResult `json:"queryAnalysisValidationResult,omitempty"` - // Status - Current status of validation at the database level. Possible values include: 'ValidationStatusDefault', 'ValidationStatusNotStarted', 'ValidationStatusInitialized', 'ValidationStatusInProgress', 'ValidationStatusCompleted', 'ValidationStatusCompletedWithIssues', 'ValidationStatusFailed', 'ValidationStatusStopped' - Status ValidationStatus `json:"status,omitempty"` +// ConnectToSourceSQLServerTaskOutputDatabaseLevel database level output for the task that validates +// connection to SQL Server and also validates source server requirements +type ConnectToSourceSQLServerTaskOutputDatabaseLevel struct { + // Name - Database name + Name *string `json:"name,omitempty"` + // SizeMB - Size of the file in megabytes + SizeMB *float64 `json:"sizeMB,omitempty"` + // DatabaseFiles - The list of database files + DatabaseFiles *[]DatabaseFileInfo `json:"databaseFiles,omitempty"` + // CompatibilityLevel - SQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140' + CompatibilityLevel DatabaseCompatLevel `json:"compatibilityLevel,omitempty"` + // DatabaseState - State of the database. Possible values include: 'DatabaseStateOnline', 'DatabaseStateRestoring', 'DatabaseStateRecovering', 'DatabaseStateRecoveryPending', 'DatabaseStateSuspect', 'DatabaseStateEmergency', 'DatabaseStateOffline', 'DatabaseStateCopying', 'DatabaseStateOfflineSecondary' + DatabaseState DatabaseState `json:"databaseState,omitempty"` // ID - Result identifier ID *string `json:"id,omitempty"` - // ResultType - Possible values include: 'ResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeMigrationDatabaseLevelValidationOutput', 'ResultTypeMigrationValidationOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput' - ResultType ResultType `json:"resultType,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput' + ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"` } -// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. -func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) MarshalJSON() ([]byte, error) { - msssdtodlvr.ResultType = ResultTypeMigrationDatabaseLevelValidationOutput +// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputDatabaseLevel. +func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { + ctssstodl.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput objectMap := make(map[string]interface{}) - if msssdtodlvr.MigrationID != nil { - objectMap["migrationId"] = msssdtodlvr.MigrationID - } - if msssdtodlvr.SourceDatabaseName != nil { - objectMap["sourceDatabaseName"] = msssdtodlvr.SourceDatabaseName - } - if msssdtodlvr.TargetDatabaseName != nil { - objectMap["targetDatabaseName"] = msssdtodlvr.TargetDatabaseName - } - if msssdtodlvr.StartedOn != nil { - objectMap["startedOn"] = msssdtodlvr.StartedOn - } - if msssdtodlvr.EndedOn != nil { - objectMap["endedOn"] = msssdtodlvr.EndedOn + if ctssstodl.Name != nil { + objectMap["name"] = ctssstodl.Name } - if msssdtodlvr.DataIntegrityValidationResult != nil { - objectMap["dataIntegrityValidationResult"] = msssdtodlvr.DataIntegrityValidationResult + if ctssstodl.SizeMB != nil { + objectMap["sizeMB"] = ctssstodl.SizeMB } - if msssdtodlvr.SchemaValidationResult != nil { - objectMap["schemaValidationResult"] = msssdtodlvr.SchemaValidationResult + if ctssstodl.DatabaseFiles != nil { + objectMap["databaseFiles"] = ctssstodl.DatabaseFiles } - if msssdtodlvr.QueryAnalysisValidationResult != nil { - objectMap["queryAnalysisValidationResult"] = msssdtodlvr.QueryAnalysisValidationResult + if ctssstodl.CompatibilityLevel != "" { + objectMap["compatibilityLevel"] = ctssstodl.CompatibilityLevel } - if msssdtodlvr.Status != "" { - objectMap["status"] = msssdtodlvr.Status + if ctssstodl.DatabaseState != "" { + objectMap["databaseState"] = ctssstodl.DatabaseState } - if msssdtodlvr.ID != nil { - objectMap["id"] = msssdtodlvr.ID + if ctssstodl.ID != nil { + objectMap["id"] = ctssstodl.ID } - if msssdtodlvr.ResultType != "" { - objectMap["resultType"] = msssdtodlvr.ResultType + if ctssstodl.ResultType != "" { + objectMap["resultType"] = ctssstodl.ResultType } return json.Marshal(objectMap) } -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. -func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) { - return &msssdtodlvr, true -} - -// AsMigrateSQLServerSQLDbTaskOutputValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. -func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) { - return nil, false -} - -// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. -func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { +// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel. +func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. -func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { +// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel. +func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. -func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { - return nil, false +// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel. +func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) { + return &ctssstodl, true } -// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. -func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { +// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel. +func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. -func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { +// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel. +func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) { return nil, false } -// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. -func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { - return &msssdtodlvr, true +// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputDatabaseLevel. +func (ctssstodl ConnectToSourceSQLServerTaskOutputDatabaseLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) { + return &ctssstodl, true } -// MigrateSQLServerSQLDbTaskOutputError task errors for Sql Server to Azure Sql DB migration. -type MigrateSQLServerSQLDbTaskOutputError struct { - // Error - Migration error - Error *ReportableException `json:"error,omitempty"` +// ConnectToSourceSQLServerTaskOutputLoginLevel login level output for the task that validates connection +// to SQL Server and also validates source server requirements +type ConnectToSourceSQLServerTaskOutputLoginLevel struct { + // Name - Login name. + Name *string `json:"name,omitempty"` + // LoginType - The type of login. Possible values include: 'WindowsUser', 'WindowsGroup', 'SQLLogin', 'Certificate', 'AsymmetricKey', 'ExternalUser', 'ExternalGroup' + LoginType LoginType `json:"loginType,omitempty"` + // DefaultDatabase - The default database for the login. + DefaultDatabase *string `json:"defaultDatabase,omitempty"` + // IsEnabled - The state of the login. + IsEnabled *bool `json:"isEnabled,omitempty"` + // MigrationEligibility - Information about eligibility of login for migration. + MigrationEligibility *MigrationEligibilityInfo `json:"migrationEligibility,omitempty"` // ID - Result identifier ID *string `json:"id,omitempty"` - // ResultType - Possible values include: 'ResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeMigrationDatabaseLevelValidationOutput', 'ResultTypeMigrationValidationOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput' - ResultType ResultType `json:"resultType,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput' + ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"` } -// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputError. -func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) MarshalJSON() ([]byte, error) { - msssdtoe.ResultType = ResultTypeErrorOutput +// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputLoginLevel. +func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) MarshalJSON() ([]byte, error) { + ctssstoll.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput objectMap := make(map[string]interface{}) - if msssdtoe.Error != nil { - objectMap["error"] = msssdtoe.Error + if ctssstoll.Name != nil { + objectMap["name"] = ctssstoll.Name } - if msssdtoe.ID != nil { - objectMap["id"] = msssdtoe.ID + if ctssstoll.LoginType != "" { + objectMap["loginType"] = ctssstoll.LoginType } - if msssdtoe.ResultType != "" { - objectMap["resultType"] = msssdtoe.ResultType + if ctssstoll.DefaultDatabase != nil { + objectMap["defaultDatabase"] = ctssstoll.DefaultDatabase + } + if ctssstoll.IsEnabled != nil { + objectMap["isEnabled"] = ctssstoll.IsEnabled + } + if ctssstoll.MigrationEligibility != nil { + objectMap["migrationEligibility"] = ctssstoll.MigrationEligibility + } + if ctssstoll.ID != nil { + objectMap["id"] = ctssstoll.ID + } + if ctssstoll.ResultType != "" { + objectMap["resultType"] = ctssstoll.ResultType } return json.Marshal(objectMap) } -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. -func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) { - return nil, false -} - -// AsMigrateSQLServerSQLDbTaskOutputValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. -func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) { +// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel. +func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. -func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { - return &msssdtoe, true -} - -// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. -func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { - return nil, false +// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel. +func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) { + return &ctssstoll, true } -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. -func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { +// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel. +func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. -func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { +// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel. +func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. -func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { +// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel. +func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) { return nil, false } -// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. -func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { - return &msssdtoe, true +// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputLoginLevel. +func (ctssstoll ConnectToSourceSQLServerTaskOutputLoginLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) { + return &ctssstoll, true } -// MigrateSQLServerSQLDbTaskOutputMigrationLevel migration level result for Sql server to Azure Sql DB -// migration. -type MigrateSQLServerSQLDbTaskOutputMigrationLevel struct { - // StartedOn - Migration start time - StartedOn *date.Time `json:"startedOn,omitempty"` - // EndedOn - Migration end time - EndedOn *date.Time `json:"endedOn,omitempty"` - // DurationInSeconds - Duration of task execution in seconds. - DurationInSeconds *int64 `json:"durationInSeconds,omitempty"` - // Status - Current status of migration. Possible values include: 'MigrationStatusDefault', 'MigrationStatusConnecting', 'MigrationStatusSourceAndTargetSelected', 'MigrationStatusSelectLogins', 'MigrationStatusConfigured', 'MigrationStatusRunning', 'MigrationStatusError', 'MigrationStatusStopped', 'MigrationStatusCompleted', 'MigrationStatusCompletedWithWarnings' - Status MigrationStatus `json:"status,omitempty"` - // StatusMessage - Migration status message - StatusMessage *string `json:"statusMessage,omitempty"` - // Message - Migration progress message - Message *string `json:"message,omitempty"` - // Databases - Selected databases as a map from database name to database id +// ConnectToSourceSQLServerTaskOutputTaskLevel task level output for the task that validates connection to +// SQL Server and also validates source server requirements +type ConnectToSourceSQLServerTaskOutputTaskLevel struct { + // Databases - Source databases as a map from database name to database id Databases map[string]*string `json:"databases"` - // DatabaseSummary - Summary of database results in the migration - DatabaseSummary map[string]*DatabaseSummaryResult `json:"databaseSummary"` - // MigrationReport - Migration Report Result, provides unique url for downloading your migration report. - MigrationReport *MigrationReportResult `json:"migrationReport,omitempty"` + // Logins - Source logins as a map from login name to login id. + Logins map[string]*string `json:"logins"` + // AgentJobs - Source agent jobs as a map from agent job name to id. + AgentJobs map[string]*string `json:"agentJobs"` // SourceServerVersion - Source server version SourceServerVersion *string `json:"sourceServerVersion,omitempty"` // SourceServerBrandVersion - Source server brand version SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - // TargetServerVersion - Target server version - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - // TargetServerBrandVersion - Target server brand version - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - // ExceptionsAndWarnings - Migration exceptions and warnings. - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` + // ValidationErrors - Validation errors + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` // ID - Result identifier ID *string `json:"id,omitempty"` - // ResultType - Possible values include: 'ResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeMigrationDatabaseLevelValidationOutput', 'ResultTypeMigrationValidationOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput' - ResultType ResultType `json:"resultType,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput' + ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"` } -// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputMigrationLevel. -func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - msssdtoml.ResultType = ResultTypeMigrationLevelOutput +// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskOutputTaskLevel. +func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) MarshalJSON() ([]byte, error) { + ctssstotl.ResultType = ResultTypeBasicConnectToSourceSQLServerTaskOutputResultTypeTaskLevelOutput objectMap := make(map[string]interface{}) - if msssdtoml.StartedOn != nil { - objectMap["startedOn"] = msssdtoml.StartedOn - } - if msssdtoml.EndedOn != nil { - objectMap["endedOn"] = msssdtoml.EndedOn - } - if msssdtoml.DurationInSeconds != nil { - objectMap["durationInSeconds"] = msssdtoml.DurationInSeconds + if ctssstotl.Databases != nil { + objectMap["databases"] = ctssstotl.Databases } - if msssdtoml.Status != "" { - objectMap["status"] = msssdtoml.Status + if ctssstotl.Logins != nil { + objectMap["logins"] = ctssstotl.Logins } - if msssdtoml.StatusMessage != nil { - objectMap["statusMessage"] = msssdtoml.StatusMessage + if ctssstotl.AgentJobs != nil { + objectMap["agentJobs"] = ctssstotl.AgentJobs } - if msssdtoml.Message != nil { - objectMap["message"] = msssdtoml.Message + if ctssstotl.SourceServerVersion != nil { + objectMap["sourceServerVersion"] = ctssstotl.SourceServerVersion } - if msssdtoml.Databases != nil { - objectMap["databases"] = msssdtoml.Databases + if ctssstotl.SourceServerBrandVersion != nil { + objectMap["sourceServerBrandVersion"] = ctssstotl.SourceServerBrandVersion } - if msssdtoml.DatabaseSummary != nil { - objectMap["databaseSummary"] = msssdtoml.DatabaseSummary + if ctssstotl.ValidationErrors != nil { + objectMap["validationErrors"] = ctssstotl.ValidationErrors } - if msssdtoml.MigrationReport != nil { - objectMap["migrationReport"] = msssdtoml.MigrationReport + if ctssstotl.ID != nil { + objectMap["id"] = ctssstotl.ID } - if msssdtoml.SourceServerVersion != nil { - objectMap["sourceServerVersion"] = msssdtoml.SourceServerVersion + if ctssstotl.ResultType != "" { + objectMap["resultType"] = ctssstotl.ResultType } - if msssdtoml.SourceServerBrandVersion != nil { - objectMap["sourceServerBrandVersion"] = msssdtoml.SourceServerBrandVersion + return json.Marshal(objectMap) +} + +// AsConnectToSourceSQLServerTaskOutputAgentJobLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel. +func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskOutputLoginLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel. +func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskOutputDatabaseLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel. +func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskOutputTaskLevel is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel. +func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) { + return &ctssstotl, true +} + +// AsConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel. +func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) { + return nil, false +} + +// AsBasicConnectToSourceSQLServerTaskOutput is the BasicConnectToSourceSQLServerTaskOutput implementation for ConnectToSourceSQLServerTaskOutputTaskLevel. +func (ctssstotl ConnectToSourceSQLServerTaskOutputTaskLevel) AsBasicConnectToSourceSQLServerTaskOutput() (BasicConnectToSourceSQLServerTaskOutput, bool) { + return &ctssstotl, true +} + +// ConnectToSourceSQLServerTaskProperties properties for the task that validates connection to SQL Server +// and also validates source server requirements +type ConnectToSourceSQLServerTaskProperties struct { + // Input - Task input + Input *ConnectToSourceSQLServerTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]BasicConnectToSourceSQLServerTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) MarshalJSON() ([]byte, error) { + ctssstp.TaskType = TaskTypeConnectToSourceSQLServer + objectMap := make(map[string]interface{}) + if ctssstp.Input != nil { + objectMap["input"] = ctssstp.Input } - if msssdtoml.TargetServerVersion != nil { - objectMap["targetServerVersion"] = msssdtoml.TargetServerVersion + if ctssstp.Output != nil { + objectMap["output"] = ctssstp.Output } - if msssdtoml.TargetServerBrandVersion != nil { - objectMap["targetServerBrandVersion"] = msssdtoml.TargetServerBrandVersion + if ctssstp.Errors != nil { + objectMap["errors"] = ctssstp.Errors } - if msssdtoml.ExceptionsAndWarnings != nil { - objectMap["exceptionsAndWarnings"] = msssdtoml.ExceptionsAndWarnings + if ctssstp.State != "" { + objectMap["state"] = ctssstp.State } - if msssdtoml.ID != nil { - objectMap["id"] = msssdtoml.ID + if ctssstp.Commands != nil { + objectMap["commands"] = ctssstp.Commands } - if msssdtoml.ResultType != "" { - objectMap["resultType"] = msssdtoml.ResultType + if ctssstp.TaskType != "" { + objectMap["taskType"] = ctssstp.TaskType } return json.Marshal(objectMap) } -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. -func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) { +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. -func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) { +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. -func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. -func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. -func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. -func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { - return &msssdtoml, true +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false } -// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. -func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { return nil, false } -// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. -func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { - return &msssdtoml, true -} - -// MigrateSQLServerSQLDbTaskOutputTableLevel table level result for Sql Server to Azure Sql DB migration. -type MigrateSQLServerSQLDbTaskOutputTableLevel struct { - // ObjectName - Name of the item - ObjectName *string `json:"objectName,omitempty"` - // StartedOn - Migration start time - StartedOn *date.Time `json:"startedOn,omitempty"` - // EndedOn - Migration end time - EndedOn *date.Time `json:"endedOn,omitempty"` - // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' - State MigrationState `json:"state,omitempty"` - // StatusMessage - Status message - StatusMessage *string `json:"statusMessage,omitempty"` - // ItemsCount - Number of items - ItemsCount *int64 `json:"itemsCount,omitempty"` - // ItemsCompletedCount - Number of successfully completed items - ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` - // ErrorPrefix - Wildcard string prefix to use for querying all errors of the item - ErrorPrefix *string `json:"errorPrefix,omitempty"` - // ResultPrefix - Wildcard string prefix to use for querying all sub-tem results of the item - ResultPrefix *string `json:"resultPrefix,omitempty"` - // ID - Result identifier - ID *string `json:"id,omitempty"` - // ResultType - Possible values include: 'ResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeMigrationDatabaseLevelValidationOutput', 'ResultTypeMigrationValidationOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput' - ResultType ResultType `json:"resultType,omitempty"` -} - -// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) MarshalJSON() ([]byte, error) { - msssdtotl.ResultType = ResultTypeTableLevelOutput - objectMap := make(map[string]interface{}) - if msssdtotl.ObjectName != nil { - objectMap["objectName"] = msssdtotl.ObjectName - } - if msssdtotl.StartedOn != nil { - objectMap["startedOn"] = msssdtotl.StartedOn - } - if msssdtotl.EndedOn != nil { - objectMap["endedOn"] = msssdtotl.EndedOn - } - if msssdtotl.State != "" { - objectMap["state"] = msssdtotl.State - } - if msssdtotl.StatusMessage != nil { - objectMap["statusMessage"] = msssdtotl.StatusMessage - } - if msssdtotl.ItemsCount != nil { - objectMap["itemsCount"] = msssdtotl.ItemsCount - } - if msssdtotl.ItemsCompletedCount != nil { - objectMap["itemsCompletedCount"] = msssdtotl.ItemsCompletedCount - } - if msssdtotl.ErrorPrefix != nil { - objectMap["errorPrefix"] = msssdtotl.ErrorPrefix - } - if msssdtotl.ResultPrefix != nil { - objectMap["resultPrefix"] = msssdtotl.ResultPrefix - } - if msssdtotl.ID != nil { - objectMap["id"] = msssdtotl.ID - } - if msssdtotl.ResultType != "" { - objectMap["resultType"] = msssdtotl.ResultType - } - return json.Marshal(objectMap) -} - -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) { +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) { +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { - return &msssdtotl, true -} - -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false } -// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { - return &msssdtotl, true -} - -// MigrateSQLServerSQLDbTaskOutputValidationResult validation result for Sql Server to Azure Sql DB -// migration. -type MigrateSQLServerSQLDbTaskOutputValidationResult struct { - // MigrationID - Migration Identifier - MigrationID *string `json:"migrationId,omitempty"` - // SummaryResults - Validation summary results for each database - SummaryResults map[string]*MigrationValidationDatabaseSummaryResult `json:"summaryResults"` - // Status - Current status of validation at the migration level. Status from the database validation result status will be aggregated here. Possible values include: 'ValidationStatusDefault', 'ValidationStatusNotStarted', 'ValidationStatusInitialized', 'ValidationStatusInProgress', 'ValidationStatusCompleted', 'ValidationStatusCompletedWithIssues', 'ValidationStatusFailed', 'ValidationStatusStopped' - Status ValidationStatus `json:"status,omitempty"` - // ID - Result identifier - ID *string `json:"id,omitempty"` - // ResultType - Possible values include: 'ResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeMigrationDatabaseLevelValidationOutput', 'ResultTypeMigrationValidationOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput' - ResultType ResultType `json:"resultType,omitempty"` -} - -// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputValidationResult. -func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) MarshalJSON() ([]byte, error) { - msssdtovr.ResultType = ResultTypeMigrationValidationOutput - objectMap := make(map[string]interface{}) - if msssdtovr.MigrationID != nil { - objectMap["migrationId"] = msssdtovr.MigrationID - } - if msssdtovr.SummaryResults != nil { - objectMap["summaryResults"] = msssdtovr.SummaryResults - } - if msssdtovr.Status != "" { - objectMap["status"] = msssdtovr.Status - } - if msssdtovr.ID != nil { - objectMap["id"] = msssdtovr.ID - } - if msssdtovr.ResultType != "" { - objectMap["resultType"] = msssdtovr.ResultType - } - return json.Marshal(objectMap) -} - -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. -func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) { +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. -func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) { - return &msssdtovr, true -} - -// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. -func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. -func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. -func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. -func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. -func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { return nil, false } -// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. -func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { - return &msssdtovr, true -} - -// MigrateSQLServerSQLDbTaskProperties properties for the task that migrates on-prem SQL Server databases -// to Azure SQL Database -type MigrateSQLServerSQLDbTaskProperties struct { - // Input - Task input - Input *MigrateSQLServerSQLDbTaskInput `json:"input,omitempty"` - // Output - Task output. This is ignored if submitted. - Output *[]BasicMigrateSQLServerSQLDbTaskOutput `json:"output,omitempty"` - // Errors - Array of errors. This is ignored if submitted. - Errors *[]ODataError `json:"errors,omitempty"` - // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' - State TaskState `json:"state,omitempty"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServer' - TaskType TaskType `json:"taskType,omitempty"` -} - -// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) MarshalJSON() ([]byte, error) { - msssdtp.TaskType = TaskTypeMigrateSQLServerSQLDb - objectMap := make(map[string]interface{}) - if msssdtp.Input != nil { - objectMap["input"] = msssdtp.Input - } - if msssdtp.Output != nil { - objectMap["output"] = msssdtp.Output - } - if msssdtp.Errors != nil { - objectMap["errors"] = msssdtp.Errors - } - if msssdtp.State != "" { - objectMap["state"] = msssdtp.State - } - if msssdtp.TaskType != "" { - objectMap["taskType"] = msssdtp.TaskType - } - return json.Marshal(objectMap) -} - -// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { - return &msssdtp, true -} - -// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false } -// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { - return nil, false +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return &ctssstp, true } -// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { return nil, false } -// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { return nil, false } -// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { - return &msssdtp, true +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &ctssstp, true } -// UnmarshalJSON is the custom unmarshaler for MigrateSQLServerSQLDbTaskProperties struct. -func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ConnectToSourceSQLServerTaskProperties struct. +func (ctssstp *ConnectToSourceSQLServerTaskProperties) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -2635,20 +2720,20 @@ func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) e switch k { case "input": if v != nil { - var input MigrateSQLServerSQLDbTaskInput + var input ConnectToSourceSQLServerTaskInput err = json.Unmarshal(*v, &input) if err != nil { return err } - msssdtp.Input = &input + ctssstp.Input = &input } case "output": if v != nil { - output, err := unmarshalBasicMigrateSQLServerSQLDbTaskOutputArray(*v) + output, err := unmarshalBasicConnectToSourceSQLServerTaskOutputArray(*v) if err != nil { return err } - msssdtp.Output = &output + ctssstp.Output = &output } case "errors": if v != nil { @@ -2657,7 +2742,7 @@ func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) e if err != nil { return err } - msssdtp.Errors = &errorsVar + ctssstp.Errors = &errorsVar } case "state": if v != nil { @@ -2666,7 +2751,15 @@ func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) e if err != nil { return err } - msssdtp.State = state + ctssstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + ctssstp.Commands = &commands } case "taskType": if v != nil { @@ -2675,7 +2768,7 @@ func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) e if err != nil { return err } - msssdtp.TaskType = taskType + ctssstp.TaskType = taskType } } } @@ -2683,144 +2776,194 @@ func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) e return nil } -// MigrateSQLServerSQLServerDatabaseInput database specific information for SQL to SQL migration task -// inputs -type MigrateSQLServerSQLServerDatabaseInput struct { - // Name - Name of the database - Name *string `json:"name,omitempty"` - // RestoreDatabaseName - Name of the database at destination - RestoreDatabaseName *string `json:"restoreDatabaseName,omitempty"` - // BackupFileShare - Backup file share information for this database. - BackupFileShare *FileShare `json:"backupFileShare,omitempty"` - // DatabaseFiles - The list of database files - DatabaseFiles *[]DatabaseFileInput `json:"databaseFiles,omitempty"` -} - -// MigrationEligibilityInfo information about migration eligibility of a server object -type MigrationEligibilityInfo struct { - // IsEligibileForMigration - Whether object is eligible for migration or not. - IsEligibileForMigration *bool `json:"isEligibileForMigration,omitempty"` - // ValidationMessages - Information about eligibility failure for the server object. - ValidationMessages *[]string `json:"validationMessages,omitempty"` +// ConnectToTargetAzureDbForMySQLTaskInput input for the task that validates connection to Azure Database +// for MySQL and target server requirements +type ConnectToTargetAzureDbForMySQLTaskInput struct { + // SourceConnectionInfo - Connection information for source MySQL server + SourceConnectionInfo *MySQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Connection information for target Azure Database for MySQL server + TargetConnectionInfo *MySQLConnectionInfo `json:"targetConnectionInfo,omitempty"` } -// MigrationReportResult migration validation report result, contains the url for downloading the generated -// report. -type MigrationReportResult struct { - // ID - Migration validation result identifier +// ConnectToTargetAzureDbForMySQLTaskOutput output for the task that validates connection to Azure Database +// for MySQL and target server requirements +type ConnectToTargetAzureDbForMySQLTaskOutput struct { + // ID - Result identifier ID *string `json:"id,omitempty"` - // ReportURL - The url of the report. - ReportURL *string `json:"reportUrl,omitempty"` + // ServerVersion - Version of the target server + ServerVersion *string `json:"serverVersion,omitempty"` + // Databases - List of databases on target server + Databases *[]string `json:"databases,omitempty"` + // TargetServerBrandVersion - Target server brand version + TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` + // ValidationErrors - Validation errors associated with the task + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` } -// MigrationTableMetadata metadata for tables selected in migration project -type MigrationTableMetadata struct { - // SourceTableName - Source table name - SourceTableName *string `json:"sourceTableName,omitempty"` - // TargetTableName - Target table name - TargetTableName *string `json:"targetTableName,omitempty"` +// ConnectToTargetAzureDbForMySQLTaskProperties properties for the task that validates connection to Azure +// Database for MySQL and target server requirements +type ConnectToTargetAzureDbForMySQLTaskProperties struct { + // Input - Task input + Input *ConnectToTargetAzureDbForMySQLTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]ConnectToTargetAzureDbForMySQLTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` } -// MigrationValidationDatabaseSummaryResult migration Validation Database level summary result -type MigrationValidationDatabaseSummaryResult struct { - // ID - Result identifier - ID *string `json:"id,omitempty"` - // MigrationID - Migration Identifier - MigrationID *string `json:"migrationId,omitempty"` - // SourceDatabaseName - Name of the source database - SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` - // TargetDatabaseName - Name of the target database - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` - // StartedOn - Validation start time - StartedOn *date.Time `json:"startedOn,omitempty"` - // EndedOn - Validation end time - EndedOn *date.Time `json:"endedOn,omitempty"` - // Status - Current status of validation at the database level. Possible values include: 'ValidationStatusDefault', 'ValidationStatusNotStarted', 'ValidationStatusInitialized', 'ValidationStatusInProgress', 'ValidationStatusCompleted', 'ValidationStatusCompletedWithIssues', 'ValidationStatusFailed', 'ValidationStatusStopped' - Status ValidationStatus `json:"status,omitempty"` +// MarshalJSON is the custom marshaler for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) MarshalJSON() ([]byte, error) { + cttadfmstp.TaskType = TaskTypeConnectToTargetAzureDbForMySQL + objectMap := make(map[string]interface{}) + if cttadfmstp.Input != nil { + objectMap["input"] = cttadfmstp.Input + } + if cttadfmstp.Output != nil { + objectMap["output"] = cttadfmstp.Output + } + if cttadfmstp.Errors != nil { + objectMap["errors"] = cttadfmstp.Errors + } + if cttadfmstp.State != "" { + objectMap["state"] = cttadfmstp.State + } + if cttadfmstp.Commands != nil { + objectMap["commands"] = cttadfmstp.Commands + } + if cttadfmstp.TaskType != "" { + objectMap["taskType"] = cttadfmstp.TaskType + } + return json.Marshal(objectMap) } -// MigrationValidationOptions types of validations to run after the migration -type MigrationValidationOptions struct { - // EnableSchemaValidation - Allows to compare the schema information between source and target. - EnableSchemaValidation *bool `json:"enableSchemaValidation,omitempty"` - // EnableDataIntegrityValidation - Allows to perform a checksum based data integrity validation between source and target for the selected database / tables . - EnableDataIntegrityValidation *bool `json:"enableDataIntegrityValidation,omitempty"` - // EnableQueryAnalysisValidation - Allows to perform a quick and intelligent query analysis by retrieving queries from the source database and executes them in the target. The result will have execution statistics for executions in source and target databases for the extracted queries. - EnableQueryAnalysisValidation *bool `json:"enableQueryAnalysisValidation,omitempty"` +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false } -// NameAvailabilityRequest a resource type and proposed name -type NameAvailabilityRequest struct { - // Name - The proposed resource name - Name *string `json:"name,omitempty"` - // Type - The resource type chain (e.g. virtualMachines/extensions) - Type *string `json:"type,omitempty"` +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false } -// NameAvailabilityResponse indicates whether a proposed resource name is available -type NameAvailabilityResponse struct { - autorest.Response `json:"-"` - // NameAvailable - If true, the name is valid and available. If false, 'reason' describes why not. - NameAvailable *bool `json:"nameAvailable,omitempty"` - // Reason - The reason why the name is not available, if nameAvailable is false. Possible values include: 'AlreadyExists', 'Invalid' - Reason NameCheckFailureReason `json:"reason,omitempty"` - // Message - The localized reason why the name is not available, if nameAvailable is false - Message *string `json:"message,omitempty"` +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false } -// ODataError error information in OData format. -type ODataError struct { - // Code - The machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError' - Code *string `json:"code,omitempty"` - // Message - The human-readable description of the error - Message *string `json:"message,omitempty"` - // Details - Inner errors that caused this error - Details *[]ODataError `json:"details,omitempty"` +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false } -// Project a project resource -type Project struct { - autorest.Response `json:"-"` - // ProjectProperties - Project properties - *ProjectProperties `json:"properties,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for Project. -func (p Project) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if p.ProjectProperties != nil { - objectMap["properties"] = p.ProjectProperties - } - if p.Tags != nil { - objectMap["tags"] = p.Tags - } - if p.Location != nil { - objectMap["location"] = p.Location - } - if p.ID != nil { - objectMap["id"] = p.ID - } - if p.Name != nil { - objectMap["name"] = p.Name - } - if p.Type != nil { - objectMap["type"] = p.Type - } - return json.Marshal(objectMap) +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false } -// UnmarshalJSON is the custom unmarshaler for Project struct. -func (p *Project) UnmarshalJSON(body []byte) error { +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return &cttadfmstp, true +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &cttadfmstp, true +} + +// UnmarshalJSON is the custom unmarshaler for ConnectToTargetAzureDbForMySQLTaskProperties struct. +func (cttadfmstp *ConnectToTargetAzureDbForMySQLTaskProperties) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -2828,59 +2971,58 @@ func (p *Project) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "properties": + case "input": if v != nil { - var projectProperties ProjectProperties - err = json.Unmarshal(*v, &projectProperties) + var input ConnectToTargetAzureDbForMySQLTaskInput + err = json.Unmarshal(*v, &input) if err != nil { return err } - p.ProjectProperties = &projectProperties + cttadfmstp.Input = &input } - case "tags": + case "output": if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) + var output []ConnectToTargetAzureDbForMySQLTaskOutput + err = json.Unmarshal(*v, &output) if err != nil { return err } - p.Tags = tags + cttadfmstp.Output = &output } - case "location": + case "errors": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) if err != nil { return err } - p.Location = &location + cttadfmstp.Errors = &errorsVar } - case "id": + case "state": if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var state TaskState + err = json.Unmarshal(*v, &state) if err != nil { return err } - p.ID = &ID + cttadfmstp.State = state } - case "name": + case "commands": if v != nil { - var name string - err = json.Unmarshal(*v, &name) + commands, err := unmarshalBasicCommandPropertiesArray(*v) if err != nil { return err } - p.Name = &name + cttadfmstp.Commands = &commands } - case "type": + case "taskType": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var taskType TaskType + err = json.Unmarshal(*v, &taskType) if err != nil { return err } - p.Type = &typeVar + cttadfmstp.TaskType = taskType } } } @@ -2888,192 +3030,194 @@ func (p *Project) UnmarshalJSON(body []byte) error { return nil } -// ProjectList oData page of project resources -type ProjectList struct { - autorest.Response `json:"-"` - // Value - List of projects - Value *[]Project `json:"value,omitempty"` - // NextLink - URL to load the next page of projects - NextLink *string `json:"nextLink,omitempty"` +// ConnectToTargetAzureDbForPostgreSQLSyncTaskInput input for the task that validates connection to Azure +// Database for PostgreSQL and target server requirements +type ConnectToTargetAzureDbForPostgreSQLSyncTaskInput struct { + // SourceConnectionInfo - Connection information for source PostgreSQL server + SourceConnectionInfo *PostgreSQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Connection information for target Azure Database for PostgreSQL server + TargetConnectionInfo *PostgreSQLConnectionInfo `json:"targetConnectionInfo,omitempty"` } -// ProjectListIterator provides access to a complete listing of Project values. -type ProjectListIterator struct { - i int - page ProjectListPage +// ConnectToTargetAzureDbForPostgreSQLSyncTaskOutput output for the task that validates connection to Azure +// Database for PostgreSQL and target server requirements +type ConnectToTargetAzureDbForPostgreSQLSyncTaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // TargetServerVersion - Version of the target server + TargetServerVersion *string `json:"targetServerVersion,omitempty"` + // Databases - List of databases on target server + Databases *[]string `json:"databases,omitempty"` + // TargetServerBrandVersion - Target server brand version + TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` + // ValidationErrors - Validation errors associated with the task + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ProjectListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProjectListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() +// ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties properties for the task that validates connection +// to Azure Database For PostgreSQL server and target server requirements for online migration +type ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties struct { + // Input - Task input + Input *ConnectToTargetAzureDbForPostgreSQLSyncTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]ConnectToTargetAzureDbForPostgreSQLSyncTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) MarshalJSON() ([]byte, error) { + cttadfpsstp.TaskType = TaskTypeConnectToTargetAzureDbForPostgreSQLSync + objectMap := make(map[string]interface{}) + if cttadfpsstp.Input != nil { + objectMap["input"] = cttadfpsstp.Input } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil + if cttadfpsstp.Output != nil { + objectMap["output"] = cttadfpsstp.Output } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err + if cttadfpsstp.Errors != nil { + objectMap["errors"] = cttadfpsstp.Errors } - iter.i = 0 - return nil + if cttadfpsstp.State != "" { + objectMap["state"] = cttadfpsstp.State + } + if cttadfpsstp.Commands != nil { + objectMap["commands"] = cttadfpsstp.Commands + } + if cttadfpsstp.TaskType != "" { + objectMap["taskType"] = cttadfpsstp.TaskType + } + return json.Marshal(objectMap) } -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ProjectListIterator) Next() error { - return iter.NextWithContext(context.Background()) +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ProjectListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false } -// Response returns the raw server response from the last page request. -func (iter ProjectListIterator) Response() ProjectList { - return iter.page.Response() +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ProjectListIterator) Value() Project { - if !iter.page.NotDone() { - return Project{} - } - return iter.page.Values()[iter.i] +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false } -// Creates a new instance of the ProjectListIterator type. -func NewProjectListIterator(page ProjectListPage) ProjectListIterator { - return ProjectListIterator{page: page} +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// IsEmpty returns true if the ListResult contains no values. -func (pl ProjectList) IsEmpty() bool { - return pl.Value == nil || len(*pl.Value) == 0 +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false } -// projectListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (pl ProjectList) projectListPreparer(ctx context.Context) (*http.Request, error) { - if pl.NextLink == nil || len(to.String(pl.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(pl.NextLink))) +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false } -// ProjectListPage contains a page of Project values. -type ProjectListPage struct { - fn func(context.Context, ProjectList) (ProjectList, error) - pl ProjectList +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false } -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ProjectListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProjectListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.pl) - if err != nil { - return err - } - page.pl = next - return nil +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false } -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ProjectListPage) Next() error { - return page.NextWithContext(context.Background()) +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ProjectListPage) NotDone() bool { - return !page.pl.IsEmpty() +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false } -// Response returns the raw server response from the last page request. -func (page ProjectListPage) Response() ProjectList { - return page.pl +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false } -// Values returns the slice of values for the current page or nil if there are no values. -func (page ProjectListPage) Values() []Project { - if page.pl.IsEmpty() { - return nil - } - return *page.pl.Value +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false } -// Creates a new instance of the ProjectListPage type. -func NewProjectListPage(getNextPage func(context.Context, ProjectList) (ProjectList, error)) ProjectListPage { - return ProjectListPage{fn: getNextPage} +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false } -// ProjectMetadata common metadata for migration projects -type ProjectMetadata struct { - // SourceServerName - Source server name - SourceServerName *string `json:"sourceServerName,omitempty"` - // SourceServerPort - Source server port number - SourceServerPort *string `json:"sourceServerPort,omitempty"` - // SourceUsername - Source username - SourceUsername *string `json:"sourceUsername,omitempty"` - // TargetServerName - Target server name - TargetServerName *string `json:"targetServerName,omitempty"` - // TargetUsername - Target username - TargetUsername *string `json:"targetUsername,omitempty"` - // TargetDbName - Target database name - TargetDbName *string `json:"targetDbName,omitempty"` - // TargetUsingWinAuth - Whether target connection is Windows authentication - TargetUsingWinAuth *bool `json:"targetUsingWinAuth,omitempty"` - // SelectedMigrationTables - List of tables selected for migration - SelectedMigrationTables *[]MigrationTableMetadata `json:"selectedMigrationTables,omitempty"` +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false } -// ProjectProperties project-specific properties -type ProjectProperties struct { - // SourcePlatform - Source platform for the project. Possible values include: 'SQL', 'Unknown' - SourcePlatform ProjectSourcePlatform `json:"sourcePlatform,omitempty"` - // TargetPlatform - Target platform for the project. Possible values include: 'ProjectTargetPlatformSQLDB', 'ProjectTargetPlatformUnknown' - TargetPlatform ProjectTargetPlatform `json:"targetPlatform,omitempty"` - // CreationTime - UTC Date and time when project was created - CreationTime *date.Time `json:"creationTime,omitempty"` - // SourceConnectionInfo - Information for connecting to source - SourceConnectionInfo BasicConnectionInfo `json:"sourceConnectionInfo,omitempty"` - // TargetConnectionInfo - Information for connecting to target - TargetConnectionInfo BasicConnectionInfo `json:"targetConnectionInfo,omitempty"` - // DatabasesInfo - List of DatabaseInfo - DatabasesInfo *[]DatabaseInfo `json:"databasesInfo,omitempty"` - // ProvisioningState - The project's provisioning state. Possible values include: 'Deleting', 'Succeeded' - ProvisioningState ProjectProvisioningState `json:"provisioningState,omitempty"` +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return &cttadfpsstp, true } -// UnmarshalJSON is the custom unmarshaler for ProjectProperties struct. -func (pp *ProjectProperties) UnmarshalJSON(body []byte) error { +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &cttadfpsstp, true +} + +// UnmarshalJSON is the custom unmarshaler for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties struct. +func (cttadfpsstp *ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -3081,66 +3225,58 @@ func (pp *ProjectProperties) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "sourcePlatform": - if v != nil { - var sourcePlatform ProjectSourcePlatform - err = json.Unmarshal(*v, &sourcePlatform) - if err != nil { - return err - } - pp.SourcePlatform = sourcePlatform - } - case "targetPlatform": + case "input": if v != nil { - var targetPlatform ProjectTargetPlatform - err = json.Unmarshal(*v, &targetPlatform) + var input ConnectToTargetAzureDbForPostgreSQLSyncTaskInput + err = json.Unmarshal(*v, &input) if err != nil { return err } - pp.TargetPlatform = targetPlatform + cttadfpsstp.Input = &input } - case "creationTime": + case "output": if v != nil { - var creationTime date.Time - err = json.Unmarshal(*v, &creationTime) + var output []ConnectToTargetAzureDbForPostgreSQLSyncTaskOutput + err = json.Unmarshal(*v, &output) if err != nil { return err } - pp.CreationTime = &creationTime + cttadfpsstp.Output = &output } - case "sourceConnectionInfo": + case "errors": if v != nil { - sourceConnectionInfo, err := unmarshalBasicConnectionInfo(*v) + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) if err != nil { return err } - pp.SourceConnectionInfo = sourceConnectionInfo + cttadfpsstp.Errors = &errorsVar } - case "targetConnectionInfo": + case "state": if v != nil { - targetConnectionInfo, err := unmarshalBasicConnectionInfo(*v) + var state TaskState + err = json.Unmarshal(*v, &state) if err != nil { return err } - pp.TargetConnectionInfo = targetConnectionInfo + cttadfpsstp.State = state } - case "databasesInfo": + case "commands": if v != nil { - var databasesInfo []DatabaseInfo - err = json.Unmarshal(*v, &databasesInfo) + commands, err := unmarshalBasicCommandPropertiesArray(*v) if err != nil { return err } - pp.DatabasesInfo = &databasesInfo + cttadfpsstp.Commands = &commands } - case "provisioningState": + case "taskType": if v != nil { - var provisioningState ProjectProvisioningState - err = json.Unmarshal(*v, &provisioningState) + var taskType TaskType + err = json.Unmarshal(*v, &taskType) if err != nil { return err } - pp.ProvisioningState = provisioningState + cttadfpsstp.TaskType = taskType } } } @@ -3148,721 +3284,458 @@ func (pp *ProjectProperties) UnmarshalJSON(body []byte) error { return nil } -// ProjectTask a task resource -type ProjectTask struct { - autorest.Response `json:"-"` - // Etag - HTTP strong entity tag value. This is ignored if submitted. - Etag *string `json:"etag,omitempty"` - // Properties - Custom task properties - Properties BasicProjectTaskProperties `json:"properties,omitempty"` - // ID - Resource ID. +// ConnectToTargetSQLDbTaskInput input for the task that validates connection to SQL DB and target server +// requirements +type ConnectToTargetSQLDbTaskInput struct { + // TargetConnectionInfo - Connection information for target SQL DB + TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` +} + +// ConnectToTargetSQLDbTaskOutput output for the task that validates connection to SQL DB and target server +// requirements +type ConnectToTargetSQLDbTaskOutput struct { + // ID - Result identifier ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` + // Databases - Source databases as a map from database name to database id + Databases map[string]*string `json:"databases"` + // TargetServerVersion - Version of the target server + TargetServerVersion *string `json:"targetServerVersion,omitempty"` + // TargetServerBrandVersion - Target server brand version + TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` } -// UnmarshalJSON is the custom unmarshaler for ProjectTask struct. -func (pt *ProjectTask) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err +// MarshalJSON is the custom marshaler for ConnectToTargetSQLDbTaskOutput. +func (cttsdto ConnectToTargetSQLDbTaskOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cttsdto.ID != nil { + objectMap["id"] = cttsdto.ID } - for k, v := range m { - switch k { - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pt.Etag = &etag - } - case "properties": - if v != nil { - properties, err := unmarshalBasicProjectTaskProperties(*v) - if err != nil { - return err - } - pt.Properties = properties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pt.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pt.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - pt.Type = &typeVar - } - } + if cttsdto.Databases != nil { + objectMap["databases"] = cttsdto.Databases } - - return nil -} - -// BasicProjectTaskProperties base class for all types of DMS task properties. If task is not supported by current -// client, this object is returned. -type BasicProjectTaskProperties interface { - AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) - AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) - AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) - AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) - AsProjectTaskProperties() (*ProjectTaskProperties, bool) + if cttsdto.TargetServerVersion != nil { + objectMap["targetServerVersion"] = cttsdto.TargetServerVersion + } + if cttsdto.TargetServerBrandVersion != nil { + objectMap["targetServerBrandVersion"] = cttsdto.TargetServerBrandVersion + } + return json.Marshal(objectMap) } -// ProjectTaskProperties base class for all types of DMS task properties. If task is not supported by current -// client, this object is returned. -type ProjectTaskProperties struct { +// ConnectToTargetSQLDbTaskProperties properties for the task that validates connection to SQL DB and +// target server requirements +type ConnectToTargetSQLDbTaskProperties struct { + // Input - Task input + Input *ConnectToTargetSQLDbTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]ConnectToTargetSQLDbTaskOutput `json:"output,omitempty"` // Errors - Array of errors. This is ignored if submitted. Errors *[]ODataError `json:"errors,omitempty"` // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' State TaskState `json:"state,omitempty"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServer' + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' TaskType TaskType `json:"taskType,omitempty"` } -func unmarshalBasicProjectTaskProperties(body []byte) (BasicProjectTaskProperties, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["taskType"] { - case string(TaskTypeMigrateSQLServerSQLDb): - var msssdtp MigrateSQLServerSQLDbTaskProperties - err := json.Unmarshal(body, &msssdtp) - return msssdtp, err - case string(TaskTypeGetUserTablesSQL): - var gutstp GetUserTablesSQLTaskProperties - err := json.Unmarshal(body, &gutstp) - return gutstp, err - case string(TaskTypeConnectToTargetSQLDb): - var cttsdtp ConnectToTargetSQLDbTaskProperties - err := json.Unmarshal(body, &cttsdtp) - return cttsdtp, err - case string(TaskTypeConnectToSourceSQLServer): - var ctssstp ConnectToSourceSQLServerTaskProperties - err := json.Unmarshal(body, &ctssstp) - return ctssstp, err - default: - var ptp ProjectTaskProperties - err := json.Unmarshal(body, &ptp) - return ptp, err +// MarshalJSON is the custom marshaler for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) MarshalJSON() ([]byte, error) { + cttsdtp.TaskType = TaskTypeConnectToTargetSQLDb + objectMap := make(map[string]interface{}) + if cttsdtp.Input != nil { + objectMap["input"] = cttsdtp.Input } -} -func unmarshalBasicProjectTaskPropertiesArray(body []byte) ([]BasicProjectTaskProperties, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err + if cttsdtp.Output != nil { + objectMap["output"] = cttsdtp.Output } - - ptpArray := make([]BasicProjectTaskProperties, len(rawMessages)) - - for index, rawMessage := range rawMessages { - ptp, err := unmarshalBasicProjectTaskProperties(*rawMessage) - if err != nil { - return nil, err - } - ptpArray[index] = ptp + if cttsdtp.Errors != nil { + objectMap["errors"] = cttsdtp.Errors } - return ptpArray, nil -} - -// MarshalJSON is the custom marshaler for ProjectTaskProperties. -func (ptp ProjectTaskProperties) MarshalJSON() ([]byte, error) { - ptp.TaskType = TaskTypeUnknown - objectMap := make(map[string]interface{}) - if ptp.Errors != nil { - objectMap["errors"] = ptp.Errors + if cttsdtp.State != "" { + objectMap["state"] = cttsdtp.State } - if ptp.State != "" { - objectMap["state"] = ptp.State + if cttsdtp.Commands != nil { + objectMap["commands"] = cttsdtp.Commands } - if ptp.TaskType != "" { - objectMap["taskType"] = ptp.TaskType + if cttsdtp.TaskType != "" { + objectMap["taskType"] = cttsdtp.TaskType } return json.Marshal(objectMap) } -// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. -func (ptp ProjectTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { return nil, false } -// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. -func (ptp ProjectTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { return nil, false } -// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. -func (ptp ProjectTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. -func (ptp ProjectTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { return nil, false } -// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. -func (ptp ProjectTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { - return &ptp, true +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. -func (ptp ProjectTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { - return &ptp, true +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false } -// QueryAnalysisValidationResult results for query analysis comparison between the source and target -type QueryAnalysisValidationResult struct { - // QueryResults - List of queries executed and it's execution results in source and target - QueryResults *QueryExecutionResult `json:"queryResults,omitempty"` - // ValidationErrors - Errors that are part of the execution - ValidationErrors *ValidationError `json:"validationErrors,omitempty"` +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false } -// QueryExecutionResult describes query analysis results for execution in source and target -type QueryExecutionResult struct { - // QueryText - Query text retrieved from the source server - QueryText *string `json:"queryText,omitempty"` - // StatementsInBatch - Total no. of statements in the batch - StatementsInBatch *int64 `json:"statementsInBatch,omitempty"` - // SourceResult - Query analysis result from the source - SourceResult *ExecutionStatistics `json:"sourceResult,omitempty"` - // TargetResult - Query analysis result from the target - TargetResult *ExecutionStatistics `json:"targetResult,omitempty"` +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false } -// Quota describes a quota for or usage details about a resource -type Quota struct { - // CurrentValue - The current value of the quota. If null or missing, the current value cannot be determined in the context of the request. - CurrentValue *float64 `json:"currentValue,omitempty"` - // ID - The resource ID of the quota object - ID *string `json:"id,omitempty"` - // Limit - The maximum value of the quota. If null or missing, the quota has no maximum, in which case it merely tracks usage. - Limit *float64 `json:"limit,omitempty"` - // Name - The name of the quota - Name *QuotaName `json:"name,omitempty"` - // Unit - The unit for the quota, such as Count, Bytes, BytesPerSecond, etc. - Unit *string `json:"unit,omitempty"` +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false } -// QuotaList oData page of quota objects -type QuotaList struct { - autorest.Response `json:"-"` - // Value - List of quotas - Value *[]Quota `json:"value,omitempty"` - // NextLink - URL to load the next page of quotas, or null or missing if this is the last page - NextLink *string `json:"nextLink,omitempty"` +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false } -// QuotaListIterator provides access to a complete listing of Quota values. -type QuotaListIterator struct { - i int - page QuotaListPage +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *QuotaListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QuotaListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false } -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *QuotaListIterator) Next() error { - return iter.NextWithContext(context.Background()) +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter QuotaListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false } -// Response returns the raw server response from the last page request. -func (iter QuotaListIterator) Response() QuotaList { - return iter.page.Response() +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter QuotaListIterator) Value() Quota { - if !iter.page.NotDone() { - return Quota{} - } - return iter.page.Values()[iter.i] +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// Creates a new instance of the QuotaListIterator type. -func NewQuotaListIterator(page QuotaListPage) QuotaListIterator { - return QuotaListIterator{page: page} +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false } -// IsEmpty returns true if the ListResult contains no values. -func (ql QuotaList) IsEmpty() bool { - return ql.Value == nil || len(*ql.Value) == 0 +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return &cttsdtp, true } -// quotaListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (ql QuotaList) quotaListPreparer(ctx context.Context) (*http.Request, error) { - if ql.NextLink == nil || len(to.String(ql.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ql.NextLink))) +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false } -// QuotaListPage contains a page of Quota values. -type QuotaListPage struct { - fn func(context.Context, QuotaList) (QuotaList, error) - ql QuotaList +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false } -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *QuotaListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QuotaListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.ql) +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &cttsdtp, true +} + +// UnmarshalJSON is the custom unmarshaler for ConnectToTargetSQLDbTaskProperties struct. +func (cttsdtp *ConnectToTargetSQLDbTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { return err } - page.ql = next + for k, v := range m { + switch k { + case "input": + if v != nil { + var input ConnectToTargetSQLDbTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + cttsdtp.Input = &input + } + case "output": + if v != nil { + var output []ConnectToTargetSQLDbTaskOutput + err = json.Unmarshal(*v, &output) + if err != nil { + return err + } + cttsdtp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + cttsdtp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + cttsdtp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + cttsdtp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + cttsdtp.TaskType = taskType + } + } + } + return nil } -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *QuotaListPage) Next() error { - return page.NextWithContext(context.Background()) +// ConnectToTargetSQLMISyncTaskInput input for the task that validates connection to Azure SQL Database +// Managed Instance online scenario. +type ConnectToTargetSQLMISyncTaskInput struct { + // TargetConnectionInfo - Connection information for Azure SQL Database Managed Instance + TargetConnectionInfo *MiSQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // AzureApp - Azure Active Directory Application the DMS instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account + AzureApp *AzureActiveDirectoryApp `json:"azureApp,omitempty"` } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page QuotaListPage) NotDone() bool { - return !page.ql.IsEmpty() +// ConnectToTargetSQLMISyncTaskOutput output for the task that validates connection to Azure SQL Database +// Managed Instance. +type ConnectToTargetSQLMISyncTaskOutput struct { + // TargetServerVersion - Target server version + TargetServerVersion *string `json:"targetServerVersion,omitempty"` + // TargetServerBrandVersion - Target server brand version + TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` + // ValidationErrors - Validation errors + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` } -// Response returns the raw server response from the last page request. -func (page QuotaListPage) Response() QuotaList { - return page.ql +// ConnectToTargetSQLMISyncTaskProperties properties for the task that validates connection to Azure SQL +// Database Managed Instance +type ConnectToTargetSQLMISyncTaskProperties struct { + // Input - Task input + Input *ConnectToTargetSQLMISyncTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]ConnectToTargetSQLMISyncTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` } -// Values returns the slice of values for the current page or nil if there are no values. -func (page QuotaListPage) Values() []Quota { - if page.ql.IsEmpty() { - return nil +// MarshalJSON is the custom marshaler for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) MarshalJSON() ([]byte, error) { + cttsmstp.TaskType = TaskTypeConnectToTargetAzureSQLDbMISyncLRS + objectMap := make(map[string]interface{}) + if cttsmstp.Input != nil { + objectMap["input"] = cttsmstp.Input } - return *page.ql.Value + if cttsmstp.Output != nil { + objectMap["output"] = cttsmstp.Output + } + if cttsmstp.Errors != nil { + objectMap["errors"] = cttsmstp.Errors + } + if cttsmstp.State != "" { + objectMap["state"] = cttsmstp.State + } + if cttsmstp.Commands != nil { + objectMap["commands"] = cttsmstp.Commands + } + if cttsmstp.TaskType != "" { + objectMap["taskType"] = cttsmstp.TaskType + } + return json.Marshal(objectMap) } -// Creates a new instance of the QuotaListPage type. -func NewQuotaListPage(getNextPage func(context.Context, QuotaList) (QuotaList, error)) QuotaListPage { - return QuotaListPage{fn: getNextPage} +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false } -// QuotaName the name of the quota -type QuotaName struct { - // LocalizedValue - The localized name of the quota - LocalizedValue *string `json:"localizedValue,omitempty"` - // Value - The unlocalized name (or ID) of the quota - Value *string `json:"value,omitempty"` +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false } -// ReportableException exception object for all custom exceptions -type ReportableException struct { - // Message - Error message - Message *string `json:"message,omitempty"` - // FilePath - The path to the file where exception occurred - FilePath *string `json:"filePath,omitempty"` - // LineNumber - The line number where exception occurred - LineNumber *string `json:"lineNumber,omitempty"` - // HResult - Coded numerical value that is assigned to a specific exception - HResult *int32 `json:"hResult,omitempty"` - // StackTrace - Stack trace - StackTrace *string `json:"stackTrace,omitempty"` +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false } -// Resource ARM resource. -type Resource struct { - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false } -// ResourceSku describes an available DMS SKU. -type ResourceSku struct { - // ResourceType - The type of resource the SKU applies to. - ResourceType *string `json:"resourceType,omitempty"` - // Name - The name of SKU. - Name *string `json:"name,omitempty"` - // Tier - Specifies the tier of DMS in a scale set. - Tier *string `json:"tier,omitempty"` - // Size - The Size of the SKU. - Size *string `json:"size,omitempty"` - // Family - The Family of this particular SKU. - Family *string `json:"family,omitempty"` - // Kind - The Kind of resources that are supported in this SKU. - Kind *string `json:"kind,omitempty"` - // Capacity - Not used. - Capacity *ResourceSkuCapacity `json:"capacity,omitempty"` - // Locations - The set of locations that the SKU is available. - Locations *[]string `json:"locations,omitempty"` - // APIVersions - The api versions that support this SKU. - APIVersions *[]string `json:"apiVersions,omitempty"` - // Costs - Metadata for retrieving price info. - Costs *[]ResourceSkuCosts `json:"costs,omitempty"` - // Capabilities - A name value pair to describe the capability. - Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"` - // Restrictions - The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. - Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"` +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// ResourceSkuCapabilities describes The SKU capabilities object. -type ResourceSkuCapabilities struct { - // Name - An invariant to describe the feature. - Name *string `json:"name,omitempty"` - // Value - An invariant if the feature is measured by quantity. - Value *string `json:"value,omitempty"` +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false } -// ResourceSkuCapacity describes scaling information of a SKU. -type ResourceSkuCapacity struct { - // Minimum - The minimum capacity. - Minimum *int64 `json:"minimum,omitempty"` - // Maximum - The maximum capacity. - Maximum *int64 `json:"maximum,omitempty"` - // Default - The default capacity. - Default *int64 `json:"default,omitempty"` - // ScaleType - The scale type applicable to the SKU. Possible values include: 'ResourceSkuCapacityScaleTypeAutomatic', 'ResourceSkuCapacityScaleTypeManual', 'ResourceSkuCapacityScaleTypeNone' - ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"` +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false } -// ResourceSkuCosts describes metadata for retrieving price info. -type ResourceSkuCosts struct { - // MeterID - Used for querying price from commerce. - MeterID *string `json:"meterID,omitempty"` - // Quantity - The multiplier is needed to extend the base metered cost. - Quantity *int64 `json:"quantity,omitempty"` - // ExtendedUnit - An invariant to show the extended unit. - ExtendedUnit *string `json:"extendedUnit,omitempty"` +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false } -// ResourceSkuRestrictions describes scaling information of a SKU. -type ResourceSkuRestrictions struct { - // Type - The type of restrictions. Possible values include: 'Location' - Type ResourceSkuRestrictionsType `json:"type,omitempty"` - // Values - The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. - Values *[]string `json:"values,omitempty"` - // ReasonCode - The reason code for restriction. Possible values include: 'QuotaID', 'NotAvailableForSubscription' - ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"` +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false } -// ResourceSkusResult the DMS List SKUs operation response. -type ResourceSkusResult struct { - autorest.Response `json:"-"` - // Value - The list of SKUs available for the subscription. - Value *[]ResourceSku `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of DMS SKUs. Call ListNext() with this to fetch the next page of DMS SKUs. - NextLink *string `json:"nextLink,omitempty"` +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false } -// ResourceSkusResultIterator provides access to a complete listing of ResourceSku values. -type ResourceSkusResultIterator struct { - i int - page ResourceSkusResultPage +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ResourceSkusResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ResourceSkusResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ResourceSkusResultIterator) Response() ResourceSkusResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ResourceSkusResultIterator) Value() ResourceSku { - if !iter.page.NotDone() { - return ResourceSku{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ResourceSkusResultIterator type. -func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator { - return ResourceSkusResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (rsr ResourceSkusResult) IsEmpty() bool { - return rsr.Value == nil || len(*rsr.Value) == 0 -} - -// resourceSkusResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (rsr ResourceSkusResult) resourceSkusResultPreparer(ctx context.Context) (*http.Request, error) { - if rsr.NextLink == nil || len(to.String(rsr.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rsr.NextLink))) +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return &cttsmstp, true } -// ResourceSkusResultPage contains a page of ResourceSku values. -type ResourceSkusResultPage struct { - fn func(context.Context, ResourceSkusResult) (ResourceSkusResult, error) - rsr ResourceSkusResult +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false } -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.rsr) - if err != nil { - return err - } - page.rsr = next - return nil +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false } -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ResourceSkusResultPage) Next() error { - return page.NextWithContext(context.Background()) +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ResourceSkusResultPage) NotDone() bool { - return !page.rsr.IsEmpty() +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// Response returns the raw server response from the last page request. -func (page ResourceSkusResultPage) Response() ResourceSkusResult { - return page.rsr +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false } -// Values returns the slice of values for the current page or nil if there are no values. -func (page ResourceSkusResultPage) Values() []ResourceSku { - if page.rsr.IsEmpty() { - return nil - } - return *page.rsr.Value +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false } -// Creates a new instance of the ResourceSkusResultPage type. -func NewResourceSkusResultPage(getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage { - return ResourceSkusResultPage{fn: getNextPage} +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false } -// SchemaComparisonValidationResult results for schema comparison between the source and target -type SchemaComparisonValidationResult struct { - // SchemaDifferences - List of schema differences between the source and target databases - SchemaDifferences *SchemaComparisonValidationResultType `json:"schemaDifferences,omitempty"` - // ValidationErrors - List of errors that happened while performing schema compare validation - ValidationErrors *ValidationError `json:"validationErrors,omitempty"` - // SourceDatabaseObjectCount - Count of source database objects - SourceDatabaseObjectCount map[string]*int64 `json:"sourceDatabaseObjectCount"` - // TargetDatabaseObjectCount - Count of target database objects - TargetDatabaseObjectCount map[string]*int64 `json:"targetDatabaseObjectCount"` +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for SchemaComparisonValidationResult. -func (scvr SchemaComparisonValidationResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if scvr.SchemaDifferences != nil { - objectMap["schemaDifferences"] = scvr.SchemaDifferences - } - if scvr.ValidationErrors != nil { - objectMap["validationErrors"] = scvr.ValidationErrors - } - if scvr.SourceDatabaseObjectCount != nil { - objectMap["sourceDatabaseObjectCount"] = scvr.SourceDatabaseObjectCount - } - if scvr.TargetDatabaseObjectCount != nil { - objectMap["targetDatabaseObjectCount"] = scvr.TargetDatabaseObjectCount - } - return json.Marshal(objectMap) +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false } -// SchemaComparisonValidationResultType description about the errors happen while performing migration -// validation -type SchemaComparisonValidationResultType struct { - // ObjectName - Name of the object that has the difference - ObjectName *string `json:"objectName,omitempty"` - // ObjectType - Type of the object that has the difference. e.g (Table/View/StoredProcedure). Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function' - ObjectType ObjectType `json:"objectType,omitempty"` - // UpdateAction - Update action type with respect to target. Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget' - UpdateAction UpdateActionType `json:"updateAction,omitempty"` +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false } -// Service a Database Migration Service resource -type Service struct { - autorest.Response `json:"-"` - // Etag - HTTP strong entity tag value. Ignored if submitted - Etag *string `json:"etag,omitempty"` - // Kind - The resource kind. Only 'vm' (the default) is supported. - Kind *string `json:"kind,omitempty"` - // ServiceProperties - Custom service properties - *ServiceProperties `json:"properties,omitempty"` - // Sku - Service SKU - Sku *ServiceSku `json:"sku,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for Service. -func (s Service) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if s.Etag != nil { - objectMap["etag"] = s.Etag - } - if s.Kind != nil { - objectMap["kind"] = s.Kind - } - if s.ServiceProperties != nil { - objectMap["properties"] = s.ServiceProperties - } - if s.Sku != nil { - objectMap["sku"] = s.Sku - } - if s.Tags != nil { - objectMap["tags"] = s.Tags - } - if s.Location != nil { - objectMap["location"] = s.Location - } - if s.ID != nil { - objectMap["id"] = s.ID - } - if s.Name != nil { - objectMap["name"] = s.Name - } - if s.Type != nil { - objectMap["type"] = s.Type - } - return json.Marshal(objectMap) +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &cttsmstp, true } -// UnmarshalJSON is the custom unmarshaler for Service struct. -func (s *Service) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ConnectToTargetSQLMISyncTaskProperties struct. +func (cttsmstp *ConnectToTargetSQLMISyncTaskProperties) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -3870,113 +3743,9436 @@ func (s *Service) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - s.Etag = &etag - } - case "kind": - if v != nil { - var kind string - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - s.Kind = &kind - } - case "properties": + case "input": if v != nil { - var serviceProperties ServiceProperties - err = json.Unmarshal(*v, &serviceProperties) + var input ConnectToTargetSQLMISyncTaskInput + err = json.Unmarshal(*v, &input) if err != nil { return err } - s.ServiceProperties = &serviceProperties + cttsmstp.Input = &input } - case "sku": + case "output": if v != nil { - var sku ServiceSku - err = json.Unmarshal(*v, &sku) + var output []ConnectToTargetSQLMISyncTaskOutput + err = json.Unmarshal(*v, &output) if err != nil { return err } - s.Sku = &sku + cttsmstp.Output = &output } - case "tags": + case "errors": if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) if err != nil { return err } - s.Tags = tags + cttsmstp.Errors = &errorsVar } - case "location": + case "state": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var state TaskState + err = json.Unmarshal(*v, &state) if err != nil { return err } - s.Location = &location + cttsmstp.State = state } - case "id": + case "commands": if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + commands, err := unmarshalBasicCommandPropertiesArray(*v) if err != nil { return err } - s.ID = &ID + cttsmstp.Commands = &commands } - case "name": + case "taskType": if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var taskType TaskType + err = json.Unmarshal(*v, &taskType) if err != nil { return err } - s.Name = &name + cttsmstp.TaskType = taskType } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + } + } + + return nil +} + +// ConnectToTargetSQLMITaskInput input for the task that validates connection to Azure SQL Database Managed +// Instance. +type ConnectToTargetSQLMITaskInput struct { + // TargetConnectionInfo - Connection information for target SQL Server + TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` +} + +// ConnectToTargetSQLMITaskOutput output for the task that validates connection to Azure SQL Database +// Managed Instance. +type ConnectToTargetSQLMITaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // TargetServerVersion - Target server version + TargetServerVersion *string `json:"targetServerVersion,omitempty"` + // TargetServerBrandVersion - Target server brand version + TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` + // Logins - List of logins on the target server. + Logins *[]string `json:"logins,omitempty"` + // AgentJobs - List of agent jobs on the target server. + AgentJobs *[]string `json:"agentJobs,omitempty"` + // ValidationErrors - Validation errors + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` +} + +// ConnectToTargetSQLMITaskProperties properties for the task that validates connection to Azure SQL +// Database Managed Instance +type ConnectToTargetSQLMITaskProperties struct { + // Input - Task input + Input *ConnectToTargetSQLMITaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]ConnectToTargetSQLMITaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) MarshalJSON() ([]byte, error) { + cttsmtp.TaskType = TaskTypeConnectToTargetAzureSQLDbMI + objectMap := make(map[string]interface{}) + if cttsmtp.Input != nil { + objectMap["input"] = cttsmtp.Input + } + if cttsmtp.Output != nil { + objectMap["output"] = cttsmtp.Output + } + if cttsmtp.Errors != nil { + objectMap["errors"] = cttsmtp.Errors + } + if cttsmtp.State != "" { + objectMap["state"] = cttsmtp.State + } + if cttsmtp.Commands != nil { + objectMap["commands"] = cttsmtp.Commands + } + if cttsmtp.TaskType != "" { + objectMap["taskType"] = cttsmtp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return &cttsmtp, true +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &cttsmtp, true +} + +// UnmarshalJSON is the custom unmarshaler for ConnectToTargetSQLMITaskProperties struct. +func (cttsmtp *ConnectToTargetSQLMITaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input ConnectToTargetSQLMITaskInput + err = json.Unmarshal(*v, &input) if err != nil { return err } - s.Type = &typeVar + cttsmtp.Input = &input + } + case "output": + if v != nil { + var output []ConnectToTargetSQLMITaskOutput + err = json.Unmarshal(*v, &output) + if err != nil { + return err + } + cttsmtp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + cttsmtp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + cttsmtp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + cttsmtp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + cttsmtp.TaskType = taskType } } } - return nil + return nil +} + +// ConnectToTargetSQLSQLDbSyncTaskInput input for the task that validates connection to Azure SQL DB and +// target server requirements +type ConnectToTargetSQLSQLDbSyncTaskInput struct { + // SourceConnectionInfo - Connection information for source SQL Server + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Connection information for target SQL DB + TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` +} + +// ConnectToTargetSQLSQLDbSyncTaskProperties properties for the task that validates connection to SQL DB +// and target server requirements for online migration +type ConnectToTargetSQLSQLDbSyncTaskProperties struct { + // Input - Task input + Input *ConnectToTargetSQLSQLDbSyncTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]ConnectToTargetSQLDbTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) MarshalJSON() ([]byte, error) { + cttssdstp.TaskType = TaskTypeConnectToTargetSQLDbSync + objectMap := make(map[string]interface{}) + if cttssdstp.Input != nil { + objectMap["input"] = cttssdstp.Input + } + if cttssdstp.Output != nil { + objectMap["output"] = cttssdstp.Output + } + if cttssdstp.Errors != nil { + objectMap["errors"] = cttssdstp.Errors + } + if cttssdstp.State != "" { + objectMap["state"] = cttssdstp.State + } + if cttssdstp.Commands != nil { + objectMap["commands"] = cttssdstp.Commands + } + if cttssdstp.TaskType != "" { + objectMap["taskType"] = cttssdstp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return &cttssdstp, true +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &cttssdstp, true +} + +// UnmarshalJSON is the custom unmarshaler for ConnectToTargetSQLSQLDbSyncTaskProperties struct. +func (cttssdstp *ConnectToTargetSQLSQLDbSyncTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input ConnectToTargetSQLSQLDbSyncTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + cttssdstp.Input = &input + } + case "output": + if v != nil { + var output []ConnectToTargetSQLDbTaskOutput + err = json.Unmarshal(*v, &output) + if err != nil { + return err + } + cttssdstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + cttssdstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + cttssdstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + cttssdstp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + cttssdstp.TaskType = taskType + } + } + } + + return nil +} + +// Database information about a single database +type Database struct { + // ID - Unique identifier for the database + ID *string `json:"id,omitempty"` + // Name - Name of the database + Name *string `json:"name,omitempty"` + // CompatibilityLevel - SQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140' + CompatibilityLevel DatabaseCompatLevel `json:"compatibilityLevel,omitempty"` + // Collation - Collation name of the database + Collation *string `json:"collation,omitempty"` + // ServerName - Name of the server + ServerName *string `json:"serverName,omitempty"` + // Fqdn - Fully qualified name + Fqdn *string `json:"fqdn,omitempty"` + // InstallID - Install id of the database + InstallID *string `json:"installId,omitempty"` + // ServerVersion - Version of the server + ServerVersion *string `json:"serverVersion,omitempty"` + // ServerEdition - Edition of the server + ServerEdition *string `json:"serverEdition,omitempty"` + // ServerLevel - Product level of the server (RTM, SP, CTP). + ServerLevel *string `json:"serverLevel,omitempty"` + // ServerDefaultDataPath - Default path of the data files + ServerDefaultDataPath *string `json:"serverDefaultDataPath,omitempty"` + // ServerDefaultLogPath - Default path of the log files + ServerDefaultLogPath *string `json:"serverDefaultLogPath,omitempty"` + // ServerDefaultBackupPath - Default path of the backup folder + ServerDefaultBackupPath *string `json:"serverDefaultBackupPath,omitempty"` + // ServerCoreCount - Number of cores on the server + ServerCoreCount *int32 `json:"serverCoreCount,omitempty"` + // ServerVisibleOnlineCoreCount - Number of cores on the server that have VISIBLE ONLINE status + ServerVisibleOnlineCoreCount *int32 `json:"serverVisibleOnlineCoreCount,omitempty"` + // DatabaseState - State of the database. Possible values include: 'DatabaseStateOnline', 'DatabaseStateRestoring', 'DatabaseStateRecovering', 'DatabaseStateRecoveryPending', 'DatabaseStateSuspect', 'DatabaseStateEmergency', 'DatabaseStateOffline', 'DatabaseStateCopying', 'DatabaseStateOfflineSecondary' + DatabaseState DatabaseState `json:"databaseState,omitempty"` + // ServerID - The unique Server Id + ServerID *string `json:"serverId,omitempty"` +} + +// DatabaseBackupInfo information about backup files when existing backup mode is used. +type DatabaseBackupInfo struct { + // DatabaseName - Database name. + DatabaseName *string `json:"databaseName,omitempty"` + // BackupType - Backup Type. Possible values include: 'BackupTypeDatabase', 'BackupTypeTransactionLog', 'BackupTypeFile', 'BackupTypeDifferentialDatabase', 'BackupTypeDifferentialFile', 'BackupTypePartial', 'BackupTypeDifferentialPartial' + BackupType BackupType `json:"backupType,omitempty"` + // BackupFiles - The list of backup files for the current database. + BackupFiles *[]string `json:"backupFiles,omitempty"` + // Position - Position of current database backup in the file. + Position *int32 `json:"position,omitempty"` + // IsDamaged - Database was damaged when backed up, but the backup operation was requested to continue despite errors. + IsDamaged *bool `json:"isDamaged,omitempty"` + // IsCompressed - Whether the backup set is compressed + IsCompressed *bool `json:"isCompressed,omitempty"` + // FamilyCount - Number of files in the backup set. + FamilyCount *int32 `json:"familyCount,omitempty"` + // BackupFinishDate - Date and time when the backup operation finished. + BackupFinishDate *date.Time `json:"backupFinishDate,omitempty"` +} + +// DatabaseFileInfo database file specific information +type DatabaseFileInfo struct { + // DatabaseName - Name of the database + DatabaseName *string `json:"databaseName,omitempty"` + // ID - Unique identifier for database file + ID *string `json:"id,omitempty"` + // LogicalName - Logical name of the file + LogicalName *string `json:"logicalName,omitempty"` + // PhysicalFullName - Operating-system full path of the file + PhysicalFullName *string `json:"physicalFullName,omitempty"` + // RestoreFullName - Suggested full path of the file for restoring + RestoreFullName *string `json:"restoreFullName,omitempty"` + // FileType - Database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext' + FileType DatabaseFileType `json:"fileType,omitempty"` + // SizeMB - Size of the file in megabytes + SizeMB *float64 `json:"sizeMB,omitempty"` +} + +// DatabaseFileInput database file specific information for input +type DatabaseFileInput struct { + // ID - Unique identifier for database file + ID *string `json:"id,omitempty"` + // LogicalName - Logical name of the file + LogicalName *string `json:"logicalName,omitempty"` + // PhysicalFullName - Operating-system full path of the file + PhysicalFullName *string `json:"physicalFullName,omitempty"` + // RestoreFullName - Suggested full path of the file for restoring + RestoreFullName *string `json:"restoreFullName,omitempty"` + // FileType - Database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext' + FileType DatabaseFileType `json:"fileType,omitempty"` +} + +// DatabaseInfo project Database Details +type DatabaseInfo struct { + // SourceDatabaseName - Name of the database + SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` +} + +// DatabaseObjectName a representation of the name of an object in a database +type DatabaseObjectName struct { + // DatabaseName - The unescaped name of the database containing the object + DatabaseName *string `json:"databaseName,omitempty"` + // ObjectName - The unescaped name of the object + ObjectName *string `json:"objectName,omitempty"` + // SchemaName - The unescaped name of the schema containing the object + SchemaName *string `json:"schemaName,omitempty"` + // ObjectType - Type of the object in the database. Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function' + ObjectType ObjectType `json:"objectType,omitempty"` +} + +// DatabaseSummaryResult summary of database results in the migration +type DatabaseSummaryResult struct { + // SizeMB - Size of the database in megabytes + SizeMB *float64 `json:"sizeMB,omitempty"` + // Name - Name of the item + Name *string `json:"name,omitempty"` + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' + State MigrationState `json:"state,omitempty"` + // StatusMessage - Status message + StatusMessage *string `json:"statusMessage,omitempty"` + // ItemsCount - Number of items + ItemsCount *int64 `json:"itemsCount,omitempty"` + // ItemsCompletedCount - Number of successfully completed items + ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` + // ErrorPrefix - Wildcard string prefix to use for querying all errors of the item + ErrorPrefix *string `json:"errorPrefix,omitempty"` + // ResultPrefix - Wildcard string prefix to use for querying all sub-tem results of the item + ResultPrefix *string `json:"resultPrefix,omitempty"` +} + +// DatabaseTable table properties +type DatabaseTable struct { + // HasRows - Indicates whether table is empty or not + HasRows *bool `json:"hasRows,omitempty"` + // Name - Schema-qualified name of the table + Name *string `json:"name,omitempty"` +} + +// DataIntegrityValidationResult results for checksum based Data Integrity validation results +type DataIntegrityValidationResult struct { + // FailedObjects - List of failed table names of source and target pair + FailedObjects map[string]*string `json:"failedObjects"` + // ValidationErrors - List of errors that happened while performing data integrity validation + ValidationErrors *ValidationError `json:"validationErrors,omitempty"` +} + +// MarshalJSON is the custom marshaler for DataIntegrityValidationResult. +func (divr DataIntegrityValidationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if divr.FailedObjects != nil { + objectMap["failedObjects"] = divr.FailedObjects + } + if divr.ValidationErrors != nil { + objectMap["validationErrors"] = divr.ValidationErrors + } + return json.Marshal(objectMap) +} + +// DataItemMigrationSummaryResult basic summary of a data item migration +type DataItemMigrationSummaryResult struct { + // Name - Name of the item + Name *string `json:"name,omitempty"` + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' + State MigrationState `json:"state,omitempty"` + // StatusMessage - Status message + StatusMessage *string `json:"statusMessage,omitempty"` + // ItemsCount - Number of items + ItemsCount *int64 `json:"itemsCount,omitempty"` + // ItemsCompletedCount - Number of successfully completed items + ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` + // ErrorPrefix - Wildcard string prefix to use for querying all errors of the item + ErrorPrefix *string `json:"errorPrefix,omitempty"` + // ResultPrefix - Wildcard string prefix to use for querying all sub-tem results of the item + ResultPrefix *string `json:"resultPrefix,omitempty"` +} + +// Error migration Task errors +type Error struct { + // Message - Error description + Message *string `json:"message,omitempty"` + // Type - Type of error. Possible values include: 'ErrorTypeDefault', 'ErrorTypeWarning', 'ErrorTypeError' + Type ErrorType `json:"type,omitempty"` +} + +// ExecutionStatistics description about the errors happen while performing migration validation +type ExecutionStatistics struct { + // ExecutionCount - No. of query executions + ExecutionCount *int64 `json:"executionCount,omitempty"` + // CPUTimeMs - CPU Time in millisecond(s) for the query execution + CPUTimeMs *float64 `json:"cpuTimeMs,omitempty"` + // ElapsedTimeMs - Time taken in millisecond(s) for executing the query + ElapsedTimeMs *float64 `json:"elapsedTimeMs,omitempty"` + // WaitStats - Dictionary of sql query execution wait types and the respective statistics + WaitStats map[string]*WaitStatistics `json:"waitStats"` + // HasErrors - Indicates whether the query resulted in an error + HasErrors *bool `json:"hasErrors,omitempty"` + // SQLErrors - List of sql Errors + SQLErrors *[]string `json:"sqlErrors,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExecutionStatistics. +func (es ExecutionStatistics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if es.ExecutionCount != nil { + objectMap["executionCount"] = es.ExecutionCount + } + if es.CPUTimeMs != nil { + objectMap["cpuTimeMs"] = es.CPUTimeMs + } + if es.ElapsedTimeMs != nil { + objectMap["elapsedTimeMs"] = es.ElapsedTimeMs + } + if es.WaitStats != nil { + objectMap["waitStats"] = es.WaitStats + } + if es.HasErrors != nil { + objectMap["hasErrors"] = es.HasErrors + } + if es.SQLErrors != nil { + objectMap["sqlErrors"] = es.SQLErrors + } + return json.Marshal(objectMap) +} + +// FileShare file share information with Path, Username, and Password. +type FileShare struct { + // UserName - User name credential to connect to the share location + UserName *string `json:"userName,omitempty"` + // Password - Password credential used to connect to the share location. + Password *string `json:"password,omitempty"` + // Path - The folder path for this share. + Path *string `json:"path,omitempty"` +} + +// GetProjectDetailsNonSQLTaskInput input for the task that reads configuration from project artifacts +type GetProjectDetailsNonSQLTaskInput struct { + // ProjectName - Name of the migration project + ProjectName *string `json:"projectName,omitempty"` + // ProjectLocation - A URL that points to the location to access project artifacts + ProjectLocation *string `json:"projectLocation,omitempty"` +} + +// GetTdeCertificatesSQLTaskInput input for the task that gets TDE certificates in Base64 encoded format. +type GetTdeCertificatesSQLTaskInput struct { + // ConnectionInfo - Connection information for SQL Server + ConnectionInfo *SQLConnectionInfo `json:"connectionInfo,omitempty"` + // BackupFileShare - Backup file share information for file share to be used for temporarily storing files. + BackupFileShare *FileShare `json:"backupFileShare,omitempty"` + // SelectedCertificates - List containing certificate names and corresponding password to use for encrypting the exported certificate. + SelectedCertificates *[]SelectedCertificateInput `json:"selectedCertificates,omitempty"` +} + +// GetTdeCertificatesSQLTaskOutput output of the task that gets TDE certificates in Base64 encoded format. +type GetTdeCertificatesSQLTaskOutput struct { + // Base64EncodedCertificates - Mapping from certificate name to base 64 encoded format. + Base64EncodedCertificates map[string][]string `json:"base64EncodedCertificates"` + // ValidationErrors - Validation errors + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` +} + +// MarshalJSON is the custom marshaler for GetTdeCertificatesSQLTaskOutput. +func (gtcsto GetTdeCertificatesSQLTaskOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gtcsto.Base64EncodedCertificates != nil { + objectMap["base64EncodedCertificates"] = gtcsto.Base64EncodedCertificates + } + if gtcsto.ValidationErrors != nil { + objectMap["validationErrors"] = gtcsto.ValidationErrors + } + return json.Marshal(objectMap) +} + +// GetTdeCertificatesSQLTaskProperties properties for the task that gets TDE certificates in Base64 encoded +// format. +type GetTdeCertificatesSQLTaskProperties struct { + // Input - Task input + Input *GetTdeCertificatesSQLTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]GetTdeCertificatesSQLTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) MarshalJSON() ([]byte, error) { + gtcstp.TaskType = TaskTypeGetTDECertificatesSQL + objectMap := make(map[string]interface{}) + if gtcstp.Input != nil { + objectMap["input"] = gtcstp.Input + } + if gtcstp.Output != nil { + objectMap["output"] = gtcstp.Output + } + if gtcstp.Errors != nil { + objectMap["errors"] = gtcstp.Errors + } + if gtcstp.State != "" { + objectMap["state"] = gtcstp.State + } + if gtcstp.Commands != nil { + objectMap["commands"] = gtcstp.Commands + } + if gtcstp.TaskType != "" { + objectMap["taskType"] = gtcstp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return >cstp, true +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return >cstp, true +} + +// UnmarshalJSON is the custom unmarshaler for GetTdeCertificatesSQLTaskProperties struct. +func (gtcstp *GetTdeCertificatesSQLTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input GetTdeCertificatesSQLTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + gtcstp.Input = &input + } + case "output": + if v != nil { + var output []GetTdeCertificatesSQLTaskOutput + err = json.Unmarshal(*v, &output) + if err != nil { + return err + } + gtcstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + gtcstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + gtcstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + gtcstp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + gtcstp.TaskType = taskType + } + } + } + + return nil +} + +// GetUserTablesSQLSyncTaskInput input for the task that collects user tables for the given list of +// databases +type GetUserTablesSQLSyncTaskInput struct { + // SourceConnectionInfo - Connection information for SQL Server + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Connection information for SQL DB + TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // SelectedSourceDatabases - List of source database names to collect tables for + SelectedSourceDatabases *[]string `json:"selectedSourceDatabases,omitempty"` + // SelectedTargetDatabases - List of target database names to collect tables for + SelectedTargetDatabases *[]string `json:"selectedTargetDatabases,omitempty"` +} + +// GetUserTablesSQLSyncTaskOutput output of the task that collects user tables for the given list of +// databases +type GetUserTablesSQLSyncTaskOutput struct { + // DatabasesToSourceTables - Mapping from database name to list of source tables + DatabasesToSourceTables map[string][]DatabaseTable `json:"databasesToSourceTables"` + // DatabasesToTargetTables - Mapping from database name to list of target tables + DatabasesToTargetTables map[string][]DatabaseTable `json:"databasesToTargetTables"` + // TableValidationErrors - Mapping from database name to list of validation errors + TableValidationErrors map[string][]string `json:"tableValidationErrors"` + // ValidationErrors - Validation errors + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` +} + +// MarshalJSON is the custom marshaler for GetUserTablesSQLSyncTaskOutput. +func (gutssto GetUserTablesSQLSyncTaskOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gutssto.DatabasesToSourceTables != nil { + objectMap["databasesToSourceTables"] = gutssto.DatabasesToSourceTables + } + if gutssto.DatabasesToTargetTables != nil { + objectMap["databasesToTargetTables"] = gutssto.DatabasesToTargetTables + } + if gutssto.TableValidationErrors != nil { + objectMap["tableValidationErrors"] = gutssto.TableValidationErrors + } + if gutssto.ValidationErrors != nil { + objectMap["validationErrors"] = gutssto.ValidationErrors + } + return json.Marshal(objectMap) +} + +// GetUserTablesSQLSyncTaskProperties properties for the task that collects user tables for the given list +// of databases +type GetUserTablesSQLSyncTaskProperties struct { + // Input - Task input + Input *GetUserTablesSQLSyncTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]GetUserTablesSQLSyncTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) MarshalJSON() ([]byte, error) { + gutsstp.TaskType = TaskTypeGetUserTablesAzureSQLDbSync + objectMap := make(map[string]interface{}) + if gutsstp.Input != nil { + objectMap["input"] = gutsstp.Input + } + if gutsstp.Output != nil { + objectMap["output"] = gutsstp.Output + } + if gutsstp.Errors != nil { + objectMap["errors"] = gutsstp.Errors + } + if gutsstp.State != "" { + objectMap["state"] = gutsstp.State + } + if gutsstp.Commands != nil { + objectMap["commands"] = gutsstp.Commands + } + if gutsstp.TaskType != "" { + objectMap["taskType"] = gutsstp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return &gutsstp, true +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &gutsstp, true +} + +// UnmarshalJSON is the custom unmarshaler for GetUserTablesSQLSyncTaskProperties struct. +func (gutsstp *GetUserTablesSQLSyncTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input GetUserTablesSQLSyncTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + gutsstp.Input = &input + } + case "output": + if v != nil { + var output []GetUserTablesSQLSyncTaskOutput + err = json.Unmarshal(*v, &output) + if err != nil { + return err + } + gutsstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + gutsstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + gutsstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + gutsstp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + gutsstp.TaskType = taskType + } + } + } + + return nil +} + +// GetUserTablesSQLTaskInput input for the task that collects user tables for the given list of databases +type GetUserTablesSQLTaskInput struct { + // ConnectionInfo - Connection information for SQL Server + ConnectionInfo *SQLConnectionInfo `json:"connectionInfo,omitempty"` + // SelectedDatabases - List of database names to collect tables for + SelectedDatabases *[]string `json:"selectedDatabases,omitempty"` +} + +// GetUserTablesSQLTaskOutput output of the task that collects user tables for the given list of databases +type GetUserTablesSQLTaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // DatabasesToTables - Mapping from database name to list of tables + DatabasesToTables map[string][]DatabaseTable `json:"databasesToTables"` + // ValidationErrors - Validation errors + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` +} + +// MarshalJSON is the custom marshaler for GetUserTablesSQLTaskOutput. +func (gutsto GetUserTablesSQLTaskOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gutsto.ID != nil { + objectMap["id"] = gutsto.ID + } + if gutsto.DatabasesToTables != nil { + objectMap["databasesToTables"] = gutsto.DatabasesToTables + } + if gutsto.ValidationErrors != nil { + objectMap["validationErrors"] = gutsto.ValidationErrors + } + return json.Marshal(objectMap) +} + +// GetUserTablesSQLTaskProperties properties for the task that collects user tables for the given list of +// databases +type GetUserTablesSQLTaskProperties struct { + // Input - Task input + Input *GetUserTablesSQLTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]GetUserTablesSQLTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) MarshalJSON() ([]byte, error) { + gutstp.TaskType = TaskTypeGetUserTablesSQL + objectMap := make(map[string]interface{}) + if gutstp.Input != nil { + objectMap["input"] = gutstp.Input + } + if gutstp.Output != nil { + objectMap["output"] = gutstp.Output + } + if gutstp.Errors != nil { + objectMap["errors"] = gutstp.Errors + } + if gutstp.State != "" { + objectMap["state"] = gutstp.State + } + if gutstp.Commands != nil { + objectMap["commands"] = gutstp.Commands + } + if gutstp.TaskType != "" { + objectMap["taskType"] = gutstp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return &gutstp, true +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &gutstp, true +} + +// UnmarshalJSON is the custom unmarshaler for GetUserTablesSQLTaskProperties struct. +func (gutstp *GetUserTablesSQLTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input GetUserTablesSQLTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + gutstp.Input = &input + } + case "output": + if v != nil { + var output []GetUserTablesSQLTaskOutput + err = json.Unmarshal(*v, &output) + if err != nil { + return err + } + gutstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + gutstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + gutstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + gutstp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + gutstp.TaskType = taskType + } + } + } + + return nil +} + +// MigrateMISyncCompleteCommandInput input for command that completes online migration for an Azure SQL +// Database Managed Instance. +type MigrateMISyncCompleteCommandInput struct { + // SourceDatabaseName - Name of managed instance database + SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` +} + +// MigrateMISyncCompleteCommandOutput output for command that completes online migration for an Azure SQL +// Database Managed Instance. +type MigrateMISyncCompleteCommandOutput struct { + // Errors - List of errors that happened during the command execution + Errors *[]ReportableException `json:"errors,omitempty"` +} + +// MigrateMISyncCompleteCommandProperties properties for the command that completes online migration for an +// Azure SQL Database Managed Instance. +type MigrateMISyncCompleteCommandProperties struct { + // Input - Command input + Input *MigrateMISyncCompleteCommandInput `json:"input,omitempty"` + // Output - Command output. This is ignored if submitted. + Output *MigrateMISyncCompleteCommandOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the command. This is ignored if submitted. Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', 'Failed' + State CommandState `json:"state,omitempty"` + // CommandType - Possible values include: 'CommandTypeUnknown', 'CommandTypeMigrateSQLServerAzureDbSQLMiComplete', 'CommandTypeMigrateSyncCompleteDatabase' + CommandType CommandType `json:"commandType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateMISyncCompleteCommandProperties. +func (mmsccp MigrateMISyncCompleteCommandProperties) MarshalJSON() ([]byte, error) { + mmsccp.CommandType = CommandTypeMigrateSQLServerAzureDbSQLMiComplete + objectMap := make(map[string]interface{}) + if mmsccp.Input != nil { + objectMap["input"] = mmsccp.Input + } + if mmsccp.Output != nil { + objectMap["output"] = mmsccp.Output + } + if mmsccp.Errors != nil { + objectMap["errors"] = mmsccp.Errors + } + if mmsccp.State != "" { + objectMap["state"] = mmsccp.State + } + if mmsccp.CommandType != "" { + objectMap["commandType"] = mmsccp.CommandType + } + return json.Marshal(objectMap) +} + +// AsMigrateMISyncCompleteCommandProperties is the BasicCommandProperties implementation for MigrateMISyncCompleteCommandProperties. +func (mmsccp MigrateMISyncCompleteCommandProperties) AsMigrateMISyncCompleteCommandProperties() (*MigrateMISyncCompleteCommandProperties, bool) { + return &mmsccp, true +} + +// AsMigrateSyncCompleteCommandProperties is the BasicCommandProperties implementation for MigrateMISyncCompleteCommandProperties. +func (mmsccp MigrateMISyncCompleteCommandProperties) AsMigrateSyncCompleteCommandProperties() (*MigrateSyncCompleteCommandProperties, bool) { + return nil, false +} + +// AsCommandProperties is the BasicCommandProperties implementation for MigrateMISyncCompleteCommandProperties. +func (mmsccp MigrateMISyncCompleteCommandProperties) AsCommandProperties() (*CommandProperties, bool) { + return nil, false +} + +// AsBasicCommandProperties is the BasicCommandProperties implementation for MigrateMISyncCompleteCommandProperties. +func (mmsccp MigrateMISyncCompleteCommandProperties) AsBasicCommandProperties() (BasicCommandProperties, bool) { + return &mmsccp, true +} + +// MigrateMySQLAzureDbForMySQLSyncDatabaseInput database specific information for MySQL to Azure Database +// for MySQL migration task inputs +type MigrateMySQLAzureDbForMySQLSyncDatabaseInput struct { + // Name - Name of the database + Name *string `json:"name,omitempty"` + // TargetDatabaseName - Name of target database. Note: Target database will be truncated before starting migration. + TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` + // MigrationSetting - Migration settings which tune the migration behavior + MigrationSetting map[string]*string `json:"migrationSetting"` + // SourceSetting - Source settings to tune source endpoint migration behavior + SourceSetting map[string]*string `json:"sourceSetting"` + // TargetSetting - Target settings to tune target endpoint migration behavior + TargetSetting map[string]*string `json:"targetSetting"` +} + +// MarshalJSON is the custom marshaler for MigrateMySQLAzureDbForMySQLSyncDatabaseInput. +func (mmsadfmssdi MigrateMySQLAzureDbForMySQLSyncDatabaseInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mmsadfmssdi.Name != nil { + objectMap["name"] = mmsadfmssdi.Name + } + if mmsadfmssdi.TargetDatabaseName != nil { + objectMap["targetDatabaseName"] = mmsadfmssdi.TargetDatabaseName + } + if mmsadfmssdi.MigrationSetting != nil { + objectMap["migrationSetting"] = mmsadfmssdi.MigrationSetting + } + if mmsadfmssdi.SourceSetting != nil { + objectMap["sourceSetting"] = mmsadfmssdi.SourceSetting + } + if mmsadfmssdi.TargetSetting != nil { + objectMap["targetSetting"] = mmsadfmssdi.TargetSetting + } + return json.Marshal(objectMap) +} + +// MigrateMySQLAzureDbForMySQLSyncTaskInput input for the task that migrates MySQL databases to Azure +// Database for MySQL for online migrations +type MigrateMySQLAzureDbForMySQLSyncTaskInput struct { + // SourceConnectionInfo - Connection information for source MySQL + SourceConnectionInfo *MySQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Connection information for target Azure Database for MySQL + TargetConnectionInfo *MySQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // SelectedDatabases - Databases to migrate + SelectedDatabases *[]MigrateMySQLAzureDbForMySQLSyncDatabaseInput `json:"selectedDatabases,omitempty"` +} + +// BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput output for the task that migrates MySQL databases to Azure Database +// for MySQL for online migrations +type BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput interface { + AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError, bool) + AsMigrateMySQLAzureDbForMySQLSyncTaskOutputError() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputError, bool) + AsMigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel, bool) + AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel, bool) + AsMigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel, bool) + AsMigrateMySQLAzureDbForMySQLSyncTaskOutput() (*MigrateMySQLAzureDbForMySQLSyncTaskOutput, bool) +} + +// MigrateMySQLAzureDbForMySQLSyncTaskOutput output for the task that migrates MySQL databases to Azure +// Database for MySQL for online migrations +type MigrateMySQLAzureDbForMySQLSyncTaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrateMySQLAzureDbForMySQLSyncTaskOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelErrorOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput `json:"resultType,omitempty"` +} + +func unmarshalBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput(body []byte) (BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["resultType"] { + case string(ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelErrorOutput): + var mmsadfmsstode MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError + err := json.Unmarshal(body, &mmsadfmsstode) + return mmsadfmsstode, err + case string(ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeErrorOutput): + var mmsadfmsstoe MigrateMySQLAzureDbForMySQLSyncTaskOutputError + err := json.Unmarshal(body, &mmsadfmsstoe) + return mmsadfmsstoe, err + case string(ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeTableLevelOutput): + var mmsadfmsstotl MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel + err := json.Unmarshal(body, &mmsadfmsstotl) + return mmsadfmsstotl, err + case string(ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelOutput): + var mmsadfmsstodl MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel + err := json.Unmarshal(body, &mmsadfmsstodl) + return mmsadfmsstodl, err + case string(ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrationLevelOutput): + var mmsadfmsstoml MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel + err := json.Unmarshal(body, &mmsadfmsstoml) + return mmsadfmsstoml, err + default: + var mmsadfmssto MigrateMySQLAzureDbForMySQLSyncTaskOutput + err := json.Unmarshal(body, &mmsadfmssto) + return mmsadfmssto, err + } +} +func unmarshalBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputArray(body []byte) ([]BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + mmsadfmsstoArray := make([]BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + mmsadfmssto, err := unmarshalBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput(*rawMessage) + if err != nil { + return nil, err + } + mmsadfmsstoArray[index] = mmsadfmssto + } + return mmsadfmsstoArray, nil +} + +// MarshalJSON is the custom marshaler for MigrateMySQLAzureDbForMySQLSyncTaskOutput. +func (mmsadfmssto MigrateMySQLAzureDbForMySQLSyncTaskOutput) MarshalJSON() ([]byte, error) { + mmsadfmssto.ResultType = ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrateMySQLAzureDbForMySQLSyncTaskOutput + objectMap := make(map[string]interface{}) + if mmsadfmssto.ID != nil { + objectMap["id"] = mmsadfmssto.ID + } + if mmsadfmssto.ResultType != "" { + objectMap["resultType"] = mmsadfmssto.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutput. +func (mmsadfmssto MigrateMySQLAzureDbForMySQLSyncTaskOutput) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputError is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutput. +func (mmsadfmssto MigrateMySQLAzureDbForMySQLSyncTaskOutput) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputError() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutput. +func (mmsadfmssto MigrateMySQLAzureDbForMySQLSyncTaskOutput) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutput. +func (mmsadfmssto MigrateMySQLAzureDbForMySQLSyncTaskOutput) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutput. +func (mmsadfmssto MigrateMySQLAzureDbForMySQLSyncTaskOutput) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutput is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutput. +func (mmsadfmssto MigrateMySQLAzureDbForMySQLSyncTaskOutput) AsMigrateMySQLAzureDbForMySQLSyncTaskOutput() (*MigrateMySQLAzureDbForMySQLSyncTaskOutput, bool) { + return &mmsadfmssto, true +} + +// AsBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutput. +func (mmsadfmssto MigrateMySQLAzureDbForMySQLSyncTaskOutput) AsBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput() (BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput, bool) { + return &mmsadfmssto, true +} + +// MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError ... +type MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError struct { + // ErrorMessage - Error message + ErrorMessage *string `json:"errorMessage,omitempty"` + // Events - List of error events. + Events *[]SyncMigrationDatabaseErrorEvent `json:"events,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrateMySQLAzureDbForMySQLSyncTaskOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelErrorOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError. +func (mmsadfmsstode MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError) MarshalJSON() ([]byte, error) { + mmsadfmsstode.ResultType = ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelErrorOutput + objectMap := make(map[string]interface{}) + if mmsadfmsstode.ErrorMessage != nil { + objectMap["errorMessage"] = mmsadfmsstode.ErrorMessage + } + if mmsadfmsstode.Events != nil { + objectMap["events"] = mmsadfmsstode.Events + } + if mmsadfmsstode.ID != nil { + objectMap["id"] = mmsadfmsstode.ID + } + if mmsadfmsstode.ResultType != "" { + objectMap["resultType"] = mmsadfmsstode.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError. +func (mmsadfmsstode MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError, bool) { + return &mmsadfmsstode, true +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputError is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError. +func (mmsadfmsstode MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputError() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError. +func (mmsadfmsstode MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError. +func (mmsadfmsstode MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError. +func (mmsadfmsstode MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutput is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError. +func (mmsadfmsstode MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError) AsMigrateMySQLAzureDbForMySQLSyncTaskOutput() (*MigrateMySQLAzureDbForMySQLSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError. +func (mmsadfmsstode MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError) AsBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput() (BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput, bool) { + return &mmsadfmsstode, true +} + +// MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel ... +type MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel struct { + // DatabaseName - Name of the database + DatabaseName *string `json:"databaseName,omitempty"` + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // MigrationState - Migration state that this database is in. Possible values include: 'SyncDatabaseMigrationReportingStateUNDEFINED', 'SyncDatabaseMigrationReportingStateCONFIGURING', 'SyncDatabaseMigrationReportingStateINITIALIAZING', 'SyncDatabaseMigrationReportingStateSTARTING', 'SyncDatabaseMigrationReportingStateRUNNING', 'SyncDatabaseMigrationReportingStateREADYTOCOMPLETE', 'SyncDatabaseMigrationReportingStateCOMPLETING', 'SyncDatabaseMigrationReportingStateCOMPLETE', 'SyncDatabaseMigrationReportingStateCANCELLING', 'SyncDatabaseMigrationReportingStateCANCELLED', 'SyncDatabaseMigrationReportingStateFAILED' + MigrationState SyncDatabaseMigrationReportingState `json:"migrationState,omitempty"` + // IncomingChanges - Number of incoming changes + IncomingChanges *int64 `json:"incomingChanges,omitempty"` + // AppliedChanges - Number of applied changes + AppliedChanges *int64 `json:"appliedChanges,omitempty"` + // CdcInsertCounter - Number of cdc inserts + CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` + // CdcDeleteCounter - Number of cdc deletes + CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` + // CdcUpdateCounter - Number of cdc updates + CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` + // FullLoadCompletedTables - Number of tables completed in full load + FullLoadCompletedTables *int64 `json:"fullLoadCompletedTables,omitempty"` + // FullLoadLoadingTables - Number of tables loading in full load + FullLoadLoadingTables *int64 `json:"fullLoadLoadingTables,omitempty"` + // FullLoadQueuedTables - Number of tables queued in full load + FullLoadQueuedTables *int64 `json:"fullLoadQueuedTables,omitempty"` + // FullLoadErroredTables - Number of tables errored in full load + FullLoadErroredTables *int64 `json:"fullLoadErroredTables,omitempty"` + // InitializationCompleted - Indicates if initial load (full load) has been completed + InitializationCompleted *bool `json:"initializationCompleted,omitempty"` + // Latency - CDC apply latency + Latency *int64 `json:"latency,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrateMySQLAzureDbForMySQLSyncTaskOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelErrorOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel. +func (mmsadfmsstodl MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { + mmsadfmsstodl.ResultType = ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelOutput + objectMap := make(map[string]interface{}) + if mmsadfmsstodl.DatabaseName != nil { + objectMap["databaseName"] = mmsadfmsstodl.DatabaseName + } + if mmsadfmsstodl.StartedOn != nil { + objectMap["startedOn"] = mmsadfmsstodl.StartedOn + } + if mmsadfmsstodl.EndedOn != nil { + objectMap["endedOn"] = mmsadfmsstodl.EndedOn + } + if mmsadfmsstodl.MigrationState != "" { + objectMap["migrationState"] = mmsadfmsstodl.MigrationState + } + if mmsadfmsstodl.IncomingChanges != nil { + objectMap["incomingChanges"] = mmsadfmsstodl.IncomingChanges + } + if mmsadfmsstodl.AppliedChanges != nil { + objectMap["appliedChanges"] = mmsadfmsstodl.AppliedChanges + } + if mmsadfmsstodl.CdcInsertCounter != nil { + objectMap["cdcInsertCounter"] = mmsadfmsstodl.CdcInsertCounter + } + if mmsadfmsstodl.CdcDeleteCounter != nil { + objectMap["cdcDeleteCounter"] = mmsadfmsstodl.CdcDeleteCounter + } + if mmsadfmsstodl.CdcUpdateCounter != nil { + objectMap["cdcUpdateCounter"] = mmsadfmsstodl.CdcUpdateCounter + } + if mmsadfmsstodl.FullLoadCompletedTables != nil { + objectMap["fullLoadCompletedTables"] = mmsadfmsstodl.FullLoadCompletedTables + } + if mmsadfmsstodl.FullLoadLoadingTables != nil { + objectMap["fullLoadLoadingTables"] = mmsadfmsstodl.FullLoadLoadingTables + } + if mmsadfmsstodl.FullLoadQueuedTables != nil { + objectMap["fullLoadQueuedTables"] = mmsadfmsstodl.FullLoadQueuedTables + } + if mmsadfmsstodl.FullLoadErroredTables != nil { + objectMap["fullLoadErroredTables"] = mmsadfmsstodl.FullLoadErroredTables + } + if mmsadfmsstodl.InitializationCompleted != nil { + objectMap["initializationCompleted"] = mmsadfmsstodl.InitializationCompleted + } + if mmsadfmsstodl.Latency != nil { + objectMap["latency"] = mmsadfmsstodl.Latency + } + if mmsadfmsstodl.ID != nil { + objectMap["id"] = mmsadfmsstodl.ID + } + if mmsadfmsstodl.ResultType != "" { + objectMap["resultType"] = mmsadfmsstodl.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel. +func (mmsadfmsstodl MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputError is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel. +func (mmsadfmsstodl MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputError() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel. +func (mmsadfmsstodl MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel. +func (mmsadfmsstodl MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel, bool) { + return &mmsadfmsstodl, true +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel. +func (mmsadfmsstodl MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutput is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel. +func (mmsadfmsstodl MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutput() (*MigrateMySQLAzureDbForMySQLSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel. +func (mmsadfmsstodl MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel) AsBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput() (BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput, bool) { + return &mmsadfmsstodl, true +} + +// MigrateMySQLAzureDbForMySQLSyncTaskOutputError ... +type MigrateMySQLAzureDbForMySQLSyncTaskOutputError struct { + // Error - Migration error + Error *ReportableException `json:"error,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrateMySQLAzureDbForMySQLSyncTaskOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelErrorOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateMySQLAzureDbForMySQLSyncTaskOutputError. +func (mmsadfmsstoe MigrateMySQLAzureDbForMySQLSyncTaskOutputError) MarshalJSON() ([]byte, error) { + mmsadfmsstoe.ResultType = ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeErrorOutput + objectMap := make(map[string]interface{}) + if mmsadfmsstoe.Error != nil { + objectMap["error"] = mmsadfmsstoe.Error + } + if mmsadfmsstoe.ID != nil { + objectMap["id"] = mmsadfmsstoe.ID + } + if mmsadfmsstoe.ResultType != "" { + objectMap["resultType"] = mmsadfmsstoe.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputError. +func (mmsadfmsstoe MigrateMySQLAzureDbForMySQLSyncTaskOutputError) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputError is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputError. +func (mmsadfmsstoe MigrateMySQLAzureDbForMySQLSyncTaskOutputError) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputError() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputError, bool) { + return &mmsadfmsstoe, true +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputError. +func (mmsadfmsstoe MigrateMySQLAzureDbForMySQLSyncTaskOutputError) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputError. +func (mmsadfmsstoe MigrateMySQLAzureDbForMySQLSyncTaskOutputError) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputError. +func (mmsadfmsstoe MigrateMySQLAzureDbForMySQLSyncTaskOutputError) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutput is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputError. +func (mmsadfmsstoe MigrateMySQLAzureDbForMySQLSyncTaskOutputError) AsMigrateMySQLAzureDbForMySQLSyncTaskOutput() (*MigrateMySQLAzureDbForMySQLSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputError. +func (mmsadfmsstoe MigrateMySQLAzureDbForMySQLSyncTaskOutputError) AsBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput() (BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput, bool) { + return &mmsadfmsstoe, true +} + +// MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel ... +type MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel struct { + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // SourceServerVersion - Source server version + SourceServerVersion *string `json:"sourceServerVersion,omitempty"` + // SourceServer - Source server name + SourceServer *string `json:"sourceServer,omitempty"` + // TargetServerVersion - Target server version + TargetServerVersion *string `json:"targetServerVersion,omitempty"` + // TargetServer - Target server name + TargetServer *string `json:"targetServer,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrateMySQLAzureDbForMySQLSyncTaskOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelErrorOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel. +func (mmsadfmsstoml MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { + mmsadfmsstoml.ResultType = ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrationLevelOutput + objectMap := make(map[string]interface{}) + if mmsadfmsstoml.StartedOn != nil { + objectMap["startedOn"] = mmsadfmsstoml.StartedOn + } + if mmsadfmsstoml.EndedOn != nil { + objectMap["endedOn"] = mmsadfmsstoml.EndedOn + } + if mmsadfmsstoml.SourceServerVersion != nil { + objectMap["sourceServerVersion"] = mmsadfmsstoml.SourceServerVersion + } + if mmsadfmsstoml.SourceServer != nil { + objectMap["sourceServer"] = mmsadfmsstoml.SourceServer + } + if mmsadfmsstoml.TargetServerVersion != nil { + objectMap["targetServerVersion"] = mmsadfmsstoml.TargetServerVersion + } + if mmsadfmsstoml.TargetServer != nil { + objectMap["targetServer"] = mmsadfmsstoml.TargetServer + } + if mmsadfmsstoml.ID != nil { + objectMap["id"] = mmsadfmsstoml.ID + } + if mmsadfmsstoml.ResultType != "" { + objectMap["resultType"] = mmsadfmsstoml.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel. +func (mmsadfmsstoml MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputError is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel. +func (mmsadfmsstoml MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputError() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel. +func (mmsadfmsstoml MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel. +func (mmsadfmsstoml MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel. +func (mmsadfmsstoml MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel, bool) { + return &mmsadfmsstoml, true +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutput is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel. +func (mmsadfmsstoml MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutput() (*MigrateMySQLAzureDbForMySQLSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel. +func (mmsadfmsstoml MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel) AsBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput() (BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput, bool) { + return &mmsadfmsstoml, true +} + +// MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel ... +type MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel struct { + // TableName - Name of the table + TableName *string `json:"tableName,omitempty"` + // DatabaseName - Name of the database + DatabaseName *string `json:"databaseName,omitempty"` + // CdcInsertCounter - Number of applied inserts + CdcInsertCounter *string `json:"cdcInsertCounter,omitempty"` + // CdcUpdateCounter - Number of applied updates + CdcUpdateCounter *string `json:"cdcUpdateCounter,omitempty"` + // CdcDeleteCounter - Number of applied deletes + CdcDeleteCounter *string `json:"cdcDeleteCounter,omitempty"` + // FullLoadEstFinishTime - Estimate to finish full load + FullLoadEstFinishTime *date.Time `json:"fullLoadEstFinishTime,omitempty"` + // FullLoadStartedOn - Full load start time + FullLoadStartedOn *date.Time `json:"fullLoadStartedOn,omitempty"` + // FullLoadEndedOn - Full load end time + FullLoadEndedOn *date.Time `json:"fullLoadEndedOn,omitempty"` + // FullLoadTotalRows - Number of rows applied in full load + FullLoadTotalRows *int64 `json:"fullLoadTotalRows,omitempty"` + // State - Current state of the table migration. Possible values include: 'SyncTableMigrationStateBEFORELOAD', 'SyncTableMigrationStateFULLLOAD', 'SyncTableMigrationStateCOMPLETED', 'SyncTableMigrationStateCANCELED', 'SyncTableMigrationStateERROR', 'SyncTableMigrationStateFAILED' + State SyncTableMigrationState `json:"state,omitempty"` + // TotalChangesApplied - Total number of applied changes + TotalChangesApplied *int64 `json:"totalChangesApplied,omitempty"` + // DataErrorsCounter - Number of data errors occurred + DataErrorsCounter *int64 `json:"dataErrorsCounter,omitempty"` + // LastModifiedTime - Last modified time on target + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrateMySQLAzureDbForMySQLSyncTaskOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelErrorOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel. +func (mmsadfmsstotl MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel) MarshalJSON() ([]byte, error) { + mmsadfmsstotl.ResultType = ResultTypeBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputResultTypeTableLevelOutput + objectMap := make(map[string]interface{}) + if mmsadfmsstotl.TableName != nil { + objectMap["tableName"] = mmsadfmsstotl.TableName + } + if mmsadfmsstotl.DatabaseName != nil { + objectMap["databaseName"] = mmsadfmsstotl.DatabaseName + } + if mmsadfmsstotl.CdcInsertCounter != nil { + objectMap["cdcInsertCounter"] = mmsadfmsstotl.CdcInsertCounter + } + if mmsadfmsstotl.CdcUpdateCounter != nil { + objectMap["cdcUpdateCounter"] = mmsadfmsstotl.CdcUpdateCounter + } + if mmsadfmsstotl.CdcDeleteCounter != nil { + objectMap["cdcDeleteCounter"] = mmsadfmsstotl.CdcDeleteCounter + } + if mmsadfmsstotl.FullLoadEstFinishTime != nil { + objectMap["fullLoadEstFinishTime"] = mmsadfmsstotl.FullLoadEstFinishTime + } + if mmsadfmsstotl.FullLoadStartedOn != nil { + objectMap["fullLoadStartedOn"] = mmsadfmsstotl.FullLoadStartedOn + } + if mmsadfmsstotl.FullLoadEndedOn != nil { + objectMap["fullLoadEndedOn"] = mmsadfmsstotl.FullLoadEndedOn + } + if mmsadfmsstotl.FullLoadTotalRows != nil { + objectMap["fullLoadTotalRows"] = mmsadfmsstotl.FullLoadTotalRows + } + if mmsadfmsstotl.State != "" { + objectMap["state"] = mmsadfmsstotl.State + } + if mmsadfmsstotl.TotalChangesApplied != nil { + objectMap["totalChangesApplied"] = mmsadfmsstotl.TotalChangesApplied + } + if mmsadfmsstotl.DataErrorsCounter != nil { + objectMap["dataErrorsCounter"] = mmsadfmsstotl.DataErrorsCounter + } + if mmsadfmsstotl.LastModifiedTime != nil { + objectMap["lastModifiedTime"] = mmsadfmsstotl.LastModifiedTime + } + if mmsadfmsstotl.ID != nil { + objectMap["id"] = mmsadfmsstotl.ID + } + if mmsadfmsstotl.ResultType != "" { + objectMap["resultType"] = mmsadfmsstotl.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel. +func (mmsadfmsstotl MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputError is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel. +func (mmsadfmsstotl MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputError() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel. +func (mmsadfmsstotl MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel, bool) { + return &mmsadfmsstotl, true +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel. +func (mmsadfmsstotl MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel. +func (mmsadfmsstotl MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel() (*MigrateMySQLAzureDbForMySQLSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskOutput is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel. +func (mmsadfmsstotl MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel) AsMigrateMySQLAzureDbForMySQLSyncTaskOutput() (*MigrateMySQLAzureDbForMySQLSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput is the BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput implementation for MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel. +func (mmsadfmsstotl MigrateMySQLAzureDbForMySQLSyncTaskOutputTableLevel) AsBasicMigrateMySQLAzureDbForMySQLSyncTaskOutput() (BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput, bool) { + return &mmsadfmsstotl, true +} + +// MigrateMySQLAzureDbForMySQLSyncTaskProperties properties for the task that migrates MySQL databases to +// Azure Database for MySQL for online migrations +type MigrateMySQLAzureDbForMySQLSyncTaskProperties struct { + // Input - Task input + Input *MigrateMySQLAzureDbForMySQLSyncTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]BasicMigrateMySQLAzureDbForMySQLSyncTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) MarshalJSON() ([]byte, error) { + mmsadfmsstp.TaskType = TaskTypeMigrateMySQLAzureDbForMySQLSync + objectMap := make(map[string]interface{}) + if mmsadfmsstp.Input != nil { + objectMap["input"] = mmsadfmsstp.Input + } + if mmsadfmsstp.Output != nil { + objectMap["output"] = mmsadfmsstp.Output + } + if mmsadfmsstp.Errors != nil { + objectMap["errors"] = mmsadfmsstp.Errors + } + if mmsadfmsstp.State != "" { + objectMap["state"] = mmsadfmsstp.State + } + if mmsadfmsstp.Commands != nil { + objectMap["commands"] = mmsadfmsstp.Commands + } + if mmsadfmsstp.TaskType != "" { + objectMap["taskType"] = mmsadfmsstp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return &mmsadfmsstp, true +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &mmsadfmsstp, true +} + +// UnmarshalJSON is the custom unmarshaler for MigrateMySQLAzureDbForMySQLSyncTaskProperties struct. +func (mmsadfmsstp *MigrateMySQLAzureDbForMySQLSyncTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input MigrateMySQLAzureDbForMySQLSyncTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + mmsadfmsstp.Input = &input + } + case "output": + if v != nil { + output, err := unmarshalBasicMigrateMySQLAzureDbForMySQLSyncTaskOutputArray(*v) + if err != nil { + return err + } + mmsadfmsstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + mmsadfmsstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + mmsadfmsstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + mmsadfmsstp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + mmsadfmsstp.TaskType = taskType + } + } + } + + return nil +} + +// MigratePostgreSQLAzureDbForPostgreSQLSyncDatabaseInput database specific information for PostgreSQL to +// Azure Database for PostgreSQL migration task inputs +type MigratePostgreSQLAzureDbForPostgreSQLSyncDatabaseInput struct { + // Name - Name of the database + Name *string `json:"name,omitempty"` + // TargetDatabaseName - Name of target database. Note: Target database will be truncated before starting migration. + TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` + // MigrationSetting - Migration settings which tune the migration behavior + MigrationSetting map[string]*string `json:"migrationSetting"` + // SourceSetting - Source settings to tune source endpoint migration behavior + SourceSetting map[string]*string `json:"sourceSetting"` + // TargetSetting - Target settings to tune target endpoint migration behavior + TargetSetting map[string]*string `json:"targetSetting"` +} + +// MarshalJSON is the custom marshaler for MigratePostgreSQLAzureDbForPostgreSQLSyncDatabaseInput. +func (mpsadfpssdi MigratePostgreSQLAzureDbForPostgreSQLSyncDatabaseInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mpsadfpssdi.Name != nil { + objectMap["name"] = mpsadfpssdi.Name + } + if mpsadfpssdi.TargetDatabaseName != nil { + objectMap["targetDatabaseName"] = mpsadfpssdi.TargetDatabaseName + } + if mpsadfpssdi.MigrationSetting != nil { + objectMap["migrationSetting"] = mpsadfpssdi.MigrationSetting + } + if mpsadfpssdi.SourceSetting != nil { + objectMap["sourceSetting"] = mpsadfpssdi.SourceSetting + } + if mpsadfpssdi.TargetSetting != nil { + objectMap["targetSetting"] = mpsadfpssdi.TargetSetting + } + return json.Marshal(objectMap) +} + +// MigratePostgreSQLAzureDbForPostgreSQLSyncTaskInput input for the task that migrates PostgreSQL databases +// to Azure Database for PostgreSQL for online migrations +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskInput struct { + // SelectedDatabases - Databases to migrate + SelectedDatabases *[]MigratePostgreSQLAzureDbForPostgreSQLSyncDatabaseInput `json:"selectedDatabases,omitempty"` + // TargetConnectionInfo - Connection information for target Azure Database for PostgreSQL + TargetConnectionInfo *PostgreSQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // SourceConnectionInfo - Connection information for source PostgreSQL + SourceConnectionInfo *PostgreSQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` +} + +// BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput output for the task that migrates PostgreSQL databases to +// Azure Database for PostgreSQL for online migrations +type BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput interface { + AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError, bool) + AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError, bool) + AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel, bool) + AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel, bool) + AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel, bool) + AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, bool) +} + +// MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput output for the task that migrates PostgreSQL databases +// to Azure Database for PostgreSQL for online migrations +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput', 'ResultTypeDatabaseLevelErrorOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput' + ResultType ResultType `json:"resultType,omitempty"` +} + +func unmarshalBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput(body []byte) (BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["resultType"] { + case string(ResultTypeDatabaseLevelErrorOutput): + var mpsadfpsstode MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError + err := json.Unmarshal(body, &mpsadfpsstode) + return mpsadfpsstode, err + case string(ResultTypeErrorOutput): + var mpsadfpsstoe MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError + err := json.Unmarshal(body, &mpsadfpsstoe) + return mpsadfpsstoe, err + case string(ResultTypeTableLevelOutput): + var mpsadfpsstotl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel + err := json.Unmarshal(body, &mpsadfpsstotl) + return mpsadfpsstotl, err + case string(ResultTypeDatabaseLevelOutput): + var mpsadfpsstodl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel + err := json.Unmarshal(body, &mpsadfpsstodl) + return mpsadfpsstodl, err + case string(ResultTypeMigrationLevelOutput): + var mpsadfpsstoml MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel + err := json.Unmarshal(body, &mpsadfpsstoml) + return mpsadfpsstoml, err + default: + var mpsadfpssto MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput + err := json.Unmarshal(body, &mpsadfpssto) + return mpsadfpssto, err + } +} +func unmarshalBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputArray(body []byte) ([]BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + mpsadfpsstoArray := make([]BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + mpsadfpssto, err := unmarshalBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput(*rawMessage) + if err != nil { + return nil, err + } + mpsadfpsstoArray[index] = mpsadfpssto + } + return mpsadfpsstoArray, nil +} + +// MarshalJSON is the custom marshaler for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput. +func (mpsadfpssto MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput) MarshalJSON() ([]byte, error) { + mpsadfpssto.ResultType = ResultTypeMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput + objectMap := make(map[string]interface{}) + if mpsadfpssto.ID != nil { + objectMap["id"] = mpsadfpssto.ID + } + if mpsadfpssto.ResultType != "" { + objectMap["resultType"] = mpsadfpssto.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput. +func (mpsadfpssto MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput. +func (mpsadfpssto MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput. +func (mpsadfpssto MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput. +func (mpsadfpssto MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput. +func (mpsadfpssto MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput. +func (mpsadfpssto MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, bool) { + return &mpsadfpssto, true +} + +// AsBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput. +func (mpsadfpssto MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput) AsBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput() (BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, bool) { + return &mpsadfpssto, true +} + +// MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError ... +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError struct { + // ErrorMessage - Error message + ErrorMessage *string `json:"errorMessage,omitempty"` + // Events - List of error events. + Events *[]SyncMigrationDatabaseErrorEvent `json:"events,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput', 'ResultTypeDatabaseLevelErrorOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput' + ResultType ResultType `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError. +func (mpsadfpsstode MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError) MarshalJSON() ([]byte, error) { + mpsadfpsstode.ResultType = ResultTypeDatabaseLevelErrorOutput + objectMap := make(map[string]interface{}) + if mpsadfpsstode.ErrorMessage != nil { + objectMap["errorMessage"] = mpsadfpsstode.ErrorMessage + } + if mpsadfpsstode.Events != nil { + objectMap["events"] = mpsadfpsstode.Events + } + if mpsadfpsstode.ID != nil { + objectMap["id"] = mpsadfpsstode.ID + } + if mpsadfpsstode.ResultType != "" { + objectMap["resultType"] = mpsadfpsstode.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError. +func (mpsadfpsstode MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError, bool) { + return &mpsadfpsstode, true +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError. +func (mpsadfpsstode MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError. +func (mpsadfpsstode MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError. +func (mpsadfpsstode MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError. +func (mpsadfpsstode MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError. +func (mpsadfpsstode MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError. +func (mpsadfpsstode MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError) AsBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput() (BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, bool) { + return &mpsadfpsstode, true +} + +// MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel ... +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel struct { + // DatabaseName - Name of the database + DatabaseName *string `json:"databaseName,omitempty"` + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // MigrationState - Migration state that this database is in. Possible values include: 'SyncDatabaseMigrationReportingStateUNDEFINED', 'SyncDatabaseMigrationReportingStateCONFIGURING', 'SyncDatabaseMigrationReportingStateINITIALIAZING', 'SyncDatabaseMigrationReportingStateSTARTING', 'SyncDatabaseMigrationReportingStateRUNNING', 'SyncDatabaseMigrationReportingStateREADYTOCOMPLETE', 'SyncDatabaseMigrationReportingStateCOMPLETING', 'SyncDatabaseMigrationReportingStateCOMPLETE', 'SyncDatabaseMigrationReportingStateCANCELLING', 'SyncDatabaseMigrationReportingStateCANCELLED', 'SyncDatabaseMigrationReportingStateFAILED' + MigrationState SyncDatabaseMigrationReportingState `json:"migrationState,omitempty"` + // IncomingChanges - Number of incoming changes + IncomingChanges *int64 `json:"incomingChanges,omitempty"` + // AppliedChanges - Number of applied changes + AppliedChanges *int64 `json:"appliedChanges,omitempty"` + // CdcInsertCounter - Number of cdc inserts + CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` + // CdcDeleteCounter - Number of cdc deletes + CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` + // CdcUpdateCounter - Number of cdc updates + CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` + // FullLoadCompletedTables - Number of tables completed in full load + FullLoadCompletedTables *int64 `json:"fullLoadCompletedTables,omitempty"` + // FullLoadLoadingTables - Number of tables loading in full load + FullLoadLoadingTables *int64 `json:"fullLoadLoadingTables,omitempty"` + // FullLoadQueuedTables - Number of tables queued in full load + FullLoadQueuedTables *int64 `json:"fullLoadQueuedTables,omitempty"` + // FullLoadErroredTables - Number of tables errored in full load + FullLoadErroredTables *int64 `json:"fullLoadErroredTables,omitempty"` + // InitializationCompleted - Indicates if initial load (full load) has been completed + InitializationCompleted *bool `json:"initializationCompleted,omitempty"` + // Latency - CDC apply latency + Latency *int64 `json:"latency,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput', 'ResultTypeDatabaseLevelErrorOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput' + ResultType ResultType `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel. +func (mpsadfpsstodl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { + mpsadfpsstodl.ResultType = ResultTypeDatabaseLevelOutput + objectMap := make(map[string]interface{}) + if mpsadfpsstodl.DatabaseName != nil { + objectMap["databaseName"] = mpsadfpsstodl.DatabaseName + } + if mpsadfpsstodl.StartedOn != nil { + objectMap["startedOn"] = mpsadfpsstodl.StartedOn + } + if mpsadfpsstodl.EndedOn != nil { + objectMap["endedOn"] = mpsadfpsstodl.EndedOn + } + if mpsadfpsstodl.MigrationState != "" { + objectMap["migrationState"] = mpsadfpsstodl.MigrationState + } + if mpsadfpsstodl.IncomingChanges != nil { + objectMap["incomingChanges"] = mpsadfpsstodl.IncomingChanges + } + if mpsadfpsstodl.AppliedChanges != nil { + objectMap["appliedChanges"] = mpsadfpsstodl.AppliedChanges + } + if mpsadfpsstodl.CdcInsertCounter != nil { + objectMap["cdcInsertCounter"] = mpsadfpsstodl.CdcInsertCounter + } + if mpsadfpsstodl.CdcDeleteCounter != nil { + objectMap["cdcDeleteCounter"] = mpsadfpsstodl.CdcDeleteCounter + } + if mpsadfpsstodl.CdcUpdateCounter != nil { + objectMap["cdcUpdateCounter"] = mpsadfpsstodl.CdcUpdateCounter + } + if mpsadfpsstodl.FullLoadCompletedTables != nil { + objectMap["fullLoadCompletedTables"] = mpsadfpsstodl.FullLoadCompletedTables + } + if mpsadfpsstodl.FullLoadLoadingTables != nil { + objectMap["fullLoadLoadingTables"] = mpsadfpsstodl.FullLoadLoadingTables + } + if mpsadfpsstodl.FullLoadQueuedTables != nil { + objectMap["fullLoadQueuedTables"] = mpsadfpsstodl.FullLoadQueuedTables + } + if mpsadfpsstodl.FullLoadErroredTables != nil { + objectMap["fullLoadErroredTables"] = mpsadfpsstodl.FullLoadErroredTables + } + if mpsadfpsstodl.InitializationCompleted != nil { + objectMap["initializationCompleted"] = mpsadfpsstodl.InitializationCompleted + } + if mpsadfpsstodl.Latency != nil { + objectMap["latency"] = mpsadfpsstodl.Latency + } + if mpsadfpsstodl.ID != nil { + objectMap["id"] = mpsadfpsstodl.ID + } + if mpsadfpsstodl.ResultType != "" { + objectMap["resultType"] = mpsadfpsstodl.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel. +func (mpsadfpsstodl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel. +func (mpsadfpsstodl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel. +func (mpsadfpsstodl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel. +func (mpsadfpsstodl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel, bool) { + return &mpsadfpsstodl, true +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel. +func (mpsadfpsstodl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel. +func (mpsadfpsstodl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel. +func (mpsadfpsstodl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel) AsBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput() (BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, bool) { + return &mpsadfpsstodl, true +} + +// MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError ... +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError struct { + // Error - Migration error + Error *ReportableException `json:"error,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput', 'ResultTypeDatabaseLevelErrorOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput' + ResultType ResultType `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError. +func (mpsadfpsstoe MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError) MarshalJSON() ([]byte, error) { + mpsadfpsstoe.ResultType = ResultTypeErrorOutput + objectMap := make(map[string]interface{}) + if mpsadfpsstoe.Error != nil { + objectMap["error"] = mpsadfpsstoe.Error + } + if mpsadfpsstoe.ID != nil { + objectMap["id"] = mpsadfpsstoe.ID + } + if mpsadfpsstoe.ResultType != "" { + objectMap["resultType"] = mpsadfpsstoe.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError. +func (mpsadfpsstoe MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError. +func (mpsadfpsstoe MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError, bool) { + return &mpsadfpsstoe, true +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError. +func (mpsadfpsstoe MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError. +func (mpsadfpsstoe MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError. +func (mpsadfpsstoe MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError. +func (mpsadfpsstoe MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError. +func (mpsadfpsstoe MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError) AsBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput() (BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, bool) { + return &mpsadfpsstoe, true +} + +// MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel ... +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel struct { + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // SourceServerVersion - Source server version + SourceServerVersion *string `json:"sourceServerVersion,omitempty"` + // SourceServer - Source server name + SourceServer *string `json:"sourceServer,omitempty"` + // TargetServerVersion - Target server version + TargetServerVersion *string `json:"targetServerVersion,omitempty"` + // TargetServer - Target server name + TargetServer *string `json:"targetServer,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput', 'ResultTypeDatabaseLevelErrorOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput' + ResultType ResultType `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel. +func (mpsadfpsstoml MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { + mpsadfpsstoml.ResultType = ResultTypeMigrationLevelOutput + objectMap := make(map[string]interface{}) + if mpsadfpsstoml.StartedOn != nil { + objectMap["startedOn"] = mpsadfpsstoml.StartedOn + } + if mpsadfpsstoml.EndedOn != nil { + objectMap["endedOn"] = mpsadfpsstoml.EndedOn + } + if mpsadfpsstoml.SourceServerVersion != nil { + objectMap["sourceServerVersion"] = mpsadfpsstoml.SourceServerVersion + } + if mpsadfpsstoml.SourceServer != nil { + objectMap["sourceServer"] = mpsadfpsstoml.SourceServer + } + if mpsadfpsstoml.TargetServerVersion != nil { + objectMap["targetServerVersion"] = mpsadfpsstoml.TargetServerVersion + } + if mpsadfpsstoml.TargetServer != nil { + objectMap["targetServer"] = mpsadfpsstoml.TargetServer + } + if mpsadfpsstoml.ID != nil { + objectMap["id"] = mpsadfpsstoml.ID + } + if mpsadfpsstoml.ResultType != "" { + objectMap["resultType"] = mpsadfpsstoml.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel. +func (mpsadfpsstoml MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel. +func (mpsadfpsstoml MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel. +func (mpsadfpsstoml MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel. +func (mpsadfpsstoml MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel. +func (mpsadfpsstoml MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel, bool) { + return &mpsadfpsstoml, true +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel. +func (mpsadfpsstoml MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel. +func (mpsadfpsstoml MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel) AsBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput() (BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, bool) { + return &mpsadfpsstoml, true +} + +// MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel ... +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel struct { + // TableName - Name of the table + TableName *string `json:"tableName,omitempty"` + // DatabaseName - Name of the database + DatabaseName *string `json:"databaseName,omitempty"` + // CdcInsertCounter - Number of applied inserts + CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` + // CdcUpdateCounter - Number of applied updates + CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` + // CdcDeleteCounter - Number of applied deletes + CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` + // FullLoadEstFinishTime - Estimate to finish full load + FullLoadEstFinishTime *date.Time `json:"fullLoadEstFinishTime,omitempty"` + // FullLoadStartedOn - Full load start time + FullLoadStartedOn *date.Time `json:"fullLoadStartedOn,omitempty"` + // FullLoadEndedOn - Full load end time + FullLoadEndedOn *date.Time `json:"fullLoadEndedOn,omitempty"` + // FullLoadTotalRows - Number of rows applied in full load + FullLoadTotalRows *int64 `json:"fullLoadTotalRows,omitempty"` + // State - Current state of the table migration. Possible values include: 'SyncTableMigrationStateBEFORELOAD', 'SyncTableMigrationStateFULLLOAD', 'SyncTableMigrationStateCOMPLETED', 'SyncTableMigrationStateCANCELED', 'SyncTableMigrationStateERROR', 'SyncTableMigrationStateFAILED' + State SyncTableMigrationState `json:"state,omitempty"` + // TotalChangesApplied - Total number of applied changes + TotalChangesApplied *int64 `json:"totalChangesApplied,omitempty"` + // DataErrorsCounter - Number of data errors occurred + DataErrorsCounter *int64 `json:"dataErrorsCounter,omitempty"` + // LastModifiedTime - Last modified time on target + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput', 'ResultTypeDatabaseLevelErrorOutput', 'ResultTypeErrorOutput', 'ResultTypeTableLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeMigrationLevelOutput' + ResultType ResultType `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel. +func (mpsadfpsstotl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel) MarshalJSON() ([]byte, error) { + mpsadfpsstotl.ResultType = ResultTypeTableLevelOutput + objectMap := make(map[string]interface{}) + if mpsadfpsstotl.TableName != nil { + objectMap["tableName"] = mpsadfpsstotl.TableName + } + if mpsadfpsstotl.DatabaseName != nil { + objectMap["databaseName"] = mpsadfpsstotl.DatabaseName + } + if mpsadfpsstotl.CdcInsertCounter != nil { + objectMap["cdcInsertCounter"] = mpsadfpsstotl.CdcInsertCounter + } + if mpsadfpsstotl.CdcUpdateCounter != nil { + objectMap["cdcUpdateCounter"] = mpsadfpsstotl.CdcUpdateCounter + } + if mpsadfpsstotl.CdcDeleteCounter != nil { + objectMap["cdcDeleteCounter"] = mpsadfpsstotl.CdcDeleteCounter + } + if mpsadfpsstotl.FullLoadEstFinishTime != nil { + objectMap["fullLoadEstFinishTime"] = mpsadfpsstotl.FullLoadEstFinishTime + } + if mpsadfpsstotl.FullLoadStartedOn != nil { + objectMap["fullLoadStartedOn"] = mpsadfpsstotl.FullLoadStartedOn + } + if mpsadfpsstotl.FullLoadEndedOn != nil { + objectMap["fullLoadEndedOn"] = mpsadfpsstotl.FullLoadEndedOn + } + if mpsadfpsstotl.FullLoadTotalRows != nil { + objectMap["fullLoadTotalRows"] = mpsadfpsstotl.FullLoadTotalRows + } + if mpsadfpsstotl.State != "" { + objectMap["state"] = mpsadfpsstotl.State + } + if mpsadfpsstotl.TotalChangesApplied != nil { + objectMap["totalChangesApplied"] = mpsadfpsstotl.TotalChangesApplied + } + if mpsadfpsstotl.DataErrorsCounter != nil { + objectMap["dataErrorsCounter"] = mpsadfpsstotl.DataErrorsCounter + } + if mpsadfpsstotl.LastModifiedTime != nil { + objectMap["lastModifiedTime"] = mpsadfpsstotl.LastModifiedTime + } + if mpsadfpsstotl.ID != nil { + objectMap["id"] = mpsadfpsstotl.ID + } + if mpsadfpsstotl.ResultType != "" { + objectMap["resultType"] = mpsadfpsstotl.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel. +func (mpsadfpsstotl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel. +func (mpsadfpsstotl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel. +func (mpsadfpsstotl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel, bool) { + return &mpsadfpsstotl, true +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel. +func (mpsadfpsstotl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel. +func (mpsadfpsstotl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel. +func (mpsadfpsstotl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput is the BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel. +func (mpsadfpsstotl MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputTableLevel) AsBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput() (BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput, bool) { + return &mpsadfpsstotl, true +} + +// MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties properties for the task that migrates PostgreSQL +// databases to Azure Database for PostgreSQL for online migrations +type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties struct { + // Input - Task input + Input *MigratePostgreSQLAzureDbForPostgreSQLSyncTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]BasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) MarshalJSON() ([]byte, error) { + mpsadfpsstp.TaskType = TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync + objectMap := make(map[string]interface{}) + if mpsadfpsstp.Input != nil { + objectMap["input"] = mpsadfpsstp.Input + } + if mpsadfpsstp.Output != nil { + objectMap["output"] = mpsadfpsstp.Output + } + if mpsadfpsstp.Errors != nil { + objectMap["errors"] = mpsadfpsstp.Errors + } + if mpsadfpsstp.State != "" { + objectMap["state"] = mpsadfpsstp.State + } + if mpsadfpsstp.Commands != nil { + objectMap["commands"] = mpsadfpsstp.Commands + } + if mpsadfpsstp.TaskType != "" { + objectMap["taskType"] = mpsadfpsstp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return &mpsadfpsstp, true +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &mpsadfpsstp, true +} + +// UnmarshalJSON is the custom unmarshaler for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties struct. +func (mpsadfpsstp *MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input MigratePostgreSQLAzureDbForPostgreSQLSyncTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + mpsadfpsstp.Input = &input + } + case "output": + if v != nil { + output, err := unmarshalBasicMigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputArray(*v) + if err != nil { + return err + } + mpsadfpsstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + mpsadfpsstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + mpsadfpsstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + mpsadfpsstp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + mpsadfpsstp.TaskType = taskType + } + } + } + + return nil +} + +// MigrateSQLServerSQLDbDatabaseInput database specific information for SQL to Azure SQL DB migration task +// inputs +type MigrateSQLServerSQLDbDatabaseInput struct { + // Name - Name of the database + Name *string `json:"name,omitempty"` + // TargetDatabaseName - Name of target database. Note: Target database will be truncated before starting migration. + TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` + // MakeSourceDbReadOnly - Whether to set database read only before migration + MakeSourceDbReadOnly *bool `json:"makeSourceDbReadOnly,omitempty"` + // TableMap - Mapping of source to target tables + TableMap map[string]*string `json:"tableMap"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbDatabaseInput. +func (msssddi MigrateSQLServerSQLDbDatabaseInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if msssddi.Name != nil { + objectMap["name"] = msssddi.Name + } + if msssddi.TargetDatabaseName != nil { + objectMap["targetDatabaseName"] = msssddi.TargetDatabaseName + } + if msssddi.MakeSourceDbReadOnly != nil { + objectMap["makeSourceDbReadOnly"] = msssddi.MakeSourceDbReadOnly + } + if msssddi.TableMap != nil { + objectMap["tableMap"] = msssddi.TableMap + } + return json.Marshal(objectMap) +} + +// MigrateSQLServerSQLDbSyncDatabaseInput database specific information for SQL to Azure SQL DB sync +// migration task inputs +type MigrateSQLServerSQLDbSyncDatabaseInput struct { + // ID - Unique identifier for database + ID *string `json:"id,omitempty"` + // Name - Name of database + Name *string `json:"name,omitempty"` + // TargetDatabaseName - Target database name + TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` + // SchemaName - Schema name to be migrated + SchemaName *string `json:"schemaName,omitempty"` + // TableMap - Mapping of source to target tables + TableMap map[string]*string `json:"tableMap"` + // MigrationSetting - Migration settings which tune the migration behavior + MigrationSetting map[string]*string `json:"migrationSetting"` + // SourceSetting - Source settings to tune source endpoint migration behavior + SourceSetting map[string]*string `json:"sourceSetting"` + // TargetSetting - Target settings to tune target endpoint migration behavior + TargetSetting map[string]*string `json:"targetSetting"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbSyncDatabaseInput. +func (msssdsdi MigrateSQLServerSQLDbSyncDatabaseInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if msssdsdi.ID != nil { + objectMap["id"] = msssdsdi.ID + } + if msssdsdi.Name != nil { + objectMap["name"] = msssdsdi.Name + } + if msssdsdi.TargetDatabaseName != nil { + objectMap["targetDatabaseName"] = msssdsdi.TargetDatabaseName + } + if msssdsdi.SchemaName != nil { + objectMap["schemaName"] = msssdsdi.SchemaName + } + if msssdsdi.TableMap != nil { + objectMap["tableMap"] = msssdsdi.TableMap + } + if msssdsdi.MigrationSetting != nil { + objectMap["migrationSetting"] = msssdsdi.MigrationSetting + } + if msssdsdi.SourceSetting != nil { + objectMap["sourceSetting"] = msssdsdi.SourceSetting + } + if msssdsdi.TargetSetting != nil { + objectMap["targetSetting"] = msssdsdi.TargetSetting + } + return json.Marshal(objectMap) +} + +// MigrateSQLServerSQLDbSyncTaskInput input for the task that migrates on-prem SQL Server databases to +// Azure SQL Database for online migrations +type MigrateSQLServerSQLDbSyncTaskInput struct { + // SelectedDatabases - Databases to migrate + SelectedDatabases *[]MigrateSQLServerSQLDbSyncDatabaseInput `json:"selectedDatabases,omitempty"` + // ValidationOptions - Validation options + ValidationOptions *MigrationValidationOptions `json:"validationOptions,omitempty"` + // SourceConnectionInfo - Information for connecting to source + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Information for connecting to target + TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` +} + +// BasicMigrateSQLServerSQLDbSyncTaskOutput output for the task that migrates on-prem SQL Server databases to Azure SQL +// Database for online migrations +type BasicMigrateSQLServerSQLDbSyncTaskOutput interface { + AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseError() (*MigrateSQLServerSQLDbSyncTaskOutputDatabaseError, bool) + AsMigrateSQLServerSQLDbSyncTaskOutputError() (*MigrateSQLServerSQLDbSyncTaskOutputError, bool) + AsMigrateSQLServerSQLDbSyncTaskOutputTableLevel() (*MigrateSQLServerSQLDbSyncTaskOutputTableLevel, bool) + AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel, bool) + AsMigrateSQLServerSQLDbSyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel, bool) + AsMigrateSQLServerSQLDbSyncTaskOutput() (*MigrateSQLServerSQLDbSyncTaskOutput, bool) +} + +// MigrateSQLServerSQLDbSyncTaskOutput output for the task that migrates on-prem SQL Server databases to Azure +// SQL Database for online migrations +type MigrateSQLServerSQLDbSyncTaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrateSQLServerSQLDbSyncTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput `json:"resultType,omitempty"` +} + +func unmarshalBasicMigrateSQLServerSQLDbSyncTaskOutput(body []byte) (BasicMigrateSQLServerSQLDbSyncTaskOutput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["resultType"] { + case string(ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelErrorOutput): + var msssdstode MigrateSQLServerSQLDbSyncTaskOutputDatabaseError + err := json.Unmarshal(body, &msssdstode) + return msssdstode, err + case string(ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeErrorOutput): + var msssdstoe MigrateSQLServerSQLDbSyncTaskOutputError + err := json.Unmarshal(body, &msssdstoe) + return msssdstoe, err + case string(ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeTableLevelOutput): + var msssdstotl MigrateSQLServerSQLDbSyncTaskOutputTableLevel + err := json.Unmarshal(body, &msssdstotl) + return msssdstotl, err + case string(ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelOutput): + var msssdstodl MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel + err := json.Unmarshal(body, &msssdstodl) + return msssdstodl, err + case string(ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrationLevelOutput): + var msssdstoml MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel + err := json.Unmarshal(body, &msssdstoml) + return msssdstoml, err + default: + var msssdsto MigrateSQLServerSQLDbSyncTaskOutput + err := json.Unmarshal(body, &msssdsto) + return msssdsto, err + } +} +func unmarshalBasicMigrateSQLServerSQLDbSyncTaskOutputArray(body []byte) ([]BasicMigrateSQLServerSQLDbSyncTaskOutput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + msssdstoArray := make([]BasicMigrateSQLServerSQLDbSyncTaskOutput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + msssdsto, err := unmarshalBasicMigrateSQLServerSQLDbSyncTaskOutput(*rawMessage) + if err != nil { + return nil, err + } + msssdstoArray[index] = msssdsto + } + return msssdstoArray, nil +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbSyncTaskOutput. +func (msssdsto MigrateSQLServerSQLDbSyncTaskOutput) MarshalJSON() ([]byte, error) { + msssdsto.ResultType = ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrateSQLServerSQLDbSyncTaskOutput + objectMap := make(map[string]interface{}) + if msssdsto.ID != nil { + objectMap["id"] = msssdsto.ID + } + if msssdsto.ResultType != "" { + objectMap["resultType"] = msssdsto.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseError is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutput. +func (msssdsto MigrateSQLServerSQLDbSyncTaskOutput) AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseError() (*MigrateSQLServerSQLDbSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputError is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutput. +func (msssdsto MigrateSQLServerSQLDbSyncTaskOutput) AsMigrateSQLServerSQLDbSyncTaskOutputError() (*MigrateSQLServerSQLDbSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutput. +func (msssdsto MigrateSQLServerSQLDbSyncTaskOutput) AsMigrateSQLServerSQLDbSyncTaskOutputTableLevel() (*MigrateSQLServerSQLDbSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutput. +func (msssdsto MigrateSQLServerSQLDbSyncTaskOutput) AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutput. +func (msssdsto MigrateSQLServerSQLDbSyncTaskOutput) AsMigrateSQLServerSQLDbSyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutput is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutput. +func (msssdsto MigrateSQLServerSQLDbSyncTaskOutput) AsMigrateSQLServerSQLDbSyncTaskOutput() (*MigrateSQLServerSQLDbSyncTaskOutput, bool) { + return &msssdsto, true +} + +// AsBasicMigrateSQLServerSQLDbSyncTaskOutput is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutput. +func (msssdsto MigrateSQLServerSQLDbSyncTaskOutput) AsBasicMigrateSQLServerSQLDbSyncTaskOutput() (BasicMigrateSQLServerSQLDbSyncTaskOutput, bool) { + return &msssdsto, true +} + +// MigrateSQLServerSQLDbSyncTaskOutputDatabaseError ... +type MigrateSQLServerSQLDbSyncTaskOutputDatabaseError struct { + // ErrorMessage - Error message + ErrorMessage *string `json:"errorMessage,omitempty"` + // Events - List of error events. + Events *[]SyncMigrationDatabaseErrorEvent `json:"events,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrateSQLServerSQLDbSyncTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbSyncTaskOutputDatabaseError. +func (msssdstode MigrateSQLServerSQLDbSyncTaskOutputDatabaseError) MarshalJSON() ([]byte, error) { + msssdstode.ResultType = ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelErrorOutput + objectMap := make(map[string]interface{}) + if msssdstode.ErrorMessage != nil { + objectMap["errorMessage"] = msssdstode.ErrorMessage + } + if msssdstode.Events != nil { + objectMap["events"] = msssdstode.Events + } + if msssdstode.ID != nil { + objectMap["id"] = msssdstode.ID + } + if msssdstode.ResultType != "" { + objectMap["resultType"] = msssdstode.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseError is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputDatabaseError. +func (msssdstode MigrateSQLServerSQLDbSyncTaskOutputDatabaseError) AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseError() (*MigrateSQLServerSQLDbSyncTaskOutputDatabaseError, bool) { + return &msssdstode, true +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputError is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputDatabaseError. +func (msssdstode MigrateSQLServerSQLDbSyncTaskOutputDatabaseError) AsMigrateSQLServerSQLDbSyncTaskOutputError() (*MigrateSQLServerSQLDbSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputDatabaseError. +func (msssdstode MigrateSQLServerSQLDbSyncTaskOutputDatabaseError) AsMigrateSQLServerSQLDbSyncTaskOutputTableLevel() (*MigrateSQLServerSQLDbSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputDatabaseError. +func (msssdstode MigrateSQLServerSQLDbSyncTaskOutputDatabaseError) AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputDatabaseError. +func (msssdstode MigrateSQLServerSQLDbSyncTaskOutputDatabaseError) AsMigrateSQLServerSQLDbSyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutput is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputDatabaseError. +func (msssdstode MigrateSQLServerSQLDbSyncTaskOutputDatabaseError) AsMigrateSQLServerSQLDbSyncTaskOutput() (*MigrateSQLServerSQLDbSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLDbSyncTaskOutput is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputDatabaseError. +func (msssdstode MigrateSQLServerSQLDbSyncTaskOutputDatabaseError) AsBasicMigrateSQLServerSQLDbSyncTaskOutput() (BasicMigrateSQLServerSQLDbSyncTaskOutput, bool) { + return &msssdstode, true +} + +// MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel ... +type MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel struct { + // DatabaseName - Name of the database + DatabaseName *string `json:"databaseName,omitempty"` + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // MigrationState - Migration state that this database is in. Possible values include: 'SyncDatabaseMigrationReportingStateUNDEFINED', 'SyncDatabaseMigrationReportingStateCONFIGURING', 'SyncDatabaseMigrationReportingStateINITIALIAZING', 'SyncDatabaseMigrationReportingStateSTARTING', 'SyncDatabaseMigrationReportingStateRUNNING', 'SyncDatabaseMigrationReportingStateREADYTOCOMPLETE', 'SyncDatabaseMigrationReportingStateCOMPLETING', 'SyncDatabaseMigrationReportingStateCOMPLETE', 'SyncDatabaseMigrationReportingStateCANCELLING', 'SyncDatabaseMigrationReportingStateCANCELLED', 'SyncDatabaseMigrationReportingStateFAILED' + MigrationState SyncDatabaseMigrationReportingState `json:"migrationState,omitempty"` + // IncomingChanges - Number of incoming changes + IncomingChanges *int64 `json:"incomingChanges,omitempty"` + // AppliedChanges - Number of applied changes + AppliedChanges *int64 `json:"appliedChanges,omitempty"` + // CdcInsertCounter - Number of cdc inserts + CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` + // CdcDeleteCounter - Number of cdc deletes + CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` + // CdcUpdateCounter - Number of cdc updates + CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` + // FullLoadCompletedTables - Number of tables completed in full load + FullLoadCompletedTables *int64 `json:"fullLoadCompletedTables,omitempty"` + // FullLoadLoadingTables - Number of tables loading in full load + FullLoadLoadingTables *int64 `json:"fullLoadLoadingTables,omitempty"` + // FullLoadQueuedTables - Number of tables queued in full load + FullLoadQueuedTables *int64 `json:"fullLoadQueuedTables,omitempty"` + // FullLoadErroredTables - Number of tables errored in full load + FullLoadErroredTables *int64 `json:"fullLoadErroredTables,omitempty"` + // InitializationCompleted - Indicates if initial load (full load) has been completed + InitializationCompleted *bool `json:"initializationCompleted,omitempty"` + // Latency - CDC apply latency + Latency *int64 `json:"latency,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrateSQLServerSQLDbSyncTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel. +func (msssdstodl MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { + msssdstodl.ResultType = ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelOutput + objectMap := make(map[string]interface{}) + if msssdstodl.DatabaseName != nil { + objectMap["databaseName"] = msssdstodl.DatabaseName + } + if msssdstodl.StartedOn != nil { + objectMap["startedOn"] = msssdstodl.StartedOn + } + if msssdstodl.EndedOn != nil { + objectMap["endedOn"] = msssdstodl.EndedOn + } + if msssdstodl.MigrationState != "" { + objectMap["migrationState"] = msssdstodl.MigrationState + } + if msssdstodl.IncomingChanges != nil { + objectMap["incomingChanges"] = msssdstodl.IncomingChanges + } + if msssdstodl.AppliedChanges != nil { + objectMap["appliedChanges"] = msssdstodl.AppliedChanges + } + if msssdstodl.CdcInsertCounter != nil { + objectMap["cdcInsertCounter"] = msssdstodl.CdcInsertCounter + } + if msssdstodl.CdcDeleteCounter != nil { + objectMap["cdcDeleteCounter"] = msssdstodl.CdcDeleteCounter + } + if msssdstodl.CdcUpdateCounter != nil { + objectMap["cdcUpdateCounter"] = msssdstodl.CdcUpdateCounter + } + if msssdstodl.FullLoadCompletedTables != nil { + objectMap["fullLoadCompletedTables"] = msssdstodl.FullLoadCompletedTables + } + if msssdstodl.FullLoadLoadingTables != nil { + objectMap["fullLoadLoadingTables"] = msssdstodl.FullLoadLoadingTables + } + if msssdstodl.FullLoadQueuedTables != nil { + objectMap["fullLoadQueuedTables"] = msssdstodl.FullLoadQueuedTables + } + if msssdstodl.FullLoadErroredTables != nil { + objectMap["fullLoadErroredTables"] = msssdstodl.FullLoadErroredTables + } + if msssdstodl.InitializationCompleted != nil { + objectMap["initializationCompleted"] = msssdstodl.InitializationCompleted + } + if msssdstodl.Latency != nil { + objectMap["latency"] = msssdstodl.Latency + } + if msssdstodl.ID != nil { + objectMap["id"] = msssdstodl.ID + } + if msssdstodl.ResultType != "" { + objectMap["resultType"] = msssdstodl.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseError is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel. +func (msssdstodl MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseError() (*MigrateSQLServerSQLDbSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputError is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel. +func (msssdstodl MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbSyncTaskOutputError() (*MigrateSQLServerSQLDbSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel. +func (msssdstodl MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbSyncTaskOutputTableLevel() (*MigrateSQLServerSQLDbSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel. +func (msssdstodl MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel, bool) { + return &msssdstodl, true +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel. +func (msssdstodl MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbSyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutput is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel. +func (msssdstodl MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbSyncTaskOutput() (*MigrateSQLServerSQLDbSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLDbSyncTaskOutput is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel. +func (msssdstodl MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel) AsBasicMigrateSQLServerSQLDbSyncTaskOutput() (BasicMigrateSQLServerSQLDbSyncTaskOutput, bool) { + return &msssdstodl, true +} + +// MigrateSQLServerSQLDbSyncTaskOutputError ... +type MigrateSQLServerSQLDbSyncTaskOutputError struct { + // Error - Migration error + Error *ReportableException `json:"error,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrateSQLServerSQLDbSyncTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbSyncTaskOutputError. +func (msssdstoe MigrateSQLServerSQLDbSyncTaskOutputError) MarshalJSON() ([]byte, error) { + msssdstoe.ResultType = ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeErrorOutput + objectMap := make(map[string]interface{}) + if msssdstoe.Error != nil { + objectMap["error"] = msssdstoe.Error + } + if msssdstoe.ID != nil { + objectMap["id"] = msssdstoe.ID + } + if msssdstoe.ResultType != "" { + objectMap["resultType"] = msssdstoe.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseError is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputError. +func (msssdstoe MigrateSQLServerSQLDbSyncTaskOutputError) AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseError() (*MigrateSQLServerSQLDbSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputError is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputError. +func (msssdstoe MigrateSQLServerSQLDbSyncTaskOutputError) AsMigrateSQLServerSQLDbSyncTaskOutputError() (*MigrateSQLServerSQLDbSyncTaskOutputError, bool) { + return &msssdstoe, true +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputError. +func (msssdstoe MigrateSQLServerSQLDbSyncTaskOutputError) AsMigrateSQLServerSQLDbSyncTaskOutputTableLevel() (*MigrateSQLServerSQLDbSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputError. +func (msssdstoe MigrateSQLServerSQLDbSyncTaskOutputError) AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputError. +func (msssdstoe MigrateSQLServerSQLDbSyncTaskOutputError) AsMigrateSQLServerSQLDbSyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutput is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputError. +func (msssdstoe MigrateSQLServerSQLDbSyncTaskOutputError) AsMigrateSQLServerSQLDbSyncTaskOutput() (*MigrateSQLServerSQLDbSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLDbSyncTaskOutput is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputError. +func (msssdstoe MigrateSQLServerSQLDbSyncTaskOutputError) AsBasicMigrateSQLServerSQLDbSyncTaskOutput() (BasicMigrateSQLServerSQLDbSyncTaskOutput, bool) { + return &msssdstoe, true +} + +// MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel ... +type MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel struct { + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // SourceServerVersion - Source server version + SourceServerVersion *string `json:"sourceServerVersion,omitempty"` + // SourceServer - Source server name + SourceServer *string `json:"sourceServer,omitempty"` + // TargetServerVersion - Target server version + TargetServerVersion *string `json:"targetServerVersion,omitempty"` + // TargetServer - Target server name + TargetServer *string `json:"targetServer,omitempty"` + // DatabaseCount - Count of databases + DatabaseCount *int32 `json:"databaseCount,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrateSQLServerSQLDbSyncTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel. +func (msssdstoml MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { + msssdstoml.ResultType = ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrationLevelOutput + objectMap := make(map[string]interface{}) + if msssdstoml.StartedOn != nil { + objectMap["startedOn"] = msssdstoml.StartedOn + } + if msssdstoml.EndedOn != nil { + objectMap["endedOn"] = msssdstoml.EndedOn + } + if msssdstoml.SourceServerVersion != nil { + objectMap["sourceServerVersion"] = msssdstoml.SourceServerVersion + } + if msssdstoml.SourceServer != nil { + objectMap["sourceServer"] = msssdstoml.SourceServer + } + if msssdstoml.TargetServerVersion != nil { + objectMap["targetServerVersion"] = msssdstoml.TargetServerVersion + } + if msssdstoml.TargetServer != nil { + objectMap["targetServer"] = msssdstoml.TargetServer + } + if msssdstoml.DatabaseCount != nil { + objectMap["databaseCount"] = msssdstoml.DatabaseCount + } + if msssdstoml.ID != nil { + objectMap["id"] = msssdstoml.ID + } + if msssdstoml.ResultType != "" { + objectMap["resultType"] = msssdstoml.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseError is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel. +func (msssdstoml MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseError() (*MigrateSQLServerSQLDbSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputError is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel. +func (msssdstoml MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbSyncTaskOutputError() (*MigrateSQLServerSQLDbSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel. +func (msssdstoml MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbSyncTaskOutputTableLevel() (*MigrateSQLServerSQLDbSyncTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel. +func (msssdstoml MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel. +func (msssdstoml MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbSyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel, bool) { + return &msssdstoml, true +} + +// AsMigrateSQLServerSQLDbSyncTaskOutput is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel. +func (msssdstoml MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbSyncTaskOutput() (*MigrateSQLServerSQLDbSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLDbSyncTaskOutput is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel. +func (msssdstoml MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel) AsBasicMigrateSQLServerSQLDbSyncTaskOutput() (BasicMigrateSQLServerSQLDbSyncTaskOutput, bool) { + return &msssdstoml, true +} + +// MigrateSQLServerSQLDbSyncTaskOutputTableLevel ... +type MigrateSQLServerSQLDbSyncTaskOutputTableLevel struct { + // TableName - Name of the table + TableName *string `json:"tableName,omitempty"` + // DatabaseName - Name of the database + DatabaseName *string `json:"databaseName,omitempty"` + // CdcInsertCounter - Number of applied inserts + CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` + // CdcUpdateCounter - Number of applied updates + CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` + // CdcDeleteCounter - Number of applied deletes + CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` + // FullLoadEstFinishTime - Estimate to finish full load + FullLoadEstFinishTime *date.Time `json:"fullLoadEstFinishTime,omitempty"` + // FullLoadStartedOn - Full load start time + FullLoadStartedOn *date.Time `json:"fullLoadStartedOn,omitempty"` + // FullLoadEndedOn - Full load end time + FullLoadEndedOn *date.Time `json:"fullLoadEndedOn,omitempty"` + // FullLoadTotalRows - Number of rows applied in full load + FullLoadTotalRows *int64 `json:"fullLoadTotalRows,omitempty"` + // State - Current state of the table migration. Possible values include: 'SyncTableMigrationStateBEFORELOAD', 'SyncTableMigrationStateFULLLOAD', 'SyncTableMigrationStateCOMPLETED', 'SyncTableMigrationStateCANCELED', 'SyncTableMigrationStateERROR', 'SyncTableMigrationStateFAILED' + State SyncTableMigrationState `json:"state,omitempty"` + // TotalChangesApplied - Total number of applied changes + TotalChangesApplied *int64 `json:"totalChangesApplied,omitempty"` + // DataErrorsCounter - Number of data errors occurred + DataErrorsCounter *int64 `json:"dataErrorsCounter,omitempty"` + // LastModifiedTime - Last modified time on target + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrateSQLServerSQLDbSyncTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbSyncTaskOutputTableLevel. +func (msssdstotl MigrateSQLServerSQLDbSyncTaskOutputTableLevel) MarshalJSON() ([]byte, error) { + msssdstotl.ResultType = ResultTypeBasicMigrateSQLServerSQLDbSyncTaskOutputResultTypeTableLevelOutput + objectMap := make(map[string]interface{}) + if msssdstotl.TableName != nil { + objectMap["tableName"] = msssdstotl.TableName + } + if msssdstotl.DatabaseName != nil { + objectMap["databaseName"] = msssdstotl.DatabaseName + } + if msssdstotl.CdcInsertCounter != nil { + objectMap["cdcInsertCounter"] = msssdstotl.CdcInsertCounter + } + if msssdstotl.CdcUpdateCounter != nil { + objectMap["cdcUpdateCounter"] = msssdstotl.CdcUpdateCounter + } + if msssdstotl.CdcDeleteCounter != nil { + objectMap["cdcDeleteCounter"] = msssdstotl.CdcDeleteCounter + } + if msssdstotl.FullLoadEstFinishTime != nil { + objectMap["fullLoadEstFinishTime"] = msssdstotl.FullLoadEstFinishTime + } + if msssdstotl.FullLoadStartedOn != nil { + objectMap["fullLoadStartedOn"] = msssdstotl.FullLoadStartedOn + } + if msssdstotl.FullLoadEndedOn != nil { + objectMap["fullLoadEndedOn"] = msssdstotl.FullLoadEndedOn + } + if msssdstotl.FullLoadTotalRows != nil { + objectMap["fullLoadTotalRows"] = msssdstotl.FullLoadTotalRows + } + if msssdstotl.State != "" { + objectMap["state"] = msssdstotl.State + } + if msssdstotl.TotalChangesApplied != nil { + objectMap["totalChangesApplied"] = msssdstotl.TotalChangesApplied + } + if msssdstotl.DataErrorsCounter != nil { + objectMap["dataErrorsCounter"] = msssdstotl.DataErrorsCounter + } + if msssdstotl.LastModifiedTime != nil { + objectMap["lastModifiedTime"] = msssdstotl.LastModifiedTime + } + if msssdstotl.ID != nil { + objectMap["id"] = msssdstotl.ID + } + if msssdstotl.ResultType != "" { + objectMap["resultType"] = msssdstotl.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseError is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputTableLevel. +func (msssdstotl MigrateSQLServerSQLDbSyncTaskOutputTableLevel) AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseError() (*MigrateSQLServerSQLDbSyncTaskOutputDatabaseError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputError is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputTableLevel. +func (msssdstotl MigrateSQLServerSQLDbSyncTaskOutputTableLevel) AsMigrateSQLServerSQLDbSyncTaskOutputError() (*MigrateSQLServerSQLDbSyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputTableLevel. +func (msssdstotl MigrateSQLServerSQLDbSyncTaskOutputTableLevel) AsMigrateSQLServerSQLDbSyncTaskOutputTableLevel() (*MigrateSQLServerSQLDbSyncTaskOutputTableLevel, bool) { + return &msssdstotl, true +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputTableLevel. +func (msssdstotl MigrateSQLServerSQLDbSyncTaskOutputTableLevel) AsMigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputTableLevel. +func (msssdstotl MigrateSQLServerSQLDbSyncTaskOutputTableLevel) AsMigrateSQLServerSQLDbSyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbSyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskOutput is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputTableLevel. +func (msssdstotl MigrateSQLServerSQLDbSyncTaskOutputTableLevel) AsMigrateSQLServerSQLDbSyncTaskOutput() (*MigrateSQLServerSQLDbSyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLDbSyncTaskOutput is the BasicMigrateSQLServerSQLDbSyncTaskOutput implementation for MigrateSQLServerSQLDbSyncTaskOutputTableLevel. +func (msssdstotl MigrateSQLServerSQLDbSyncTaskOutputTableLevel) AsBasicMigrateSQLServerSQLDbSyncTaskOutput() (BasicMigrateSQLServerSQLDbSyncTaskOutput, bool) { + return &msssdstotl, true +} + +// MigrateSQLServerSQLDbSyncTaskProperties properties for the task that migrates on-prem SQL Server +// databases to Azure SQL Database for online migrations +type MigrateSQLServerSQLDbSyncTaskProperties struct { + // Input - Task input + Input *MigrateSQLServerSQLDbSyncTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]BasicMigrateSQLServerSQLDbSyncTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) MarshalJSON() ([]byte, error) { + msssdstp.TaskType = TaskTypeMigrateSQLServerAzureSQLDbSync + objectMap := make(map[string]interface{}) + if msssdstp.Input != nil { + objectMap["input"] = msssdstp.Input + } + if msssdstp.Output != nil { + objectMap["output"] = msssdstp.Output + } + if msssdstp.Errors != nil { + objectMap["errors"] = msssdstp.Errors + } + if msssdstp.State != "" { + objectMap["state"] = msssdstp.State + } + if msssdstp.Commands != nil { + objectMap["commands"] = msssdstp.Commands + } + if msssdstp.TaskType != "" { + objectMap["taskType"] = msssdstp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return &msssdstp, true +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &msssdstp, true +} + +// UnmarshalJSON is the custom unmarshaler for MigrateSQLServerSQLDbSyncTaskProperties struct. +func (msssdstp *MigrateSQLServerSQLDbSyncTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input MigrateSQLServerSQLDbSyncTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + msssdstp.Input = &input + } + case "output": + if v != nil { + output, err := unmarshalBasicMigrateSQLServerSQLDbSyncTaskOutputArray(*v) + if err != nil { + return err + } + msssdstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + msssdstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + msssdstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + msssdstp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + msssdstp.TaskType = taskType + } + } + } + + return nil +} + +// MigrateSQLServerSQLDbTaskInput input for the task that migrates on-prem SQL Server databases to Azure +// SQL Database +type MigrateSQLServerSQLDbTaskInput struct { + // SelectedDatabases - Databases to migrate + SelectedDatabases *[]MigrateSQLServerSQLDbDatabaseInput `json:"selectedDatabases,omitempty"` + // ValidationOptions - Options for enabling various post migration validations. Available options, + // 1.) Data Integrity Check: Performs a checksum based comparison on source and target tables after the migration to ensure the correctness of the data. + // 2.) Schema Validation: Performs a thorough schema comparison between the source and target tables and provides a list of differences between the source and target database, 3.) Query Analysis: Executes a set of queries picked up automatically either from the Query Plan Cache or Query Store and execute them and compares the execution time between the source and target database. + ValidationOptions *MigrationValidationOptions `json:"validationOptions,omitempty"` + // SourceConnectionInfo - Information for connecting to source + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Information for connecting to target + TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` +} + +// BasicMigrateSQLServerSQLDbTaskOutput output for the task that migrates on-prem SQL Server databases to Azure SQL +// Database +type BasicMigrateSQLServerSQLDbTaskOutput interface { + AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) + AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) + AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) + AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) + AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) + AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) + AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) +} + +// MigrateSQLServerSQLDbTaskOutput output for the task that migrates on-prem SQL Server databases to Azure SQL +// Database +type MigrateSQLServerSQLDbTaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationDatabaseLevelValidationOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationValidationOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLDbTaskOutput `json:"resultType,omitempty"` +} + +func unmarshalBasicMigrateSQLServerSQLDbTaskOutput(body []byte) (BasicMigrateSQLServerSQLDbTaskOutput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["resultType"] { + case string(ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationDatabaseLevelValidationOutput): + var msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult + err := json.Unmarshal(body, &msssdtodlvr) + return msssdtodlvr, err + case string(ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationValidationOutput): + var msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult + err := json.Unmarshal(body, &msssdtovr) + return msssdtovr, err + case string(ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput): + var msssdtoe MigrateSQLServerSQLDbTaskOutputError + err := json.Unmarshal(body, &msssdtoe) + return msssdtoe, err + case string(ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput): + var msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel + err := json.Unmarshal(body, &msssdtotl) + return msssdtotl, err + case string(ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput): + var msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel + err := json.Unmarshal(body, &msssdtodl) + return msssdtodl, err + case string(ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput): + var msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel + err := json.Unmarshal(body, &msssdtoml) + return msssdtoml, err + default: + var msssdto MigrateSQLServerSQLDbTaskOutput + err := json.Unmarshal(body, &msssdto) + return msssdto, err + } +} +func unmarshalBasicMigrateSQLServerSQLDbTaskOutputArray(body []byte) ([]BasicMigrateSQLServerSQLDbTaskOutput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + msssdtoArray := make([]BasicMigrateSQLServerSQLDbTaskOutput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + msssdto, err := unmarshalBasicMigrateSQLServerSQLDbTaskOutput(*rawMessage) + if err != nil { + return nil, err + } + msssdtoArray[index] = msssdto + } + return msssdtoArray, nil +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutput. +func (msssdto MigrateSQLServerSQLDbTaskOutput) MarshalJSON() ([]byte, error) { + msssdto.ResultType = ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput + objectMap := make(map[string]interface{}) + if msssdto.ID != nil { + objectMap["id"] = msssdto.ID + } + if msssdto.ResultType != "" { + objectMap["resultType"] = msssdto.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. +func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. +func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. +func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. +func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. +func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. +func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. +func (msssdto MigrateSQLServerSQLDbTaskOutput) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { + return &msssdto, true +} + +// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutput. +func (msssdto MigrateSQLServerSQLDbTaskOutput) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { + return &msssdto, true +} + +// MigrateSQLServerSQLDbTaskOutputDatabaseLevel database level result for Sql Server to Azure Sql DB +// migration. +type MigrateSQLServerSQLDbTaskOutputDatabaseLevel struct { + // DatabaseName - Name of the item + DatabaseName *string `json:"databaseName,omitempty"` + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' + State MigrationState `json:"state,omitempty"` + // Stage - Migration stage that this database is in. Possible values include: 'DatabaseMigrationStageNone', 'DatabaseMigrationStageInitialize', 'DatabaseMigrationStageBackup', 'DatabaseMigrationStageFileCopy', 'DatabaseMigrationStageRestore', 'DatabaseMigrationStageCompleted' + Stage DatabaseMigrationStage `json:"stage,omitempty"` + // StatusMessage - Status message + StatusMessage *string `json:"statusMessage,omitempty"` + // Message - Migration progress message + Message *string `json:"message,omitempty"` + // NumberOfObjects - Number of objects + NumberOfObjects *int64 `json:"numberOfObjects,omitempty"` + // NumberOfObjectsCompleted - Number of successfully completed objects + NumberOfObjectsCompleted *int64 `json:"numberOfObjectsCompleted,omitempty"` + // ErrorCount - Number of database/object errors. + ErrorCount *int64 `json:"errorCount,omitempty"` + // ErrorPrefix - Wildcard string prefix to use for querying all errors of the item + ErrorPrefix *string `json:"errorPrefix,omitempty"` + // ResultPrefix - Wildcard string prefix to use for querying all sub-tem results of the item + ResultPrefix *string `json:"resultPrefix,omitempty"` + // ExceptionsAndWarnings - Migration exceptions and warnings. + ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` + // ObjectSummary - Summary of object results in the migration + ObjectSummary map[string]*DataItemMigrationSummaryResult `json:"objectSummary"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationDatabaseLevelValidationOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationValidationOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLDbTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. +func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { + msssdtodl.ResultType = ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput + objectMap := make(map[string]interface{}) + if msssdtodl.DatabaseName != nil { + objectMap["databaseName"] = msssdtodl.DatabaseName + } + if msssdtodl.StartedOn != nil { + objectMap["startedOn"] = msssdtodl.StartedOn + } + if msssdtodl.EndedOn != nil { + objectMap["endedOn"] = msssdtodl.EndedOn + } + if msssdtodl.State != "" { + objectMap["state"] = msssdtodl.State + } + if msssdtodl.Stage != "" { + objectMap["stage"] = msssdtodl.Stage + } + if msssdtodl.StatusMessage != nil { + objectMap["statusMessage"] = msssdtodl.StatusMessage + } + if msssdtodl.Message != nil { + objectMap["message"] = msssdtodl.Message + } + if msssdtodl.NumberOfObjects != nil { + objectMap["numberOfObjects"] = msssdtodl.NumberOfObjects + } + if msssdtodl.NumberOfObjectsCompleted != nil { + objectMap["numberOfObjectsCompleted"] = msssdtodl.NumberOfObjectsCompleted + } + if msssdtodl.ErrorCount != nil { + objectMap["errorCount"] = msssdtodl.ErrorCount + } + if msssdtodl.ErrorPrefix != nil { + objectMap["errorPrefix"] = msssdtodl.ErrorPrefix + } + if msssdtodl.ResultPrefix != nil { + objectMap["resultPrefix"] = msssdtodl.ResultPrefix + } + if msssdtodl.ExceptionsAndWarnings != nil { + objectMap["exceptionsAndWarnings"] = msssdtodl.ExceptionsAndWarnings + } + if msssdtodl.ObjectSummary != nil { + objectMap["objectSummary"] = msssdtodl.ObjectSummary + } + if msssdtodl.ID != nil { + objectMap["id"] = msssdtodl.ID + } + if msssdtodl.ResultType != "" { + objectMap["resultType"] = msssdtodl.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. +func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. +func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. +func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. +func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. +func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { + return &msssdtodl, true +} + +// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. +func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. +func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevel. +func (msssdtodl MigrateSQLServerSQLDbTaskOutputDatabaseLevel) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { + return &msssdtodl, true +} + +// MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult database validation result for Sql Server +// to Azure Sql DB migration. +type MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult struct { + // MigrationID - Migration Identifier + MigrationID *string `json:"migrationId,omitempty"` + // SourceDatabaseName - Name of the source database + SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` + // TargetDatabaseName - Name of the target database + TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` + // StartedOn - Validation start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Validation end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // DataIntegrityValidationResult - Provides data integrity validation result between the source and target tables that are migrated. + DataIntegrityValidationResult *DataIntegrityValidationResult `json:"dataIntegrityValidationResult,omitempty"` + // SchemaValidationResult - Provides schema comparison result between source and target database + SchemaValidationResult *SchemaComparisonValidationResult `json:"schemaValidationResult,omitempty"` + // QueryAnalysisValidationResult - Results of some of the query execution result between source and target database + QueryAnalysisValidationResult *QueryAnalysisValidationResult `json:"queryAnalysisValidationResult,omitempty"` + // Status - Current status of validation at the database level. Possible values include: 'ValidationStatusDefault', 'ValidationStatusNotStarted', 'ValidationStatusInitialized', 'ValidationStatusInProgress', 'ValidationStatusCompleted', 'ValidationStatusCompletedWithIssues', 'ValidationStatusFailed', 'ValidationStatusStopped' + Status ValidationStatus `json:"status,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationDatabaseLevelValidationOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationValidationOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLDbTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. +func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) MarshalJSON() ([]byte, error) { + msssdtodlvr.ResultType = ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationDatabaseLevelValidationOutput + objectMap := make(map[string]interface{}) + if msssdtodlvr.MigrationID != nil { + objectMap["migrationId"] = msssdtodlvr.MigrationID + } + if msssdtodlvr.SourceDatabaseName != nil { + objectMap["sourceDatabaseName"] = msssdtodlvr.SourceDatabaseName + } + if msssdtodlvr.TargetDatabaseName != nil { + objectMap["targetDatabaseName"] = msssdtodlvr.TargetDatabaseName + } + if msssdtodlvr.StartedOn != nil { + objectMap["startedOn"] = msssdtodlvr.StartedOn + } + if msssdtodlvr.EndedOn != nil { + objectMap["endedOn"] = msssdtodlvr.EndedOn + } + if msssdtodlvr.DataIntegrityValidationResult != nil { + objectMap["dataIntegrityValidationResult"] = msssdtodlvr.DataIntegrityValidationResult + } + if msssdtodlvr.SchemaValidationResult != nil { + objectMap["schemaValidationResult"] = msssdtodlvr.SchemaValidationResult + } + if msssdtodlvr.QueryAnalysisValidationResult != nil { + objectMap["queryAnalysisValidationResult"] = msssdtodlvr.QueryAnalysisValidationResult + } + if msssdtodlvr.Status != "" { + objectMap["status"] = msssdtodlvr.Status + } + if msssdtodlvr.ID != nil { + objectMap["id"] = msssdtodlvr.ID + } + if msssdtodlvr.ResultType != "" { + objectMap["resultType"] = msssdtodlvr.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. +func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) { + return &msssdtodlvr, true +} + +// AsMigrateSQLServerSQLDbTaskOutputValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. +func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. +func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. +func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. +func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. +func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. +func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult. +func (msssdtodlvr MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { + return &msssdtodlvr, true +} + +// MigrateSQLServerSQLDbTaskOutputError task errors for Sql Server to Azure Sql DB migration. +type MigrateSQLServerSQLDbTaskOutputError struct { + // Error - Migration error + Error *ReportableException `json:"error,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationDatabaseLevelValidationOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationValidationOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLDbTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputError. +func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) MarshalJSON() ([]byte, error) { + msssdtoe.ResultType = ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput + objectMap := make(map[string]interface{}) + if msssdtoe.Error != nil { + objectMap["error"] = msssdtoe.Error + } + if msssdtoe.ID != nil { + objectMap["id"] = msssdtoe.ID + } + if msssdtoe.ResultType != "" { + objectMap["resultType"] = msssdtoe.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. +func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. +func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. +func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { + return &msssdtoe, true +} + +// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. +func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. +func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. +func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. +func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputError. +func (msssdtoe MigrateSQLServerSQLDbTaskOutputError) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { + return &msssdtoe, true +} + +// MigrateSQLServerSQLDbTaskOutputMigrationLevel migration level result for Sql server to Azure Sql DB +// migration. +type MigrateSQLServerSQLDbTaskOutputMigrationLevel struct { + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // DurationInSeconds - Duration of task execution in seconds. + DurationInSeconds *int64 `json:"durationInSeconds,omitempty"` + // Status - Current status of migration. Possible values include: 'MigrationStatusDefault', 'MigrationStatusConnecting', 'MigrationStatusSourceAndTargetSelected', 'MigrationStatusSelectLogins', 'MigrationStatusConfigured', 'MigrationStatusRunning', 'MigrationStatusError', 'MigrationStatusStopped', 'MigrationStatusCompleted', 'MigrationStatusCompletedWithWarnings' + Status MigrationStatus `json:"status,omitempty"` + // StatusMessage - Migration status message + StatusMessage *string `json:"statusMessage,omitempty"` + // Message - Migration progress message + Message *string `json:"message,omitempty"` + // Databases - Selected databases as a map from database name to database id + Databases map[string]*string `json:"databases"` + // DatabaseSummary - Summary of database results in the migration + DatabaseSummary map[string]*DatabaseSummaryResult `json:"databaseSummary"` + // MigrationReport - Migration Report Result, provides unique url for downloading your migration report. + MigrationReport *MigrationReportResult `json:"migrationReport,omitempty"` + // SourceServerVersion - Source server version + SourceServerVersion *string `json:"sourceServerVersion,omitempty"` + // SourceServerBrandVersion - Source server brand version + SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` + // TargetServerVersion - Target server version + TargetServerVersion *string `json:"targetServerVersion,omitempty"` + // TargetServerBrandVersion - Target server brand version + TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` + // ExceptionsAndWarnings - Migration exceptions and warnings. + ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationDatabaseLevelValidationOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationValidationOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLDbTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputMigrationLevel. +func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { + msssdtoml.ResultType = ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput + objectMap := make(map[string]interface{}) + if msssdtoml.StartedOn != nil { + objectMap["startedOn"] = msssdtoml.StartedOn + } + if msssdtoml.EndedOn != nil { + objectMap["endedOn"] = msssdtoml.EndedOn + } + if msssdtoml.DurationInSeconds != nil { + objectMap["durationInSeconds"] = msssdtoml.DurationInSeconds + } + if msssdtoml.Status != "" { + objectMap["status"] = msssdtoml.Status + } + if msssdtoml.StatusMessage != nil { + objectMap["statusMessage"] = msssdtoml.StatusMessage + } + if msssdtoml.Message != nil { + objectMap["message"] = msssdtoml.Message + } + if msssdtoml.Databases != nil { + objectMap["databases"] = msssdtoml.Databases + } + if msssdtoml.DatabaseSummary != nil { + objectMap["databaseSummary"] = msssdtoml.DatabaseSummary + } + if msssdtoml.MigrationReport != nil { + objectMap["migrationReport"] = msssdtoml.MigrationReport + } + if msssdtoml.SourceServerVersion != nil { + objectMap["sourceServerVersion"] = msssdtoml.SourceServerVersion + } + if msssdtoml.SourceServerBrandVersion != nil { + objectMap["sourceServerBrandVersion"] = msssdtoml.SourceServerBrandVersion + } + if msssdtoml.TargetServerVersion != nil { + objectMap["targetServerVersion"] = msssdtoml.TargetServerVersion + } + if msssdtoml.TargetServerBrandVersion != nil { + objectMap["targetServerBrandVersion"] = msssdtoml.TargetServerBrandVersion + } + if msssdtoml.ExceptionsAndWarnings != nil { + objectMap["exceptionsAndWarnings"] = msssdtoml.ExceptionsAndWarnings + } + if msssdtoml.ID != nil { + objectMap["id"] = msssdtoml.ID + } + if msssdtoml.ResultType != "" { + objectMap["resultType"] = msssdtoml.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. +func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. +func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. +func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. +func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. +func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. +func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { + return &msssdtoml, true +} + +// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. +func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputMigrationLevel. +func (msssdtoml MigrateSQLServerSQLDbTaskOutputMigrationLevel) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { + return &msssdtoml, true +} + +// MigrateSQLServerSQLDbTaskOutputTableLevel table level result for Sql Server to Azure Sql DB migration. +type MigrateSQLServerSQLDbTaskOutputTableLevel struct { + // ObjectName - Name of the item + ObjectName *string `json:"objectName,omitempty"` + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' + State MigrationState `json:"state,omitempty"` + // StatusMessage - Status message + StatusMessage *string `json:"statusMessage,omitempty"` + // ItemsCount - Number of items + ItemsCount *int64 `json:"itemsCount,omitempty"` + // ItemsCompletedCount - Number of successfully completed items + ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` + // ErrorPrefix - Wildcard string prefix to use for querying all errors of the item + ErrorPrefix *string `json:"errorPrefix,omitempty"` + // ResultPrefix - Wildcard string prefix to use for querying all sub-tem results of the item + ResultPrefix *string `json:"resultPrefix,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationDatabaseLevelValidationOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationValidationOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLDbTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) MarshalJSON() ([]byte, error) { + msssdtotl.ResultType = ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput + objectMap := make(map[string]interface{}) + if msssdtotl.ObjectName != nil { + objectMap["objectName"] = msssdtotl.ObjectName + } + if msssdtotl.StartedOn != nil { + objectMap["startedOn"] = msssdtotl.StartedOn + } + if msssdtotl.EndedOn != nil { + objectMap["endedOn"] = msssdtotl.EndedOn + } + if msssdtotl.State != "" { + objectMap["state"] = msssdtotl.State + } + if msssdtotl.StatusMessage != nil { + objectMap["statusMessage"] = msssdtotl.StatusMessage + } + if msssdtotl.ItemsCount != nil { + objectMap["itemsCount"] = msssdtotl.ItemsCount + } + if msssdtotl.ItemsCompletedCount != nil { + objectMap["itemsCompletedCount"] = msssdtotl.ItemsCompletedCount + } + if msssdtotl.ErrorPrefix != nil { + objectMap["errorPrefix"] = msssdtotl.ErrorPrefix + } + if msssdtotl.ResultPrefix != nil { + objectMap["resultPrefix"] = msssdtotl.ResultPrefix + } + if msssdtotl.ID != nil { + objectMap["id"] = msssdtotl.ID + } + if msssdtotl.ResultType != "" { + objectMap["resultType"] = msssdtotl.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { + return &msssdtotl, true +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { + return &msssdtotl, true +} + +// MigrateSQLServerSQLDbTaskOutputValidationResult validation result for Sql Server to Azure Sql DB +// migration. +type MigrateSQLServerSQLDbTaskOutputValidationResult struct { + // MigrationID - Migration Identifier + MigrationID *string `json:"migrationId,omitempty"` + // SummaryResults - Validation summary results for each database + SummaryResults map[string]*MigrationValidationDatabaseSummaryResult `json:"summaryResults"` + // Status - Current status of validation at the migration level. Status from the database validation result status will be aggregated here. Possible values include: 'ValidationStatusDefault', 'ValidationStatusNotStarted', 'ValidationStatusInitialized', 'ValidationStatusInProgress', 'ValidationStatusCompleted', 'ValidationStatusCompletedWithIssues', 'ValidationStatusFailed', 'ValidationStatusStopped' + Status ValidationStatus `json:"status,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationDatabaseLevelValidationOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationValidationOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLDbTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputValidationResult. +func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) MarshalJSON() ([]byte, error) { + msssdtovr.ResultType = ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationValidationOutput + objectMap := make(map[string]interface{}) + if msssdtovr.MigrationID != nil { + objectMap["migrationId"] = msssdtovr.MigrationID + } + if msssdtovr.SummaryResults != nil { + objectMap["summaryResults"] = msssdtovr.SummaryResults + } + if msssdtovr.Status != "" { + objectMap["status"] = msssdtovr.Status + } + if msssdtovr.ID != nil { + objectMap["id"] = msssdtovr.ID + } + if msssdtovr.ResultType != "" { + objectMap["resultType"] = msssdtovr.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. +func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevelValidationResult, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputValidationResult is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. +func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsMigrateSQLServerSQLDbTaskOutputValidationResult() (*MigrateSQLServerSQLDbTaskOutputValidationResult, bool) { + return &msssdtovr, true +} + +// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. +func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. +func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. +func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. +func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. +func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputValidationResult. +func (msssdtovr MigrateSQLServerSQLDbTaskOutputValidationResult) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { + return &msssdtovr, true +} + +// MigrateSQLServerSQLDbTaskProperties properties for the task that migrates on-prem SQL Server databases +// to Azure SQL Database +type MigrateSQLServerSQLDbTaskProperties struct { + // Input - Task input + Input *MigrateSQLServerSQLDbTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]BasicMigrateSQLServerSQLDbTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) MarshalJSON() ([]byte, error) { + msssdtp.TaskType = TaskTypeMigrateSQLServerSQLDb + objectMap := make(map[string]interface{}) + if msssdtp.Input != nil { + objectMap["input"] = msssdtp.Input + } + if msssdtp.Output != nil { + objectMap["output"] = msssdtp.Output + } + if msssdtp.Errors != nil { + objectMap["errors"] = msssdtp.Errors + } + if msssdtp.State != "" { + objectMap["state"] = msssdtp.State + } + if msssdtp.Commands != nil { + objectMap["commands"] = msssdtp.Commands + } + if msssdtp.TaskType != "" { + objectMap["taskType"] = msssdtp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return &msssdtp, true +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &msssdtp, true +} + +// UnmarshalJSON is the custom unmarshaler for MigrateSQLServerSQLDbTaskProperties struct. +func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input MigrateSQLServerSQLDbTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + msssdtp.Input = &input + } + case "output": + if v != nil { + output, err := unmarshalBasicMigrateSQLServerSQLDbTaskOutputArray(*v) + if err != nil { + return err + } + msssdtp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + msssdtp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + msssdtp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + msssdtp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + msssdtp.TaskType = taskType + } + } + } + + return nil +} + +// MigrateSQLServerSQLMIDatabaseInput database specific information for SQL to Azure SQL DB Managed +// Instance migration task inputs +type MigrateSQLServerSQLMIDatabaseInput struct { + // Name - Name of the database + Name *string `json:"name,omitempty"` + // RestoreDatabaseName - Name of the database at destination + RestoreDatabaseName *string `json:"restoreDatabaseName,omitempty"` + // BackupFileShare - Backup file share information for backing up this database. + BackupFileShare *FileShare `json:"backupFileShare,omitempty"` + // BackupFilePaths - The list of backup files to be used in case of existing backups. + BackupFilePaths *[]string `json:"backupFilePaths,omitempty"` +} + +// MigrateSQLServerSQLMISyncTaskInput input for task that migrates SQL Server databases to Azure SQL +// Database Managed Instance online scenario. +type MigrateSQLServerSQLMISyncTaskInput struct { + // SelectedDatabases - Databases to migrate + SelectedDatabases *[]MigrateSQLServerSQLMIDatabaseInput `json:"selectedDatabases,omitempty"` + // BackupFileShare - Backup file share information for all selected databases. + BackupFileShare *FileShare `json:"backupFileShare,omitempty"` + // StorageResourceID - Fully qualified resourceId of storage + StorageResourceID *string `json:"storageResourceId,omitempty"` + // SourceConnectionInfo - Connection information for source SQL Server + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Connection information for Azure SQL Database Managed Instance + TargetConnectionInfo *MiSQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // AzureApp - Azure Active Directory Application the DMS instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account + AzureApp *AzureActiveDirectoryApp `json:"azureApp,omitempty"` +} + +// BasicMigrateSQLServerSQLMISyncTaskOutput output for task that migrates SQL Server databases to Azure SQL Database +// Managed Instance using Log Replay Service. +type BasicMigrateSQLServerSQLMISyncTaskOutput interface { + AsMigrateSQLServerSQLMISyncTaskOutputError() (*MigrateSQLServerSQLMISyncTaskOutputError, bool) + AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel, bool) + AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLMISyncTaskOutputMigrationLevel, bool) + AsMigrateSQLServerSQLMISyncTaskOutput() (*MigrateSQLServerSQLMISyncTaskOutput, bool) +} + +// MigrateSQLServerSQLMISyncTaskOutput output for task that migrates SQL Server databases to Azure SQL Database +// Managed Instance using Log Replay Service. +type MigrateSQLServerSQLMISyncTaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput `json:"resultType,omitempty"` +} + +func unmarshalBasicMigrateSQLServerSQLMISyncTaskOutput(body []byte) (BasicMigrateSQLServerSQLMISyncTaskOutput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["resultType"] { + case string(ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput): + var msssmstoe MigrateSQLServerSQLMISyncTaskOutputError + err := json.Unmarshal(body, &msssmstoe) + return msssmstoe, err + case string(ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput): + var msssmstodl MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel + err := json.Unmarshal(body, &msssmstodl) + return msssmstodl, err + case string(ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput): + var msssmstoml MigrateSQLServerSQLMISyncTaskOutputMigrationLevel + err := json.Unmarshal(body, &msssmstoml) + return msssmstoml, err + default: + var msssmsto MigrateSQLServerSQLMISyncTaskOutput + err := json.Unmarshal(body, &msssmsto) + return msssmsto, err + } +} +func unmarshalBasicMigrateSQLServerSQLMISyncTaskOutputArray(body []byte) ([]BasicMigrateSQLServerSQLMISyncTaskOutput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + msssmstoArray := make([]BasicMigrateSQLServerSQLMISyncTaskOutput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + msssmsto, err := unmarshalBasicMigrateSQLServerSQLMISyncTaskOutput(*rawMessage) + if err != nil { + return nil, err + } + msssmstoArray[index] = msssmsto + } + return msssmstoArray, nil +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMISyncTaskOutput. +func (msssmsto MigrateSQLServerSQLMISyncTaskOutput) MarshalJSON() ([]byte, error) { + msssmsto.ResultType = ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput + objectMap := make(map[string]interface{}) + if msssmsto.ID != nil { + objectMap["id"] = msssmsto.ID + } + if msssmsto.ResultType != "" { + objectMap["resultType"] = msssmsto.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLMISyncTaskOutputError is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutput. +func (msssmsto MigrateSQLServerSQLMISyncTaskOutput) AsMigrateSQLServerSQLMISyncTaskOutputError() (*MigrateSQLServerSQLMISyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutput. +func (msssmsto MigrateSQLServerSQLMISyncTaskOutput) AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutput. +func (msssmsto MigrateSQLServerSQLMISyncTaskOutput) AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLMISyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutput. +func (msssmsto MigrateSQLServerSQLMISyncTaskOutput) AsMigrateSQLServerSQLMISyncTaskOutput() (*MigrateSQLServerSQLMISyncTaskOutput, bool) { + return &msssmsto, true +} + +// AsBasicMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutput. +func (msssmsto MigrateSQLServerSQLMISyncTaskOutput) AsBasicMigrateSQLServerSQLMISyncTaskOutput() (BasicMigrateSQLServerSQLMISyncTaskOutput, bool) { + return &msssmsto, true +} + +// MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel ... +type MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel struct { + // SourceDatabaseName - Name of the database + SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` + // MigrationState - Current state of database. Possible values include: 'UNDEFINED', 'INITIAL', 'FULLBACKUPUPLOADSTART', 'LOGSHIPPINGSTART', 'UPLOADLOGFILESSTART', 'CUTOVERSTART', 'POSTCUTOVERCOMPLETE', 'COMPLETED', 'CANCELLED', 'FAILED' + MigrationState DatabaseMigrationState `json:"migrationState,omitempty"` + // StartedOn - Database migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Database migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // FullBackupSetInfo - Details of full backup set + FullBackupSetInfo *BackupSetInfo `json:"fullBackupSetInfo,omitempty"` + // LastRestoredBackupSetInfo - Last applied backup set information + LastRestoredBackupSetInfo *BackupSetInfo `json:"lastRestoredBackupSetInfo,omitempty"` + // ActiveBackupSets - Backup sets that are currently active (Either being uploaded or getting restored) + ActiveBackupSets *[]BackupSetInfo `json:"activeBackupSets,omitempty"` + // ContainerName - Name of container created in the Azure Storage account where backups are copied to + ContainerName *string `json:"containerName,omitempty"` + // ErrorPrefix - prefix string to use for querying errors for this database + ErrorPrefix *string `json:"errorPrefix,omitempty"` + // IsFullBackupRestored - Whether full backup has been applied to the target database or not + IsFullBackupRestored *bool `json:"isFullBackupRestored,omitempty"` + // ExceptionsAndWarnings - Migration exceptions and warnings + ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel. +func (msssmstodl MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { + msssmstodl.ResultType = ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput + objectMap := make(map[string]interface{}) + if msssmstodl.SourceDatabaseName != nil { + objectMap["sourceDatabaseName"] = msssmstodl.SourceDatabaseName + } + if msssmstodl.MigrationState != "" { + objectMap["migrationState"] = msssmstodl.MigrationState + } + if msssmstodl.StartedOn != nil { + objectMap["startedOn"] = msssmstodl.StartedOn + } + if msssmstodl.EndedOn != nil { + objectMap["endedOn"] = msssmstodl.EndedOn + } + if msssmstodl.FullBackupSetInfo != nil { + objectMap["fullBackupSetInfo"] = msssmstodl.FullBackupSetInfo + } + if msssmstodl.LastRestoredBackupSetInfo != nil { + objectMap["lastRestoredBackupSetInfo"] = msssmstodl.LastRestoredBackupSetInfo + } + if msssmstodl.ActiveBackupSets != nil { + objectMap["activeBackupSets"] = msssmstodl.ActiveBackupSets + } + if msssmstodl.ContainerName != nil { + objectMap["containerName"] = msssmstodl.ContainerName + } + if msssmstodl.ErrorPrefix != nil { + objectMap["errorPrefix"] = msssmstodl.ErrorPrefix + } + if msssmstodl.IsFullBackupRestored != nil { + objectMap["isFullBackupRestored"] = msssmstodl.IsFullBackupRestored + } + if msssmstodl.ExceptionsAndWarnings != nil { + objectMap["exceptionsAndWarnings"] = msssmstodl.ExceptionsAndWarnings + } + if msssmstodl.ID != nil { + objectMap["id"] = msssmstodl.ID + } + if msssmstodl.ResultType != "" { + objectMap["resultType"] = msssmstodl.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLMISyncTaskOutputError is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel. +func (msssmstodl MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel) AsMigrateSQLServerSQLMISyncTaskOutputError() (*MigrateSQLServerSQLMISyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel. +func (msssmstodl MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel) AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel, bool) { + return &msssmstodl, true +} + +// AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel. +func (msssmstodl MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel) AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLMISyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel. +func (msssmstodl MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel) AsMigrateSQLServerSQLMISyncTaskOutput() (*MigrateSQLServerSQLMISyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel. +func (msssmstodl MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel) AsBasicMigrateSQLServerSQLMISyncTaskOutput() (BasicMigrateSQLServerSQLMISyncTaskOutput, bool) { + return &msssmstodl, true +} + +// MigrateSQLServerSQLMISyncTaskOutputError ... +type MigrateSQLServerSQLMISyncTaskOutputError struct { + // Error - Migration error + Error *ReportableException `json:"error,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMISyncTaskOutputError. +func (msssmstoe MigrateSQLServerSQLMISyncTaskOutputError) MarshalJSON() ([]byte, error) { + msssmstoe.ResultType = ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput + objectMap := make(map[string]interface{}) + if msssmstoe.Error != nil { + objectMap["error"] = msssmstoe.Error + } + if msssmstoe.ID != nil { + objectMap["id"] = msssmstoe.ID + } + if msssmstoe.ResultType != "" { + objectMap["resultType"] = msssmstoe.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLMISyncTaskOutputError is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputError. +func (msssmstoe MigrateSQLServerSQLMISyncTaskOutputError) AsMigrateSQLServerSQLMISyncTaskOutputError() (*MigrateSQLServerSQLMISyncTaskOutputError, bool) { + return &msssmstoe, true +} + +// AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputError. +func (msssmstoe MigrateSQLServerSQLMISyncTaskOutputError) AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputError. +func (msssmstoe MigrateSQLServerSQLMISyncTaskOutputError) AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLMISyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputError. +func (msssmstoe MigrateSQLServerSQLMISyncTaskOutputError) AsMigrateSQLServerSQLMISyncTaskOutput() (*MigrateSQLServerSQLMISyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputError. +func (msssmstoe MigrateSQLServerSQLMISyncTaskOutputError) AsBasicMigrateSQLServerSQLMISyncTaskOutput() (BasicMigrateSQLServerSQLMISyncTaskOutput, bool) { + return &msssmstoe, true +} + +// MigrateSQLServerSQLMISyncTaskOutputMigrationLevel ... +type MigrateSQLServerSQLMISyncTaskOutputMigrationLevel struct { + // DatabaseCount - Count of databases + DatabaseCount *int32 `json:"databaseCount,omitempty"` + // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' + State MigrationState `json:"state,omitempty"` + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // SourceServerName - Source server name + SourceServerName *string `json:"sourceServerName,omitempty"` + // SourceServerVersion - Source server version + SourceServerVersion *string `json:"sourceServerVersion,omitempty"` + // SourceServerBrandVersion - Source server brand version + SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` + // TargetServerName - Target server name + TargetServerName *string `json:"targetServerName,omitempty"` + // TargetServerVersion - Target server version + TargetServerVersion *string `json:"targetServerVersion,omitempty"` + // TargetServerBrandVersion - Target server brand version + TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` + // DatabaseErrorCount - Number of database level errors + DatabaseErrorCount *int32 `json:"databaseErrorCount,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMISyncTaskOutputMigrationLevel. +func (msssmstoml MigrateSQLServerSQLMISyncTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { + msssmstoml.ResultType = ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput + objectMap := make(map[string]interface{}) + if msssmstoml.DatabaseCount != nil { + objectMap["databaseCount"] = msssmstoml.DatabaseCount + } + if msssmstoml.State != "" { + objectMap["state"] = msssmstoml.State + } + if msssmstoml.StartedOn != nil { + objectMap["startedOn"] = msssmstoml.StartedOn + } + if msssmstoml.EndedOn != nil { + objectMap["endedOn"] = msssmstoml.EndedOn + } + if msssmstoml.SourceServerName != nil { + objectMap["sourceServerName"] = msssmstoml.SourceServerName + } + if msssmstoml.SourceServerVersion != nil { + objectMap["sourceServerVersion"] = msssmstoml.SourceServerVersion + } + if msssmstoml.SourceServerBrandVersion != nil { + objectMap["sourceServerBrandVersion"] = msssmstoml.SourceServerBrandVersion + } + if msssmstoml.TargetServerName != nil { + objectMap["targetServerName"] = msssmstoml.TargetServerName + } + if msssmstoml.TargetServerVersion != nil { + objectMap["targetServerVersion"] = msssmstoml.TargetServerVersion + } + if msssmstoml.TargetServerBrandVersion != nil { + objectMap["targetServerBrandVersion"] = msssmstoml.TargetServerBrandVersion + } + if msssmstoml.DatabaseErrorCount != nil { + objectMap["databaseErrorCount"] = msssmstoml.DatabaseErrorCount + } + if msssmstoml.ID != nil { + objectMap["id"] = msssmstoml.ID + } + if msssmstoml.ResultType != "" { + objectMap["resultType"] = msssmstoml.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLMISyncTaskOutputError is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputMigrationLevel. +func (msssmstoml MigrateSQLServerSQLMISyncTaskOutputMigrationLevel) AsMigrateSQLServerSQLMISyncTaskOutputError() (*MigrateSQLServerSQLMISyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputMigrationLevel. +func (msssmstoml MigrateSQLServerSQLMISyncTaskOutputMigrationLevel) AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputMigrationLevel. +func (msssmstoml MigrateSQLServerSQLMISyncTaskOutputMigrationLevel) AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLMISyncTaskOutputMigrationLevel, bool) { + return &msssmstoml, true +} + +// AsMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputMigrationLevel. +func (msssmstoml MigrateSQLServerSQLMISyncTaskOutputMigrationLevel) AsMigrateSQLServerSQLMISyncTaskOutput() (*MigrateSQLServerSQLMISyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputMigrationLevel. +func (msssmstoml MigrateSQLServerSQLMISyncTaskOutputMigrationLevel) AsBasicMigrateSQLServerSQLMISyncTaskOutput() (BasicMigrateSQLServerSQLMISyncTaskOutput, bool) { + return &msssmstoml, true +} + +// MigrateSQLServerSQLMISyncTaskProperties properties for task that migrates SQL Server databases to Azure +// SQL Database Managed Instance sync scenario +type MigrateSQLServerSQLMISyncTaskProperties struct { + // Input - Task input + Input *MigrateSQLServerSQLMISyncTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]BasicMigrateSQLServerSQLMISyncTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) MarshalJSON() ([]byte, error) { + msssmstp.TaskType = TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS + objectMap := make(map[string]interface{}) + if msssmstp.Input != nil { + objectMap["input"] = msssmstp.Input + } + if msssmstp.Output != nil { + objectMap["output"] = msssmstp.Output + } + if msssmstp.Errors != nil { + objectMap["errors"] = msssmstp.Errors + } + if msssmstp.State != "" { + objectMap["state"] = msssmstp.State + } + if msssmstp.Commands != nil { + objectMap["commands"] = msssmstp.Commands + } + if msssmstp.TaskType != "" { + objectMap["taskType"] = msssmstp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return &msssmstp, true +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &msssmstp, true +} + +// UnmarshalJSON is the custom unmarshaler for MigrateSQLServerSQLMISyncTaskProperties struct. +func (msssmstp *MigrateSQLServerSQLMISyncTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input MigrateSQLServerSQLMISyncTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + msssmstp.Input = &input + } + case "output": + if v != nil { + output, err := unmarshalBasicMigrateSQLServerSQLMISyncTaskOutputArray(*v) + if err != nil { + return err + } + msssmstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + msssmstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + msssmstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + msssmstp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + msssmstp.TaskType = taskType + } + } + } + + return nil +} + +// MigrateSQLServerSQLMITaskInput input for task that migrates SQL Server databases to Azure SQL Database +// Managed Instance. +type MigrateSQLServerSQLMITaskInput struct { + // SelectedDatabases - Databases to migrate + SelectedDatabases *[]MigrateSQLServerSQLMIDatabaseInput `json:"selectedDatabases,omitempty"` + // SelectedLogins - Logins to migrate. + SelectedLogins *[]string `json:"selectedLogins,omitempty"` + // SelectedAgentJobs - Agent Jobs to migrate. + SelectedAgentJobs *[]string `json:"selectedAgentJobs,omitempty"` + // BackupFileShare - Backup file share information for all selected databases. + BackupFileShare *FileShare `json:"backupFileShare,omitempty"` + // BackupBlobShare - SAS URI of Azure Storage Account Container to be used for storing backup files. + BackupBlobShare *BlobShare `json:"backupBlobShare,omitempty"` + // BackupMode - Backup Mode to specify whether to use existing backup or create new backup. If using existing backups, backup file paths are required to be provided in selectedDatabases. Possible values include: 'CreateBackup', 'ExistingBackup' + BackupMode BackupMode `json:"backupMode,omitempty"` + // SourceConnectionInfo - Information for connecting to source + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Information for connecting to target + TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` +} + +// BasicMigrateSQLServerSQLMITaskOutput output for task that migrates SQL Server databases to Azure SQL Database +// Managed Instance. +type BasicMigrateSQLServerSQLMITaskOutput interface { + AsMigrateSQLServerSQLMITaskOutputError() (*MigrateSQLServerSQLMITaskOutputError, bool) + AsMigrateSQLServerSQLMITaskOutputLoginLevel() (*MigrateSQLServerSQLMITaskOutputLoginLevel, bool) + AsMigrateSQLServerSQLMITaskOutputAgentJobLevel() (*MigrateSQLServerSQLMITaskOutputAgentJobLevel, bool) + AsMigrateSQLServerSQLMITaskOutputDatabaseLevel() (*MigrateSQLServerSQLMITaskOutputDatabaseLevel, bool) + AsMigrateSQLServerSQLMITaskOutputMigrationLevel() (*MigrateSQLServerSQLMITaskOutputMigrationLevel, bool) + AsMigrateSQLServerSQLMITaskOutput() (*MigrateSQLServerSQLMITaskOutput, bool) +} + +// MigrateSQLServerSQLMITaskOutput output for task that migrates SQL Server databases to Azure SQL Database +// Managed Instance. +type MigrateSQLServerSQLMITaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLMITaskOutput `json:"resultType,omitempty"` +} + +func unmarshalBasicMigrateSQLServerSQLMITaskOutput(body []byte) (BasicMigrateSQLServerSQLMITaskOutput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["resultType"] { + case string(ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput): + var msssmtoe MigrateSQLServerSQLMITaskOutputError + err := json.Unmarshal(body, &msssmtoe) + return msssmtoe, err + case string(ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput): + var msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel + err := json.Unmarshal(body, &msssmtoll) + return msssmtoll, err + case string(ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput): + var msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel + err := json.Unmarshal(body, &msssmtoajl) + return msssmtoajl, err + case string(ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput): + var msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel + err := json.Unmarshal(body, &msssmtodl) + return msssmtodl, err + case string(ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput): + var msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel + err := json.Unmarshal(body, &msssmtoml) + return msssmtoml, err + default: + var msssmto MigrateSQLServerSQLMITaskOutput + err := json.Unmarshal(body, &msssmto) + return msssmto, err + } +} +func unmarshalBasicMigrateSQLServerSQLMITaskOutputArray(body []byte) ([]BasicMigrateSQLServerSQLMITaskOutput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + msssmtoArray := make([]BasicMigrateSQLServerSQLMITaskOutput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + msssmto, err := unmarshalBasicMigrateSQLServerSQLMITaskOutput(*rawMessage) + if err != nil { + return nil, err + } + msssmtoArray[index] = msssmto + } + return msssmtoArray, nil +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMITaskOutput. +func (msssmto MigrateSQLServerSQLMITaskOutput) MarshalJSON() ([]byte, error) { + msssmto.ResultType = ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput + objectMap := make(map[string]interface{}) + if msssmto.ID != nil { + objectMap["id"] = msssmto.ID + } + if msssmto.ResultType != "" { + objectMap["resultType"] = msssmto.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLMITaskOutputError is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutput. +func (msssmto MigrateSQLServerSQLMITaskOutput) AsMigrateSQLServerSQLMITaskOutputError() (*MigrateSQLServerSQLMITaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputLoginLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutput. +func (msssmto MigrateSQLServerSQLMITaskOutput) AsMigrateSQLServerSQLMITaskOutputLoginLevel() (*MigrateSQLServerSQLMITaskOutputLoginLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputAgentJobLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutput. +func (msssmto MigrateSQLServerSQLMITaskOutput) AsMigrateSQLServerSQLMITaskOutputAgentJobLevel() (*MigrateSQLServerSQLMITaskOutputAgentJobLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutput. +func (msssmto MigrateSQLServerSQLMITaskOutput) AsMigrateSQLServerSQLMITaskOutputDatabaseLevel() (*MigrateSQLServerSQLMITaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutput. +func (msssmto MigrateSQLServerSQLMITaskOutput) AsMigrateSQLServerSQLMITaskOutputMigrationLevel() (*MigrateSQLServerSQLMITaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutput. +func (msssmto MigrateSQLServerSQLMITaskOutput) AsMigrateSQLServerSQLMITaskOutput() (*MigrateSQLServerSQLMITaskOutput, bool) { + return &msssmto, true +} + +// AsBasicMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutput. +func (msssmto MigrateSQLServerSQLMITaskOutput) AsBasicMigrateSQLServerSQLMITaskOutput() (BasicMigrateSQLServerSQLMITaskOutput, bool) { + return &msssmto, true +} + +// MigrateSQLServerSQLMITaskOutputAgentJobLevel ... +type MigrateSQLServerSQLMITaskOutputAgentJobLevel struct { + // Name - Agent Job name. + Name *string `json:"name,omitempty"` + // IsEnabled - The state of the original Agent Job. + IsEnabled *bool `json:"isEnabled,omitempty"` + // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' + State MigrationState `json:"state,omitempty"` + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // Message - Migration progress message + Message *string `json:"message,omitempty"` + // ExceptionsAndWarnings - Migration errors and warnings per job + ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLMITaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMITaskOutputAgentJobLevel. +func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) MarshalJSON() ([]byte, error) { + msssmtoajl.ResultType = ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput + objectMap := make(map[string]interface{}) + if msssmtoajl.Name != nil { + objectMap["name"] = msssmtoajl.Name + } + if msssmtoajl.IsEnabled != nil { + objectMap["isEnabled"] = msssmtoajl.IsEnabled + } + if msssmtoajl.State != "" { + objectMap["state"] = msssmtoajl.State + } + if msssmtoajl.StartedOn != nil { + objectMap["startedOn"] = msssmtoajl.StartedOn + } + if msssmtoajl.EndedOn != nil { + objectMap["endedOn"] = msssmtoajl.EndedOn + } + if msssmtoajl.Message != nil { + objectMap["message"] = msssmtoajl.Message + } + if msssmtoajl.ExceptionsAndWarnings != nil { + objectMap["exceptionsAndWarnings"] = msssmtoajl.ExceptionsAndWarnings + } + if msssmtoajl.ID != nil { + objectMap["id"] = msssmtoajl.ID + } + if msssmtoajl.ResultType != "" { + objectMap["resultType"] = msssmtoajl.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLMITaskOutputError is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputAgentJobLevel. +func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) AsMigrateSQLServerSQLMITaskOutputError() (*MigrateSQLServerSQLMITaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputLoginLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputAgentJobLevel. +func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) AsMigrateSQLServerSQLMITaskOutputLoginLevel() (*MigrateSQLServerSQLMITaskOutputLoginLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputAgentJobLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputAgentJobLevel. +func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) AsMigrateSQLServerSQLMITaskOutputAgentJobLevel() (*MigrateSQLServerSQLMITaskOutputAgentJobLevel, bool) { + return &msssmtoajl, true +} + +// AsMigrateSQLServerSQLMITaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputAgentJobLevel. +func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) AsMigrateSQLServerSQLMITaskOutputDatabaseLevel() (*MigrateSQLServerSQLMITaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputAgentJobLevel. +func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) AsMigrateSQLServerSQLMITaskOutputMigrationLevel() (*MigrateSQLServerSQLMITaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputAgentJobLevel. +func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) AsMigrateSQLServerSQLMITaskOutput() (*MigrateSQLServerSQLMITaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputAgentJobLevel. +func (msssmtoajl MigrateSQLServerSQLMITaskOutputAgentJobLevel) AsBasicMigrateSQLServerSQLMITaskOutput() (BasicMigrateSQLServerSQLMITaskOutput, bool) { + return &msssmtoajl, true +} + +// MigrateSQLServerSQLMITaskOutputDatabaseLevel ... +type MigrateSQLServerSQLMITaskOutputDatabaseLevel struct { + // DatabaseName - Name of the database + DatabaseName *string `json:"databaseName,omitempty"` + // SizeMB - Size of the database in megabytes + SizeMB *float64 `json:"sizeMB,omitempty"` + // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' + State MigrationState `json:"state,omitempty"` + // Stage - Current stage of migration. Possible values include: 'DatabaseMigrationStageNone', 'DatabaseMigrationStageInitialize', 'DatabaseMigrationStageBackup', 'DatabaseMigrationStageFileCopy', 'DatabaseMigrationStageRestore', 'DatabaseMigrationStageCompleted' + Stage DatabaseMigrationStage `json:"stage,omitempty"` + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // Message - Migration progress message + Message *string `json:"message,omitempty"` + // ExceptionsAndWarnings - Migration exceptions and warnings + ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLMITaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMITaskOutputDatabaseLevel. +func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { + msssmtodl.ResultType = ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput + objectMap := make(map[string]interface{}) + if msssmtodl.DatabaseName != nil { + objectMap["databaseName"] = msssmtodl.DatabaseName + } + if msssmtodl.SizeMB != nil { + objectMap["sizeMB"] = msssmtodl.SizeMB + } + if msssmtodl.State != "" { + objectMap["state"] = msssmtodl.State + } + if msssmtodl.Stage != "" { + objectMap["stage"] = msssmtodl.Stage + } + if msssmtodl.StartedOn != nil { + objectMap["startedOn"] = msssmtodl.StartedOn + } + if msssmtodl.EndedOn != nil { + objectMap["endedOn"] = msssmtodl.EndedOn + } + if msssmtodl.Message != nil { + objectMap["message"] = msssmtodl.Message + } + if msssmtodl.ExceptionsAndWarnings != nil { + objectMap["exceptionsAndWarnings"] = msssmtodl.ExceptionsAndWarnings + } + if msssmtodl.ID != nil { + objectMap["id"] = msssmtodl.ID + } + if msssmtodl.ResultType != "" { + objectMap["resultType"] = msssmtodl.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLMITaskOutputError is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputDatabaseLevel. +func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) AsMigrateSQLServerSQLMITaskOutputError() (*MigrateSQLServerSQLMITaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputLoginLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputDatabaseLevel. +func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) AsMigrateSQLServerSQLMITaskOutputLoginLevel() (*MigrateSQLServerSQLMITaskOutputLoginLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputAgentJobLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputDatabaseLevel. +func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) AsMigrateSQLServerSQLMITaskOutputAgentJobLevel() (*MigrateSQLServerSQLMITaskOutputAgentJobLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputDatabaseLevel. +func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) AsMigrateSQLServerSQLMITaskOutputDatabaseLevel() (*MigrateSQLServerSQLMITaskOutputDatabaseLevel, bool) { + return &msssmtodl, true +} + +// AsMigrateSQLServerSQLMITaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputDatabaseLevel. +func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) AsMigrateSQLServerSQLMITaskOutputMigrationLevel() (*MigrateSQLServerSQLMITaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputDatabaseLevel. +func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) AsMigrateSQLServerSQLMITaskOutput() (*MigrateSQLServerSQLMITaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputDatabaseLevel. +func (msssmtodl MigrateSQLServerSQLMITaskOutputDatabaseLevel) AsBasicMigrateSQLServerSQLMITaskOutput() (BasicMigrateSQLServerSQLMITaskOutput, bool) { + return &msssmtodl, true +} + +// MigrateSQLServerSQLMITaskOutputError ... +type MigrateSQLServerSQLMITaskOutputError struct { + // Error - Migration error + Error *ReportableException `json:"error,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLMITaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMITaskOutputError. +func (msssmtoe MigrateSQLServerSQLMITaskOutputError) MarshalJSON() ([]byte, error) { + msssmtoe.ResultType = ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput + objectMap := make(map[string]interface{}) + if msssmtoe.Error != nil { + objectMap["error"] = msssmtoe.Error + } + if msssmtoe.ID != nil { + objectMap["id"] = msssmtoe.ID + } + if msssmtoe.ResultType != "" { + objectMap["resultType"] = msssmtoe.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLMITaskOutputError is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputError. +func (msssmtoe MigrateSQLServerSQLMITaskOutputError) AsMigrateSQLServerSQLMITaskOutputError() (*MigrateSQLServerSQLMITaskOutputError, bool) { + return &msssmtoe, true +} + +// AsMigrateSQLServerSQLMITaskOutputLoginLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputError. +func (msssmtoe MigrateSQLServerSQLMITaskOutputError) AsMigrateSQLServerSQLMITaskOutputLoginLevel() (*MigrateSQLServerSQLMITaskOutputLoginLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputAgentJobLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputError. +func (msssmtoe MigrateSQLServerSQLMITaskOutputError) AsMigrateSQLServerSQLMITaskOutputAgentJobLevel() (*MigrateSQLServerSQLMITaskOutputAgentJobLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputError. +func (msssmtoe MigrateSQLServerSQLMITaskOutputError) AsMigrateSQLServerSQLMITaskOutputDatabaseLevel() (*MigrateSQLServerSQLMITaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputError. +func (msssmtoe MigrateSQLServerSQLMITaskOutputError) AsMigrateSQLServerSQLMITaskOutputMigrationLevel() (*MigrateSQLServerSQLMITaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputError. +func (msssmtoe MigrateSQLServerSQLMITaskOutputError) AsMigrateSQLServerSQLMITaskOutput() (*MigrateSQLServerSQLMITaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputError. +func (msssmtoe MigrateSQLServerSQLMITaskOutputError) AsBasicMigrateSQLServerSQLMITaskOutput() (BasicMigrateSQLServerSQLMITaskOutput, bool) { + return &msssmtoe, true +} + +// MigrateSQLServerSQLMITaskOutputLoginLevel ... +type MigrateSQLServerSQLMITaskOutputLoginLevel struct { + // LoginName - Login name. + LoginName *string `json:"loginName,omitempty"` + // State - Current state of login. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' + State MigrationState `json:"state,omitempty"` + // Stage - Current stage of login. Possible values include: 'LoginMigrationStageNone', 'LoginMigrationStageInitialize', 'LoginMigrationStageLoginMigration', 'LoginMigrationStageEstablishUserMapping', 'LoginMigrationStageAssignRoleMembership', 'LoginMigrationStageAssignRoleOwnership', 'LoginMigrationStageEstablishServerPermissions', 'LoginMigrationStageEstablishObjectPermissions', 'LoginMigrationStageCompleted' + Stage LoginMigrationStage `json:"stage,omitempty"` + // StartedOn - Login migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Login migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // Message - Login migration progress message + Message *string `json:"message,omitempty"` + // ExceptionsAndWarnings - Login migration errors and warnings per login + ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLMITaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMITaskOutputLoginLevel. +func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) MarshalJSON() ([]byte, error) { + msssmtoll.ResultType = ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput + objectMap := make(map[string]interface{}) + if msssmtoll.LoginName != nil { + objectMap["loginName"] = msssmtoll.LoginName + } + if msssmtoll.State != "" { + objectMap["state"] = msssmtoll.State + } + if msssmtoll.Stage != "" { + objectMap["stage"] = msssmtoll.Stage + } + if msssmtoll.StartedOn != nil { + objectMap["startedOn"] = msssmtoll.StartedOn + } + if msssmtoll.EndedOn != nil { + objectMap["endedOn"] = msssmtoll.EndedOn + } + if msssmtoll.Message != nil { + objectMap["message"] = msssmtoll.Message + } + if msssmtoll.ExceptionsAndWarnings != nil { + objectMap["exceptionsAndWarnings"] = msssmtoll.ExceptionsAndWarnings + } + if msssmtoll.ID != nil { + objectMap["id"] = msssmtoll.ID + } + if msssmtoll.ResultType != "" { + objectMap["resultType"] = msssmtoll.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLMITaskOutputError is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputLoginLevel. +func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) AsMigrateSQLServerSQLMITaskOutputError() (*MigrateSQLServerSQLMITaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputLoginLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputLoginLevel. +func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) AsMigrateSQLServerSQLMITaskOutputLoginLevel() (*MigrateSQLServerSQLMITaskOutputLoginLevel, bool) { + return &msssmtoll, true +} + +// AsMigrateSQLServerSQLMITaskOutputAgentJobLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputLoginLevel. +func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) AsMigrateSQLServerSQLMITaskOutputAgentJobLevel() (*MigrateSQLServerSQLMITaskOutputAgentJobLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputLoginLevel. +func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) AsMigrateSQLServerSQLMITaskOutputDatabaseLevel() (*MigrateSQLServerSQLMITaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputLoginLevel. +func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) AsMigrateSQLServerSQLMITaskOutputMigrationLevel() (*MigrateSQLServerSQLMITaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputLoginLevel. +func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) AsMigrateSQLServerSQLMITaskOutput() (*MigrateSQLServerSQLMITaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputLoginLevel. +func (msssmtoll MigrateSQLServerSQLMITaskOutputLoginLevel) AsBasicMigrateSQLServerSQLMITaskOutput() (BasicMigrateSQLServerSQLMITaskOutput, bool) { + return &msssmtoll, true +} + +// MigrateSQLServerSQLMITaskOutputMigrationLevel ... +type MigrateSQLServerSQLMITaskOutputMigrationLevel struct { + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // Status - Current status of migration. Possible values include: 'MigrationStatusDefault', 'MigrationStatusConnecting', 'MigrationStatusSourceAndTargetSelected', 'MigrationStatusSelectLogins', 'MigrationStatusConfigured', 'MigrationStatusRunning', 'MigrationStatusError', 'MigrationStatusStopped', 'MigrationStatusCompleted', 'MigrationStatusCompletedWithWarnings' + Status MigrationStatus `json:"status,omitempty"` + // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' + State MigrationState `json:"state,omitempty"` + // AgentJobs - Selected agent jobs as a map from name to id + AgentJobs map[string]*string `json:"agentJobs"` + // Logins - Selected logins as a map from name to id + Logins map[string]*string `json:"logins"` + // Message - Migration progress message + Message *string `json:"message,omitempty"` + // ServerRoleResults - Map of server role migration results. + ServerRoleResults map[string]*StartMigrationScenarioServerRoleResult `json:"serverRoleResults"` + // OrphanedUsersInfo - List of orphaned users. + OrphanedUsersInfo *[]OrphanedUserInfo `json:"orphanedUsersInfo,omitempty"` + // Databases - Selected databases as a map from database name to database id + Databases map[string]*string `json:"databases"` + // SourceServerVersion - Source server version + SourceServerVersion *string `json:"sourceServerVersion,omitempty"` + // SourceServerBrandVersion - Source server brand version + SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` + // TargetServerVersion - Target server version + TargetServerVersion *string `json:"targetServerVersion,omitempty"` + // TargetServerBrandVersion - Target server brand version + TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` + // ExceptionsAndWarnings - Migration exceptions and warnings. + ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrateSQLServerSQLMITaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeLoginLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeAgentJobLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLMITaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMITaskOutputMigrationLevel. +func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { + msssmtoml.ResultType = ResultTypeBasicMigrateSQLServerSQLMITaskOutputResultTypeMigrationLevelOutput + objectMap := make(map[string]interface{}) + if msssmtoml.StartedOn != nil { + objectMap["startedOn"] = msssmtoml.StartedOn + } + if msssmtoml.EndedOn != nil { + objectMap["endedOn"] = msssmtoml.EndedOn + } + if msssmtoml.Status != "" { + objectMap["status"] = msssmtoml.Status + } + if msssmtoml.State != "" { + objectMap["state"] = msssmtoml.State + } + if msssmtoml.AgentJobs != nil { + objectMap["agentJobs"] = msssmtoml.AgentJobs + } + if msssmtoml.Logins != nil { + objectMap["logins"] = msssmtoml.Logins + } + if msssmtoml.Message != nil { + objectMap["message"] = msssmtoml.Message + } + if msssmtoml.ServerRoleResults != nil { + objectMap["serverRoleResults"] = msssmtoml.ServerRoleResults + } + if msssmtoml.OrphanedUsersInfo != nil { + objectMap["orphanedUsersInfo"] = msssmtoml.OrphanedUsersInfo + } + if msssmtoml.Databases != nil { + objectMap["databases"] = msssmtoml.Databases + } + if msssmtoml.SourceServerVersion != nil { + objectMap["sourceServerVersion"] = msssmtoml.SourceServerVersion + } + if msssmtoml.SourceServerBrandVersion != nil { + objectMap["sourceServerBrandVersion"] = msssmtoml.SourceServerBrandVersion + } + if msssmtoml.TargetServerVersion != nil { + objectMap["targetServerVersion"] = msssmtoml.TargetServerVersion + } + if msssmtoml.TargetServerBrandVersion != nil { + objectMap["targetServerBrandVersion"] = msssmtoml.TargetServerBrandVersion + } + if msssmtoml.ExceptionsAndWarnings != nil { + objectMap["exceptionsAndWarnings"] = msssmtoml.ExceptionsAndWarnings + } + if msssmtoml.ID != nil { + objectMap["id"] = msssmtoml.ID + } + if msssmtoml.ResultType != "" { + objectMap["resultType"] = msssmtoml.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLMITaskOutputError is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputMigrationLevel. +func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) AsMigrateSQLServerSQLMITaskOutputError() (*MigrateSQLServerSQLMITaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputLoginLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputMigrationLevel. +func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) AsMigrateSQLServerSQLMITaskOutputLoginLevel() (*MigrateSQLServerSQLMITaskOutputLoginLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputAgentJobLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputMigrationLevel. +func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) AsMigrateSQLServerSQLMITaskOutputAgentJobLevel() (*MigrateSQLServerSQLMITaskOutputAgentJobLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputMigrationLevel. +func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) AsMigrateSQLServerSQLMITaskOutputDatabaseLevel() (*MigrateSQLServerSQLMITaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputMigrationLevel. +func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) AsMigrateSQLServerSQLMITaskOutputMigrationLevel() (*MigrateSQLServerSQLMITaskOutputMigrationLevel, bool) { + return &msssmtoml, true +} + +// AsMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputMigrationLevel. +func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) AsMigrateSQLServerSQLMITaskOutput() (*MigrateSQLServerSQLMITaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLMITaskOutput is the BasicMigrateSQLServerSQLMITaskOutput implementation for MigrateSQLServerSQLMITaskOutputMigrationLevel. +func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) AsBasicMigrateSQLServerSQLMITaskOutput() (BasicMigrateSQLServerSQLMITaskOutput, bool) { + return &msssmtoml, true +} + +// MigrateSQLServerSQLMITaskProperties properties for task that migrates SQL Server databases to Azure SQL +// Database Managed Instance +type MigrateSQLServerSQLMITaskProperties struct { + // Input - Task input + Input *MigrateSQLServerSQLMITaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]BasicMigrateSQLServerSQLMITaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) MarshalJSON() ([]byte, error) { + msssmtp.TaskType = TaskTypeMigrateSQLServerAzureSQLDbMI + objectMap := make(map[string]interface{}) + if msssmtp.Input != nil { + objectMap["input"] = msssmtp.Input + } + if msssmtp.Output != nil { + objectMap["output"] = msssmtp.Output + } + if msssmtp.Errors != nil { + objectMap["errors"] = msssmtp.Errors + } + if msssmtp.State != "" { + objectMap["state"] = msssmtp.State + } + if msssmtp.Commands != nil { + objectMap["commands"] = msssmtp.Commands + } + if msssmtp.TaskType != "" { + objectMap["taskType"] = msssmtp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return &msssmtp, true +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &msssmtp, true +} + +// UnmarshalJSON is the custom unmarshaler for MigrateSQLServerSQLMITaskProperties struct. +func (msssmtp *MigrateSQLServerSQLMITaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input MigrateSQLServerSQLMITaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + msssmtp.Input = &input + } + case "output": + if v != nil { + output, err := unmarshalBasicMigrateSQLServerSQLMITaskOutputArray(*v) + if err != nil { + return err + } + msssmtp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + msssmtp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + msssmtp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + msssmtp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + msssmtp.TaskType = taskType + } + } + } + + return nil +} + +// MigrateSQLServerSQLServerDatabaseInput database specific information for SQL to SQL migration task +// inputs +type MigrateSQLServerSQLServerDatabaseInput struct { + // Name - Name of the database + Name *string `json:"name,omitempty"` + // RestoreDatabaseName - Name of the database at destination + RestoreDatabaseName *string `json:"restoreDatabaseName,omitempty"` + // BackupAndRestoreFolder - The backup and restore folder + BackupAndRestoreFolder *string `json:"backupAndRestoreFolder,omitempty"` + // DatabaseFiles - The list of database files + DatabaseFiles *[]DatabaseFileInput `json:"databaseFiles,omitempty"` +} + +// MigrateSyncCompleteCommandInput input for command that completes sync migration for a database. +type MigrateSyncCompleteCommandInput struct { + // DatabaseName - Name of database + DatabaseName *string `json:"databaseName,omitempty"` + // CommitTimeStamp - Time stamp to complete + CommitTimeStamp *date.Time `json:"commitTimeStamp,omitempty"` +} + +// MigrateSyncCompleteCommandOutput output for command that completes sync migration for a database. +type MigrateSyncCompleteCommandOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // Errors - List of errors that happened during the command execution + Errors *[]ReportableException `json:"errors,omitempty"` +} + +// MigrateSyncCompleteCommandProperties properties for the command that completes sync migration for a +// database. +type MigrateSyncCompleteCommandProperties struct { + // Input - Command input + Input *MigrateSyncCompleteCommandInput `json:"input,omitempty"` + // Output - Command output. This is ignored if submitted. + Output *MigrateSyncCompleteCommandOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the command. This is ignored if submitted. Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', 'Failed' + State CommandState `json:"state,omitempty"` + // CommandType - Possible values include: 'CommandTypeUnknown', 'CommandTypeMigrateSQLServerAzureDbSQLMiComplete', 'CommandTypeMigrateSyncCompleteDatabase' + CommandType CommandType `json:"commandType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSyncCompleteCommandProperties. +func (msccp MigrateSyncCompleteCommandProperties) MarshalJSON() ([]byte, error) { + msccp.CommandType = CommandTypeMigrateSyncCompleteDatabase + objectMap := make(map[string]interface{}) + if msccp.Input != nil { + objectMap["input"] = msccp.Input + } + if msccp.Output != nil { + objectMap["output"] = msccp.Output + } + if msccp.Errors != nil { + objectMap["errors"] = msccp.Errors + } + if msccp.State != "" { + objectMap["state"] = msccp.State + } + if msccp.CommandType != "" { + objectMap["commandType"] = msccp.CommandType + } + return json.Marshal(objectMap) +} + +// AsMigrateMISyncCompleteCommandProperties is the BasicCommandProperties implementation for MigrateSyncCompleteCommandProperties. +func (msccp MigrateSyncCompleteCommandProperties) AsMigrateMISyncCompleteCommandProperties() (*MigrateMISyncCompleteCommandProperties, bool) { + return nil, false +} + +// AsMigrateSyncCompleteCommandProperties is the BasicCommandProperties implementation for MigrateSyncCompleteCommandProperties. +func (msccp MigrateSyncCompleteCommandProperties) AsMigrateSyncCompleteCommandProperties() (*MigrateSyncCompleteCommandProperties, bool) { + return &msccp, true +} + +// AsCommandProperties is the BasicCommandProperties implementation for MigrateSyncCompleteCommandProperties. +func (msccp MigrateSyncCompleteCommandProperties) AsCommandProperties() (*CommandProperties, bool) { + return nil, false +} + +// AsBasicCommandProperties is the BasicCommandProperties implementation for MigrateSyncCompleteCommandProperties. +func (msccp MigrateSyncCompleteCommandProperties) AsBasicCommandProperties() (BasicCommandProperties, bool) { + return &msccp, true +} + +// MigrationEligibilityInfo information about migration eligibility of a server object +type MigrationEligibilityInfo struct { + // IsEligibileForMigration - Whether object is eligible for migration or not. + IsEligibileForMigration *bool `json:"isEligibileForMigration,omitempty"` + // ValidationMessages - Information about eligibility failure for the server object. + ValidationMessages *[]string `json:"validationMessages,omitempty"` +} + +// MigrationReportResult migration validation report result, contains the url for downloading the generated +// report. +type MigrationReportResult struct { + // ID - Migration validation result identifier + ID *string `json:"id,omitempty"` + // ReportURL - The url of the report. + ReportURL *string `json:"reportUrl,omitempty"` +} + +// MigrationTableMetadata metadata for tables selected in migration project +type MigrationTableMetadata struct { + // SourceTableName - Source table name + SourceTableName *string `json:"sourceTableName,omitempty"` + // TargetTableName - Target table name + TargetTableName *string `json:"targetTableName,omitempty"` +} + +// MigrationValidationDatabaseSummaryResult migration Validation Database level summary result +type MigrationValidationDatabaseSummaryResult struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // MigrationID - Migration Identifier + MigrationID *string `json:"migrationId,omitempty"` + // SourceDatabaseName - Name of the source database + SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` + // TargetDatabaseName - Name of the target database + TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` + // StartedOn - Validation start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Validation end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // Status - Current status of validation at the database level. Possible values include: 'ValidationStatusDefault', 'ValidationStatusNotStarted', 'ValidationStatusInitialized', 'ValidationStatusInProgress', 'ValidationStatusCompleted', 'ValidationStatusCompletedWithIssues', 'ValidationStatusFailed', 'ValidationStatusStopped' + Status ValidationStatus `json:"status,omitempty"` +} + +// MigrationValidationOptions types of validations to run after the migration +type MigrationValidationOptions struct { + // EnableSchemaValidation - Allows to compare the schema information between source and target. + EnableSchemaValidation *bool `json:"enableSchemaValidation,omitempty"` + // EnableDataIntegrityValidation - Allows to perform a checksum based data integrity validation between source and target for the selected database / tables . + EnableDataIntegrityValidation *bool `json:"enableDataIntegrityValidation,omitempty"` + // EnableQueryAnalysisValidation - Allows to perform a quick and intelligent query analysis by retrieving queries from the source database and executes them in the target. The result will have execution statistics for executions in source and target databases for the extracted queries. + EnableQueryAnalysisValidation *bool `json:"enableQueryAnalysisValidation,omitempty"` +} + +// MiSQLConnectionInfo properties required to create a connection to Azure SQL database Managed instance +type MiSQLConnectionInfo struct { + // ManagedInstanceResourceID - Resource id for Azure SQL database Managed instance + ManagedInstanceResourceID *string `json:"managedInstanceResourceId,omitempty"` + // UserName - User name + UserName *string `json:"userName,omitempty"` + // Password - Password credential. + Password *string `json:"password,omitempty"` + // Type - Possible values include: 'TypeUnknown', 'TypeMiSQLConnectionInfo', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeSQLConnectionInfo' + Type Type `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) MarshalJSON() ([]byte, error) { + msci.Type = TypeMiSQLConnectionInfo + objectMap := make(map[string]interface{}) + if msci.ManagedInstanceResourceID != nil { + objectMap["managedInstanceResourceId"] = msci.ManagedInstanceResourceID + } + if msci.UserName != nil { + objectMap["userName"] = msci.UserName + } + if msci.Password != nil { + objectMap["password"] = msci.Password + } + if msci.Type != "" { + objectMap["type"] = msci.Type + } + return json.Marshal(objectMap) +} + +// AsMiSQLConnectionInfo is the BasicConnectionInfo implementation for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) AsMiSQLConnectionInfo() (*MiSQLConnectionInfo, bool) { + return &msci, true +} + +// AsPostgreSQLConnectionInfo is the BasicConnectionInfo implementation for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) AsPostgreSQLConnectionInfo() (*PostgreSQLConnectionInfo, bool) { + return nil, false +} + +// AsMySQLConnectionInfo is the BasicConnectionInfo implementation for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) AsMySQLConnectionInfo() (*MySQLConnectionInfo, bool) { + return nil, false +} + +// AsSQLConnectionInfo is the BasicConnectionInfo implementation for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) AsSQLConnectionInfo() (*SQLConnectionInfo, bool) { + return nil, false +} + +// AsConnectionInfo is the BasicConnectionInfo implementation for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) AsConnectionInfo() (*ConnectionInfo, bool) { + return nil, false +} + +// AsBasicConnectionInfo is the BasicConnectionInfo implementation for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) AsBasicConnectionInfo() (BasicConnectionInfo, bool) { + return &msci, true +} + +// MySQLConnectionInfo information for connecting to MySQL server +type MySQLConnectionInfo struct { + // ServerName - Name of the server + ServerName *string `json:"serverName,omitempty"` + // Port - Port for Server + Port *int32 `json:"port,omitempty"` + // UserName - User name + UserName *string `json:"userName,omitempty"` + // Password - Password credential. + Password *string `json:"password,omitempty"` + // Type - Possible values include: 'TypeUnknown', 'TypeMiSQLConnectionInfo', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeSQLConnectionInfo' + Type Type `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for MySQLConnectionInfo. +func (msci MySQLConnectionInfo) MarshalJSON() ([]byte, error) { + msci.Type = TypeMySQLConnectionInfo + objectMap := make(map[string]interface{}) + if msci.ServerName != nil { + objectMap["serverName"] = msci.ServerName + } + if msci.Port != nil { + objectMap["port"] = msci.Port + } + if msci.UserName != nil { + objectMap["userName"] = msci.UserName + } + if msci.Password != nil { + objectMap["password"] = msci.Password + } + if msci.Type != "" { + objectMap["type"] = msci.Type + } + return json.Marshal(objectMap) +} + +// AsMiSQLConnectionInfo is the BasicConnectionInfo implementation for MySQLConnectionInfo. +func (msci MySQLConnectionInfo) AsMiSQLConnectionInfo() (*MiSQLConnectionInfo, bool) { + return nil, false +} + +// AsPostgreSQLConnectionInfo is the BasicConnectionInfo implementation for MySQLConnectionInfo. +func (msci MySQLConnectionInfo) AsPostgreSQLConnectionInfo() (*PostgreSQLConnectionInfo, bool) { + return nil, false +} + +// AsMySQLConnectionInfo is the BasicConnectionInfo implementation for MySQLConnectionInfo. +func (msci MySQLConnectionInfo) AsMySQLConnectionInfo() (*MySQLConnectionInfo, bool) { + return &msci, true +} + +// AsSQLConnectionInfo is the BasicConnectionInfo implementation for MySQLConnectionInfo. +func (msci MySQLConnectionInfo) AsSQLConnectionInfo() (*SQLConnectionInfo, bool) { + return nil, false +} + +// AsConnectionInfo is the BasicConnectionInfo implementation for MySQLConnectionInfo. +func (msci MySQLConnectionInfo) AsConnectionInfo() (*ConnectionInfo, bool) { + return nil, false +} + +// AsBasicConnectionInfo is the BasicConnectionInfo implementation for MySQLConnectionInfo. +func (msci MySQLConnectionInfo) AsBasicConnectionInfo() (BasicConnectionInfo, bool) { + return &msci, true +} + +// NameAvailabilityRequest a resource type and proposed name +type NameAvailabilityRequest struct { + // Name - The proposed resource name + Name *string `json:"name,omitempty"` + // Type - The resource type chain (e.g. virtualMachines/extensions) + Type *string `json:"type,omitempty"` +} + +// NameAvailabilityResponse indicates whether a proposed resource name is available +type NameAvailabilityResponse struct { + autorest.Response `json:"-"` + // NameAvailable - If true, the name is valid and available. If false, 'reason' describes why not. + NameAvailable *bool `json:"nameAvailable,omitempty"` + // Reason - The reason why the name is not available, if nameAvailable is false. Possible values include: 'AlreadyExists', 'Invalid' + Reason NameCheckFailureReason `json:"reason,omitempty"` + // Message - The localized reason why the name is not available, if nameAvailable is false + Message *string `json:"message,omitempty"` +} + +// NonSQLDataMigrationTable defines metadata for table to be migrated +type NonSQLDataMigrationTable struct { + // SourceName - Source table name + SourceName *string `json:"sourceName,omitempty"` +} + +// NonSQLDataMigrationTableResult object used to report the data migration results of a table +type NonSQLDataMigrationTableResult struct { + // ResultCode - Result code of the data migration. Possible values include: 'Initial', 'Completed', 'ObjectNotExistsInSource', 'ObjectNotExistsInTarget', 'TargetObjectIsInaccessible', 'FatalError' + ResultCode ResultCode `json:"resultCode,omitempty"` + // SourceName - Name of the source table + SourceName *string `json:"sourceName,omitempty"` + // TargetName - Name of the target table + TargetName *string `json:"targetName,omitempty"` + // SourceRowCount - Number of rows in the source table + SourceRowCount *int64 `json:"sourceRowCount,omitempty"` + // TargetRowCount - Number of rows in the target table + TargetRowCount *int64 `json:"targetRowCount,omitempty"` + // ElapsedTimeInMiliseconds - Time taken to migrate the data + ElapsedTimeInMiliseconds *float64 `json:"elapsedTimeInMiliseconds,omitempty"` + // Errors - List of errors, if any, during migration + Errors *[]Error `json:"errors,omitempty"` +} + +// NonSQLMigrationTaskInput base class for non sql migration task input +type NonSQLMigrationTaskInput struct { + // TargetConnectionInfo - Information for connecting to target + TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // TargetDatabaseName - Target database name + TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` + // ProjectName - Name of the migration project + ProjectName *string `json:"projectName,omitempty"` + // ProjectLocation - A URL that points to the drop location to access project artifacts + ProjectLocation *string `json:"projectLocation,omitempty"` + // SelectedTables - Metadata of the tables selected for migration + SelectedTables *[]NonSQLDataMigrationTable `json:"selectedTables,omitempty"` +} + +// NonSQLMigrationTaskOutput base class for non sql migration task output +type NonSQLMigrationTaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // Status - Current state of migration. Possible values include: 'MigrationStatusDefault', 'MigrationStatusConnecting', 'MigrationStatusSourceAndTargetSelected', 'MigrationStatusSelectLogins', 'MigrationStatusConfigured', 'MigrationStatusRunning', 'MigrationStatusError', 'MigrationStatusStopped', 'MigrationStatusCompleted', 'MigrationStatusCompletedWithWarnings' + Status MigrationStatus `json:"status,omitempty"` + // DataMigrationTableResults - Results of the migration. The key contains the table name and the value the table result object + DataMigrationTableResults map[string]*NonSQLDataMigrationTableResult `json:"dataMigrationTableResults"` + // ProgressMessage - Message about the progress of the migration + ProgressMessage *string `json:"progressMessage,omitempty"` + // SourceServerName - Name of source server + SourceServerName *string `json:"sourceServerName,omitempty"` + // TargetServerName - Name of target server + TargetServerName *string `json:"targetServerName,omitempty"` +} + +// MarshalJSON is the custom marshaler for NonSQLMigrationTaskOutput. +func (nsmto NonSQLMigrationTaskOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if nsmto.ID != nil { + objectMap["id"] = nsmto.ID + } + if nsmto.StartedOn != nil { + objectMap["startedOn"] = nsmto.StartedOn + } + if nsmto.EndedOn != nil { + objectMap["endedOn"] = nsmto.EndedOn + } + if nsmto.Status != "" { + objectMap["status"] = nsmto.Status + } + if nsmto.DataMigrationTableResults != nil { + objectMap["dataMigrationTableResults"] = nsmto.DataMigrationTableResults + } + if nsmto.ProgressMessage != nil { + objectMap["progressMessage"] = nsmto.ProgressMessage + } + if nsmto.SourceServerName != nil { + objectMap["sourceServerName"] = nsmto.SourceServerName + } + if nsmto.TargetServerName != nil { + objectMap["targetServerName"] = nsmto.TargetServerName + } + return json.Marshal(objectMap) +} + +// ODataError error information in OData format. +type ODataError struct { + // Code - The machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError' + Code *string `json:"code,omitempty"` + // Message - The human-readable description of the error + Message *string `json:"message,omitempty"` + // Details - Inner errors that caused this error + Details *[]ODataError `json:"details,omitempty"` +} + +// OrphanedUserInfo information of orphaned users on the SQL server database. +type OrphanedUserInfo struct { + // Name - Name of the orphaned user + Name *string `json:"name,omitempty"` + // DatabaseName - Parent database of the user + DatabaseName *string `json:"databaseName,omitempty"` +} + +// PostgreSQLConnectionInfo information for connecting to PostgreSQL server +type PostgreSQLConnectionInfo struct { + // ServerName - Name of the server + ServerName *string `json:"serverName,omitempty"` + // DatabaseName - Name of the database + DatabaseName *string `json:"databaseName,omitempty"` + // Port - Port for Server + Port *int32 `json:"port,omitempty"` + // UserName - User name + UserName *string `json:"userName,omitempty"` + // Password - Password credential. + Password *string `json:"password,omitempty"` + // Type - Possible values include: 'TypeUnknown', 'TypeMiSQLConnectionInfo', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeSQLConnectionInfo' + Type Type `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for PostgreSQLConnectionInfo. +func (psci PostgreSQLConnectionInfo) MarshalJSON() ([]byte, error) { + psci.Type = TypePostgreSQLConnectionInfo + objectMap := make(map[string]interface{}) + if psci.ServerName != nil { + objectMap["serverName"] = psci.ServerName + } + if psci.DatabaseName != nil { + objectMap["databaseName"] = psci.DatabaseName + } + if psci.Port != nil { + objectMap["port"] = psci.Port + } + if psci.UserName != nil { + objectMap["userName"] = psci.UserName + } + if psci.Password != nil { + objectMap["password"] = psci.Password + } + if psci.Type != "" { + objectMap["type"] = psci.Type + } + return json.Marshal(objectMap) +} + +// AsMiSQLConnectionInfo is the BasicConnectionInfo implementation for PostgreSQLConnectionInfo. +func (psci PostgreSQLConnectionInfo) AsMiSQLConnectionInfo() (*MiSQLConnectionInfo, bool) { + return nil, false +} + +// AsPostgreSQLConnectionInfo is the BasicConnectionInfo implementation for PostgreSQLConnectionInfo. +func (psci PostgreSQLConnectionInfo) AsPostgreSQLConnectionInfo() (*PostgreSQLConnectionInfo, bool) { + return &psci, true +} + +// AsMySQLConnectionInfo is the BasicConnectionInfo implementation for PostgreSQLConnectionInfo. +func (psci PostgreSQLConnectionInfo) AsMySQLConnectionInfo() (*MySQLConnectionInfo, bool) { + return nil, false +} + +// AsSQLConnectionInfo is the BasicConnectionInfo implementation for PostgreSQLConnectionInfo. +func (psci PostgreSQLConnectionInfo) AsSQLConnectionInfo() (*SQLConnectionInfo, bool) { + return nil, false +} + +// AsConnectionInfo is the BasicConnectionInfo implementation for PostgreSQLConnectionInfo. +func (psci PostgreSQLConnectionInfo) AsConnectionInfo() (*ConnectionInfo, bool) { + return nil, false +} + +// AsBasicConnectionInfo is the BasicConnectionInfo implementation for PostgreSQLConnectionInfo. +func (psci PostgreSQLConnectionInfo) AsBasicConnectionInfo() (BasicConnectionInfo, bool) { + return &psci, true +} + +// Project a project resource +type Project struct { + autorest.Response `json:"-"` + // ProjectProperties - Project properties + *ProjectProperties `json:"properties,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Project. +func (p Project) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if p.ProjectProperties != nil { + objectMap["properties"] = p.ProjectProperties + } + if p.Tags != nil { + objectMap["tags"] = p.Tags + } + if p.Location != nil { + objectMap["location"] = p.Location + } + if p.ID != nil { + objectMap["id"] = p.ID + } + if p.Name != nil { + objectMap["name"] = p.Name + } + if p.Type != nil { + objectMap["type"] = p.Type + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Project struct. +func (p *Project) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var projectProperties ProjectProperties + err = json.Unmarshal(*v, &projectProperties) + if err != nil { + return err + } + p.ProjectProperties = &projectProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + p.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + p.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + p.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + p.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + p.Type = &typeVar + } + } + } + + return nil +} + +// ProjectList oData page of project resources +type ProjectList struct { + autorest.Response `json:"-"` + // Value - List of projects + Value *[]Project `json:"value,omitempty"` + // NextLink - URL to load the next page of projects + NextLink *string `json:"nextLink,omitempty"` +} + +// ProjectListIterator provides access to a complete listing of Project values. +type ProjectListIterator struct { + i int + page ProjectListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProjectListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProjectListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProjectListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProjectListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProjectListIterator) Response() ProjectList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProjectListIterator) Value() Project { + if !iter.page.NotDone() { + return Project{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProjectListIterator type. +func NewProjectListIterator(page ProjectListPage) ProjectListIterator { + return ProjectListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pl ProjectList) IsEmpty() bool { + return pl.Value == nil || len(*pl.Value) == 0 +} + +// projectListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pl ProjectList) projectListPreparer(ctx context.Context) (*http.Request, error) { + if pl.NextLink == nil || len(to.String(pl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pl.NextLink))) +} + +// ProjectListPage contains a page of Project values. +type ProjectListPage struct { + fn func(context.Context, ProjectList) (ProjectList, error) + pl ProjectList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProjectListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProjectListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pl) + if err != nil { + return err + } + page.pl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProjectListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProjectListPage) NotDone() bool { + return !page.pl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProjectListPage) Response() ProjectList { + return page.pl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProjectListPage) Values() []Project { + if page.pl.IsEmpty() { + return nil + } + return *page.pl.Value +} + +// Creates a new instance of the ProjectListPage type. +func NewProjectListPage(getNextPage func(context.Context, ProjectList) (ProjectList, error)) ProjectListPage { + return ProjectListPage{fn: getNextPage} +} + +// ProjectMetadata common metadata for migration projects +type ProjectMetadata struct { + // SourceServerName - Source server name + SourceServerName *string `json:"sourceServerName,omitempty"` + // SourceServerPort - Source server port number + SourceServerPort *string `json:"sourceServerPort,omitempty"` + // SourceUsername - Source username + SourceUsername *string `json:"sourceUsername,omitempty"` + // TargetServerName - Target server name + TargetServerName *string `json:"targetServerName,omitempty"` + // TargetUsername - Target username + TargetUsername *string `json:"targetUsername,omitempty"` + // TargetDbName - Target database name + TargetDbName *string `json:"targetDbName,omitempty"` + // TargetUsingWinAuth - Whether target connection is Windows authentication + TargetUsingWinAuth *bool `json:"targetUsingWinAuth,omitempty"` + // SelectedMigrationTables - List of tables selected for migration + SelectedMigrationTables *[]MigrationTableMetadata `json:"selectedMigrationTables,omitempty"` +} + +// ProjectProperties project-specific properties +type ProjectProperties struct { + // SourcePlatform - Source platform for the project. Possible values include: 'ProjectSourcePlatformSQL', 'ProjectSourcePlatformUnknown' + SourcePlatform ProjectSourcePlatform `json:"sourcePlatform,omitempty"` + // TargetPlatform - Target platform for the project. Possible values include: 'ProjectTargetPlatformSQLDB', 'ProjectTargetPlatformUnknown' + TargetPlatform ProjectTargetPlatform `json:"targetPlatform,omitempty"` + // CreationTime - UTC Date and time when project was created + CreationTime *date.Time `json:"creationTime,omitempty"` + // SourceConnectionInfo - Information for connecting to source + SourceConnectionInfo BasicConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Information for connecting to target + TargetConnectionInfo BasicConnectionInfo `json:"targetConnectionInfo,omitempty"` + // DatabasesInfo - List of DatabaseInfo + DatabasesInfo *[]DatabaseInfo `json:"databasesInfo,omitempty"` + // ProvisioningState - The project's provisioning state. Possible values include: 'ProjectProvisioningStateDeleting', 'ProjectProvisioningStateSucceeded' + ProvisioningState ProjectProvisioningState `json:"provisioningState,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ProjectProperties struct. +func (pp *ProjectProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "sourcePlatform": + if v != nil { + var sourcePlatform ProjectSourcePlatform + err = json.Unmarshal(*v, &sourcePlatform) + if err != nil { + return err + } + pp.SourcePlatform = sourcePlatform + } + case "targetPlatform": + if v != nil { + var targetPlatform ProjectTargetPlatform + err = json.Unmarshal(*v, &targetPlatform) + if err != nil { + return err + } + pp.TargetPlatform = targetPlatform + } + case "creationTime": + if v != nil { + var creationTime date.Time + err = json.Unmarshal(*v, &creationTime) + if err != nil { + return err + } + pp.CreationTime = &creationTime + } + case "sourceConnectionInfo": + if v != nil { + sourceConnectionInfo, err := unmarshalBasicConnectionInfo(*v) + if err != nil { + return err + } + pp.SourceConnectionInfo = sourceConnectionInfo + } + case "targetConnectionInfo": + if v != nil { + targetConnectionInfo, err := unmarshalBasicConnectionInfo(*v) + if err != nil { + return err + } + pp.TargetConnectionInfo = targetConnectionInfo + } + case "databasesInfo": + if v != nil { + var databasesInfo []DatabaseInfo + err = json.Unmarshal(*v, &databasesInfo) + if err != nil { + return err + } + pp.DatabasesInfo = &databasesInfo + } + case "provisioningState": + if v != nil { + var provisioningState ProjectProvisioningState + err = json.Unmarshal(*v, &provisioningState) + if err != nil { + return err + } + pp.ProvisioningState = provisioningState + } + } + } + + return nil +} + +// ProjectTask a task resource +type ProjectTask struct { + autorest.Response `json:"-"` + // Etag - HTTP strong entity tag value. This is ignored if submitted. + Etag *string `json:"etag,omitempty"` + // Properties - Custom task properties + Properties BasicProjectTaskProperties `json:"properties,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ProjectTask struct. +func (pt *ProjectTask) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pt.Etag = &etag + } + case "properties": + if v != nil { + properties, err := unmarshalBasicProjectTaskProperties(*v) + if err != nil { + return err + } + pt.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pt.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pt.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pt.Type = &typeVar + } + } + } + + return nil +} + +// BasicProjectTaskProperties base class for all types of DMS task properties. If task is not supported by current +// client, this object is returned. +type BasicProjectTaskProperties interface { + AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) + AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) + AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) + AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) + AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) + AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) + AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) + AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) + AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) + AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) + AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) + AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) + AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) + AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) + AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) + AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) + AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) + AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) + AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) + AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) + AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) + AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) + AsProjectTaskProperties() (*ProjectTaskProperties, bool) +} + +// ProjectTaskProperties base class for all types of DMS task properties. If task is not supported by current +// client, this object is returned. +type ProjectTaskProperties struct { + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +func unmarshalBasicProjectTaskProperties(body []byte) (BasicProjectTaskProperties, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["taskType"] { + case string(TaskTypeGetTDECertificatesSQL): + var gtcstp GetTdeCertificatesSQLTaskProperties + err := json.Unmarshal(body, >cstp) + return gtcstp, err + case string(TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS): + var vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties + err := json.Unmarshal(body, &vmisssmstp) + return vmisssmstp, err + case string(TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI): + var vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties + err := json.Unmarshal(body, &vmisssmtp) + return vmisssmtp, err + case string(TaskTypeValidateMigrationInputSQLServerSQLDbSync): + var vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties + err := json.Unmarshal(body, &vmisssdstp) + return vmisssdstp, err + case string(TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync): + var mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties + err := json.Unmarshal(body, &mpsadfpsstp) + return mpsadfpsstp, err + case string(TaskTypeMigrateMySQLAzureDbForMySQLSync): + var mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties + err := json.Unmarshal(body, &mmsadfmsstp) + return mmsadfmsstp, err + case string(TaskTypeMigrateSQLServerAzureSQLDbSync): + var msssdstp MigrateSQLServerSQLDbSyncTaskProperties + err := json.Unmarshal(body, &msssdstp) + return msssdstp, err + case string(TaskTypeMigrateSQLServerSQLDb): + var msssdtp MigrateSQLServerSQLDbTaskProperties + err := json.Unmarshal(body, &msssdtp) + return msssdtp, err + case string(TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS): + var msssmstp MigrateSQLServerSQLMISyncTaskProperties + err := json.Unmarshal(body, &msssmstp) + return msssmstp, err + case string(TaskTypeMigrateSQLServerAzureSQLDbMI): + var msssmtp MigrateSQLServerSQLMITaskProperties + err := json.Unmarshal(body, &msssmtp) + return msssmtp, err + case string(TaskTypeConnectToTargetAzureDbForMySQL): + var cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties + err := json.Unmarshal(body, &cttadfmstp) + return cttadfmstp, err + case string(TaskTypeConnectToTargetAzureSQLDbMISyncLRS): + var cttsmstp ConnectToTargetSQLMISyncTaskProperties + err := json.Unmarshal(body, &cttsmstp) + return cttsmstp, err + case string(TaskTypeConnectToTargetAzureSQLDbMI): + var cttsmtp ConnectToTargetSQLMITaskProperties + err := json.Unmarshal(body, &cttsmtp) + return cttsmtp, err + case string(TaskTypeGetUserTablesAzureSQLDbSync): + var gutsstp GetUserTablesSQLSyncTaskProperties + err := json.Unmarshal(body, &gutsstp) + return gutsstp, err + case string(TaskTypeGetUserTablesSQL): + var gutstp GetUserTablesSQLTaskProperties + err := json.Unmarshal(body, &gutstp) + return gutstp, err + case string(TaskTypeConnectToTargetAzureDbForPostgreSQLSync): + var cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties + err := json.Unmarshal(body, &cttadfpsstp) + return cttadfpsstp, err + case string(TaskTypeConnectToTargetSQLDbSync): + var cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties + err := json.Unmarshal(body, &cttssdstp) + return cttssdstp, err + case string(TaskTypeConnectToTargetSQLDb): + var cttsdtp ConnectToTargetSQLDbTaskProperties + err := json.Unmarshal(body, &cttsdtp) + return cttsdtp, err + case string(TaskTypeConnectToSourcePostgreSQLSync): + var ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties + err := json.Unmarshal(body, &ctspsstp) + return ctspsstp, err + case string(TaskTypeConnectToSourceSQLServerSync): + var ctsssstp ConnectToSourceSQLServerSyncTaskProperties + err := json.Unmarshal(body, &ctsssstp) + return ctsssstp, err + case string(TaskTypeConnectToSourceSQLServer): + var ctssstp ConnectToSourceSQLServerTaskProperties + err := json.Unmarshal(body, &ctssstp) + return ctssstp, err + case string(TaskTypeConnectToSourceMySQL): + var ctsmstp ConnectToSourceMySQLTaskProperties + err := json.Unmarshal(body, &ctsmstp) + return ctsmstp, err + default: + var ptp ProjectTaskProperties + err := json.Unmarshal(body, &ptp) + return ptp, err + } +} +func unmarshalBasicProjectTaskPropertiesArray(body []byte) ([]BasicProjectTaskProperties, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ptpArray := make([]BasicProjectTaskProperties, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ptp, err := unmarshalBasicProjectTaskProperties(*rawMessage) + if err != nil { + return nil, err + } + ptpArray[index] = ptp + } + return ptpArray, nil +} + +// MarshalJSON is the custom marshaler for ProjectTaskProperties. +func (ptp ProjectTaskProperties) MarshalJSON() ([]byte, error) { + ptp.TaskType = TaskTypeUnknown + objectMap := make(map[string]interface{}) + if ptp.Errors != nil { + objectMap["errors"] = ptp.Errors + } + if ptp.State != "" { + objectMap["state"] = ptp.State + } + if ptp.Commands != nil { + objectMap["commands"] = ptp.Commands + } + if ptp.TaskType != "" { + objectMap["taskType"] = ptp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return &ptp, true +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &ptp, true +} + +// UnmarshalJSON is the custom unmarshaler for ProjectTaskProperties struct. +func (ptp *ProjectTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + ptp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + ptp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + ptp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + ptp.TaskType = taskType + } + } + } + + return nil +} + +// QueryAnalysisValidationResult results for query analysis comparison between the source and target +type QueryAnalysisValidationResult struct { + // QueryResults - List of queries executed and it's execution results in source and target + QueryResults *QueryExecutionResult `json:"queryResults,omitempty"` + // ValidationErrors - Errors that are part of the execution + ValidationErrors *ValidationError `json:"validationErrors,omitempty"` +} + +// QueryExecutionResult describes query analysis results for execution in source and target +type QueryExecutionResult struct { + // QueryText - Query text retrieved from the source server + QueryText *string `json:"queryText,omitempty"` + // StatementsInBatch - Total no. of statements in the batch + StatementsInBatch *int64 `json:"statementsInBatch,omitempty"` + // SourceResult - Query analysis result from the source + SourceResult *ExecutionStatistics `json:"sourceResult,omitempty"` + // TargetResult - Query analysis result from the target + TargetResult *ExecutionStatistics `json:"targetResult,omitempty"` +} + +// Quota describes a quota for or usage details about a resource +type Quota struct { + // CurrentValue - The current value of the quota. If null or missing, the current value cannot be determined in the context of the request. + CurrentValue *float64 `json:"currentValue,omitempty"` + // ID - The resource ID of the quota object + ID *string `json:"id,omitempty"` + // Limit - The maximum value of the quota. If null or missing, the quota has no maximum, in which case it merely tracks usage. + Limit *float64 `json:"limit,omitempty"` + // Name - The name of the quota + Name *QuotaName `json:"name,omitempty"` + // Unit - The unit for the quota, such as Count, Bytes, BytesPerSecond, etc. + Unit *string `json:"unit,omitempty"` +} + +// QuotaList oData page of quota objects +type QuotaList struct { + autorest.Response `json:"-"` + // Value - List of quotas + Value *[]Quota `json:"value,omitempty"` + // NextLink - URL to load the next page of quotas, or null or missing if this is the last page + NextLink *string `json:"nextLink,omitempty"` +} + +// QuotaListIterator provides access to a complete listing of Quota values. +type QuotaListIterator struct { + i int + page QuotaListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *QuotaListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QuotaListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *QuotaListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter QuotaListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter QuotaListIterator) Response() QuotaList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter QuotaListIterator) Value() Quota { + if !iter.page.NotDone() { + return Quota{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the QuotaListIterator type. +func NewQuotaListIterator(page QuotaListPage) QuotaListIterator { + return QuotaListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ql QuotaList) IsEmpty() bool { + return ql.Value == nil || len(*ql.Value) == 0 +} + +// quotaListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ql QuotaList) quotaListPreparer(ctx context.Context) (*http.Request, error) { + if ql.NextLink == nil || len(to.String(ql.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ql.NextLink))) +} + +// QuotaListPage contains a page of Quota values. +type QuotaListPage struct { + fn func(context.Context, QuotaList) (QuotaList, error) + ql QuotaList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *QuotaListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QuotaListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ql) + if err != nil { + return err + } + page.ql = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *QuotaListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page QuotaListPage) NotDone() bool { + return !page.ql.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page QuotaListPage) Response() QuotaList { + return page.ql +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page QuotaListPage) Values() []Quota { + if page.ql.IsEmpty() { + return nil + } + return *page.ql.Value +} + +// Creates a new instance of the QuotaListPage type. +func NewQuotaListPage(getNextPage func(context.Context, QuotaList) (QuotaList, error)) QuotaListPage { + return QuotaListPage{fn: getNextPage} +} + +// QuotaName the name of the quota +type QuotaName struct { + // LocalizedValue - The localized name of the quota + LocalizedValue *string `json:"localizedValue,omitempty"` + // Value - The unlocalized name (or ID) of the quota + Value *string `json:"value,omitempty"` +} + +// ReportableException exception object for all custom exceptions +type ReportableException struct { + // Message - Error message + Message *string `json:"message,omitempty"` + // ActionableMessage - Actionable steps for this exception + ActionableMessage *string `json:"actionableMessage,omitempty"` + // FilePath - The path to the file where exception occurred + FilePath *string `json:"filePath,omitempty"` + // LineNumber - The line number where exception occurred + LineNumber *string `json:"lineNumber,omitempty"` + // HResult - Coded numerical value that is assigned to a specific exception + HResult *int32 `json:"hResult,omitempty"` + // StackTrace - Stack trace + StackTrace *string `json:"stackTrace,omitempty"` +} + +// Resource ARM resource. +type Resource struct { + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` +} + +// ResourceSku describes an available DMS SKU. +type ResourceSku struct { + // ResourceType - The type of resource the SKU applies to. + ResourceType *string `json:"resourceType,omitempty"` + // Name - The name of SKU. + Name *string `json:"name,omitempty"` + // Tier - Specifies the tier of DMS in a scale set. + Tier *string `json:"tier,omitempty"` + // Size - The Size of the SKU. + Size *string `json:"size,omitempty"` + // Family - The Family of this particular SKU. + Family *string `json:"family,omitempty"` + // Kind - The Kind of resources that are supported in this SKU. + Kind *string `json:"kind,omitempty"` + // Capacity - Not used. + Capacity *ResourceSkuCapacity `json:"capacity,omitempty"` + // Locations - The set of locations that the SKU is available. + Locations *[]string `json:"locations,omitempty"` + // APIVersions - The api versions that support this SKU. + APIVersions *[]string `json:"apiVersions,omitempty"` + // Costs - Metadata for retrieving price info. + Costs *[]ResourceSkuCosts `json:"costs,omitempty"` + // Capabilities - A name value pair to describe the capability. + Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"` + // Restrictions - The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"` +} + +// ResourceSkuCapabilities describes The SKU capabilities object. +type ResourceSkuCapabilities struct { + // Name - An invariant to describe the feature. + Name *string `json:"name,omitempty"` + // Value - An invariant if the feature is measured by quantity. + Value *string `json:"value,omitempty"` +} + +// ResourceSkuCapacity describes scaling information of a SKU. +type ResourceSkuCapacity struct { + // Minimum - The minimum capacity. + Minimum *int64 `json:"minimum,omitempty"` + // Maximum - The maximum capacity. + Maximum *int64 `json:"maximum,omitempty"` + // Default - The default capacity. + Default *int64 `json:"default,omitempty"` + // ScaleType - The scale type applicable to the SKU. Possible values include: 'ResourceSkuCapacityScaleTypeAutomatic', 'ResourceSkuCapacityScaleTypeManual', 'ResourceSkuCapacityScaleTypeNone' + ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"` +} + +// ResourceSkuCosts describes metadata for retrieving price info. +type ResourceSkuCosts struct { + // MeterID - Used for querying price from commerce. + MeterID *string `json:"meterID,omitempty"` + // Quantity - The multiplier is needed to extend the base metered cost. + Quantity *int64 `json:"quantity,omitempty"` + // ExtendedUnit - An invariant to show the extended unit. + ExtendedUnit *string `json:"extendedUnit,omitempty"` +} + +// ResourceSkuRestrictions describes scaling information of a SKU. +type ResourceSkuRestrictions struct { + // Type - The type of restrictions. Possible values include: 'Location' + Type ResourceSkuRestrictionsType `json:"type,omitempty"` + // Values - The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + Values *[]string `json:"values,omitempty"` + // ReasonCode - The reason code for restriction. Possible values include: 'QuotaID', 'NotAvailableForSubscription' + ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"` +} + +// ResourceSkusResult the DMS List SKUs operation response. +type ResourceSkusResult struct { + autorest.Response `json:"-"` + // Value - The list of SKUs available for the subscription. + Value *[]ResourceSku `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of DMS SKUs. Call ListNext() with this to fetch the next page of DMS SKUs. + NextLink *string `json:"nextLink,omitempty"` +} + +// ResourceSkusResultIterator provides access to a complete listing of ResourceSku values. +type ResourceSkusResultIterator struct { + i int + page ResourceSkusResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ResourceSkusResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ResourceSkusResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ResourceSkusResultIterator) Response() ResourceSkusResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ResourceSkusResultIterator) Value() ResourceSku { + if !iter.page.NotDone() { + return ResourceSku{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ResourceSkusResultIterator type. +func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator { + return ResourceSkusResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rsr ResourceSkusResult) IsEmpty() bool { + return rsr.Value == nil || len(*rsr.Value) == 0 +} + +// resourceSkusResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rsr ResourceSkusResult) resourceSkusResultPreparer(ctx context.Context) (*http.Request, error) { + if rsr.NextLink == nil || len(to.String(rsr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rsr.NextLink))) +} + +// ResourceSkusResultPage contains a page of ResourceSku values. +type ResourceSkusResultPage struct { + fn func(context.Context, ResourceSkusResult) (ResourceSkusResult, error) + rsr ResourceSkusResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.rsr) + if err != nil { + return err + } + page.rsr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ResourceSkusResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ResourceSkusResultPage) NotDone() bool { + return !page.rsr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ResourceSkusResultPage) Response() ResourceSkusResult { + return page.rsr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ResourceSkusResultPage) Values() []ResourceSku { + if page.rsr.IsEmpty() { + return nil + } + return *page.rsr.Value +} + +// Creates a new instance of the ResourceSkusResultPage type. +func NewResourceSkusResultPage(getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage { + return ResourceSkusResultPage{fn: getNextPage} +} + +// SchemaComparisonValidationResult results for schema comparison between the source and target +type SchemaComparisonValidationResult struct { + // SchemaDifferences - List of schema differences between the source and target databases + SchemaDifferences *SchemaComparisonValidationResultType `json:"schemaDifferences,omitempty"` + // ValidationErrors - List of errors that happened while performing schema compare validation + ValidationErrors *ValidationError `json:"validationErrors,omitempty"` + // SourceDatabaseObjectCount - Count of source database objects + SourceDatabaseObjectCount map[string]*int64 `json:"sourceDatabaseObjectCount"` + // TargetDatabaseObjectCount - Count of target database objects + TargetDatabaseObjectCount map[string]*int64 `json:"targetDatabaseObjectCount"` +} + +// MarshalJSON is the custom marshaler for SchemaComparisonValidationResult. +func (scvr SchemaComparisonValidationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if scvr.SchemaDifferences != nil { + objectMap["schemaDifferences"] = scvr.SchemaDifferences + } + if scvr.ValidationErrors != nil { + objectMap["validationErrors"] = scvr.ValidationErrors + } + if scvr.SourceDatabaseObjectCount != nil { + objectMap["sourceDatabaseObjectCount"] = scvr.SourceDatabaseObjectCount + } + if scvr.TargetDatabaseObjectCount != nil { + objectMap["targetDatabaseObjectCount"] = scvr.TargetDatabaseObjectCount + } + return json.Marshal(objectMap) +} + +// SchemaComparisonValidationResultType description about the errors happen while performing migration +// validation +type SchemaComparisonValidationResultType struct { + // ObjectName - Name of the object that has the difference + ObjectName *string `json:"objectName,omitempty"` + // ObjectType - Type of the object that has the difference. e.g (Table/View/StoredProcedure). Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function' + ObjectType ObjectType `json:"objectType,omitempty"` + // UpdateAction - Update action type with respect to target. Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget' + UpdateAction UpdateActionType `json:"updateAction,omitempty"` +} + +// SelectedCertificateInput info for ertificate to be exported for TDE enabled databases. +type SelectedCertificateInput struct { + // CertificateName - Name of certificate to be exported. + CertificateName *string `json:"certificateName,omitempty"` + // Password - Password to use for encrypting the exported certificate. + Password *string `json:"password,omitempty"` +} + +// ServerProperties server properties for Oracle, MySQL type source +type ServerProperties struct { + // ServerPlatform - Name of the server platform + ServerPlatform *string `json:"serverPlatform,omitempty"` + // ServerName - Name of the server + ServerName *string `json:"serverName,omitempty"` + // ServerVersion - Version of the database server + ServerVersion *string `json:"serverVersion,omitempty"` + // ServerEdition - Edition of the database server + ServerEdition *string `json:"serverEdition,omitempty"` + // ServerOperatingSystemVersion - Version of the operating system + ServerOperatingSystemVersion *string `json:"serverOperatingSystemVersion,omitempty"` + // ServerDatabaseCount - Number of databases in the server + ServerDatabaseCount *int32 `json:"serverDatabaseCount,omitempty"` +} + +// Service a Database Migration Service resource +type Service struct { + autorest.Response `json:"-"` + // Etag - HTTP strong entity tag value. Ignored if submitted + Etag *string `json:"etag,omitempty"` + // Kind - The resource kind. Only 'vm' (the default) is supported. + Kind *string `json:"kind,omitempty"` + // ServiceProperties - Custom service properties + *ServiceProperties `json:"properties,omitempty"` + // Sku - Service SKU + Sku *ServiceSku `json:"sku,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Service. +func (s Service) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if s.Etag != nil { + objectMap["etag"] = s.Etag + } + if s.Kind != nil { + objectMap["kind"] = s.Kind + } + if s.ServiceProperties != nil { + objectMap["properties"] = s.ServiceProperties + } + if s.Sku != nil { + objectMap["sku"] = s.Sku + } + if s.Tags != nil { + objectMap["tags"] = s.Tags + } + if s.Location != nil { + objectMap["location"] = s.Location + } + if s.ID != nil { + objectMap["id"] = s.ID + } + if s.Name != nil { + objectMap["name"] = s.Name + } + if s.Type != nil { + objectMap["type"] = s.Type + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Service struct. +func (s *Service) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + s.Etag = &etag + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + s.Kind = &kind + } + case "properties": + if v != nil { + var serviceProperties ServiceProperties + err = json.Unmarshal(*v, &serviceProperties) + if err != nil { + return err + } + s.ServiceProperties = &serviceProperties + } + case "sku": + if v != nil { + var sku ServiceSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + s.Sku = &sku + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + s.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + s.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + s.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + s.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + s.Type = &typeVar + } + } + } + + return nil +} + +// ServiceList oData page of service objects +type ServiceList struct { + autorest.Response `json:"-"` + // Value - List of services + Value *[]Service `json:"value,omitempty"` + // NextLink - URL to load the next page of services + NextLink *string `json:"nextLink,omitempty"` +} + +// ServiceListIterator provides access to a complete listing of Service values. +type ServiceListIterator struct { + i int + page ServiceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ServiceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ServiceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ServiceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ServiceListIterator) Response() ServiceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ServiceListIterator) Value() Service { + if !iter.page.NotDone() { + return Service{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ServiceListIterator type. +func NewServiceListIterator(page ServiceListPage) ServiceListIterator { + return ServiceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sl ServiceList) IsEmpty() bool { + return sl.Value == nil || len(*sl.Value) == 0 +} + +// serviceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sl ServiceList) serviceListPreparer(ctx context.Context) (*http.Request, error) { + if sl.NextLink == nil || len(to.String(sl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sl.NextLink))) +} + +// ServiceListPage contains a page of Service values. +type ServiceListPage struct { + fn func(context.Context, ServiceList) (ServiceList, error) + sl ServiceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ServiceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.sl) + if err != nil { + return err + } + page.sl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ServiceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ServiceListPage) NotDone() bool { + return !page.sl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ServiceListPage) Response() ServiceList { + return page.sl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ServiceListPage) Values() []Service { + if page.sl.IsEmpty() { + return nil + } + return *page.sl.Value +} + +// Creates a new instance of the ServiceListPage type. +func NewServiceListPage(getNextPage func(context.Context, ServiceList) (ServiceList, error)) ServiceListPage { + return ServiceListPage{fn: getNextPage} +} + +// ServiceOperation description of an action supported by the Database Migration Service +type ServiceOperation struct { + // Name - The fully qualified action name, e.g. Microsoft.DataMigration/services/read + Name *string `json:"name,omitempty"` + // Display - Localized display text + Display *ServiceOperationDisplay `json:"display,omitempty"` +} + +// ServiceOperationDisplay localized display text +type ServiceOperationDisplay struct { + // Provider - The localized resource provider name + Provider *string `json:"provider,omitempty"` + // Resource - The localized resource type name + Resource *string `json:"resource,omitempty"` + // Operation - The localized operation name + Operation *string `json:"operation,omitempty"` + // Description - The localized operation description + Description *string `json:"description,omitempty"` +} + +// ServiceOperationList oData page of action (operation) objects +type ServiceOperationList struct { + autorest.Response `json:"-"` + // Value - List of actions + Value *[]ServiceOperation `json:"value,omitempty"` + // NextLink - URL to load the next page of actions + NextLink *string `json:"nextLink,omitempty"` +} + +// ServiceOperationListIterator provides access to a complete listing of ServiceOperation values. +type ServiceOperationListIterator struct { + i int + page ServiceOperationListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ServiceOperationListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceOperationListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ServiceOperationListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ServiceOperationListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ServiceOperationListIterator) Response() ServiceOperationList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ServiceOperationListIterator) Value() ServiceOperation { + if !iter.page.NotDone() { + return ServiceOperation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ServiceOperationListIterator type. +func NewServiceOperationListIterator(page ServiceOperationListPage) ServiceOperationListIterator { + return ServiceOperationListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sol ServiceOperationList) IsEmpty() bool { + return sol.Value == nil || len(*sol.Value) == 0 +} + +// serviceOperationListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sol ServiceOperationList) serviceOperationListPreparer(ctx context.Context) (*http.Request, error) { + if sol.NextLink == nil || len(to.String(sol.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sol.NextLink))) +} + +// ServiceOperationListPage contains a page of ServiceOperation values. +type ServiceOperationListPage struct { + fn func(context.Context, ServiceOperationList) (ServiceOperationList, error) + sol ServiceOperationList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ServiceOperationListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceOperationListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.sol) + if err != nil { + return err + } + page.sol = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ServiceOperationListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ServiceOperationListPage) NotDone() bool { + return !page.sol.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ServiceOperationListPage) Response() ServiceOperationList { + return page.sol +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ServiceOperationListPage) Values() []ServiceOperation { + if page.sol.IsEmpty() { + return nil + } + return *page.sol.Value +} + +// Creates a new instance of the ServiceOperationListPage type. +func NewServiceOperationListPage(getNextPage func(context.Context, ServiceOperationList) (ServiceOperationList, error)) ServiceOperationListPage { + return ServiceOperationListPage{fn: getNextPage} +} + +// ServiceProperties properties of the Data Migration service instance +type ServiceProperties struct { + // ProvisioningState - The resource's provisioning state. Possible values include: 'ServiceProvisioningStateAccepted', 'ServiceProvisioningStateDeleting', 'ServiceProvisioningStateDeploying', 'ServiceProvisioningStateStopped', 'ServiceProvisioningStateStopping', 'ServiceProvisioningStateStarting', 'ServiceProvisioningStateFailedToStart', 'ServiceProvisioningStateFailedToStop', 'ServiceProvisioningStateSucceeded', 'ServiceProvisioningStateFailed' + ProvisioningState ServiceProvisioningState `json:"provisioningState,omitempty"` + // PublicKey - The public key of the service, used to encrypt secrets sent to the service + PublicKey *string `json:"publicKey,omitempty"` + // VirtualSubnetID - The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined + VirtualSubnetID *string `json:"virtualSubnetId,omitempty"` +} + +// ServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ServicesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ServicesCreateOrUpdateFuture) Result(client ServicesClient) (s Service, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "datamigration.ServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("datamigration.ServicesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.CreateOrUpdateResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "datamigration.ServicesCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// ServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ServicesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ServicesDeleteFuture) Result(client ServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "datamigration.ServicesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("datamigration.ServicesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ServiceSku an Azure SKU instance +type ServiceSku struct { + // Name - The unique name of the SKU, such as 'P3' + Name *string `json:"name,omitempty"` + // Tier - The tier of the SKU, such as 'Free', 'Basic', 'Standard', or 'Premium' + Tier *string `json:"tier,omitempty"` + // Family - The SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual machines + Family *string `json:"family,omitempty"` + // Size - The size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines + Size *string `json:"size,omitempty"` + // Capacity - The capacity of the SKU, if it supports scaling + Capacity *int32 `json:"capacity,omitempty"` +} + +// ServiceSkuList oData page of available SKUs +type ServiceSkuList struct { + autorest.Response `json:"-"` + // Value - List of service SKUs + Value *[]AvailableServiceSku `json:"value,omitempty"` + // NextLink - URL to load the next page of service SKUs + NextLink *string `json:"nextLink,omitempty"` +} + +// ServiceSkuListIterator provides access to a complete listing of AvailableServiceSku values. +type ServiceSkuListIterator struct { + i int + page ServiceSkuListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ServiceSkuListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceSkuListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ServiceSkuListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ServiceSkuListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ServiceSkuListIterator) Response() ServiceSkuList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ServiceSkuListIterator) Value() AvailableServiceSku { + if !iter.page.NotDone() { + return AvailableServiceSku{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ServiceSkuListIterator type. +func NewServiceSkuListIterator(page ServiceSkuListPage) ServiceSkuListIterator { + return ServiceSkuListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ssl ServiceSkuList) IsEmpty() bool { + return ssl.Value == nil || len(*ssl.Value) == 0 +} + +// serviceSkuListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ssl ServiceSkuList) serviceSkuListPreparer(ctx context.Context) (*http.Request, error) { + if ssl.NextLink == nil || len(to.String(ssl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ssl.NextLink))) +} + +// ServiceSkuListPage contains a page of AvailableServiceSku values. +type ServiceSkuListPage struct { + fn func(context.Context, ServiceSkuList) (ServiceSkuList, error) + ssl ServiceSkuList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ServiceSkuListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceSkuListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ssl) + if err != nil { + return err + } + page.ssl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ServiceSkuListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ServiceSkuListPage) NotDone() bool { + return !page.ssl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ServiceSkuListPage) Response() ServiceSkuList { + return page.ssl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ServiceSkuListPage) Values() []AvailableServiceSku { + if page.ssl.IsEmpty() { + return nil + } + return *page.ssl.Value +} + +// Creates a new instance of the ServiceSkuListPage type. +func NewServiceSkuListPage(getNextPage func(context.Context, ServiceSkuList) (ServiceSkuList, error)) ServiceSkuListPage { + return ServiceSkuListPage{fn: getNextPage} +} + +// ServicesStartFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ServicesStartFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ServicesStartFuture) Result(client ServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "datamigration.ServicesStartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("datamigration.ServicesStartFuture") + return + } + ar.Response = future.Response() + return +} + +// ServicesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type ServicesStopFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ServicesStopFuture) Result(client ServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "datamigration.ServicesStopFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("datamigration.ServicesStopFuture") + return + } + ar.Response = future.Response() + return +} + +// ServiceStatusResponse service health status +type ServiceStatusResponse struct { + autorest.Response `json:"-"` + // AgentVersion - The DMS instance agent version + AgentVersion *string `json:"agentVersion,omitempty"` + // Status - The machine-readable status, such as 'Initializing', 'Offline', 'Online', 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or 'Failed' + Status *string `json:"status,omitempty"` + // VMSize - The services virtual machine size, such as 'Standard_D2_v2' + VMSize *string `json:"vmSize,omitempty"` + // SupportedTaskTypes - The list of supported task types + SupportedTaskTypes *[]string `json:"supportedTaskTypes,omitempty"` +} + +// ServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ServicesUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ServicesUpdateFuture) Result(client ServicesClient) (s Service, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "datamigration.ServicesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("datamigration.ServicesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { + s, err = client.UpdateResponder(s.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "datamigration.ServicesUpdateFuture", "Result", s.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLConnectionInfo information for connecting to SQL database server +type SQLConnectionInfo struct { + // DataSource - Data source in the format Protocol:MachineName\SQLServerInstanceName,PortNumber + DataSource *string `json:"dataSource,omitempty"` + // Authentication - Authentication type to use for connection. Possible values include: 'None', 'WindowsAuthentication', 'SQLAuthentication', 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword' + Authentication AuthenticationType `json:"authentication,omitempty"` + // EncryptConnection - Whether to encrypt the connection + EncryptConnection *bool `json:"encryptConnection,omitempty"` + // AdditionalSettings - Additional connection settings + AdditionalSettings *string `json:"additionalSettings,omitempty"` + // TrustServerCertificate - Whether to trust the server certificate + TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` + // Platform - Server platform type for connection. Possible values include: 'SQLOnPrem' + Platform SQLSourcePlatform `json:"platform,omitempty"` + // UserName - User name + UserName *string `json:"userName,omitempty"` + // Password - Password credential. + Password *string `json:"password,omitempty"` + // Type - Possible values include: 'TypeUnknown', 'TypeMiSQLConnectionInfo', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeSQLConnectionInfo' + Type Type `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLConnectionInfo. +func (sci SQLConnectionInfo) MarshalJSON() ([]byte, error) { + sci.Type = TypeSQLConnectionInfo + objectMap := make(map[string]interface{}) + if sci.DataSource != nil { + objectMap["dataSource"] = sci.DataSource + } + if sci.Authentication != "" { + objectMap["authentication"] = sci.Authentication + } + if sci.EncryptConnection != nil { + objectMap["encryptConnection"] = sci.EncryptConnection + } + if sci.AdditionalSettings != nil { + objectMap["additionalSettings"] = sci.AdditionalSettings + } + if sci.TrustServerCertificate != nil { + objectMap["trustServerCertificate"] = sci.TrustServerCertificate + } + if sci.Platform != "" { + objectMap["platform"] = sci.Platform + } + if sci.UserName != nil { + objectMap["userName"] = sci.UserName + } + if sci.Password != nil { + objectMap["password"] = sci.Password + } + if sci.Type != "" { + objectMap["type"] = sci.Type + } + return json.Marshal(objectMap) +} + +// AsMiSQLConnectionInfo is the BasicConnectionInfo implementation for SQLConnectionInfo. +func (sci SQLConnectionInfo) AsMiSQLConnectionInfo() (*MiSQLConnectionInfo, bool) { + return nil, false +} + +// AsPostgreSQLConnectionInfo is the BasicConnectionInfo implementation for SQLConnectionInfo. +func (sci SQLConnectionInfo) AsPostgreSQLConnectionInfo() (*PostgreSQLConnectionInfo, bool) { + return nil, false +} + +// AsMySQLConnectionInfo is the BasicConnectionInfo implementation for SQLConnectionInfo. +func (sci SQLConnectionInfo) AsMySQLConnectionInfo() (*MySQLConnectionInfo, bool) { + return nil, false } -// ServiceList oData page of service objects -type ServiceList struct { +// AsSQLConnectionInfo is the BasicConnectionInfo implementation for SQLConnectionInfo. +func (sci SQLConnectionInfo) AsSQLConnectionInfo() (*SQLConnectionInfo, bool) { + return &sci, true +} + +// AsConnectionInfo is the BasicConnectionInfo implementation for SQLConnectionInfo. +func (sci SQLConnectionInfo) AsConnectionInfo() (*ConnectionInfo, bool) { + return nil, false +} + +// AsBasicConnectionInfo is the BasicConnectionInfo implementation for SQLConnectionInfo. +func (sci SQLConnectionInfo) AsBasicConnectionInfo() (BasicConnectionInfo, bool) { + return &sci, true +} + +// SQLMigrationTaskInput base class for migration task input +type SQLMigrationTaskInput struct { + // SourceConnectionInfo - Information for connecting to source + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Information for connecting to target + TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` +} + +// SQLServerSQLMISyncTaskInput input for task that migrates SQL Server databases to Azure SQL Database +// Managed Instance online scenario. +type SQLServerSQLMISyncTaskInput struct { + // SelectedDatabases - Databases to migrate + SelectedDatabases *[]MigrateSQLServerSQLMIDatabaseInput `json:"selectedDatabases,omitempty"` + // BackupFileShare - Backup file share information for all selected databases. + BackupFileShare *FileShare `json:"backupFileShare,omitempty"` + // StorageResourceID - Fully qualified resourceId of storage + StorageResourceID *string `json:"storageResourceId,omitempty"` + // SourceConnectionInfo - Connection information for source SQL Server + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Connection information for Azure SQL Database Managed Instance + TargetConnectionInfo *MiSQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // AzureApp - Azure Active Directory Application the DMS instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account + AzureApp *AzureActiveDirectoryApp `json:"azureApp,omitempty"` +} + +// StartMigrationScenarioServerRoleResult server role migration result +type StartMigrationScenarioServerRoleResult struct { + // Name - Name of server role. + Name *string `json:"name,omitempty"` + // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' + State MigrationState `json:"state,omitempty"` + // ExceptionsAndWarnings - Migration exceptions and warnings. + ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` +} + +// SyncMigrationDatabaseErrorEvent database migration errors for online migration +type SyncMigrationDatabaseErrorEvent struct { + // TimestampString - String value of timestamp. + TimestampString *string `json:"timestampString,omitempty"` + // EventTypeString - Event type. + EventTypeString *string `json:"eventTypeString,omitempty"` + // EventText - Event text. + EventText *string `json:"eventText,omitempty"` +} + +// TaskList oData page of tasks +type TaskList struct { autorest.Response `json:"-"` - // Value - List of services - Value *[]Service `json:"value,omitempty"` - // NextLink - URL to load the next page of services + // Value - List of tasks + Value *[]ProjectTask `json:"value,omitempty"` + // NextLink - URL to load the next page of tasks NextLink *string `json:"nextLink,omitempty"` } -// ServiceListIterator provides access to a complete listing of Service values. -type ServiceListIterator struct { +// TaskListIterator provides access to a complete listing of ProjectTask values. +type TaskListIterator struct { i int - page ServiceListPage + page TaskListPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ServiceListIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *TaskListIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceListIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/TaskListIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -4001,62 +13197,62 @@ func (iter *ServiceListIterator) NextWithContext(ctx context.Context) (err error // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ServiceListIterator) Next() error { +func (iter *TaskListIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ServiceListIterator) NotDone() bool { +func (iter TaskListIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ServiceListIterator) Response() ServiceList { +func (iter TaskListIterator) Response() TaskList { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ServiceListIterator) Value() Service { +func (iter TaskListIterator) Value() ProjectTask { if !iter.page.NotDone() { - return Service{} + return ProjectTask{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ServiceListIterator type. -func NewServiceListIterator(page ServiceListPage) ServiceListIterator { - return ServiceListIterator{page: page} +// Creates a new instance of the TaskListIterator type. +func NewTaskListIterator(page TaskListPage) TaskListIterator { + return TaskListIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (sl ServiceList) IsEmpty() bool { - return sl.Value == nil || len(*sl.Value) == 0 +func (tl TaskList) IsEmpty() bool { + return tl.Value == nil || len(*tl.Value) == 0 } -// serviceListPreparer prepares a request to retrieve the next set of results. +// taskListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (sl ServiceList) serviceListPreparer(ctx context.Context) (*http.Request, error) { - if sl.NextLink == nil || len(to.String(sl.NextLink)) < 1 { +func (tl TaskList) taskListPreparer(ctx context.Context) (*http.Request, error) { + if tl.NextLink == nil || len(to.String(tl.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(sl.NextLink))) + autorest.WithBaseURL(to.String(tl.NextLink))) } -// ServiceListPage contains a page of Service values. -type ServiceListPage struct { - fn func(context.Context, ServiceList) (ServiceList, error) - sl ServiceList +// TaskListPage contains a page of ProjectTask values. +type TaskListPage struct { + fn func(context.Context, TaskList) (TaskList, error) + tl TaskList } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ServiceListPage) NextWithContext(ctx context.Context) (err error) { +func (page *TaskListPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceListPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/TaskListPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -4065,782 +13261,857 @@ func (page *ServiceListPage) NextWithContext(ctx context.Context) (err error) { tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.sl) + next, err := page.fn(ctx, page.tl) if err != nil { return err } - page.sl = next + page.tl = next return nil } // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *ServiceListPage) Next() error { +func (page *TaskListPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ServiceListPage) NotDone() bool { - return !page.sl.IsEmpty() +func (page TaskListPage) NotDone() bool { + return !page.tl.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ServiceListPage) Response() ServiceList { - return page.sl +func (page TaskListPage) Response() TaskList { + return page.tl } // Values returns the slice of values for the current page or nil if there are no values. -func (page ServiceListPage) Values() []Service { - if page.sl.IsEmpty() { +func (page TaskListPage) Values() []ProjectTask { + if page.tl.IsEmpty() { return nil } - return *page.sl.Value + return *page.tl.Value } -// Creates a new instance of the ServiceListPage type. -func NewServiceListPage(getNextPage func(context.Context, ServiceList) (ServiceList, error)) ServiceListPage { - return ServiceListPage{fn: getNextPage} +// Creates a new instance of the TaskListPage type. +func NewTaskListPage(getNextPage func(context.Context, TaskList) (TaskList, error)) TaskListPage { + return TaskListPage{fn: getNextPage} } -// ServiceOperation description of an action supported by the Database Migration Service -type ServiceOperation struct { - // Name - The fully qualified action name, e.g. Microsoft.DataMigration/services/read +// TrackedResource ARM tracked top level resource. +type TrackedResource struct { + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - Resource name. Name *string `json:"name,omitempty"` - // Display - Localized display text - Display *ServiceOperationDisplay `json:"display,omitempty"` -} - -// ServiceOperationDisplay localized display text -type ServiceOperationDisplay struct { - // Provider - The localized resource provider name - Provider *string `json:"provider,omitempty"` - // Resource - The localized resource type name - Resource *string `json:"resource,omitempty"` - // Operation - The localized operation name - Operation *string `json:"operation,omitempty"` - // Description - The localized operation description - Description *string `json:"description,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` } -// ServiceOperationList oData page of action (operation) objects -type ServiceOperationList struct { - autorest.Response `json:"-"` - // Value - List of actions - Value *[]ServiceOperation `json:"value,omitempty"` - // NextLink - URL to load the next page of actions - NextLink *string `json:"nextLink,omitempty"` +// MarshalJSON is the custom marshaler for TrackedResource. +func (tr TrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tr.Tags != nil { + objectMap["tags"] = tr.Tags + } + if tr.Location != nil { + objectMap["location"] = tr.Location + } + if tr.ID != nil { + objectMap["id"] = tr.ID + } + if tr.Name != nil { + objectMap["name"] = tr.Name + } + if tr.Type != nil { + objectMap["type"] = tr.Type + } + return json.Marshal(objectMap) } -// ServiceOperationListIterator provides access to a complete listing of ServiceOperation values. -type ServiceOperationListIterator struct { - i int - page ServiceOperationListPage +// ValidateMigrationInputSQLServerSQLDbSyncTaskProperties properties for task that validates migration +// input for SQL to Azure SQL DB sync migrations +type ValidateMigrationInputSQLServerSQLDbSyncTaskProperties struct { + // Input - Task input + Input *ValidateSyncMigrationInputSQLServerTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]ValidateSyncMigrationInputSQLServerTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ServiceOperationListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceOperationListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() +// MarshalJSON is the custom marshaler for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) MarshalJSON() ([]byte, error) { + vmisssdstp.TaskType = TaskTypeValidateMigrationInputSQLServerSQLDbSync + objectMap := make(map[string]interface{}) + if vmisssdstp.Input != nil { + objectMap["input"] = vmisssdstp.Input } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil + if vmisssdstp.Output != nil { + objectMap["output"] = vmisssdstp.Output } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err + if vmisssdstp.Errors != nil { + objectMap["errors"] = vmisssdstp.Errors } - iter.i = 0 - return nil + if vmisssdstp.State != "" { + objectMap["state"] = vmisssdstp.State + } + if vmisssdstp.Commands != nil { + objectMap["commands"] = vmisssdstp.Commands + } + if vmisssdstp.TaskType != "" { + objectMap["taskType"] = vmisssdstp.TaskType + } + return json.Marshal(objectMap) } -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ServiceOperationListIterator) Next() error { - return iter.NextWithContext(context.Background()) +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ServiceOperationListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false } -// Response returns the raw server response from the last page request. -func (iter ServiceOperationListIterator) Response() ServiceOperationList { - return iter.page.Response() +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return &vmisssdstp, true +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ServiceOperationListIterator) Value() ServiceOperation { - if !iter.page.NotDone() { - return ServiceOperation{} - } - return iter.page.Values()[iter.i] +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false } -// Creates a new instance of the ServiceOperationListIterator type. -func NewServiceOperationListIterator(page ServiceOperationListPage) ServiceOperationListIterator { - return ServiceOperationListIterator{page: page} +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false } -// IsEmpty returns true if the ListResult contains no values. -func (sol ServiceOperationList) IsEmpty() bool { - return sol.Value == nil || len(*sol.Value) == 0 +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false } -// serviceOperationListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (sol ServiceOperationList) serviceOperationListPreparer(ctx context.Context) (*http.Request, error) { - if sol.NextLink == nil || len(to.String(sol.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(sol.NextLink))) +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false } -// ServiceOperationListPage contains a page of ServiceOperation values. -type ServiceOperationListPage struct { - fn func(context.Context, ServiceOperationList) (ServiceOperationList, error) - sol ServiceOperationList +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ServiceOperationListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceOperationListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.sol) - if err != nil { - return err - } - page.sol = next - return nil +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false } -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ServiceOperationListPage) Next() error { - return page.NextWithContext(context.Background()) +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ServiceOperationListPage) NotDone() bool { - return !page.sol.IsEmpty() +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false } -// Response returns the raw server response from the last page request. -func (page ServiceOperationListPage) Response() ServiceOperationList { - return page.sol +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false } -// Values returns the slice of values for the current page or nil if there are no values. -func (page ServiceOperationListPage) Values() []ServiceOperation { - if page.sol.IsEmpty() { - return nil - } - return *page.sol.Value +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false } -// Creates a new instance of the ServiceOperationListPage type. -func NewServiceOperationListPage(getNextPage func(context.Context, ServiceOperationList) (ServiceOperationList, error)) ServiceOperationListPage { - return ServiceOperationListPage{fn: getNextPage} +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false } -// ServiceProperties properties of the Data Migration service instance -type ServiceProperties struct { - // ProvisioningState - The resource's provisioning state. Possible values include: 'ServiceProvisioningStateAccepted', 'ServiceProvisioningStateDeleting', 'ServiceProvisioningStateDeploying', 'ServiceProvisioningStateStopped', 'ServiceProvisioningStateStopping', 'ServiceProvisioningStateStarting', 'ServiceProvisioningStateFailedToStart', 'ServiceProvisioningStateFailedToStop', 'ServiceProvisioningStateSucceeded', 'ServiceProvisioningStateFailed' - ProvisioningState ServiceProvisioningState `json:"provisioningState,omitempty"` - // PublicKey - The public key of the service, used to encrypt secrets sent to the service - PublicKey *string `json:"publicKey,omitempty"` - // VirtualSubnetID - The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined - VirtualSubnetID *string `json:"virtualSubnetId,omitempty"` +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false } -// ServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServicesCreateOrUpdateFuture struct { - azure.Future +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &vmisssdstp, true } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ServicesCreateOrUpdateFuture) Result(client ServicesClient) (s Service, err error) { - var done bool - done, err = future.Done(client) +// UnmarshalJSON is the custom unmarshaler for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties struct. +func (vmisssdstp *ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - err = autorest.NewErrorWithError(err, "datamigration.ServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("datamigration.ServicesCreateOrUpdateFuture") - return + return err } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.CreateOrUpdateResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "datamigration.ServicesCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") + for k, v := range m { + switch k { + case "input": + if v != nil { + var input ValidateSyncMigrationInputSQLServerTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + vmisssdstp.Input = &input + } + case "output": + if v != nil { + var output []ValidateSyncMigrationInputSQLServerTaskOutput + err = json.Unmarshal(*v, &output) + if err != nil { + return err + } + vmisssdstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + vmisssdstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + vmisssdstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + vmisssdstp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + vmisssdstp.TaskType = taskType + } } } - return -} -// ServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServicesDeleteFuture struct { - azure.Future + return nil } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ServicesDeleteFuture) Result(client ServicesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "datamigration.ServicesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("datamigration.ServicesDeleteFuture") - return - } - ar.Response = future.Response() - return +// ValidateMigrationInputSQLServerSQLMISyncTaskInput input for task that migrates SQL Server databases to +// Azure SQL Database Managed Instance online scenario. +type ValidateMigrationInputSQLServerSQLMISyncTaskInput struct { + // SelectedDatabases - Databases to migrate + SelectedDatabases *[]MigrateSQLServerSQLMIDatabaseInput `json:"selectedDatabases,omitempty"` + // BackupFileShare - Backup file share information for all selected databases. + BackupFileShare *FileShare `json:"backupFileShare,omitempty"` + // StorageResourceID - Fully qualified resourceId of storage + StorageResourceID *string `json:"storageResourceId,omitempty"` + // SourceConnectionInfo - Connection information for source SQL Server + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Connection information for Azure SQL Database Managed Instance + TargetConnectionInfo *MiSQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // AzureApp - Azure Active Directory Application the DMS instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account + AzureApp *AzureActiveDirectoryApp `json:"azureApp,omitempty"` } -// ServiceSku an Azure SKU instance -type ServiceSku struct { - // Name - The unique name of the SKU, such as 'P3' +// ValidateMigrationInputSQLServerSQLMISyncTaskOutput output for task that validates migration input for +// Azure SQL Database Managed Instance online migration +type ValidateMigrationInputSQLServerSQLMISyncTaskOutput struct { + // ID - Database identifier + ID *string `json:"id,omitempty"` + // Name - Name of database Name *string `json:"name,omitempty"` - // Tier - The tier of the SKU, such as 'Free', 'Basic', 'Standard', or 'Premium' - Tier *string `json:"tier,omitempty"` - // Family - The SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual machines - Family *string `json:"family,omitempty"` - // Size - The size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines - Size *string `json:"size,omitempty"` - // Capacity - The capacity of the SKU, if it supports scaling - Capacity *int32 `json:"capacity,omitempty"` -} - -// ServiceSkuList oData page of available SKUs -type ServiceSkuList struct { - autorest.Response `json:"-"` - // Value - List of service SKUs - Value *[]AvailableServiceSku `json:"value,omitempty"` - // NextLink - URL to load the next page of service SKUs - NextLink *string `json:"nextLink,omitempty"` + // ValidationErrors - Errors associated with a selected database object + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` } -// ServiceSkuListIterator provides access to a complete listing of AvailableServiceSku values. -type ServiceSkuListIterator struct { - i int - page ServiceSkuListPage +// ValidateMigrationInputSQLServerSQLMISyncTaskProperties properties for task that validates migration +// input for SQL to Azure SQL Database Managed Instance sync scenario +type ValidateMigrationInputSQLServerSQLMISyncTaskProperties struct { + // Input - Task input + Input *ValidateMigrationInputSQLServerSQLMISyncTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]ValidateMigrationInputSQLServerSQLMISyncTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ServiceSkuListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceSkuListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() +// MarshalJSON is the custom marshaler for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) MarshalJSON() ([]byte, error) { + vmisssmstp.TaskType = TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS + objectMap := make(map[string]interface{}) + if vmisssmstp.Input != nil { + objectMap["input"] = vmisssmstp.Input } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil + if vmisssmstp.Output != nil { + objectMap["output"] = vmisssmstp.Output } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err + if vmisssmstp.Errors != nil { + objectMap["errors"] = vmisssmstp.Errors } - iter.i = 0 - return nil + if vmisssmstp.State != "" { + objectMap["state"] = vmisssmstp.State + } + if vmisssmstp.Commands != nil { + objectMap["commands"] = vmisssmstp.Commands + } + if vmisssmstp.TaskType != "" { + objectMap["taskType"] = vmisssmstp.TaskType + } + return json.Marshal(objectMap) } -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ServiceSkuListIterator) Next() error { - return iter.NextWithContext(context.Background()) +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ServiceSkuListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return &vmisssmstp, true +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// Response returns the raw server response from the last page request. -func (iter ServiceSkuListIterator) Response() ServiceSkuList { - return iter.page.Response() +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ServiceSkuListIterator) Value() AvailableServiceSku { - if !iter.page.NotDone() { - return AvailableServiceSku{} - } - return iter.page.Values()[iter.i] +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false } -// Creates a new instance of the ServiceSkuListIterator type. -func NewServiceSkuListIterator(page ServiceSkuListPage) ServiceSkuListIterator { - return ServiceSkuListIterator{page: page} +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false } -// IsEmpty returns true if the ListResult contains no values. -func (ssl ServiceSkuList) IsEmpty() bool { - return ssl.Value == nil || len(*ssl.Value) == 0 +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false } -// serviceSkuListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (ssl ServiceSkuList) serviceSkuListPreparer(ctx context.Context) (*http.Request, error) { - if ssl.NextLink == nil || len(to.String(ssl.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ssl.NextLink))) +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false } -// ServiceSkuListPage contains a page of AvailableServiceSku values. -type ServiceSkuListPage struct { - fn func(context.Context, ServiceSkuList) (ServiceSkuList, error) - ssl ServiceSkuList +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false } -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ServiceSkuListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceSkuListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.ssl) - if err != nil { - return err - } - page.ssl = next - return nil +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false } -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ServiceSkuListPage) Next() error { - return page.NextWithContext(context.Background()) +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ServiceSkuListPage) NotDone() bool { - return !page.ssl.IsEmpty() +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false } -// Response returns the raw server response from the last page request. -func (page ServiceSkuListPage) Response() ServiceSkuList { - return page.ssl +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false } -// Values returns the slice of values for the current page or nil if there are no values. -func (page ServiceSkuListPage) Values() []AvailableServiceSku { - if page.ssl.IsEmpty() { - return nil - } - return *page.ssl.Value +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// Creates a new instance of the ServiceSkuListPage type. -func NewServiceSkuListPage(getNextPage func(context.Context, ServiceSkuList) (ServiceSkuList, error)) ServiceSkuListPage { - return ServiceSkuListPage{fn: getNextPage} +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false } -// ServicesStartFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServicesStartFuture struct { - azure.Future +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ServicesStartFuture) Result(client ServicesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "datamigration.ServicesStartFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("datamigration.ServicesStartFuture") - return - } - ar.Response = future.Response() - return +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false } -// ServicesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type ServicesStopFuture struct { - azure.Future +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ServicesStopFuture) Result(client ServicesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.Done(client) - if err != nil { - err = autorest.NewErrorWithError(err, "datamigration.ServicesStopFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("datamigration.ServicesStopFuture") - return - } - ar.Response = future.Response() - return +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false } -// ServiceStatusResponse service health status -type ServiceStatusResponse struct { - autorest.Response `json:"-"` - // AgentVersion - The DMS instance agent version - AgentVersion *string `json:"agentVersion,omitempty"` - // Status - The machine-readable status, such as 'Initializing', 'Offline', 'Online', 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or 'Failed' - Status *string `json:"status,omitempty"` - // VMSize - The services virtual machine size, such as 'Standard_D2_v2' - VMSize *string `json:"vmSize,omitempty"` - // SupportedTaskTypes - The list of supported task types - SupportedTaskTypes *[]string `json:"supportedTaskTypes,omitempty"` +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false } -// ServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServicesUpdateFuture struct { - azure.Future +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ServicesUpdateFuture) Result(client ServicesClient) (s Service, err error) { - var done bool - done, err = future.Done(client) +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &vmisssmstp, true +} + +// UnmarshalJSON is the custom unmarshaler for ValidateMigrationInputSQLServerSQLMISyncTaskProperties struct. +func (vmisssmstp *ValidateMigrationInputSQLServerSQLMISyncTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - err = autorest.NewErrorWithError(err, "datamigration.ServicesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("datamigration.ServicesUpdateFuture") - return + return err } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.UpdateResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "datamigration.ServicesUpdateFuture", "Result", s.Response.Response, "Failure responding to request") + for k, v := range m { + switch k { + case "input": + if v != nil { + var input ValidateMigrationInputSQLServerSQLMISyncTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + vmisssmstp.Input = &input + } + case "output": + if v != nil { + var output []ValidateMigrationInputSQLServerSQLMISyncTaskOutput + err = json.Unmarshal(*v, &output) + if err != nil { + return err + } + vmisssmstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + vmisssmstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + vmisssmstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + vmisssmstp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + vmisssmstp.TaskType = taskType + } } } - return + + return nil } -// SQLConnectionInfo information for connecting to SQL database server -type SQLConnectionInfo struct { - // DataSource - Data source in the format Protocol:MachineName\SQLServerInstanceName,PortNumber - DataSource *string `json:"dataSource,omitempty"` - // Authentication - Authentication type to use for connection. Possible values include: 'None', 'WindowsAuthentication', 'SQLAuthentication', 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword' - Authentication AuthenticationType `json:"authentication,omitempty"` - // EncryptConnection - Whether to encrypt the connection - EncryptConnection *bool `json:"encryptConnection,omitempty"` - // AdditionalSettings - Additional connection settings - AdditionalSettings *string `json:"additionalSettings,omitempty"` - // TrustServerCertificate - Whether to trust the server certificate - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - // UserName - User name - UserName *string `json:"userName,omitempty"` - // Password - Password credential. - Password *string `json:"password,omitempty"` - // Type - Possible values include: 'TypeUnknown', 'TypeSQLConnectionInfo' - Type Type `json:"type,omitempty"` +// ValidateMigrationInputSQLServerSQLMITaskInput input for task that validates migration input for SQL to +// Azure SQL Managed Instance +type ValidateMigrationInputSQLServerSQLMITaskInput struct { + // SourceConnectionInfo - Information for connecting to source + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Information for connecting to target + TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // SelectedDatabases - Databases to migrate + SelectedDatabases *[]MigrateSQLServerSQLMIDatabaseInput `json:"selectedDatabases,omitempty"` + // SelectedLogins - Logins to migrate + SelectedLogins *[]string `json:"selectedLogins,omitempty"` + // BackupFileShare - Backup file share information for all selected databases. + BackupFileShare *FileShare `json:"backupFileShare,omitempty"` + // BackupBlobShare - SAS URI of Azure Storage Account Container to be used for storing backup files. + BackupBlobShare *BlobShare `json:"backupBlobShare,omitempty"` + // BackupMode - Backup Mode to specify whether to use existing backup or create new backup. Possible values include: 'CreateBackup', 'ExistingBackup' + BackupMode BackupMode `json:"backupMode,omitempty"` } -// MarshalJSON is the custom marshaler for SQLConnectionInfo. -func (sci SQLConnectionInfo) MarshalJSON() ([]byte, error) { - sci.Type = TypeSQLConnectionInfo +// ValidateMigrationInputSQLServerSQLMITaskOutput output for task that validates migration input for SQL to +// Azure SQL Managed Instance migrations +type ValidateMigrationInputSQLServerSQLMITaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // Name - Name of database + Name *string `json:"name,omitempty"` + // RestoreDatabaseNameErrors - Errors associated with the RestoreDatabaseName + RestoreDatabaseNameErrors *[]ReportableException `json:"restoreDatabaseNameErrors,omitempty"` + // BackupFolderErrors - Errors associated with the BackupFolder path + BackupFolderErrors *[]ReportableException `json:"backupFolderErrors,omitempty"` + // BackupShareCredentialsErrors - Errors associated with backup share user name and password credentials + BackupShareCredentialsErrors *[]ReportableException `json:"backupShareCredentialsErrors,omitempty"` + // BackupStorageAccountErrors - Errors associated with the storage account provided. + BackupStorageAccountErrors *[]ReportableException `json:"backupStorageAccountErrors,omitempty"` + // ExistingBackupErrors - Errors associated with existing backup files. + ExistingBackupErrors *[]ReportableException `json:"existingBackupErrors,omitempty"` + // DatabaseBackupInfo - Information about backup files when existing backup mode is used. + DatabaseBackupInfo *DatabaseBackupInfo `json:"databaseBackupInfo,omitempty"` +} + +// ValidateMigrationInputSQLServerSQLMITaskProperties properties for task that validates migration input +// for SQL to Azure SQL Database Managed Instance +type ValidateMigrationInputSQLServerSQLMITaskProperties struct { + // Input - Task input + Input *ValidateMigrationInputSQLServerSQLMITaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]ValidateMigrationInputSQLServerSQLMITaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectToSourceMySQL' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) MarshalJSON() ([]byte, error) { + vmisssmtp.TaskType = TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI objectMap := make(map[string]interface{}) - if sci.DataSource != nil { - objectMap["dataSource"] = sci.DataSource - } - if sci.Authentication != "" { - objectMap["authentication"] = sci.Authentication - } - if sci.EncryptConnection != nil { - objectMap["encryptConnection"] = sci.EncryptConnection - } - if sci.AdditionalSettings != nil { - objectMap["additionalSettings"] = sci.AdditionalSettings + if vmisssmtp.Input != nil { + objectMap["input"] = vmisssmtp.Input } - if sci.TrustServerCertificate != nil { - objectMap["trustServerCertificate"] = sci.TrustServerCertificate + if vmisssmtp.Output != nil { + objectMap["output"] = vmisssmtp.Output } - if sci.UserName != nil { - objectMap["userName"] = sci.UserName + if vmisssmtp.Errors != nil { + objectMap["errors"] = vmisssmtp.Errors } - if sci.Password != nil { - objectMap["password"] = sci.Password + if vmisssmtp.State != "" { + objectMap["state"] = vmisssmtp.State } - if sci.Type != "" { - objectMap["type"] = sci.Type + if vmisssmtp.Commands != nil { + objectMap["commands"] = vmisssmtp.Commands + } + if vmisssmtp.TaskType != "" { + objectMap["taskType"] = vmisssmtp.TaskType } return json.Marshal(objectMap) } -// AsSQLConnectionInfo is the BasicConnectionInfo implementation for SQLConnectionInfo. -func (sci SQLConnectionInfo) AsSQLConnectionInfo() (*SQLConnectionInfo, bool) { - return &sci, true +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false } -// AsConnectionInfo is the BasicConnectionInfo implementation for SQLConnectionInfo. -func (sci SQLConnectionInfo) AsConnectionInfo() (*ConnectionInfo, bool) { +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { return nil, false } -// AsBasicConnectionInfo is the BasicConnectionInfo implementation for SQLConnectionInfo. -func (sci SQLConnectionInfo) AsBasicConnectionInfo() (BasicConnectionInfo, bool) { - return &sci, true +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return &vmisssmtp, true } -// SQLMigrationTaskInput base class for migration task input -type SQLMigrationTaskInput struct { - // SourceConnectionInfo - Information for connecting to source - SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` - // TargetConnectionInfo - Information for connecting to target - TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false } -// StartMigrationScenarioServerRoleResult migration results from a server role. -type StartMigrationScenarioServerRoleResult struct { - // Name - Name of server role. - Name *string `json:"name,omitempty"` - // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' - State MigrationState `json:"state,omitempty"` - // ExceptionsAndWarnings - Migration exceptions and warnings. - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// TaskList oData page of tasks -type TaskList struct { - autorest.Response `json:"-"` - // Value - List of tasks - Value *[]ProjectTask `json:"value,omitempty"` - // NextLink - URL to load the next page of tasks - NextLink *string `json:"nextLink,omitempty"` +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false } -// TaskListIterator provides access to a complete listing of ProjectTask values. -type TaskListIterator struct { - i int - page TaskListPage +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *TaskListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TaskListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false } -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *TaskListIterator) Next() error { - return iter.NextWithContext(context.Background()) +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter TaskListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false } -// Response returns the raw server response from the last page request. -func (iter TaskListIterator) Response() TaskList { - return iter.page.Response() +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter TaskListIterator) Value() ProjectTask { - if !iter.page.NotDone() { - return ProjectTask{} - } - return iter.page.Values()[iter.i] +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false } -// Creates a new instance of the TaskListIterator type. -func NewTaskListIterator(page TaskListPage) TaskListIterator { - return TaskListIterator{page: page} +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false } -// IsEmpty returns true if the ListResult contains no values. -func (tl TaskList) IsEmpty() bool { - return tl.Value == nil || len(*tl.Value) == 0 +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false } -// taskListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (tl TaskList) taskListPreparer(ctx context.Context) (*http.Request, error) { - if tl.NextLink == nil || len(to.String(tl.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(tl.NextLink))) +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false } -// TaskListPage contains a page of ProjectTask values. -type TaskListPage struct { - fn func(context.Context, TaskList) (TaskList, error) - tl TaskList +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false } -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *TaskListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TaskListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.tl) - if err != nil { - return err - } - page.tl = next - return nil +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false } -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *TaskListPage) Next() error { - return page.NextWithContext(context.Background()) +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page TaskListPage) NotDone() bool { - return !page.tl.IsEmpty() +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false } -// Response returns the raw server response from the last page request. -func (page TaskListPage) Response() TaskList { - return page.tl +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false } -// Values returns the slice of values for the current page or nil if there are no values. -func (page TaskListPage) Values() []ProjectTask { - if page.tl.IsEmpty() { - return nil - } - return *page.tl.Value +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false } -// Creates a new instance of the TaskListPage type. -func NewTaskListPage(getNextPage func(context.Context, TaskList) (TaskList, error)) TaskListPage { - return TaskListPage{fn: getNextPage} +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false } -// TrackedResource ARM tracked top level resource. -type TrackedResource struct { - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - Resource name. - Name *string `json:"name,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for TrackedResource. -func (tr TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tr.Tags != nil { - objectMap["tags"] = tr.Tags - } - if tr.Location != nil { - objectMap["location"] = tr.Location - } - if tr.ID != nil { - objectMap["id"] = tr.ID - } - if tr.Name != nil { - objectMap["name"] = tr.Name +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &vmisssmtp, true +} + +// UnmarshalJSON is the custom unmarshaler for ValidateMigrationInputSQLServerSQLMITaskProperties struct. +func (vmisssmtp *ValidateMigrationInputSQLServerSQLMITaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err } - if tr.Type != nil { - objectMap["type"] = tr.Type + for k, v := range m { + switch k { + case "input": + if v != nil { + var input ValidateMigrationInputSQLServerSQLMITaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + vmisssmtp.Input = &input + } + case "output": + if v != nil { + var output []ValidateMigrationInputSQLServerSQLMITaskOutput + err = json.Unmarshal(*v, &output) + if err != nil { + return err + } + vmisssmtp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + vmisssmtp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + vmisssmtp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + vmisssmtp.Commands = &commands + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + vmisssmtp.TaskType = taskType + } + } } - return json.Marshal(objectMap) + + return nil +} + +// ValidateSyncMigrationInputSQLServerTaskInput input for task that validates migration input for SQL sync +// migrations +type ValidateSyncMigrationInputSQLServerTaskInput struct { + // SourceConnectionInfo - Information for connecting to source SQL server + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Information for connecting to target + TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // SelectedDatabases - Databases to migrate + SelectedDatabases *[]MigrateSQLServerSQLDbSyncDatabaseInput `json:"selectedDatabases,omitempty"` +} + +// ValidateSyncMigrationInputSQLServerTaskOutput output for task that validates migration input for SQL +// sync migrations +type ValidateSyncMigrationInputSQLServerTaskOutput struct { + // ID - Database identifier + ID *string `json:"id,omitempty"` + // Name - Name of database + Name *string `json:"name,omitempty"` + // ValidationErrors - Errors associated with a selected database object + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` } // ValidationError description about the errors happen while performing migration validation diff --git a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/models.go b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/models.go index 5f81e48329c3..1535c9ed62c6 100644 --- a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/models.go +++ b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/models.go @@ -52,6 +52,31 @@ func PossibleAuthenticationTypeValues() []AuthenticationType { return []AuthenticationType{ActiveDirectoryIntegrated, ActiveDirectoryPassword, None, SQLAuthentication, WindowsAuthentication} } +// BackupFileStatus enumerates the values for backup file status. +type BackupFileStatus string + +const ( + // Arrived ... + Arrived BackupFileStatus = "Arrived" + // Cancelled ... + Cancelled BackupFileStatus = "Cancelled" + // Queued ... + Queued BackupFileStatus = "Queued" + // Restored ... + Restored BackupFileStatus = "Restored" + // Restoring ... + Restoring BackupFileStatus = "Restoring" + // Uploaded ... + Uploaded BackupFileStatus = "Uploaded" + // Uploading ... + Uploading BackupFileStatus = "Uploading" +) + +// PossibleBackupFileStatusValues returns an array of possible values for the BackupFileStatus const type. +func PossibleBackupFileStatusValues() []BackupFileStatus { + return []BackupFileStatus{Arrived, Cancelled, Queued, Restored, Restoring, Uploaded, Uploading} +} + // BackupMode enumerates the values for backup mode. type BackupMode string @@ -121,6 +146,8 @@ const ( CommandTypeCancel CommandType = "cancel" // CommandTypeFinish ... CommandTypeFinish CommandType = "finish" + // CommandTypeMigrateSQLServerAzureDbSQLMiComplete ... + CommandTypeMigrateSQLServerAzureDbSQLMiComplete CommandType = "Migrate.SqlServer.AzureDbSqlMi.Complete" // CommandTypeMigrateSyncCompleteDatabase ... CommandTypeMigrateSyncCompleteDatabase CommandType = "Migrate.Sync.Complete.Database" // CommandTypeRestart ... @@ -131,7 +158,7 @@ const ( // PossibleCommandTypeValues returns an array of possible values for the CommandType const type. func PossibleCommandTypeValues() []CommandType { - return []CommandType{CommandTypeCancel, CommandTypeFinish, CommandTypeMigrateSyncCompleteDatabase, CommandTypeRestart, CommandTypeUnknown} + return []CommandType{CommandTypeCancel, CommandTypeFinish, CommandTypeMigrateSQLServerAzureDbSQLMiComplete, CommandTypeMigrateSyncCompleteDatabase, CommandTypeRestart, CommandTypeUnknown} } // DatabaseCompatLevel enumerates the values for database compat level. @@ -203,33 +230,64 @@ func PossibleDatabaseMigrationStageValues() []DatabaseMigrationStage { return []DatabaseMigrationStage{DatabaseMigrationStageBackup, DatabaseMigrationStageCompleted, DatabaseMigrationStageFileCopy, DatabaseMigrationStageInitialize, DatabaseMigrationStageNone, DatabaseMigrationStageRestore} } +// DatabaseMigrationState enumerates the values for database migration state. +type DatabaseMigrationState string + +const ( + // CANCELLED ... + CANCELLED DatabaseMigrationState = "CANCELLED" + // COMPLETED ... + COMPLETED DatabaseMigrationState = "COMPLETED" + // CUTOVERSTART ... + CUTOVERSTART DatabaseMigrationState = "CUTOVER_START" + // FAILED ... + FAILED DatabaseMigrationState = "FAILED" + // FULLBACKUPUPLOADSTART ... + FULLBACKUPUPLOADSTART DatabaseMigrationState = "FULL_BACKUP_UPLOAD_START" + // INITIAL ... + INITIAL DatabaseMigrationState = "INITIAL" + // LOGSHIPPINGSTART ... + LOGSHIPPINGSTART DatabaseMigrationState = "LOG_SHIPPING_START" + // POSTCUTOVERCOMPLETE ... + POSTCUTOVERCOMPLETE DatabaseMigrationState = "POST_CUTOVER_COMPLETE" + // UNDEFINED ... + UNDEFINED DatabaseMigrationState = "UNDEFINED" + // UPLOADLOGFILESSTART ... + UPLOADLOGFILESSTART DatabaseMigrationState = "UPLOAD_LOG_FILES_START" +) + +// PossibleDatabaseMigrationStateValues returns an array of possible values for the DatabaseMigrationState const type. +func PossibleDatabaseMigrationStateValues() []DatabaseMigrationState { + return []DatabaseMigrationState{CANCELLED, COMPLETED, CUTOVERSTART, FAILED, FULLBACKUPUPLOADSTART, INITIAL, LOGSHIPPINGSTART, POSTCUTOVERCOMPLETE, UNDEFINED, UPLOADLOGFILESSTART} +} + // DatabaseState enumerates the values for database state. type DatabaseState string const ( - // Copying ... - Copying DatabaseState = "Copying" - // Emergency ... - Emergency DatabaseState = "Emergency" - // Offline ... - Offline DatabaseState = "Offline" - // OfflineSecondary ... - OfflineSecondary DatabaseState = "OfflineSecondary" - // Online ... - Online DatabaseState = "Online" - // Recovering ... - Recovering DatabaseState = "Recovering" - // RecoveryPending ... - RecoveryPending DatabaseState = "RecoveryPending" - // Restoring ... - Restoring DatabaseState = "Restoring" - // Suspect ... - Suspect DatabaseState = "Suspect" + // DatabaseStateCopying ... + DatabaseStateCopying DatabaseState = "Copying" + // DatabaseStateEmergency ... + DatabaseStateEmergency DatabaseState = "Emergency" + // DatabaseStateOffline ... + DatabaseStateOffline DatabaseState = "Offline" + // DatabaseStateOfflineSecondary ... + DatabaseStateOfflineSecondary DatabaseState = "OfflineSecondary" + // DatabaseStateOnline ... + DatabaseStateOnline DatabaseState = "Online" + // DatabaseStateRecovering ... + DatabaseStateRecovering DatabaseState = "Recovering" + // DatabaseStateRecoveryPending ... + DatabaseStateRecoveryPending DatabaseState = "RecoveryPending" + // DatabaseStateRestoring ... + DatabaseStateRestoring DatabaseState = "Restoring" + // DatabaseStateSuspect ... + DatabaseStateSuspect DatabaseState = "Suspect" ) // PossibleDatabaseStateValues returns an array of possible values for the DatabaseState const type. func PossibleDatabaseStateValues() []DatabaseState { - return []DatabaseState{Copying, Emergency, Offline, OfflineSecondary, Online, Recovering, RecoveryPending, Restoring, Suspect} + return []DatabaseState{DatabaseStateCopying, DatabaseStateEmergency, DatabaseStateOffline, DatabaseStateOfflineSecondary, DatabaseStateOnline, DatabaseStateRecovering, DatabaseStateRecoveryPending, DatabaseStateRestoring, DatabaseStateSuspect} } // ErrorType enumerates the values for error type. @@ -466,11 +524,13 @@ type MySQLTargetPlatformType string const ( // AzureDbForMySQL ... AzureDbForMySQL MySQLTargetPlatformType = "AzureDbForMySQL" + // SQLServer ... + SQLServer MySQLTargetPlatformType = "SqlServer" ) // PossibleMySQLTargetPlatformTypeValues returns an array of possible values for the MySQLTargetPlatformType const type. func PossibleMySQLTargetPlatformTypeValues() []MySQLTargetPlatformType { - return []MySQLTargetPlatformType{AzureDbForMySQL} + return []MySQLTargetPlatformType{AzureDbForMySQL, SQLServer} } // NameCheckFailureReason enumerates the values for name check failure reason. @@ -791,6 +851,26 @@ func PossibleResultTypeBasicMigrateSQLServerSQLDbTaskOutputValues() []ResultType return []ResultTypeBasicMigrateSQLServerSQLDbTaskOutput{ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput, ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput, ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput, ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput, ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput} } +// ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput enumerates the values for result type basic migrate sql +// server sqlmi sync task output. +type ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput string + +const ( + // ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput ... + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = "DatabaseLevelOutput" + // ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput ... + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = "ErrorOutput" + // ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput ... + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = "MigrateSqlServerSqlMISyncTaskOutput" + // ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput ... + ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput = "MigrationLevelOutput" +) + +// PossibleResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputValues returns an array of possible values for the ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput const type. +func PossibleResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputValues() []ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput { + return []ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput{ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput, ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput, ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput, ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput} +} + // ResultTypeBasicMigrateSQLServerSQLMITaskOutput enumerates the values for result type basic migrate sql // server sqlmi task output. type ResultTypeBasicMigrateSQLServerSQLMITaskOutput string @@ -964,33 +1044,33 @@ func PossibleSQLSourcePlatformValues() []SQLSourcePlatform { type SyncDatabaseMigrationReportingState string const ( - // CANCELLED ... - CANCELLED SyncDatabaseMigrationReportingState = "CANCELLED" - // CANCELLING ... - CANCELLING SyncDatabaseMigrationReportingState = "CANCELLING" - // COMPLETE ... - COMPLETE SyncDatabaseMigrationReportingState = "COMPLETE" - // COMPLETING ... - COMPLETING SyncDatabaseMigrationReportingState = "COMPLETING" - // CONFIGURING ... - CONFIGURING SyncDatabaseMigrationReportingState = "CONFIGURING" - // FAILED ... - FAILED SyncDatabaseMigrationReportingState = "FAILED" - // INITIALIAZING ... - INITIALIAZING SyncDatabaseMigrationReportingState = "INITIALIAZING" - // READYTOCOMPLETE ... - READYTOCOMPLETE SyncDatabaseMigrationReportingState = "READY_TO_COMPLETE" - // RUNNING ... - RUNNING SyncDatabaseMigrationReportingState = "RUNNING" - // STARTING ... - STARTING SyncDatabaseMigrationReportingState = "STARTING" - // UNDEFINED ... - UNDEFINED SyncDatabaseMigrationReportingState = "UNDEFINED" + // SyncDatabaseMigrationReportingStateCANCELLED ... + SyncDatabaseMigrationReportingStateCANCELLED SyncDatabaseMigrationReportingState = "CANCELLED" + // SyncDatabaseMigrationReportingStateCANCELLING ... + SyncDatabaseMigrationReportingStateCANCELLING SyncDatabaseMigrationReportingState = "CANCELLING" + // SyncDatabaseMigrationReportingStateCOMPLETE ... + SyncDatabaseMigrationReportingStateCOMPLETE SyncDatabaseMigrationReportingState = "COMPLETE" + // SyncDatabaseMigrationReportingStateCOMPLETING ... + SyncDatabaseMigrationReportingStateCOMPLETING SyncDatabaseMigrationReportingState = "COMPLETING" + // SyncDatabaseMigrationReportingStateCONFIGURING ... + SyncDatabaseMigrationReportingStateCONFIGURING SyncDatabaseMigrationReportingState = "CONFIGURING" + // SyncDatabaseMigrationReportingStateFAILED ... + SyncDatabaseMigrationReportingStateFAILED SyncDatabaseMigrationReportingState = "FAILED" + // SyncDatabaseMigrationReportingStateINITIALIAZING ... + SyncDatabaseMigrationReportingStateINITIALIAZING SyncDatabaseMigrationReportingState = "INITIALIAZING" + // SyncDatabaseMigrationReportingStateREADYTOCOMPLETE ... + SyncDatabaseMigrationReportingStateREADYTOCOMPLETE SyncDatabaseMigrationReportingState = "READY_TO_COMPLETE" + // SyncDatabaseMigrationReportingStateRUNNING ... + SyncDatabaseMigrationReportingStateRUNNING SyncDatabaseMigrationReportingState = "RUNNING" + // SyncDatabaseMigrationReportingStateSTARTING ... + SyncDatabaseMigrationReportingStateSTARTING SyncDatabaseMigrationReportingState = "STARTING" + // SyncDatabaseMigrationReportingStateUNDEFINED ... + SyncDatabaseMigrationReportingStateUNDEFINED SyncDatabaseMigrationReportingState = "UNDEFINED" ) // PossibleSyncDatabaseMigrationReportingStateValues returns an array of possible values for the SyncDatabaseMigrationReportingState const type. func PossibleSyncDatabaseMigrationReportingStateValues() []SyncDatabaseMigrationReportingState { - return []SyncDatabaseMigrationReportingState{CANCELLED, CANCELLING, COMPLETE, COMPLETING, CONFIGURING, FAILED, INITIALIAZING, READYTOCOMPLETE, RUNNING, STARTING, UNDEFINED} + return []SyncDatabaseMigrationReportingState{SyncDatabaseMigrationReportingStateCANCELLED, SyncDatabaseMigrationReportingStateCANCELLING, SyncDatabaseMigrationReportingStateCOMPLETE, SyncDatabaseMigrationReportingStateCOMPLETING, SyncDatabaseMigrationReportingStateCONFIGURING, SyncDatabaseMigrationReportingStateFAILED, SyncDatabaseMigrationReportingStateINITIALIAZING, SyncDatabaseMigrationReportingStateREADYTOCOMPLETE, SyncDatabaseMigrationReportingStateRUNNING, SyncDatabaseMigrationReportingStateSTARTING, SyncDatabaseMigrationReportingStateUNDEFINED} } // SyncTableMigrationState enumerates the values for sync table migration state. @@ -1051,14 +1131,20 @@ const ( TaskTypeConnectMongoDb TaskType = "Connect.MongoDb" // TaskTypeConnectToSourceMySQL ... TaskTypeConnectToSourceMySQL TaskType = "ConnectToSource.MySql" + // TaskTypeConnectToSourcePostgreSQLSync ... + TaskTypeConnectToSourcePostgreSQLSync TaskType = "ConnectToSource.PostgreSql.Sync" // TaskTypeConnectToSourceSQLServer ... TaskTypeConnectToSourceSQLServer TaskType = "ConnectToSource.SqlServer" // TaskTypeConnectToSourceSQLServerSync ... TaskTypeConnectToSourceSQLServerSync TaskType = "ConnectToSource.SqlServer.Sync" // TaskTypeConnectToTargetAzureDbForMySQL ... TaskTypeConnectToTargetAzureDbForMySQL TaskType = "ConnectToTarget.AzureDbForMySql" + // TaskTypeConnectToTargetAzureDbForPostgreSQLSync ... + TaskTypeConnectToTargetAzureDbForPostgreSQLSync TaskType = "ConnectToTarget.AzureDbForPostgreSql.Sync" // TaskTypeConnectToTargetAzureSQLDbMI ... TaskTypeConnectToTargetAzureSQLDbMI TaskType = "ConnectToTarget.AzureSqlDbMI" + // TaskTypeConnectToTargetAzureSQLDbMISyncLRS ... + TaskTypeConnectToTargetAzureSQLDbMISyncLRS TaskType = "ConnectToTarget.AzureSqlDbMI.Sync.LRS" // TaskTypeConnectToTargetSQLDb ... TaskTypeConnectToTargetSQLDb TaskType = "ConnectToTarget.SqlDb" // TaskTypeConnectToTargetSQLDbSync ... @@ -1079,6 +1165,8 @@ const ( TaskTypeMigrateSchemaSQLServerSQLDb TaskType = "MigrateSchemaSqlServerSqlDb" // TaskTypeMigrateSQLServerAzureSQLDbMI ... TaskTypeMigrateSQLServerAzureSQLDbMI TaskType = "Migrate.SqlServer.AzureSqlDbMI" + // TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS ... + TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS TaskType = "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS" // TaskTypeMigrateSQLServerAzureSQLDbSync ... TaskTypeMigrateSQLServerAzureSQLDbSync TaskType = "Migrate.SqlServer.AzureSqlDb.Sync" // TaskTypeMigrateSQLServerSQLDb ... @@ -1087,6 +1175,8 @@ const ( TaskTypeUnknown TaskType = "Unknown" // TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI ... TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI TaskType = "ValidateMigrationInput.SqlServer.AzureSqlDbMI" + // TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS ... + TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS TaskType = "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS" // TaskTypeValidateMigrationInputSQLServerSQLDbSync ... TaskTypeValidateMigrationInputSQLServerSQLDbSync TaskType = "ValidateMigrationInput.SqlServer.SqlDb.Sync" // TaskTypeValidateMongoDb ... @@ -1095,13 +1185,15 @@ const ( // PossibleTaskTypeValues returns an array of possible values for the TaskType const type. func PossibleTaskTypeValues() []TaskType { - return []TaskType{TaskTypeConnectMongoDb, TaskTypeConnectToSourceMySQL, TaskTypeConnectToSourceSQLServer, TaskTypeConnectToSourceSQLServerSync, TaskTypeConnectToTargetAzureDbForMySQL, TaskTypeConnectToTargetAzureSQLDbMI, TaskTypeConnectToTargetSQLDb, TaskTypeConnectToTargetSQLDbSync, TaskTypeGetTDECertificatesSQL, TaskTypeGetUserTablesAzureSQLDbSync, TaskTypeGetUserTablesSQL, TaskTypeMigrateMongoDb, TaskTypeMigrateMySQLAzureDbForMySQLSync, TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync, TaskTypeMigrateSchemaSQLServerSQLDb, TaskTypeMigrateSQLServerAzureSQLDbMI, TaskTypeMigrateSQLServerAzureSQLDbSync, TaskTypeMigrateSQLServerSQLDb, TaskTypeUnknown, TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI, TaskTypeValidateMigrationInputSQLServerSQLDbSync, TaskTypeValidateMongoDb} + return []TaskType{TaskTypeConnectMongoDb, TaskTypeConnectToSourceMySQL, TaskTypeConnectToSourcePostgreSQLSync, TaskTypeConnectToSourceSQLServer, TaskTypeConnectToSourceSQLServerSync, TaskTypeConnectToTargetAzureDbForMySQL, TaskTypeConnectToTargetAzureDbForPostgreSQLSync, TaskTypeConnectToTargetAzureSQLDbMI, TaskTypeConnectToTargetAzureSQLDbMISyncLRS, TaskTypeConnectToTargetSQLDb, TaskTypeConnectToTargetSQLDbSync, TaskTypeGetTDECertificatesSQL, TaskTypeGetUserTablesAzureSQLDbSync, TaskTypeGetUserTablesSQL, TaskTypeMigrateMongoDb, TaskTypeMigrateMySQLAzureDbForMySQLSync, TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync, TaskTypeMigrateSchemaSQLServerSQLDb, TaskTypeMigrateSQLServerAzureSQLDbMI, TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS, TaskTypeMigrateSQLServerAzureSQLDbSync, TaskTypeMigrateSQLServerSQLDb, TaskTypeUnknown, TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI, TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS, TaskTypeValidateMigrationInputSQLServerSQLDbSync, TaskTypeValidateMongoDb} } // Type enumerates the values for type. type Type string const ( + // TypeMiSQLConnectionInfo ... + TypeMiSQLConnectionInfo Type = "MiSqlConnectionInfo" // TypeMongoDbConnectionInfo ... TypeMongoDbConnectionInfo Type = "MongoDbConnectionInfo" // TypeMySQLConnectionInfo ... @@ -1116,7 +1208,7 @@ const ( // PossibleTypeValues returns an array of possible values for the Type const type. func PossibleTypeValues() []Type { - return []Type{TypeMongoDbConnectionInfo, TypeMySQLConnectionInfo, TypePostgreSQLConnectionInfo, TypeSQLConnectionInfo, TypeUnknown} + return []Type{TypeMiSQLConnectionInfo, TypeMongoDbConnectionInfo, TypeMySQLConnectionInfo, TypePostgreSQLConnectionInfo, TypeSQLConnectionInfo, TypeUnknown} } // UpdateActionType enumerates the values for update action type. @@ -1203,6 +1295,50 @@ type AvailableServiceSkuSku struct { Tier *string `json:"tier,omitempty"` } +// AzureActiveDirectoryApp azure Active Directory Application +type AzureActiveDirectoryApp struct { + // ApplicationID - Application ID of the Azure Active Directory Application + ApplicationID *string `json:"applicationId,omitempty"` + // AppKey - Key used to authenticate to the Azure Active Directory Application + AppKey *string `json:"appKey,omitempty"` + // TenantID - Tenant id of the customer + TenantID *string `json:"tenantId,omitempty"` +} + +// BackupFileInfo information of the backup file +type BackupFileInfo struct { + // FileLocation - Location of the backup file in shared folder + FileLocation *string `json:"fileLocation,omitempty"` + // FamilySequenceNumber - Sequence number of the backup file in the backup set + FamilySequenceNumber *int32 `json:"familySequenceNumber,omitempty"` + // Status - Status of the backup file during migration. Possible values include: 'Arrived', 'Queued', 'Uploading', 'Uploaded', 'Restoring', 'Restored', 'Cancelled' + Status BackupFileStatus `json:"status,omitempty"` +} + +// BackupSetInfo information of backup set +type BackupSetInfo struct { + // BackupSetID - Id for the set of backup files + BackupSetID *string `json:"backupSetId,omitempty"` + // FirstLsn - First log sequence number of the backup file + FirstLsn *string `json:"firstLsn,omitempty"` + // LastLsn - Last log sequence number of the backup file + LastLsn *string `json:"lastLsn,omitempty"` + // LastModifiedTime - Last modified time of the backup file in share location + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // BackupType - Enum of the different backup types. Possible values include: 'BackupTypeDatabase', 'BackupTypeTransactionLog', 'BackupTypeFile', 'BackupTypeDifferentialDatabase', 'BackupTypeDifferentialFile', 'BackupTypePartial', 'BackupTypeDifferentialPartial' + BackupType BackupType `json:"backupType,omitempty"` + // ListOfBackupFiles - List of files in the backup set + ListOfBackupFiles *[]BackupFileInfo `json:"listOfBackupFiles,omitempty"` + // DatabaseName - Name of the database to which the backup set belongs + DatabaseName *string `json:"databaseName,omitempty"` + // BackupStartDate - Date and time that the backup operation began + BackupStartDate *date.Time `json:"backupStartDate,omitempty"` + // BackupFinishedDate - Date and time that the backup operation finished + BackupFinishedDate *date.Time `json:"backupFinishedDate,omitempty"` + // IsBackupRestored - Whether the backup set is restored or not + IsBackupRestored *bool `json:"isBackupRestored,omitempty"` +} + // BlobShare blob container storage information. type BlobShare struct { // SasURI - SAS URI of Azure Storage Account Container. @@ -1212,6 +1348,7 @@ type BlobShare struct { // BasicCommandProperties base class for all types of DMS command properties. If command is not supported by current // client, this object is returned. type BasicCommandProperties interface { + AsMigrateMISyncCompleteCommandProperties() (*MigrateMISyncCompleteCommandProperties, bool) AsMigrateSyncCompleteCommandProperties() (*MigrateSyncCompleteCommandProperties, bool) AsMongoDbCancelCommand() (*MongoDbCancelCommand, bool) AsMongoDbFinishCommand() (*MongoDbFinishCommand, bool) @@ -1227,7 +1364,7 @@ type CommandProperties struct { Errors *[]ODataError `json:"errors,omitempty"` // State - The state of the command. This is ignored if submitted. Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', 'Failed' State CommandState `json:"state,omitempty"` - // CommandType - Possible values include: 'CommandTypeUnknown', 'CommandTypeMigrateSyncCompleteDatabase', 'CommandTypeCancel', 'CommandTypeFinish', 'CommandTypeRestart' + // CommandType - Possible values include: 'CommandTypeUnknown', 'CommandTypeMigrateSQLServerAzureDbSQLMiComplete', 'CommandTypeMigrateSyncCompleteDatabase', 'CommandTypeCancel', 'CommandTypeFinish', 'CommandTypeRestart' CommandType CommandType `json:"commandType,omitempty"` } @@ -1239,6 +1376,10 @@ func unmarshalBasicCommandProperties(body []byte) (BasicCommandProperties, error } switch m["commandType"] { + case string(CommandTypeMigrateSQLServerAzureDbSQLMiComplete): + var mmsccp MigrateMISyncCompleteCommandProperties + err := json.Unmarshal(body, &mmsccp) + return mmsccp, err case string(CommandTypeMigrateSyncCompleteDatabase): var msccp MigrateSyncCompleteCommandProperties err := json.Unmarshal(body, &msccp) @@ -1296,6 +1437,11 @@ func (cp CommandProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsMigrateMISyncCompleteCommandProperties is the BasicCommandProperties implementation for CommandProperties. +func (cp CommandProperties) AsMigrateMISyncCompleteCommandProperties() (*MigrateMISyncCompleteCommandProperties, bool) { + return nil, false +} + // AsMigrateSyncCompleteCommandProperties is the BasicCommandProperties implementation for CommandProperties. func (cp CommandProperties) AsMigrateSyncCompleteCommandProperties() (*MigrateSyncCompleteCommandProperties, bool) { return nil, false @@ -1345,6 +1491,7 @@ func (cpm *CommandPropertiesModel) UnmarshalJSON(body []byte) error { // BasicConnectionInfo defines the connection properties of a server type BasicConnectionInfo interface { + AsMiSQLConnectionInfo() (*MiSQLConnectionInfo, bool) AsPostgreSQLConnectionInfo() (*PostgreSQLConnectionInfo, bool) AsMySQLConnectionInfo() (*MySQLConnectionInfo, bool) AsMongoDbConnectionInfo() (*MongoDbConnectionInfo, bool) @@ -1358,7 +1505,7 @@ type ConnectionInfo struct { UserName *string `json:"userName,omitempty"` // Password - Password credential. Password *string `json:"password,omitempty"` - // Type - Possible values include: 'TypeUnknown', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeMongoDbConnectionInfo', 'TypeSQLConnectionInfo' + // Type - Possible values include: 'TypeUnknown', 'TypeMiSQLConnectionInfo', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeMongoDbConnectionInfo', 'TypeSQLConnectionInfo' Type Type `json:"type,omitempty"` } @@ -1370,6 +1517,10 @@ func unmarshalBasicConnectionInfo(body []byte) (BasicConnectionInfo, error) { } switch m["type"] { + case string(TypeMiSQLConnectionInfo): + var msci MiSQLConnectionInfo + err := json.Unmarshal(body, &msci) + return msci, err case string(TypePostgreSQLConnectionInfo): var psci PostgreSQLConnectionInfo err := json.Unmarshal(body, &psci) @@ -1427,6 +1578,11 @@ func (ci ConnectionInfo) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsMiSQLConnectionInfo is the BasicConnectionInfo implementation for ConnectionInfo. +func (ci ConnectionInfo) AsMiSQLConnectionInfo() (*MiSQLConnectionInfo, bool) { + return nil, false +} + // AsPostgreSQLConnectionInfo is the BasicConnectionInfo implementation for ConnectionInfo. func (ci ConnectionInfo) AsPostgreSQLConnectionInfo() (*PostgreSQLConnectionInfo, bool) { return nil, false @@ -1471,7 +1627,7 @@ type ConnectToMongoDbTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -1513,6 +1669,11 @@ func (ctmdtp ConnectToMongoDbTaskProperties) AsValidateMongoDbTaskProperties() ( return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToMongoDbTaskProperties. +func (ctmdtp ConnectToMongoDbTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToMongoDbTaskProperties. func (ctmdtp ConnectToMongoDbTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -1543,6 +1704,11 @@ func (ctmdtp ConnectToMongoDbTaskProperties) AsMigrateSQLServerSQLDbTaskProperti return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToMongoDbTaskProperties. +func (ctmdtp ConnectToMongoDbTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToMongoDbTaskProperties. func (ctmdtp ConnectToMongoDbTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -1558,6 +1724,11 @@ func (ctmdtp ConnectToMongoDbTaskProperties) AsConnectToTargetAzureDbForMySQLTas return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToMongoDbTaskProperties. +func (ctmdtp ConnectToMongoDbTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToMongoDbTaskProperties. func (ctmdtp ConnectToMongoDbTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -1573,6 +1744,11 @@ func (ctmdtp ConnectToMongoDbTaskProperties) AsGetUserTablesSQLTaskProperties() return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToMongoDbTaskProperties. +func (ctmdtp ConnectToMongoDbTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToMongoDbTaskProperties. func (ctmdtp ConnectToMongoDbTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -1583,6 +1759,11 @@ func (ctmdtp ConnectToMongoDbTaskProperties) AsConnectToTargetSQLDbTaskPropertie return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToMongoDbTaskProperties. +func (ctmdtp ConnectToMongoDbTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToMongoDbTaskProperties. func (ctmdtp ConnectToMongoDbTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -1699,7 +1880,7 @@ func (ctmdtp *ConnectToMongoDbTaskProperties) UnmarshalJSON(body []byte) error { type ConnectToSourceMySQLTaskInput struct { // SourceConnectionInfo - Information for connecting to MySQL source SourceConnectionInfo *MySQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` - // TargetPlatform - Target Platform for the migration. Possible values include: 'AzureDbForMySQL' + // TargetPlatform - Target Platform for the migration. Possible values include: 'SQLServer', 'AzureDbForMySQL' TargetPlatform MySQLTargetPlatformType `json:"targetPlatform,omitempty"` // CheckPermissionsGroup - Permission group for validations. Possible values include: 'Default', 'MigrationFromSQLServerToAzureDB', 'MigrationFromSQLServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL' CheckPermissionsGroup ServerLevelPermissionsGroup `json:"checkPermissionsGroup,omitempty"` @@ -1719,7 +1900,7 @@ type ConnectToSourceMySQLTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -1761,6 +1942,11 @@ func (ctsmstp ConnectToSourceMySQLTaskProperties) AsValidateMongoDbTaskPropertie return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. func (ctsmstp ConnectToSourceMySQLTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -1791,6 +1977,11 @@ func (ctsmstp ConnectToSourceMySQLTaskProperties) AsMigrateSQLServerSQLDbTaskPro return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. func (ctsmstp ConnectToSourceMySQLTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -1806,6 +1997,11 @@ func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToTargetAzureDbForMyS return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -1821,6 +2017,11 @@ func (ctsmstp ConnectToSourceMySQLTaskProperties) AsGetUserTablesSQLTaskProperti return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -1831,6 +2032,11 @@ func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToTargetSQLDbTaskProp return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. +func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceMySQLTaskProperties. func (ctsmstp ConnectToSourceMySQLTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -1957,13 +2163,35 @@ type ConnectToSourceNonSQLTaskOutput struct { ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` } -// ConnectToSourceSQLServerSyncTaskProperties properties for the task that validates connection to SQL -// Server and source server requirements for online migration -type ConnectToSourceSQLServerSyncTaskProperties struct { +// ConnectToSourcePostgreSQLSyncTaskInput input for the task that validates connection to PostgreSQL and +// source server requirements +type ConnectToSourcePostgreSQLSyncTaskInput struct { + // SourceConnectionInfo - Connection information for source PostgreSQL server + SourceConnectionInfo *PostgreSQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` +} + +// ConnectToSourcePostgreSQLSyncTaskOutput output for the task that validates connection to PostgreSQL and +// source server requirements +type ConnectToSourcePostgreSQLSyncTaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // SourceServerVersion - Version of the source server + SourceServerVersion *string `json:"sourceServerVersion,omitempty"` + // Databases - List of databases on source server + Databases *[]string `json:"databases,omitempty"` + // SourceServerBrandVersion - Source server brand version + SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` + // ValidationErrors - Validation errors associated with the task + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` +} + +// ConnectToSourcePostgreSQLSyncTaskProperties properties for the task that validates connection to +// PostgreSQL server and source server requirements for online migration +type ConnectToSourcePostgreSQLSyncTaskProperties struct { // Input - Task input - Input *ConnectToSourceSQLServerTaskInput `json:"input,omitempty"` + Input *ConnectToSourcePostgreSQLSyncTaskInput `json:"input,omitempty"` // Output - Task output. This is ignored if submitted. - Output *[]BasicConnectToSourceSQLServerTaskOutput `json:"output,omitempty"` + Output *[]ConnectToSourcePostgreSQLSyncTaskOutput `json:"output,omitempty"` // Errors - Array of errors. This is ignored if submitted. Errors *[]ODataError `json:"errors,omitempty"` // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' @@ -1972,155 +2200,180 @@ type ConnectToSourceSQLServerSyncTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } -// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) MarshalJSON() ([]byte, error) { - ctsssstp.TaskType = TaskTypeConnectToSourceSQLServerSync +// MarshalJSON is the custom marshaler for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) MarshalJSON() ([]byte, error) { + ctspsstp.TaskType = TaskTypeConnectToSourcePostgreSQLSync objectMap := make(map[string]interface{}) - if ctsssstp.Input != nil { - objectMap["input"] = ctsssstp.Input + if ctspsstp.Input != nil { + objectMap["input"] = ctspsstp.Input } - if ctsssstp.Output != nil { - objectMap["output"] = ctsssstp.Output + if ctspsstp.Output != nil { + objectMap["output"] = ctspsstp.Output } - if ctsssstp.Errors != nil { - objectMap["errors"] = ctsssstp.Errors + if ctspsstp.Errors != nil { + objectMap["errors"] = ctspsstp.Errors } - if ctsssstp.State != "" { - objectMap["state"] = ctsssstp.State + if ctspsstp.State != "" { + objectMap["state"] = ctspsstp.State } - if ctsssstp.Commands != nil { - objectMap["commands"] = ctsssstp.Commands + if ctspsstp.Commands != nil { + objectMap["commands"] = ctspsstp.Commands } - if ctsssstp.ClientData != nil { - objectMap["clientData"] = ctsssstp.ClientData + if ctspsstp.ClientData != nil { + objectMap["clientData"] = ctspsstp.ClientData } - if ctsssstp.TaskType != "" { - objectMap["taskType"] = ctsssstp.TaskType + if ctspsstp.TaskType != "" { + objectMap["taskType"] = ctspsstp.TaskType } return json.Marshal(objectMap) } -// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { return nil, false } -// AsValidateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsValidateMongoDbTaskProperties() (*ValidateMongoDbTaskProperties, bool) { +// AsValidateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsValidateMongoDbTaskProperties() (*ValidateMongoDbTaskProperties, bool) { return nil, false } -// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { return nil, false } -// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false } -// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { return nil, false } -// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { return nil, false } -// AsMigrateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateMongoDbTaskProperties() (*MigrateMongoDbTaskProperties, bool) { +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { return nil, false } -// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false } -// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { +// AsMigrateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsMigrateMongoDbTaskProperties() (*MigrateMongoDbTaskProperties, bool) { return nil, false } -// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { return nil, false } -// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { return nil, false } -// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false } -// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { - return &ctsssstp, true +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false } -// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { return nil, false } -// AsConnectToMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToMongoDbTaskProperties() (*ConnectToMongoDbTaskProperties, bool) { +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false } -// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { return nil, false } -// AsMigrateSchemaSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateSchemaSQLServerSQLDbTaskProperties() (*MigrateSchemaSQLServerSQLDbTaskProperties, bool) { +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return &ctspsstp, true +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false } -// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { return nil, false } -// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. -func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { - return &ctsssstp, true +// AsConnectToMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToMongoDbTaskProperties() (*ConnectToMongoDbTaskProperties, bool) { + return nil, false } -// UnmarshalJSON is the custom unmarshaler for ConnectToSourceSQLServerSyncTaskProperties struct. -func (ctsssstp *ConnectToSourceSQLServerSyncTaskProperties) UnmarshalJSON(body []byte) error { +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsMigrateSchemaSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsMigrateSchemaSQLServerSQLDbTaskProperties() (*MigrateSchemaSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourcePostgreSQLSyncTaskProperties. +func (ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &ctspsstp, true +} + +// UnmarshalJSON is the custom unmarshaler for ConnectToSourcePostgreSQLSyncTaskProperties struct. +func (ctspsstp *ConnectToSourcePostgreSQLSyncTaskProperties) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -2130,20 +2383,21 @@ func (ctsssstp *ConnectToSourceSQLServerSyncTaskProperties) UnmarshalJSON(body [ switch k { case "input": if v != nil { - var input ConnectToSourceSQLServerTaskInput + var input ConnectToSourcePostgreSQLSyncTaskInput err = json.Unmarshal(*v, &input) if err != nil { return err } - ctsssstp.Input = &input + ctspsstp.Input = &input } case "output": if v != nil { - output, err := unmarshalBasicConnectToSourceSQLServerTaskOutputArray(*v) + var output []ConnectToSourcePostgreSQLSyncTaskOutput + err = json.Unmarshal(*v, &output) if err != nil { return err } - ctsssstp.Output = &output + ctspsstp.Output = &output } case "errors": if v != nil { @@ -2152,7 +2406,7 @@ func (ctsssstp *ConnectToSourceSQLServerSyncTaskProperties) UnmarshalJSON(body [ if err != nil { return err } - ctsssstp.Errors = &errorsVar + ctspsstp.Errors = &errorsVar } case "state": if v != nil { @@ -2161,7 +2415,7 @@ func (ctsssstp *ConnectToSourceSQLServerSyncTaskProperties) UnmarshalJSON(body [ if err != nil { return err } - ctsssstp.State = state + ctspsstp.State = state } case "commands": if v != nil { @@ -2169,7 +2423,7 @@ func (ctsssstp *ConnectToSourceSQLServerSyncTaskProperties) UnmarshalJSON(body [ if err != nil { return err } - ctsssstp.Commands = &commands + ctspsstp.Commands = &commands } case "clientData": if v != nil { @@ -2178,7 +2432,7 @@ func (ctsssstp *ConnectToSourceSQLServerSyncTaskProperties) UnmarshalJSON(body [ if err != nil { return err } - ctsssstp.ClientData = clientData + ctspsstp.ClientData = clientData } case "taskType": if v != nil { @@ -2187,7 +2441,7 @@ func (ctsssstp *ConnectToSourceSQLServerSyncTaskProperties) UnmarshalJSON(body [ if err != nil { return err } - ctsssstp.TaskType = taskType + ctspsstp.TaskType = taskType } } } @@ -2195,44 +2449,307 @@ func (ctsssstp *ConnectToSourceSQLServerSyncTaskProperties) UnmarshalJSON(body [ return nil } -// ConnectToSourceSQLServerTaskInput input for the task that validates connection to SQL Server and also -// validates source server requirements -type ConnectToSourceSQLServerTaskInput struct { - // SourceConnectionInfo - Connection information for Source SQL Server - SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` - // CheckPermissionsGroup - Permission group for validations. Possible values include: 'Default', 'MigrationFromSQLServerToAzureDB', 'MigrationFromSQLServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL' - CheckPermissionsGroup ServerLevelPermissionsGroup `json:"checkPermissionsGroup,omitempty"` - // CollectLogins - Flag for whether to collect logins from source server. - CollectLogins *bool `json:"collectLogins,omitempty"` - // CollectAgentJobs - Flag for whether to collect agent jobs from source server. - CollectAgentJobs *bool `json:"collectAgentJobs,omitempty"` - // CollectTdeCertificateInfo - Flag for whether to collect TDE Certificate names from source server. - CollectTdeCertificateInfo *bool `json:"collectTdeCertificateInfo,omitempty"` +// ConnectToSourceSQLServerSyncTaskProperties properties for the task that validates connection to SQL +// Server and source server requirements for online migration +type ConnectToSourceSQLServerSyncTaskProperties struct { + // Input - Task input + Input *ConnectToSourceSQLServerTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]BasicConnectToSourceSQLServerTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // ClientData - Key value pairs of client data to attach meta data information to task + ClientData map[string]*string `json:"clientData"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + TaskType TaskType `json:"taskType,omitempty"` } -// BasicConnectToSourceSQLServerTaskOutput output for the task that validates connection to SQL Server and also -// validates source server requirements -type BasicConnectToSourceSQLServerTaskOutput interface { - AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) - AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) - AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) - AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) - AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) +// MarshalJSON is the custom marshaler for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) MarshalJSON() ([]byte, error) { + ctsssstp.TaskType = TaskTypeConnectToSourceSQLServerSync + objectMap := make(map[string]interface{}) + if ctsssstp.Input != nil { + objectMap["input"] = ctsssstp.Input + } + if ctsssstp.Output != nil { + objectMap["output"] = ctsssstp.Output + } + if ctsssstp.Errors != nil { + objectMap["errors"] = ctsssstp.Errors + } + if ctsssstp.State != "" { + objectMap["state"] = ctsssstp.State + } + if ctsssstp.Commands != nil { + objectMap["commands"] = ctsssstp.Commands + } + if ctsssstp.ClientData != nil { + objectMap["clientData"] = ctsssstp.ClientData + } + if ctsssstp.TaskType != "" { + objectMap["taskType"] = ctsssstp.TaskType + } + return json.Marshal(objectMap) } -// ConnectToSourceSQLServerTaskOutput output for the task that validates connection to SQL Server and also -// validates source server requirements -type ConnectToSourceSQLServerTaskOutput struct { - // ID - Result identifier - ID *string `json:"id,omitempty"` - // ResultType - Possible values include: 'ResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeAgentJobLevelOutput', 'ResultTypeLoginLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeTaskLevelOutput' - ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"` +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false } -func unmarshalBasicConnectToSourceSQLServerTaskOutput(body []byte) (BasicConnectToSourceSQLServerTaskOutput, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { +// AsValidateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsValidateMongoDbTaskProperties() (*ValidateMongoDbTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsMigrateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateMongoDbTaskProperties() (*MigrateMongoDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return &ctsssstp, true +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToMongoDbTaskProperties() (*ConnectToMongoDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsMigrateSchemaSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsMigrateSchemaSQLServerSQLDbTaskProperties() (*MigrateSchemaSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerSyncTaskProperties. +func (ctsssstp ConnectToSourceSQLServerSyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &ctsssstp, true +} + +// UnmarshalJSON is the custom unmarshaler for ConnectToSourceSQLServerSyncTaskProperties struct. +func (ctsssstp *ConnectToSourceSQLServerSyncTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input ConnectToSourceSQLServerTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + ctsssstp.Input = &input + } + case "output": + if v != nil { + output, err := unmarshalBasicConnectToSourceSQLServerTaskOutputArray(*v) + if err != nil { + return err + } + ctsssstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + ctsssstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + ctsssstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + ctsssstp.Commands = &commands + } + case "clientData": + if v != nil { + var clientData map[string]*string + err = json.Unmarshal(*v, &clientData) + if err != nil { + return err + } + ctsssstp.ClientData = clientData + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + ctsssstp.TaskType = taskType + } + } + } + + return nil +} + +// ConnectToSourceSQLServerTaskInput input for the task that validates connection to SQL Server and also +// validates source server requirements +type ConnectToSourceSQLServerTaskInput struct { + // SourceConnectionInfo - Connection information for Source SQL Server + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // CheckPermissionsGroup - Permission group for validations. Possible values include: 'Default', 'MigrationFromSQLServerToAzureDB', 'MigrationFromSQLServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL' + CheckPermissionsGroup ServerLevelPermissionsGroup `json:"checkPermissionsGroup,omitempty"` + // CollectLogins - Flag for whether to collect logins from source server. + CollectLogins *bool `json:"collectLogins,omitempty"` + // CollectAgentJobs - Flag for whether to collect agent jobs from source server. + CollectAgentJobs *bool `json:"collectAgentJobs,omitempty"` + // CollectTdeCertificateInfo - Flag for whether to collect TDE Certificate names from source server. + CollectTdeCertificateInfo *bool `json:"collectTdeCertificateInfo,omitempty"` +} + +// BasicConnectToSourceSQLServerTaskOutput output for the task that validates connection to SQL Server and also +// validates source server requirements +type BasicConnectToSourceSQLServerTaskOutput interface { + AsConnectToSourceSQLServerTaskOutputAgentJobLevel() (*ConnectToSourceSQLServerTaskOutputAgentJobLevel, bool) + AsConnectToSourceSQLServerTaskOutputLoginLevel() (*ConnectToSourceSQLServerTaskOutputLoginLevel, bool) + AsConnectToSourceSQLServerTaskOutputDatabaseLevel() (*ConnectToSourceSQLServerTaskOutputDatabaseLevel, bool) + AsConnectToSourceSQLServerTaskOutputTaskLevel() (*ConnectToSourceSQLServerTaskOutputTaskLevel, bool) + AsConnectToSourceSQLServerTaskOutput() (*ConnectToSourceSQLServerTaskOutput, bool) +} + +// ConnectToSourceSQLServerTaskOutput output for the task that validates connection to SQL Server and also +// validates source server requirements +type ConnectToSourceSQLServerTaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeConnectToSourceSQLServerTaskOutput', 'ResultTypeAgentJobLevelOutput', 'ResultTypeLoginLevelOutput', 'ResultTypeDatabaseLevelOutput', 'ResultTypeTaskLevelOutput' + ResultType ResultTypeBasicConnectToSourceSQLServerTaskOutput `json:"resultType,omitempty"` +} + +func unmarshalBasicConnectToSourceSQLServerTaskOutput(body []byte) (BasicConnectToSourceSQLServerTaskOutput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { return nil, err } @@ -2419,7 +2936,7 @@ type ConnectToSourceSQLServerTaskOutputDatabaseLevel struct { DatabaseFiles *[]DatabaseFileInfo `json:"databaseFiles,omitempty"` // CompatibilityLevel - SQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140' CompatibilityLevel DatabaseCompatLevel `json:"compatibilityLevel,omitempty"` - // DatabaseState - State of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary' + // DatabaseState - State of the database. Possible values include: 'DatabaseStateOnline', 'DatabaseStateRestoring', 'DatabaseStateRecovering', 'DatabaseStateRecoveryPending', 'DatabaseStateSuspect', 'DatabaseStateEmergency', 'DatabaseStateOffline', 'DatabaseStateCopying', 'DatabaseStateOfflineSecondary' DatabaseState DatabaseState `json:"databaseState,omitempty"` // ID - Result identifier ID *string `json:"id,omitempty"` @@ -2664,7 +3181,7 @@ type ConnectToSourceSQLServerTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -2706,6 +3223,11 @@ func (ctssstp ConnectToSourceSQLServerTaskProperties) AsValidateMongoDbTaskPrope return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. func (ctssstp ConnectToSourceSQLServerTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -2736,6 +3258,11 @@ func (ctssstp ConnectToSourceSQLServerTaskProperties) AsMigrateSQLServerSQLDbTas return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. func (ctssstp ConnectToSourceSQLServerTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -2751,6 +3278,11 @@ func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetAzureDbFo return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -2766,6 +3298,11 @@ func (ctssstp ConnectToSourceSQLServerTaskProperties) AsGetUserTablesSQLTaskProp return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -2776,6 +3313,11 @@ func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToTargetSQLDbTask return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. +func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToSourceSQLServerTaskProperties. func (ctssstp ConnectToSourceSQLServerTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -2926,7 +3468,7 @@ type ConnectToTargetAzureDbForMySQLTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -2968,8 +3510,13 @@ func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsValidateMongoDb return nil, false } -// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. -func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false } @@ -2998,6 +3545,11 @@ func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsMigrateSQLServe return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -3013,6 +3565,11 @@ func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToTarget return &cttadfmstp, true } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -3028,6 +3585,11 @@ func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsGetUserTablesSQ return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -3038,6 +3600,11 @@ func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToTarget return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. +func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForMySQLTaskProperties. func (cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -3150,6 +3717,294 @@ func (cttadfmstp *ConnectToTargetAzureDbForMySQLTaskProperties) UnmarshalJSON(bo return nil } +// ConnectToTargetAzureDbForPostgreSQLSyncTaskInput input for the task that validates connection to Azure +// Database for PostgreSQL and target server requirements +type ConnectToTargetAzureDbForPostgreSQLSyncTaskInput struct { + // SourceConnectionInfo - Connection information for source PostgreSQL server + SourceConnectionInfo *PostgreSQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Connection information for target Azure Database for PostgreSQL server + TargetConnectionInfo *PostgreSQLConnectionInfo `json:"targetConnectionInfo,omitempty"` +} + +// ConnectToTargetAzureDbForPostgreSQLSyncTaskOutput output for the task that validates connection to Azure +// Database for PostgreSQL and target server requirements +type ConnectToTargetAzureDbForPostgreSQLSyncTaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // TargetServerVersion - Version of the target server + TargetServerVersion *string `json:"targetServerVersion,omitempty"` + // Databases - List of databases on target server + Databases *[]string `json:"databases,omitempty"` + // TargetServerBrandVersion - Target server brand version + TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` + // ValidationErrors - Validation errors associated with the task + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` +} + +// ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties properties for the task that validates connection +// to Azure Database For PostgreSQL server and target server requirements for online migration +type ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties struct { + // Input - Task input + Input *ConnectToTargetAzureDbForPostgreSQLSyncTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]ConnectToTargetAzureDbForPostgreSQLSyncTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // ClientData - Key value pairs of client data to attach meta data information to task + ClientData map[string]*string `json:"clientData"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) MarshalJSON() ([]byte, error) { + cttadfpsstp.TaskType = TaskTypeConnectToTargetAzureDbForPostgreSQLSync + objectMap := make(map[string]interface{}) + if cttadfpsstp.Input != nil { + objectMap["input"] = cttadfpsstp.Input + } + if cttadfpsstp.Output != nil { + objectMap["output"] = cttadfpsstp.Output + } + if cttadfpsstp.Errors != nil { + objectMap["errors"] = cttadfpsstp.Errors + } + if cttadfpsstp.State != "" { + objectMap["state"] = cttadfpsstp.State + } + if cttadfpsstp.Commands != nil { + objectMap["commands"] = cttadfpsstp.Commands + } + if cttadfpsstp.ClientData != nil { + objectMap["clientData"] = cttadfpsstp.ClientData + } + if cttadfpsstp.TaskType != "" { + objectMap["taskType"] = cttadfpsstp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsValidateMongoDbTaskProperties() (*ValidateMongoDbTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsMigrateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsMigrateMongoDbTaskProperties() (*MigrateMongoDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return &cttadfpsstp, true +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToMongoDbTaskProperties() (*ConnectToMongoDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsMigrateSchemaSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSchemaSQLServerSQLDbTaskProperties() (*MigrateSchemaSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties. +func (cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &cttadfpsstp, true +} + +// UnmarshalJSON is the custom unmarshaler for ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties struct. +func (cttadfpsstp *ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input ConnectToTargetAzureDbForPostgreSQLSyncTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + cttadfpsstp.Input = &input + } + case "output": + if v != nil { + var output []ConnectToTargetAzureDbForPostgreSQLSyncTaskOutput + err = json.Unmarshal(*v, &output) + if err != nil { + return err + } + cttadfpsstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + cttadfpsstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + cttadfpsstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + cttadfpsstp.Commands = &commands + } + case "clientData": + if v != nil { + var clientData map[string]*string + err = json.Unmarshal(*v, &clientData) + if err != nil { + return err + } + cttadfpsstp.ClientData = clientData + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + cttadfpsstp.TaskType = taskType + } + } + } + + return nil +} + // ConnectToTargetSQLDbTaskInput input for the task that validates connection to SQL DB and target server // requirements type ConnectToTargetSQLDbTaskInput struct { @@ -3203,7 +4058,7 @@ type ConnectToTargetSQLDbTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -3245,6 +4100,11 @@ func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsValidateMongoDbTaskPropertie return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -3275,6 +4135,11 @@ func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsMigrateSQLServerSQLDbTaskPro return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -3290,6 +4155,11 @@ func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetAzureDbForMyS return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -3305,6 +4175,11 @@ func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsGetUserTablesSQLTaskProperti return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -3315,6 +4190,11 @@ func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToTargetSQLDbTaskProp return &cttsdtp, true } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. +func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLDbTaskProperties. func (cttsdtp ConnectToTargetSQLDbTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -3427,37 +4307,33 @@ func (cttsdtp *ConnectToTargetSQLDbTaskProperties) UnmarshalJSON(body []byte) er return nil } -// ConnectToTargetSQLMITaskInput input for the task that validates connection to Azure SQL Database Managed -// Instance. -type ConnectToTargetSQLMITaskInput struct { - // TargetConnectionInfo - Connection information for target SQL Server - TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` +// ConnectToTargetSQLMISyncTaskInput input for the task that validates connection to Azure SQL Database +// Managed Instance online scenario. +type ConnectToTargetSQLMISyncTaskInput struct { + // TargetConnectionInfo - Connection information for Azure SQL Database Managed Instance + TargetConnectionInfo *MiSQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // AzureApp - Azure Active Directory Application the DMS instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account + AzureApp *AzureActiveDirectoryApp `json:"azureApp,omitempty"` } -// ConnectToTargetSQLMITaskOutput output for the task that validates connection to Azure SQL Database +// ConnectToTargetSQLMISyncTaskOutput output for the task that validates connection to Azure SQL Database // Managed Instance. -type ConnectToTargetSQLMITaskOutput struct { - // ID - Result identifier - ID *string `json:"id,omitempty"` +type ConnectToTargetSQLMISyncTaskOutput struct { // TargetServerVersion - Target server version TargetServerVersion *string `json:"targetServerVersion,omitempty"` // TargetServerBrandVersion - Target server brand version TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - // Logins - List of logins on the target server. - Logins *[]string `json:"logins,omitempty"` - // AgentJobs - List of agent jobs on the target server. - AgentJobs *[]string `json:"agentJobs,omitempty"` // ValidationErrors - Validation errors ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` } -// ConnectToTargetSQLMITaskProperties properties for the task that validates connection to Azure SQL +// ConnectToTargetSQLMISyncTaskProperties properties for the task that validates connection to Azure SQL // Database Managed Instance -type ConnectToTargetSQLMITaskProperties struct { +type ConnectToTargetSQLMISyncTaskProperties struct { // Input - Task input - Input *ConnectToTargetSQLMITaskInput `json:"input,omitempty"` + Input *ConnectToTargetSQLMISyncTaskInput `json:"input,omitempty"` // Output - Task output. This is ignored if submitted. - Output *[]ConnectToTargetSQLMITaskOutput `json:"output,omitempty"` + Output *[]ConnectToTargetSQLMISyncTaskOutput `json:"output,omitempty"` // Errors - Array of errors. This is ignored if submitted. Errors *[]ODataError `json:"errors,omitempty"` // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' @@ -3466,40 +4342,328 @@ type ConnectToTargetSQLMITaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } -// MarshalJSON is the custom marshaler for ConnectToTargetSQLMITaskProperties. -func (cttsmtp ConnectToTargetSQLMITaskProperties) MarshalJSON() ([]byte, error) { - cttsmtp.TaskType = TaskTypeConnectToTargetAzureSQLDbMI +// MarshalJSON is the custom marshaler for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) MarshalJSON() ([]byte, error) { + cttsmstp.TaskType = TaskTypeConnectToTargetAzureSQLDbMISyncLRS objectMap := make(map[string]interface{}) - if cttsmtp.Input != nil { - objectMap["input"] = cttsmtp.Input + if cttsmstp.Input != nil { + objectMap["input"] = cttsmstp.Input } - if cttsmtp.Output != nil { - objectMap["output"] = cttsmtp.Output + if cttsmstp.Output != nil { + objectMap["output"] = cttsmstp.Output } - if cttsmtp.Errors != nil { - objectMap["errors"] = cttsmtp.Errors + if cttsmstp.Errors != nil { + objectMap["errors"] = cttsmstp.Errors } - if cttsmtp.State != "" { - objectMap["state"] = cttsmtp.State + if cttsmstp.State != "" { + objectMap["state"] = cttsmstp.State } - if cttsmtp.Commands != nil { - objectMap["commands"] = cttsmtp.Commands + if cttsmstp.Commands != nil { + objectMap["commands"] = cttsmstp.Commands } - if cttsmtp.ClientData != nil { - objectMap["clientData"] = cttsmtp.ClientData + if cttsmstp.ClientData != nil { + objectMap["clientData"] = cttsmstp.ClientData } - if cttsmtp.TaskType != "" { - objectMap["taskType"] = cttsmtp.TaskType + if cttsmstp.TaskType != "" { + objectMap["taskType"] = cttsmstp.TaskType } return json.Marshal(objectMap) } -// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. -func (cttsmtp ConnectToTargetSQLMITaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsValidateMongoDbTaskProperties() (*ValidateMongoDbTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsMigrateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsMigrateMongoDbTaskProperties() (*MigrateMongoDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return &cttsmstp, true +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToMongoDbTaskProperties() (*ConnectToMongoDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsMigrateSchemaSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsMigrateSchemaSQLServerSQLDbTaskProperties() (*MigrateSchemaSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMISyncTaskProperties. +func (cttsmstp ConnectToTargetSQLMISyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &cttsmstp, true +} + +// UnmarshalJSON is the custom unmarshaler for ConnectToTargetSQLMISyncTaskProperties struct. +func (cttsmstp *ConnectToTargetSQLMISyncTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input ConnectToTargetSQLMISyncTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + cttsmstp.Input = &input + } + case "output": + if v != nil { + var output []ConnectToTargetSQLMISyncTaskOutput + err = json.Unmarshal(*v, &output) + if err != nil { + return err + } + cttsmstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + cttsmstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + cttsmstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + cttsmstp.Commands = &commands + } + case "clientData": + if v != nil { + var clientData map[string]*string + err = json.Unmarshal(*v, &clientData) + if err != nil { + return err + } + cttsmstp.ClientData = clientData + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + cttsmstp.TaskType = taskType + } + } + } + + return nil +} + +// ConnectToTargetSQLMITaskInput input for the task that validates connection to Azure SQL Database Managed +// Instance. +type ConnectToTargetSQLMITaskInput struct { + // TargetConnectionInfo - Connection information for target SQL Server + TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` +} + +// ConnectToTargetSQLMITaskOutput output for the task that validates connection to Azure SQL Database +// Managed Instance. +type ConnectToTargetSQLMITaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // TargetServerVersion - Target server version + TargetServerVersion *string `json:"targetServerVersion,omitempty"` + // TargetServerBrandVersion - Target server brand version + TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` + // Logins - List of logins on the target server. + Logins *[]string `json:"logins,omitempty"` + // AgentJobs - List of agent jobs on the target server. + AgentJobs *[]string `json:"agentJobs,omitempty"` + // ValidationErrors - Validation errors + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` +} + +// ConnectToTargetSQLMITaskProperties properties for the task that validates connection to Azure SQL +// Database Managed Instance +type ConnectToTargetSQLMITaskProperties struct { + // Input - Task input + Input *ConnectToTargetSQLMITaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]ConnectToTargetSQLMITaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // ClientData - Key value pairs of client data to attach meta data information to task + ClientData map[string]*string `json:"clientData"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) MarshalJSON() ([]byte, error) { + cttsmtp.TaskType = TaskTypeConnectToTargetAzureSQLDbMI + objectMap := make(map[string]interface{}) + if cttsmtp.Input != nil { + objectMap["input"] = cttsmtp.Input + } + if cttsmtp.Output != nil { + objectMap["output"] = cttsmtp.Output + } + if cttsmtp.Errors != nil { + objectMap["errors"] = cttsmtp.Errors + } + if cttsmtp.State != "" { + objectMap["state"] = cttsmtp.State + } + if cttsmtp.Commands != nil { + objectMap["commands"] = cttsmtp.Commands + } + if cttsmtp.ClientData != nil { + objectMap["clientData"] = cttsmtp.ClientData + } + if cttsmtp.TaskType != "" { + objectMap["taskType"] = cttsmtp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { return nil, false } @@ -3508,6 +4672,11 @@ func (cttsmtp ConnectToTargetSQLMITaskProperties) AsValidateMongoDbTaskPropertie return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. func (cttsmtp ConnectToTargetSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -3538,6 +4707,11 @@ func (cttsmtp ConnectToTargetSQLMITaskProperties) AsMigrateSQLServerSQLDbTaskPro return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. func (cttsmtp ConnectToTargetSQLMITaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -3553,6 +4727,11 @@ func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetAzureDbForMyS return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return &cttsmtp, true @@ -3568,6 +4747,11 @@ func (cttsmtp ConnectToTargetSQLMITaskProperties) AsGetUserTablesSQLTaskProperti return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -3578,6 +4762,11 @@ func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToTargetSQLDbTaskProp return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. +func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLMITaskProperties. func (cttsmtp ConnectToTargetSQLMITaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -3714,7 +4903,7 @@ type ConnectToTargetSQLSQLDbSyncTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -3756,6 +4945,11 @@ func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsValidateMongoDbTask return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -3786,6 +4980,11 @@ func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsMigrateSQLServerSQL return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -3801,6 +5000,11 @@ func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToTargetAzur return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -3816,6 +5020,11 @@ func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsGetUserTablesSQLTas return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return &cttssdstp, true @@ -3826,6 +5035,11 @@ func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToTargetSQLD return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. +func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ConnectToTargetSQLSQLDbSyncTaskProperties. func (cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -3970,7 +5184,7 @@ type Database struct { ServerCoreCount *int32 `json:"serverCoreCount,omitempty"` // ServerVisibleOnlineCoreCount - Number of cores on the server that have VISIBLE ONLINE status ServerVisibleOnlineCoreCount *int32 `json:"serverVisibleOnlineCoreCount,omitempty"` - // DatabaseState - State of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary' + // DatabaseState - State of the database. Possible values include: 'DatabaseStateOnline', 'DatabaseStateRestoring', 'DatabaseStateRecovering', 'DatabaseStateRecoveryPending', 'DatabaseStateSuspect', 'DatabaseStateEmergency', 'DatabaseStateOffline', 'DatabaseStateCopying', 'DatabaseStateOfflineSecondary' DatabaseState DatabaseState `json:"databaseState,omitempty"` // ServerID - The unique Server Id ServerID *string `json:"serverId,omitempty"` @@ -4397,7 +5611,7 @@ type GetTdeCertificatesSQLTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -4439,6 +5653,11 @@ func (gtcstp GetTdeCertificatesSQLTaskProperties) AsValidateMongoDbTaskPropertie return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. func (gtcstp GetTdeCertificatesSQLTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -4469,6 +5688,11 @@ func (gtcstp GetTdeCertificatesSQLTaskProperties) AsMigrateSQLServerSQLDbTaskPro return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. func (gtcstp GetTdeCertificatesSQLTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -4484,6 +5708,11 @@ func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToTargetAzureDbForMyS return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -4499,6 +5728,11 @@ func (gtcstp GetTdeCertificatesSQLTaskProperties) AsGetUserTablesSQLTaskProperti return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -4509,6 +5743,11 @@ func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToTargetSQLDbTaskProp return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. +func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for GetTdeCertificatesSQLTaskProperties. func (gtcstp GetTdeCertificatesSQLTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -4680,7 +5919,7 @@ type GetUserTablesSQLSyncTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -4722,6 +5961,11 @@ func (gutsstp GetUserTablesSQLSyncTaskProperties) AsValidateMongoDbTaskPropertie return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. func (gutsstp GetUserTablesSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -4752,6 +5996,11 @@ func (gutsstp GetUserTablesSQLSyncTaskProperties) AsMigrateSQLServerSQLDbTaskPro return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. func (gutsstp GetUserTablesSQLSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -4767,6 +6016,11 @@ func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToTargetAzureDbForMyS return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -4782,6 +6036,11 @@ func (gutsstp GetUserTablesSQLSyncTaskProperties) AsGetUserTablesSQLTaskProperti return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -4792,6 +6051,11 @@ func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToTargetSQLDbTaskProp return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. +func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLSyncTaskProperties. func (gutsstp GetUserTablesSQLSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -4952,7 +6216,7 @@ type GetUserTablesSQLTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -4994,6 +6258,11 @@ func (gutstp GetUserTablesSQLTaskProperties) AsValidateMongoDbTaskProperties() ( return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. func (gutstp GetUserTablesSQLTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -5024,6 +6293,11 @@ func (gutstp GetUserTablesSQLTaskProperties) AsMigrateSQLServerSQLDbTaskProperti return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. func (gutstp GetUserTablesSQLTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -5039,6 +6313,11 @@ func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetAzureDbForMySQLTas return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -5054,6 +6333,11 @@ func (gutstp GetUserTablesSQLTaskProperties) AsGetUserTablesSQLTaskProperties() return &gutstp, true } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -5064,6 +6348,11 @@ func (gutstp GetUserTablesSQLTaskProperties) AsConnectToTargetSQLDbTaskPropertie return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. +func (gutstp GetUserTablesSQLTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for GetUserTablesSQLTaskProperties. func (gutstp GetUserTablesSQLTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -5176,6 +6465,92 @@ func (gutstp *GetUserTablesSQLTaskProperties) UnmarshalJSON(body []byte) error { return nil } +// MigrateMISyncCompleteCommandInput input for command that completes online migration for an Azure SQL +// Database Managed Instance. +type MigrateMISyncCompleteCommandInput struct { + // SourceDatabaseName - Name of managed instance database + SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` +} + +// MigrateMISyncCompleteCommandOutput output for command that completes online migration for an Azure SQL +// Database Managed Instance. +type MigrateMISyncCompleteCommandOutput struct { + // Errors - List of errors that happened during the command execution + Errors *[]ReportableException `json:"errors,omitempty"` +} + +// MigrateMISyncCompleteCommandProperties properties for the command that completes online migration for an +// Azure SQL Database Managed Instance. +type MigrateMISyncCompleteCommandProperties struct { + // Input - Command input + Input *MigrateMISyncCompleteCommandInput `json:"input,omitempty"` + // Output - Command output. This is ignored if submitted. + Output *MigrateMISyncCompleteCommandOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the command. This is ignored if submitted. Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', 'Failed' + State CommandState `json:"state,omitempty"` + // CommandType - Possible values include: 'CommandTypeUnknown', 'CommandTypeMigrateSQLServerAzureDbSQLMiComplete', 'CommandTypeMigrateSyncCompleteDatabase', 'CommandTypeCancel', 'CommandTypeFinish', 'CommandTypeRestart' + CommandType CommandType `json:"commandType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateMISyncCompleteCommandProperties. +func (mmsccp MigrateMISyncCompleteCommandProperties) MarshalJSON() ([]byte, error) { + mmsccp.CommandType = CommandTypeMigrateSQLServerAzureDbSQLMiComplete + objectMap := make(map[string]interface{}) + if mmsccp.Input != nil { + objectMap["input"] = mmsccp.Input + } + if mmsccp.Output != nil { + objectMap["output"] = mmsccp.Output + } + if mmsccp.Errors != nil { + objectMap["errors"] = mmsccp.Errors + } + if mmsccp.State != "" { + objectMap["state"] = mmsccp.State + } + if mmsccp.CommandType != "" { + objectMap["commandType"] = mmsccp.CommandType + } + return json.Marshal(objectMap) +} + +// AsMigrateMISyncCompleteCommandProperties is the BasicCommandProperties implementation for MigrateMISyncCompleteCommandProperties. +func (mmsccp MigrateMISyncCompleteCommandProperties) AsMigrateMISyncCompleteCommandProperties() (*MigrateMISyncCompleteCommandProperties, bool) { + return &mmsccp, true +} + +// AsMigrateSyncCompleteCommandProperties is the BasicCommandProperties implementation for MigrateMISyncCompleteCommandProperties. +func (mmsccp MigrateMISyncCompleteCommandProperties) AsMigrateSyncCompleteCommandProperties() (*MigrateSyncCompleteCommandProperties, bool) { + return nil, false +} + +// AsMongoDbCancelCommand is the BasicCommandProperties implementation for MigrateMISyncCompleteCommandProperties. +func (mmsccp MigrateMISyncCompleteCommandProperties) AsMongoDbCancelCommand() (*MongoDbCancelCommand, bool) { + return nil, false +} + +// AsMongoDbFinishCommand is the BasicCommandProperties implementation for MigrateMISyncCompleteCommandProperties. +func (mmsccp MigrateMISyncCompleteCommandProperties) AsMongoDbFinishCommand() (*MongoDbFinishCommand, bool) { + return nil, false +} + +// AsMongoDbRestartCommand is the BasicCommandProperties implementation for MigrateMISyncCompleteCommandProperties. +func (mmsccp MigrateMISyncCompleteCommandProperties) AsMongoDbRestartCommand() (*MongoDbRestartCommand, bool) { + return nil, false +} + +// AsCommandProperties is the BasicCommandProperties implementation for MigrateMISyncCompleteCommandProperties. +func (mmsccp MigrateMISyncCompleteCommandProperties) AsCommandProperties() (*CommandProperties, bool) { + return nil, false +} + +// AsBasicCommandProperties is the BasicCommandProperties implementation for MigrateMISyncCompleteCommandProperties. +func (mmsccp MigrateMISyncCompleteCommandProperties) AsBasicCommandProperties() (BasicCommandProperties, bool) { + return &mmsccp, true +} + // MigrateMongoDbTaskProperties properties for the task that migrates data between MongoDB data sources type MigrateMongoDbTaskProperties struct { Input *MongoDbMigrationSettings `json:"input,omitempty"` @@ -5188,7 +6563,7 @@ type MigrateMongoDbTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -5230,6 +6605,11 @@ func (mmdtp MigrateMongoDbTaskProperties) AsValidateMongoDbTaskProperties() (*Va return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMongoDbTaskProperties. +func (mmdtp MigrateMongoDbTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateMongoDbTaskProperties. func (mmdtp MigrateMongoDbTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -5260,6 +6640,11 @@ func (mmdtp MigrateMongoDbTaskProperties) AsMigrateSQLServerSQLDbTaskProperties( return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMongoDbTaskProperties. +func (mmdtp MigrateMongoDbTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateMongoDbTaskProperties. func (mmdtp MigrateMongoDbTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -5275,6 +6660,11 @@ func (mmdtp MigrateMongoDbTaskProperties) AsConnectToTargetAzureDbForMySQLTaskPr return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMongoDbTaskProperties. +func (mmdtp MigrateMongoDbTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateMongoDbTaskProperties. func (mmdtp MigrateMongoDbTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -5290,6 +6680,11 @@ func (mmdtp MigrateMongoDbTaskProperties) AsGetUserTablesSQLTaskProperties() (*G return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMongoDbTaskProperties. +func (mmdtp MigrateMongoDbTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMongoDbTaskProperties. func (mmdtp MigrateMongoDbTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -5300,6 +6695,11 @@ func (mmdtp MigrateMongoDbTaskProperties) AsConnectToTargetSQLDbTaskProperties() return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMongoDbTaskProperties. +func (mmdtp MigrateMongoDbTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMongoDbTaskProperties. func (mmdtp MigrateMongoDbTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -5419,6 +6819,33 @@ type MigrateMySQLAzureDbForMySQLSyncDatabaseInput struct { Name *string `json:"name,omitempty"` // TargetDatabaseName - Name of target database. Note: Target database will be truncated before starting migration. TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` + // MigrationSetting - Migration settings which tune the migration behavior + MigrationSetting map[string]*string `json:"migrationSetting"` + // SourceSetting - Source settings to tune source endpoint migration behavior + SourceSetting map[string]*string `json:"sourceSetting"` + // TargetSetting - Target settings to tune target endpoint migration behavior + TargetSetting map[string]*string `json:"targetSetting"` +} + +// MarshalJSON is the custom marshaler for MigrateMySQLAzureDbForMySQLSyncDatabaseInput. +func (mmsadfmssdi MigrateMySQLAzureDbForMySQLSyncDatabaseInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mmsadfmssdi.Name != nil { + objectMap["name"] = mmsadfmssdi.Name + } + if mmsadfmssdi.TargetDatabaseName != nil { + objectMap["targetDatabaseName"] = mmsadfmssdi.TargetDatabaseName + } + if mmsadfmssdi.MigrationSetting != nil { + objectMap["migrationSetting"] = mmsadfmssdi.MigrationSetting + } + if mmsadfmssdi.SourceSetting != nil { + objectMap["sourceSetting"] = mmsadfmssdi.SourceSetting + } + if mmsadfmssdi.TargetSetting != nil { + objectMap["targetSetting"] = mmsadfmssdi.TargetSetting + } + return json.Marshal(objectMap) } // MigrateMySQLAzureDbForMySQLSyncTaskInput input for the task that migrates MySQL databases to Azure @@ -5627,7 +7054,7 @@ type MigrateMySQLAzureDbForMySQLSyncTaskOutputDatabaseLevel struct { StartedOn *date.Time `json:"startedOn,omitempty"` // EndedOn - Migration end time EndedOn *date.Time `json:"endedOn,omitempty"` - // MigrationState - Migration state that this database is in. Possible values include: 'UNDEFINED', 'CONFIGURING', 'INITIALIAZING', 'STARTING', 'RUNNING', 'READYTOCOMPLETE', 'COMPLETING', 'COMPLETE', 'CANCELLING', 'CANCELLED', 'FAILED' + // MigrationState - Migration state that this database is in. Possible values include: 'SyncDatabaseMigrationReportingStateUNDEFINED', 'SyncDatabaseMigrationReportingStateCONFIGURING', 'SyncDatabaseMigrationReportingStateINITIALIAZING', 'SyncDatabaseMigrationReportingStateSTARTING', 'SyncDatabaseMigrationReportingStateRUNNING', 'SyncDatabaseMigrationReportingStateREADYTOCOMPLETE', 'SyncDatabaseMigrationReportingStateCOMPLETING', 'SyncDatabaseMigrationReportingStateCOMPLETE', 'SyncDatabaseMigrationReportingStateCANCELLING', 'SyncDatabaseMigrationReportingStateCANCELLED', 'SyncDatabaseMigrationReportingStateFAILED' MigrationState SyncDatabaseMigrationReportingState `json:"migrationState,omitempty"` // IncomingChanges - Number of incoming changes IncomingChanges *int64 `json:"incomingChanges,omitempty"` @@ -6033,7 +7460,7 @@ type MigrateMySQLAzureDbForMySQLSyncTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -6075,6 +7502,11 @@ func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsValidateMongo return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -6105,6 +7537,11 @@ func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsMigrateSQLSer return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -6120,6 +7557,11 @@ func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToTarg return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -6135,6 +7577,11 @@ func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsGetUserTables return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -6145,6 +7592,11 @@ func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToTarg return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. +func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateMySQLAzureDbForMySQLSyncTaskProperties. func (mmsadfmsstp MigrateMySQLAzureDbForMySQLSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -6263,6 +7715,33 @@ type MigratePostgreSQLAzureDbForPostgreSQLSyncDatabaseInput struct { Name *string `json:"name,omitempty"` // TargetDatabaseName - Name of target database. Note: Target database will be truncated before starting migration. TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` + // MigrationSetting - Migration settings which tune the migration behavior + MigrationSetting map[string]*string `json:"migrationSetting"` + // SourceSetting - Source settings to tune source endpoint migration behavior + SourceSetting map[string]*string `json:"sourceSetting"` + // TargetSetting - Target settings to tune target endpoint migration behavior + TargetSetting map[string]*string `json:"targetSetting"` +} + +// MarshalJSON is the custom marshaler for MigratePostgreSQLAzureDbForPostgreSQLSyncDatabaseInput. +func (mpsadfpssdi MigratePostgreSQLAzureDbForPostgreSQLSyncDatabaseInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mpsadfpssdi.Name != nil { + objectMap["name"] = mpsadfpssdi.Name + } + if mpsadfpssdi.TargetDatabaseName != nil { + objectMap["targetDatabaseName"] = mpsadfpssdi.TargetDatabaseName + } + if mpsadfpssdi.MigrationSetting != nil { + objectMap["migrationSetting"] = mpsadfpssdi.MigrationSetting + } + if mpsadfpssdi.SourceSetting != nil { + objectMap["sourceSetting"] = mpsadfpssdi.SourceSetting + } + if mpsadfpssdi.TargetSetting != nil { + objectMap["targetSetting"] = mpsadfpssdi.TargetSetting + } + return json.Marshal(objectMap) } // MigratePostgreSQLAzureDbForPostgreSQLSyncTaskInput input for the task that migrates PostgreSQL databases @@ -6471,7 +7950,7 @@ type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskOutputDatabaseLevel struct { StartedOn *date.Time `json:"startedOn,omitempty"` // EndedOn - Migration end time EndedOn *date.Time `json:"endedOn,omitempty"` - // MigrationState - Migration state that this database is in. Possible values include: 'UNDEFINED', 'CONFIGURING', 'INITIALIAZING', 'STARTING', 'RUNNING', 'READYTOCOMPLETE', 'COMPLETING', 'COMPLETE', 'CANCELLING', 'CANCELLED', 'FAILED' + // MigrationState - Migration state that this database is in. Possible values include: 'SyncDatabaseMigrationReportingStateUNDEFINED', 'SyncDatabaseMigrationReportingStateCONFIGURING', 'SyncDatabaseMigrationReportingStateINITIALIAZING', 'SyncDatabaseMigrationReportingStateSTARTING', 'SyncDatabaseMigrationReportingStateRUNNING', 'SyncDatabaseMigrationReportingStateREADYTOCOMPLETE', 'SyncDatabaseMigrationReportingStateCOMPLETING', 'SyncDatabaseMigrationReportingStateCOMPLETE', 'SyncDatabaseMigrationReportingStateCANCELLING', 'SyncDatabaseMigrationReportingStateCANCELLED', 'SyncDatabaseMigrationReportingStateFAILED' MigrationState SyncDatabaseMigrationReportingState `json:"migrationState,omitempty"` // IncomingChanges - Number of incoming changes IncomingChanges *int64 `json:"incomingChanges,omitempty"` @@ -6877,7 +8356,7 @@ type MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -6919,6 +8398,11 @@ func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsVal return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -6949,6 +8433,11 @@ func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsMig return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -6964,6 +8453,11 @@ func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsCon return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -6979,6 +8473,11 @@ func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsGet return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -6989,6 +8488,11 @@ func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsCon return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. +func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties. func (mpsadfpsstp MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -7496,7 +9000,7 @@ type MigrateSchemaSQLServerSQLDbTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -7538,6 +9042,11 @@ func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsValidateMongoDbTaskP return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSchemaSQLServerSQLDbTaskProperties. +func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSchemaSQLServerSQLDbTaskProperties. func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -7568,6 +9077,11 @@ func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLD return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSchemaSQLServerSQLDbTaskProperties. +func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSchemaSQLServerSQLDbTaskProperties. func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -7583,6 +9097,11 @@ func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsConnectToTargetAzure return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSchemaSQLServerSQLDbTaskProperties. +func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSchemaSQLServerSQLDbTaskProperties. func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -7598,6 +9117,11 @@ func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsGetUserTablesSQLTask return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSchemaSQLServerSQLDbTaskProperties. +func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSchemaSQLServerSQLDbTaskProperties. func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -7608,6 +9132,11 @@ func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsConnectToTargetSQLDb return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSchemaSQLServerSQLDbTaskProperties. +func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSchemaSQLServerSQLDbTaskProperties. func (mssssdtp MigrateSchemaSQLServerSQLDbTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -8065,7 +9594,7 @@ type MigrateSQLServerSQLDbSyncTaskOutputDatabaseLevel struct { StartedOn *date.Time `json:"startedOn,omitempty"` // EndedOn - Migration end time EndedOn *date.Time `json:"endedOn,omitempty"` - // MigrationState - Migration state that this database is in. Possible values include: 'UNDEFINED', 'CONFIGURING', 'INITIALIAZING', 'STARTING', 'RUNNING', 'READYTOCOMPLETE', 'COMPLETING', 'COMPLETE', 'CANCELLING', 'CANCELLED', 'FAILED' + // MigrationState - Migration state that this database is in. Possible values include: 'SyncDatabaseMigrationReportingStateUNDEFINED', 'SyncDatabaseMigrationReportingStateCONFIGURING', 'SyncDatabaseMigrationReportingStateINITIALIAZING', 'SyncDatabaseMigrationReportingStateSTARTING', 'SyncDatabaseMigrationReportingStateRUNNING', 'SyncDatabaseMigrationReportingStateREADYTOCOMPLETE', 'SyncDatabaseMigrationReportingStateCOMPLETING', 'SyncDatabaseMigrationReportingStateCOMPLETE', 'SyncDatabaseMigrationReportingStateCANCELLING', 'SyncDatabaseMigrationReportingStateCANCELLED', 'SyncDatabaseMigrationReportingStateFAILED' MigrationState SyncDatabaseMigrationReportingState `json:"migrationState,omitempty"` // IncomingChanges - Number of incoming changes IncomingChanges *int64 `json:"incomingChanges,omitempty"` @@ -8476,7 +10005,7 @@ type MigrateSQLServerSQLDbSyncTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -8518,6 +10047,11 @@ func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsValidateMongoDbTaskPro return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -8548,6 +10082,11 @@ func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsMigrateSQLServerSQLDbT return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -8563,6 +10102,11 @@ func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToTargetAzureDb return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -8578,6 +10122,11 @@ func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsGetUserTablesSQLTaskPr return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -8588,6 +10137,11 @@ func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLDbTa return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. +func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbSyncTaskProperties. func (msssdstp MigrateSQLServerSQLDbSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -9150,87 +10704,734 @@ type MigrateSQLServerSQLDbTaskOutputTableLevel struct { ResultPrefix *string `json:"resultPrefix,omitempty"` // ID - Result identifier ID *string `json:"id,omitempty"` - // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput' - ResultType ResultTypeBasicMigrateSQLServerSQLDbTaskOutput `json:"resultType,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrateSQLServerSQLDbTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLDbTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) MarshalJSON() ([]byte, error) { + msssdtotl.ResultType = ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput + objectMap := make(map[string]interface{}) + if msssdtotl.ObjectName != nil { + objectMap["objectName"] = msssdtotl.ObjectName + } + if msssdtotl.StartedOn != nil { + objectMap["startedOn"] = msssdtotl.StartedOn + } + if msssdtotl.EndedOn != nil { + objectMap["endedOn"] = msssdtotl.EndedOn + } + if msssdtotl.State != "" { + objectMap["state"] = msssdtotl.State + } + if msssdtotl.StatusMessage != nil { + objectMap["statusMessage"] = msssdtotl.StatusMessage + } + if msssdtotl.ItemsCount != nil { + objectMap["itemsCount"] = msssdtotl.ItemsCount + } + if msssdtotl.ItemsCompletedCount != nil { + objectMap["itemsCompletedCount"] = msssdtotl.ItemsCompletedCount + } + if msssdtotl.ErrorPrefix != nil { + objectMap["errorPrefix"] = msssdtotl.ErrorPrefix + } + if msssdtotl.ResultPrefix != nil { + objectMap["resultPrefix"] = msssdtotl.ResultPrefix + } + if msssdtotl.ID != nil { + objectMap["id"] = msssdtotl.ID + } + if msssdtotl.ResultType != "" { + objectMap["resultType"] = msssdtotl.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { + return &msssdtotl, true +} + +// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. +func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { + return &msssdtotl, true +} + +// MigrateSQLServerSQLDbTaskProperties properties for the task that migrates on-prem SQL Server databases +// to Azure SQL Database +type MigrateSQLServerSQLDbTaskProperties struct { + // Input - Task input + Input *MigrateSQLServerSQLDbTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]BasicMigrateSQLServerSQLDbTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // ClientData - Key value pairs of client data to attach meta data information to task + ClientData map[string]*string `json:"clientData"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) MarshalJSON() ([]byte, error) { + msssdtp.TaskType = TaskTypeMigrateSQLServerSQLDb + objectMap := make(map[string]interface{}) + if msssdtp.Input != nil { + objectMap["input"] = msssdtp.Input + } + if msssdtp.Output != nil { + objectMap["output"] = msssdtp.Output + } + if msssdtp.Errors != nil { + objectMap["errors"] = msssdtp.Errors + } + if msssdtp.State != "" { + objectMap["state"] = msssdtp.State + } + if msssdtp.Commands != nil { + objectMap["commands"] = msssdtp.Commands + } + if msssdtp.ClientData != nil { + objectMap["clientData"] = msssdtp.ClientData + } + if msssdtp.TaskType != "" { + objectMap["taskType"] = msssdtp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsValidateMongoDbTaskProperties() (*ValidateMongoDbTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return &msssdtp, true +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsMigrateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateMongoDbTaskProperties() (*MigrateMongoDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToMongoDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToMongoDbTaskProperties() (*ConnectToMongoDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsMigrateSchemaSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSchemaSQLServerSQLDbTaskProperties() (*MigrateSchemaSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. +func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &msssdtp, true +} + +// UnmarshalJSON is the custom unmarshaler for MigrateSQLServerSQLDbTaskProperties struct. +func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input MigrateSQLServerSQLDbTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + msssdtp.Input = &input + } + case "output": + if v != nil { + output, err := unmarshalBasicMigrateSQLServerSQLDbTaskOutputArray(*v) + if err != nil { + return err + } + msssdtp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + msssdtp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + msssdtp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + msssdtp.Commands = &commands + } + case "clientData": + if v != nil { + var clientData map[string]*string + err = json.Unmarshal(*v, &clientData) + if err != nil { + return err + } + msssdtp.ClientData = clientData + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + msssdtp.TaskType = taskType + } + } + } + + return nil +} + +// MigrateSQLServerSQLMIDatabaseInput database specific information for SQL to Azure SQL DB Managed +// Instance migration task inputs +type MigrateSQLServerSQLMIDatabaseInput struct { + // Name - Name of the database + Name *string `json:"name,omitempty"` + // RestoreDatabaseName - Name of the database at destination + RestoreDatabaseName *string `json:"restoreDatabaseName,omitempty"` + // BackupFileShare - Backup file share information for backing up this database. + BackupFileShare *FileShare `json:"backupFileShare,omitempty"` + // BackupFilePaths - The list of backup files to be used in case of existing backups. + BackupFilePaths *[]string `json:"backupFilePaths,omitempty"` +} + +// MigrateSQLServerSQLMISyncTaskInput input for task that migrates SQL Server databases to Azure SQL +// Database Managed Instance online scenario. +type MigrateSQLServerSQLMISyncTaskInput struct { + // SelectedDatabases - Databases to migrate + SelectedDatabases *[]MigrateSQLServerSQLMIDatabaseInput `json:"selectedDatabases,omitempty"` + // BackupFileShare - Backup file share information for all selected databases. + BackupFileShare *FileShare `json:"backupFileShare,omitempty"` + // StorageResourceID - Fully qualified resourceId of storage + StorageResourceID *string `json:"storageResourceId,omitempty"` + // SourceConnectionInfo - Connection information for source SQL Server + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Connection information for Azure SQL Database Managed Instance + TargetConnectionInfo *MiSQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // AzureApp - Azure Active Directory Application the DMS instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account + AzureApp *AzureActiveDirectoryApp `json:"azureApp,omitempty"` +} + +// BasicMigrateSQLServerSQLMISyncTaskOutput output for task that migrates SQL Server databases to Azure SQL Database +// Managed Instance using Log Replay Service. +type BasicMigrateSQLServerSQLMISyncTaskOutput interface { + AsMigrateSQLServerSQLMISyncTaskOutputError() (*MigrateSQLServerSQLMISyncTaskOutputError, bool) + AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel, bool) + AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLMISyncTaskOutputMigrationLevel, bool) + AsMigrateSQLServerSQLMISyncTaskOutput() (*MigrateSQLServerSQLMISyncTaskOutput, bool) +} + +// MigrateSQLServerSQLMISyncTaskOutput output for task that migrates SQL Server databases to Azure SQL Database +// Managed Instance using Log Replay Service. +type MigrateSQLServerSQLMISyncTaskOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput `json:"resultType,omitempty"` +} + +func unmarshalBasicMigrateSQLServerSQLMISyncTaskOutput(body []byte) (BasicMigrateSQLServerSQLMISyncTaskOutput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["resultType"] { + case string(ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput): + var msssmstoe MigrateSQLServerSQLMISyncTaskOutputError + err := json.Unmarshal(body, &msssmstoe) + return msssmstoe, err + case string(ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput): + var msssmstodl MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel + err := json.Unmarshal(body, &msssmstodl) + return msssmstodl, err + case string(ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput): + var msssmstoml MigrateSQLServerSQLMISyncTaskOutputMigrationLevel + err := json.Unmarshal(body, &msssmstoml) + return msssmstoml, err + default: + var msssmsto MigrateSQLServerSQLMISyncTaskOutput + err := json.Unmarshal(body, &msssmsto) + return msssmsto, err + } +} +func unmarshalBasicMigrateSQLServerSQLMISyncTaskOutputArray(body []byte) ([]BasicMigrateSQLServerSQLMISyncTaskOutput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + msssmstoArray := make([]BasicMigrateSQLServerSQLMISyncTaskOutput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + msssmsto, err := unmarshalBasicMigrateSQLServerSQLMISyncTaskOutput(*rawMessage) + if err != nil { + return nil, err + } + msssmstoArray[index] = msssmsto + } + return msssmstoArray, nil +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMISyncTaskOutput. +func (msssmsto MigrateSQLServerSQLMISyncTaskOutput) MarshalJSON() ([]byte, error) { + msssmsto.ResultType = ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput + objectMap := make(map[string]interface{}) + if msssmsto.ID != nil { + objectMap["id"] = msssmsto.ID + } + if msssmsto.ResultType != "" { + objectMap["resultType"] = msssmsto.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLMISyncTaskOutputError is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutput. +func (msssmsto MigrateSQLServerSQLMISyncTaskOutput) AsMigrateSQLServerSQLMISyncTaskOutputError() (*MigrateSQLServerSQLMISyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutput. +func (msssmsto MigrateSQLServerSQLMISyncTaskOutput) AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutput. +func (msssmsto MigrateSQLServerSQLMISyncTaskOutput) AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLMISyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutput. +func (msssmsto MigrateSQLServerSQLMISyncTaskOutput) AsMigrateSQLServerSQLMISyncTaskOutput() (*MigrateSQLServerSQLMISyncTaskOutput, bool) { + return &msssmsto, true +} + +// AsBasicMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutput. +func (msssmsto MigrateSQLServerSQLMISyncTaskOutput) AsBasicMigrateSQLServerSQLMISyncTaskOutput() (BasicMigrateSQLServerSQLMISyncTaskOutput, bool) { + return &msssmsto, true +} + +// MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel ... +type MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel struct { + // SourceDatabaseName - Name of the database + SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` + // MigrationState - Current state of database. Possible values include: 'UNDEFINED', 'INITIAL', 'FULLBACKUPUPLOADSTART', 'LOGSHIPPINGSTART', 'UPLOADLOGFILESSTART', 'CUTOVERSTART', 'POSTCUTOVERCOMPLETE', 'COMPLETED', 'CANCELLED', 'FAILED' + MigrationState DatabaseMigrationState `json:"migrationState,omitempty"` + // StartedOn - Database migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Database migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // FullBackupSetInfo - Details of full backup set + FullBackupSetInfo *BackupSetInfo `json:"fullBackupSetInfo,omitempty"` + // LastRestoredBackupSetInfo - Last applied backup set information + LastRestoredBackupSetInfo *BackupSetInfo `json:"lastRestoredBackupSetInfo,omitempty"` + // ActiveBackupSets - Backup sets that are currently active (Either being uploaded or getting restored) + ActiveBackupSets *[]BackupSetInfo `json:"activeBackupSets,omitempty"` + // ContainerName - Name of container created in the Azure Storage account where backups are copied to + ContainerName *string `json:"containerName,omitempty"` + // ErrorPrefix - prefix string to use for querying errors for this database + ErrorPrefix *string `json:"errorPrefix,omitempty"` + // IsFullBackupRestored - Whether full backup has been applied to the target database or not + IsFullBackupRestored *bool `json:"isFullBackupRestored,omitempty"` + // ExceptionsAndWarnings - Migration exceptions and warnings + ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel. +func (msssmstodl MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { + msssmstodl.ResultType = ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput + objectMap := make(map[string]interface{}) + if msssmstodl.SourceDatabaseName != nil { + objectMap["sourceDatabaseName"] = msssmstodl.SourceDatabaseName + } + if msssmstodl.MigrationState != "" { + objectMap["migrationState"] = msssmstodl.MigrationState + } + if msssmstodl.StartedOn != nil { + objectMap["startedOn"] = msssmstodl.StartedOn + } + if msssmstodl.EndedOn != nil { + objectMap["endedOn"] = msssmstodl.EndedOn + } + if msssmstodl.FullBackupSetInfo != nil { + objectMap["fullBackupSetInfo"] = msssmstodl.FullBackupSetInfo + } + if msssmstodl.LastRestoredBackupSetInfo != nil { + objectMap["lastRestoredBackupSetInfo"] = msssmstodl.LastRestoredBackupSetInfo + } + if msssmstodl.ActiveBackupSets != nil { + objectMap["activeBackupSets"] = msssmstodl.ActiveBackupSets + } + if msssmstodl.ContainerName != nil { + objectMap["containerName"] = msssmstodl.ContainerName + } + if msssmstodl.ErrorPrefix != nil { + objectMap["errorPrefix"] = msssmstodl.ErrorPrefix + } + if msssmstodl.IsFullBackupRestored != nil { + objectMap["isFullBackupRestored"] = msssmstodl.IsFullBackupRestored + } + if msssmstodl.ExceptionsAndWarnings != nil { + objectMap["exceptionsAndWarnings"] = msssmstodl.ExceptionsAndWarnings + } + if msssmstodl.ID != nil { + objectMap["id"] = msssmstodl.ID + } + if msssmstodl.ResultType != "" { + objectMap["resultType"] = msssmstodl.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLMISyncTaskOutputError is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel. +func (msssmstodl MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel) AsMigrateSQLServerSQLMISyncTaskOutputError() (*MigrateSQLServerSQLMISyncTaskOutputError, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel. +func (msssmstodl MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel) AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel, bool) { + return &msssmstodl, true +} + +// AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel. +func (msssmstodl MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel) AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLMISyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel. +func (msssmstodl MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel) AsMigrateSQLServerSQLMISyncTaskOutput() (*MigrateSQLServerSQLMISyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel. +func (msssmstodl MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel) AsBasicMigrateSQLServerSQLMISyncTaskOutput() (BasicMigrateSQLServerSQLMISyncTaskOutput, bool) { + return &msssmstodl, true +} + +// MigrateSQLServerSQLMISyncTaskOutputError ... +type MigrateSQLServerSQLMISyncTaskOutputError struct { + // Error - Migration error + Error *ReportableException `json:"error,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput `json:"resultType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMISyncTaskOutputError. +func (msssmstoe MigrateSQLServerSQLMISyncTaskOutputError) MarshalJSON() ([]byte, error) { + msssmstoe.ResultType = ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput + objectMap := make(map[string]interface{}) + if msssmstoe.Error != nil { + objectMap["error"] = msssmstoe.Error + } + if msssmstoe.ID != nil { + objectMap["id"] = msssmstoe.ID + } + if msssmstoe.ResultType != "" { + objectMap["resultType"] = msssmstoe.ResultType + } + return json.Marshal(objectMap) +} + +// AsMigrateSQLServerSQLMISyncTaskOutputError is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputError. +func (msssmstoe MigrateSQLServerSQLMISyncTaskOutputError) AsMigrateSQLServerSQLMISyncTaskOutputError() (*MigrateSQLServerSQLMISyncTaskOutputError, bool) { + return &msssmstoe, true +} + +// AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputError. +func (msssmstoe MigrateSQLServerSQLMISyncTaskOutputError) AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputError. +func (msssmstoe MigrateSQLServerSQLMISyncTaskOutputError) AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLMISyncTaskOutputMigrationLevel, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputError. +func (msssmstoe MigrateSQLServerSQLMISyncTaskOutputError) AsMigrateSQLServerSQLMISyncTaskOutput() (*MigrateSQLServerSQLMISyncTaskOutput, bool) { + return nil, false +} + +// AsBasicMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputError. +func (msssmstoe MigrateSQLServerSQLMISyncTaskOutputError) AsBasicMigrateSQLServerSQLMISyncTaskOutput() (BasicMigrateSQLServerSQLMISyncTaskOutput, bool) { + return &msssmstoe, true +} + +// MigrateSQLServerSQLMISyncTaskOutputMigrationLevel ... +type MigrateSQLServerSQLMISyncTaskOutputMigrationLevel struct { + // DatabaseCount - Count of databases + DatabaseCount *int32 `json:"databaseCount,omitempty"` + // State - Current state of migration. Possible values include: 'MigrationStateNone', 'MigrationStateInProgress', 'MigrationStateFailed', 'MigrationStateWarning', 'MigrationStateCompleted', 'MigrationStateSkipped', 'MigrationStateStopped' + State MigrationState `json:"state,omitempty"` + // StartedOn - Migration start time + StartedOn *date.Time `json:"startedOn,omitempty"` + // EndedOn - Migration end time + EndedOn *date.Time `json:"endedOn,omitempty"` + // SourceServerName - Source server name + SourceServerName *string `json:"sourceServerName,omitempty"` + // SourceServerVersion - Source server version + SourceServerVersion *string `json:"sourceServerVersion,omitempty"` + // SourceServerBrandVersion - Source server brand version + SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` + // TargetServerName - Target server name + TargetServerName *string `json:"targetServerName,omitempty"` + // TargetServerVersion - Target server version + TargetServerVersion *string `json:"targetServerVersion,omitempty"` + // TargetServerBrandVersion - Target server brand version + TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` + // DatabaseErrorCount - Number of database level errors + DatabaseErrorCount *int32 `json:"databaseErrorCount,omitempty"` + // ID - Result identifier + ID *string `json:"id,omitempty"` + // ResultType - Possible values include: 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrateSQLServerSQLMISyncTaskOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeErrorOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeDatabaseLevelOutput', 'ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput' + ResultType ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutput `json:"resultType,omitempty"` } -// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) MarshalJSON() ([]byte, error) { - msssdtotl.ResultType = ResultTypeBasicMigrateSQLServerSQLDbTaskOutputResultTypeTableLevelOutput +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMISyncTaskOutputMigrationLevel. +func (msssmstoml MigrateSQLServerSQLMISyncTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { + msssmstoml.ResultType = ResultTypeBasicMigrateSQLServerSQLMISyncTaskOutputResultTypeMigrationLevelOutput objectMap := make(map[string]interface{}) - if msssdtotl.ObjectName != nil { - objectMap["objectName"] = msssdtotl.ObjectName + if msssmstoml.DatabaseCount != nil { + objectMap["databaseCount"] = msssmstoml.DatabaseCount } - if msssdtotl.StartedOn != nil { - objectMap["startedOn"] = msssdtotl.StartedOn + if msssmstoml.State != "" { + objectMap["state"] = msssmstoml.State } - if msssdtotl.EndedOn != nil { - objectMap["endedOn"] = msssdtotl.EndedOn + if msssmstoml.StartedOn != nil { + objectMap["startedOn"] = msssmstoml.StartedOn } - if msssdtotl.State != "" { - objectMap["state"] = msssdtotl.State + if msssmstoml.EndedOn != nil { + objectMap["endedOn"] = msssmstoml.EndedOn } - if msssdtotl.StatusMessage != nil { - objectMap["statusMessage"] = msssdtotl.StatusMessage + if msssmstoml.SourceServerName != nil { + objectMap["sourceServerName"] = msssmstoml.SourceServerName } - if msssdtotl.ItemsCount != nil { - objectMap["itemsCount"] = msssdtotl.ItemsCount + if msssmstoml.SourceServerVersion != nil { + objectMap["sourceServerVersion"] = msssmstoml.SourceServerVersion } - if msssdtotl.ItemsCompletedCount != nil { - objectMap["itemsCompletedCount"] = msssdtotl.ItemsCompletedCount + if msssmstoml.SourceServerBrandVersion != nil { + objectMap["sourceServerBrandVersion"] = msssmstoml.SourceServerBrandVersion } - if msssdtotl.ErrorPrefix != nil { - objectMap["errorPrefix"] = msssdtotl.ErrorPrefix + if msssmstoml.TargetServerName != nil { + objectMap["targetServerName"] = msssmstoml.TargetServerName } - if msssdtotl.ResultPrefix != nil { - objectMap["resultPrefix"] = msssdtotl.ResultPrefix + if msssmstoml.TargetServerVersion != nil { + objectMap["targetServerVersion"] = msssmstoml.TargetServerVersion } - if msssdtotl.ID != nil { - objectMap["id"] = msssdtotl.ID + if msssmstoml.TargetServerBrandVersion != nil { + objectMap["targetServerBrandVersion"] = msssmstoml.TargetServerBrandVersion } - if msssdtotl.ResultType != "" { - objectMap["resultType"] = msssdtotl.ResultType + if msssmstoml.DatabaseErrorCount != nil { + objectMap["databaseErrorCount"] = msssmstoml.DatabaseErrorCount + } + if msssmstoml.ID != nil { + objectMap["id"] = msssmstoml.ID + } + if msssmstoml.ResultType != "" { + objectMap["resultType"] = msssmstoml.ResultType } return json.Marshal(objectMap) } -// AsMigrateSQLServerSQLDbTaskOutputError is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputError() (*MigrateSQLServerSQLDbTaskOutputError, bool) { +// AsMigrateSQLServerSQLMISyncTaskOutputError is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputMigrationLevel. +func (msssmstoml MigrateSQLServerSQLMISyncTaskOutputMigrationLevel) AsMigrateSQLServerSQLMISyncTaskOutputError() (*MigrateSQLServerSQLMISyncTaskOutputError, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputTableLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputTableLevel() (*MigrateSQLServerSQLDbTaskOutputTableLevel, bool) { - return &msssdtotl, true -} - -// AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputDatabaseLevel() (*MigrateSQLServerSQLDbTaskOutputDatabaseLevel, bool) { +// AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputMigrationLevel. +func (msssmstoml MigrateSQLServerSQLMISyncTaskOutputMigrationLevel) AsMigrateSQLServerSQLMISyncTaskOutputDatabaseLevel() (*MigrateSQLServerSQLMISyncTaskOutputDatabaseLevel, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutputMigrationLevel() (*MigrateSQLServerSQLDbTaskOutputMigrationLevel, bool) { - return nil, false +// AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputMigrationLevel. +func (msssmstoml MigrateSQLServerSQLMISyncTaskOutputMigrationLevel) AsMigrateSQLServerSQLMISyncTaskOutputMigrationLevel() (*MigrateSQLServerSQLMISyncTaskOutputMigrationLevel, bool) { + return &msssmstoml, true } -// AsMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsMigrateSQLServerSQLDbTaskOutput() (*MigrateSQLServerSQLDbTaskOutput, bool) { +// AsMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputMigrationLevel. +func (msssmstoml MigrateSQLServerSQLMISyncTaskOutputMigrationLevel) AsMigrateSQLServerSQLMISyncTaskOutput() (*MigrateSQLServerSQLMISyncTaskOutput, bool) { return nil, false } -// AsBasicMigrateSQLServerSQLDbTaskOutput is the BasicMigrateSQLServerSQLDbTaskOutput implementation for MigrateSQLServerSQLDbTaskOutputTableLevel. -func (msssdtotl MigrateSQLServerSQLDbTaskOutputTableLevel) AsBasicMigrateSQLServerSQLDbTaskOutput() (BasicMigrateSQLServerSQLDbTaskOutput, bool) { - return &msssdtotl, true +// AsBasicMigrateSQLServerSQLMISyncTaskOutput is the BasicMigrateSQLServerSQLMISyncTaskOutput implementation for MigrateSQLServerSQLMISyncTaskOutputMigrationLevel. +func (msssmstoml MigrateSQLServerSQLMISyncTaskOutputMigrationLevel) AsBasicMigrateSQLServerSQLMISyncTaskOutput() (BasicMigrateSQLServerSQLMISyncTaskOutput, bool) { + return &msssmstoml, true } -// MigrateSQLServerSQLDbTaskProperties properties for the task that migrates on-prem SQL Server databases -// to Azure SQL Database -type MigrateSQLServerSQLDbTaskProperties struct { +// MigrateSQLServerSQLMISyncTaskProperties properties for task that migrates SQL Server databases to Azure +// SQL Database Managed Instance sync scenario +type MigrateSQLServerSQLMISyncTaskProperties struct { // Input - Task input - Input *MigrateSQLServerSQLDbTaskInput `json:"input,omitempty"` + Input *MigrateSQLServerSQLMISyncTaskInput `json:"input,omitempty"` // Output - Task output. This is ignored if submitted. - Output *[]BasicMigrateSQLServerSQLDbTaskOutput `json:"output,omitempty"` + Output *[]BasicMigrateSQLServerSQLMISyncTaskOutput `json:"output,omitempty"` // Errors - Array of errors. This is ignored if submitted. Errors *[]ODataError `json:"errors,omitempty"` // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' @@ -9239,155 +11440,180 @@ type MigrateSQLServerSQLDbTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } -// MarshalJSON is the custom marshaler for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) MarshalJSON() ([]byte, error) { - msssdtp.TaskType = TaskTypeMigrateSQLServerSQLDb +// MarshalJSON is the custom marshaler for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) MarshalJSON() ([]byte, error) { + msssmstp.TaskType = TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS objectMap := make(map[string]interface{}) - if msssdtp.Input != nil { - objectMap["input"] = msssdtp.Input + if msssmstp.Input != nil { + objectMap["input"] = msssmstp.Input } - if msssdtp.Output != nil { - objectMap["output"] = msssdtp.Output + if msssmstp.Output != nil { + objectMap["output"] = msssmstp.Output } - if msssdtp.Errors != nil { - objectMap["errors"] = msssdtp.Errors + if msssmstp.Errors != nil { + objectMap["errors"] = msssmstp.Errors } - if msssdtp.State != "" { - objectMap["state"] = msssdtp.State + if msssmstp.State != "" { + objectMap["state"] = msssmstp.State } - if msssdtp.Commands != nil { - objectMap["commands"] = msssdtp.Commands + if msssmstp.Commands != nil { + objectMap["commands"] = msssmstp.Commands } - if msssdtp.ClientData != nil { - objectMap["clientData"] = msssdtp.ClientData + if msssmstp.ClientData != nil { + objectMap["clientData"] = msssmstp.ClientData } - if msssdtp.TaskType != "" { - objectMap["taskType"] = msssdtp.TaskType + if msssmstp.TaskType != "" { + objectMap["taskType"] = msssmstp.TaskType } return json.Marshal(objectMap) } -// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { return nil, false } -// AsValidateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsValidateMongoDbTaskProperties() (*ValidateMongoDbTaskProperties, bool) { +// AsValidateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsValidateMongoDbTaskProperties() (*ValidateMongoDbTaskProperties, bool) { return nil, false } -// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { return nil, false } -// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false } -// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { return nil, false } -// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { return nil, false } -// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { - return &msssdtp, true +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false } -// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { return nil, false } -// AsMigrateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateMongoDbTaskProperties() (*MigrateMongoDbTaskProperties, bool) { +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return &msssmstp, true +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false } -// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { +// AsMigrateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsMigrateMongoDbTaskProperties() (*MigrateMongoDbTaskProperties, bool) { return nil, false } -// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { return nil, false } -// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { return nil, false } -// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false } -// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { return nil, false } -// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { return nil, false } -// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false } -// AsConnectToMongoDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToMongoDbTaskProperties() (*ConnectToMongoDbTaskProperties, bool) { +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { return nil, false } -// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { return nil, false } -// AsMigrateSchemaSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsMigrateSchemaSQLServerSQLDbTaskProperties() (*MigrateSchemaSQLServerSQLDbTaskProperties, bool) { +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false } -// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { return nil, false } -// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLDbTaskProperties. -func (msssdtp MigrateSQLServerSQLDbTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { - return &msssdtp, true +// AsConnectToMongoDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToMongoDbTaskProperties() (*ConnectToMongoDbTaskProperties, bool) { + return nil, false } -// UnmarshalJSON is the custom unmarshaler for MigrateSQLServerSQLDbTaskProperties struct. -func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) error { +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsMigrateSchemaSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsMigrateSchemaSQLServerSQLDbTaskProperties() (*MigrateSchemaSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMISyncTaskProperties. +func (msssmstp MigrateSQLServerSQLMISyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &msssmstp, true +} + +// UnmarshalJSON is the custom unmarshaler for MigrateSQLServerSQLMISyncTaskProperties struct. +func (msssmstp *MigrateSQLServerSQLMISyncTaskProperties) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -9397,20 +11623,20 @@ func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) e switch k { case "input": if v != nil { - var input MigrateSQLServerSQLDbTaskInput + var input MigrateSQLServerSQLMISyncTaskInput err = json.Unmarshal(*v, &input) if err != nil { return err } - msssdtp.Input = &input + msssmstp.Input = &input } case "output": if v != nil { - output, err := unmarshalBasicMigrateSQLServerSQLDbTaskOutputArray(*v) + output, err := unmarshalBasicMigrateSQLServerSQLMISyncTaskOutputArray(*v) if err != nil { return err } - msssdtp.Output = &output + msssmstp.Output = &output } case "errors": if v != nil { @@ -9419,7 +11645,7 @@ func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) e if err != nil { return err } - msssdtp.Errors = &errorsVar + msssmstp.Errors = &errorsVar } case "state": if v != nil { @@ -9428,7 +11654,7 @@ func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) e if err != nil { return err } - msssdtp.State = state + msssmstp.State = state } case "commands": if v != nil { @@ -9436,7 +11662,7 @@ func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) e if err != nil { return err } - msssdtp.Commands = &commands + msssmstp.Commands = &commands } case "clientData": if v != nil { @@ -9445,7 +11671,7 @@ func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) e if err != nil { return err } - msssdtp.ClientData = clientData + msssmstp.ClientData = clientData } case "taskType": if v != nil { @@ -9454,7 +11680,7 @@ func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) e if err != nil { return err } - msssdtp.TaskType = taskType + msssmstp.TaskType = taskType } } } @@ -9462,19 +11688,6 @@ func (msssdtp *MigrateSQLServerSQLDbTaskProperties) UnmarshalJSON(body []byte) e return nil } -// MigrateSQLServerSQLMIDatabaseInput database specific information for SQL to Azure SQL DB Managed -// Instance migration task inputs -type MigrateSQLServerSQLMIDatabaseInput struct { - // Name - Name of the database - Name *string `json:"name,omitempty"` - // RestoreDatabaseName - Name of the database at destination - RestoreDatabaseName *string `json:"restoreDatabaseName,omitempty"` - // BackupFileShare - Backup file share information for backing up this database. - BackupFileShare *FileShare `json:"backupFileShare,omitempty"` - // BackupFilePaths - The list of backup files to be used in case of existing backups. - BackupFilePaths *[]string `json:"backupFilePaths,omitempty"` -} - // MigrateSQLServerSQLMITaskInput input for task that migrates SQL Server databases to Azure SQL Database // Managed Instance. type MigrateSQLServerSQLMITaskInput struct { @@ -9974,8 +12187,8 @@ type MigrateSQLServerSQLMITaskOutputMigrationLevel struct { Message *string `json:"message,omitempty"` // ServerRoleResults - Map of server role migration results. ServerRoleResults map[string]*StartMigrationScenarioServerRoleResult `json:"serverRoleResults"` - // OrphanedUsers - Map of users to database name of orphaned users. - OrphanedUsers map[string]*string `json:"orphanedUsers"` + // OrphanedUsersInfo - List of orphaned users. + OrphanedUsersInfo *[]OrphanedUserInfo `json:"orphanedUsersInfo,omitempty"` // Databases - Selected databases as a map from database name to database id Databases map[string]*string `json:"databases"` // SourceServerVersion - Source server version @@ -10022,8 +12235,8 @@ func (msssmtoml MigrateSQLServerSQLMITaskOutputMigrationLevel) MarshalJSON() ([] if msssmtoml.ServerRoleResults != nil { objectMap["serverRoleResults"] = msssmtoml.ServerRoleResults } - if msssmtoml.OrphanedUsers != nil { - objectMap["orphanedUsers"] = msssmtoml.OrphanedUsers + if msssmtoml.OrphanedUsersInfo != nil { + objectMap["orphanedUsersInfo"] = msssmtoml.OrphanedUsersInfo } if msssmtoml.Databases != nil { objectMap["databases"] = msssmtoml.Databases @@ -10102,7 +12315,7 @@ type MigrateSQLServerSQLMITaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -10144,6 +12357,11 @@ func (msssmtp MigrateSQLServerSQLMITaskProperties) AsValidateMongoDbTaskProperti return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. func (msssmtp MigrateSQLServerSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -10174,6 +12392,11 @@ func (msssmtp MigrateSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLDbTaskPr return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. func (msssmtp MigrateSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return &msssmtp, true @@ -10189,6 +12412,11 @@ func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToTargetAzureDbForMy return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -10204,6 +12432,11 @@ func (msssmtp MigrateSQLServerSQLMITaskProperties) AsGetUserTablesSQLTaskPropert return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -10214,6 +12447,11 @@ func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToTargetSQLDbTaskPro return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. +func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for MigrateSQLServerSQLMITaskProperties. func (msssmtp MigrateSQLServerSQLMITaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -10348,6 +12586,8 @@ type MigrateSyncCompleteCommandInput struct { // MigrateSyncCompleteCommandOutput output for command that completes sync migration for a database. type MigrateSyncCompleteCommandOutput struct { + // ID - Result identifier + ID *string `json:"id,omitempty"` // Errors - List of errors that happened during the command execution Errors *[]ReportableException `json:"errors,omitempty"` } @@ -10363,7 +12603,7 @@ type MigrateSyncCompleteCommandProperties struct { Errors *[]ODataError `json:"errors,omitempty"` // State - The state of the command. This is ignored if submitted. Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', 'Failed' State CommandState `json:"state,omitempty"` - // CommandType - Possible values include: 'CommandTypeUnknown', 'CommandTypeMigrateSyncCompleteDatabase', 'CommandTypeCancel', 'CommandTypeFinish', 'CommandTypeRestart' + // CommandType - Possible values include: 'CommandTypeUnknown', 'CommandTypeMigrateSQLServerAzureDbSQLMiComplete', 'CommandTypeMigrateSyncCompleteDatabase', 'CommandTypeCancel', 'CommandTypeFinish', 'CommandTypeRestart' CommandType CommandType `json:"commandType,omitempty"` } @@ -10389,6 +12629,11 @@ func (msccp MigrateSyncCompleteCommandProperties) MarshalJSON() ([]byte, error) return json.Marshal(objectMap) } +// AsMigrateMISyncCompleteCommandProperties is the BasicCommandProperties implementation for MigrateSyncCompleteCommandProperties. +func (msccp MigrateSyncCompleteCommandProperties) AsMigrateMISyncCompleteCommandProperties() (*MigrateMISyncCompleteCommandProperties, bool) { + return nil, false +} + // AsMigrateSyncCompleteCommandProperties is the BasicCommandProperties implementation for MigrateSyncCompleteCommandProperties. func (msccp MigrateSyncCompleteCommandProperties) AsMigrateSyncCompleteCommandProperties() (*MigrateSyncCompleteCommandProperties, bool) { return &msccp, true @@ -10526,6 +12771,72 @@ func (mvr MigrationValidationResult) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// MiSQLConnectionInfo properties required to create a connection to Azure SQL database Managed instance +type MiSQLConnectionInfo struct { + // ManagedInstanceResourceID - Resource id for Azure SQL database Managed instance + ManagedInstanceResourceID *string `json:"managedInstanceResourceId,omitempty"` + // UserName - User name + UserName *string `json:"userName,omitempty"` + // Password - Password credential. + Password *string `json:"password,omitempty"` + // Type - Possible values include: 'TypeUnknown', 'TypeMiSQLConnectionInfo', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeMongoDbConnectionInfo', 'TypeSQLConnectionInfo' + Type Type `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) MarshalJSON() ([]byte, error) { + msci.Type = TypeMiSQLConnectionInfo + objectMap := make(map[string]interface{}) + if msci.ManagedInstanceResourceID != nil { + objectMap["managedInstanceResourceId"] = msci.ManagedInstanceResourceID + } + if msci.UserName != nil { + objectMap["userName"] = msci.UserName + } + if msci.Password != nil { + objectMap["password"] = msci.Password + } + if msci.Type != "" { + objectMap["type"] = msci.Type + } + return json.Marshal(objectMap) +} + +// AsMiSQLConnectionInfo is the BasicConnectionInfo implementation for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) AsMiSQLConnectionInfo() (*MiSQLConnectionInfo, bool) { + return &msci, true +} + +// AsPostgreSQLConnectionInfo is the BasicConnectionInfo implementation for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) AsPostgreSQLConnectionInfo() (*PostgreSQLConnectionInfo, bool) { + return nil, false +} + +// AsMySQLConnectionInfo is the BasicConnectionInfo implementation for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) AsMySQLConnectionInfo() (*MySQLConnectionInfo, bool) { + return nil, false +} + +// AsMongoDbConnectionInfo is the BasicConnectionInfo implementation for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) AsMongoDbConnectionInfo() (*MongoDbConnectionInfo, bool) { + return nil, false +} + +// AsSQLConnectionInfo is the BasicConnectionInfo implementation for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) AsSQLConnectionInfo() (*SQLConnectionInfo, bool) { + return nil, false +} + +// AsConnectionInfo is the BasicConnectionInfo implementation for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) AsConnectionInfo() (*ConnectionInfo, bool) { + return nil, false +} + +// AsBasicConnectionInfo is the BasicConnectionInfo implementation for MiSQLConnectionInfo. +func (msci MiSQLConnectionInfo) AsBasicConnectionInfo() (BasicConnectionInfo, bool) { + return &msci, true +} + // MongoDbCancelCommand properties for the command that cancels a migration in whole or in part type MongoDbCancelCommand struct { // Input - Command input @@ -10534,7 +12845,7 @@ type MongoDbCancelCommand struct { Errors *[]ODataError `json:"errors,omitempty"` // State - The state of the command. This is ignored if submitted. Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', 'Failed' State CommandState `json:"state,omitempty"` - // CommandType - Possible values include: 'CommandTypeUnknown', 'CommandTypeMigrateSyncCompleteDatabase', 'CommandTypeCancel', 'CommandTypeFinish', 'CommandTypeRestart' + // CommandType - Possible values include: 'CommandTypeUnknown', 'CommandTypeMigrateSQLServerAzureDbSQLMiComplete', 'CommandTypeMigrateSyncCompleteDatabase', 'CommandTypeCancel', 'CommandTypeFinish', 'CommandTypeRestart' CommandType CommandType `json:"commandType,omitempty"` } @@ -10557,6 +12868,11 @@ func (mdcc MongoDbCancelCommand) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsMigrateMISyncCompleteCommandProperties is the BasicCommandProperties implementation for MongoDbCancelCommand. +func (mdcc MongoDbCancelCommand) AsMigrateMISyncCompleteCommandProperties() (*MigrateMISyncCompleteCommandProperties, bool) { + return nil, false +} + // AsMigrateSyncCompleteCommandProperties is the BasicCommandProperties implementation for MongoDbCancelCommand. func (mdcc MongoDbCancelCommand) AsMigrateSyncCompleteCommandProperties() (*MigrateSyncCompleteCommandProperties, bool) { return nil, false @@ -10730,7 +13046,7 @@ type MongoDbConnectionInfo struct { UserName *string `json:"userName,omitempty"` // Password - Password credential. Password *string `json:"password,omitempty"` - // Type - Possible values include: 'TypeUnknown', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeMongoDbConnectionInfo', 'TypeSQLConnectionInfo' + // Type - Possible values include: 'TypeUnknown', 'TypeMiSQLConnectionInfo', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeMongoDbConnectionInfo', 'TypeSQLConnectionInfo' Type Type `json:"type,omitempty"` } @@ -10753,6 +13069,11 @@ func (mdci MongoDbConnectionInfo) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsMiSQLConnectionInfo is the BasicConnectionInfo implementation for MongoDbConnectionInfo. +func (mdci MongoDbConnectionInfo) AsMiSQLConnectionInfo() (*MiSQLConnectionInfo, bool) { + return nil, false +} + // AsPostgreSQLConnectionInfo is the BasicConnectionInfo implementation for MongoDbConnectionInfo. func (mdci MongoDbConnectionInfo) AsPostgreSQLConnectionInfo() (*PostgreSQLConnectionInfo, bool) { return nil, false @@ -10926,7 +13247,7 @@ type MongoDbFinishCommand struct { Errors *[]ODataError `json:"errors,omitempty"` // State - The state of the command. This is ignored if submitted. Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', 'Failed' State CommandState `json:"state,omitempty"` - // CommandType - Possible values include: 'CommandTypeUnknown', 'CommandTypeMigrateSyncCompleteDatabase', 'CommandTypeCancel', 'CommandTypeFinish', 'CommandTypeRestart' + // CommandType - Possible values include: 'CommandTypeUnknown', 'CommandTypeMigrateSQLServerAzureDbSQLMiComplete', 'CommandTypeMigrateSyncCompleteDatabase', 'CommandTypeCancel', 'CommandTypeFinish', 'CommandTypeRestart' CommandType CommandType `json:"commandType,omitempty"` } @@ -10949,6 +13270,11 @@ func (mdfc MongoDbFinishCommand) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsMigrateMISyncCompleteCommandProperties is the BasicCommandProperties implementation for MongoDbFinishCommand. +func (mdfc MongoDbFinishCommand) AsMigrateMISyncCompleteCommandProperties() (*MigrateMISyncCompleteCommandProperties, bool) { + return nil, false +} + // AsMigrateSyncCompleteCommandProperties is the BasicCommandProperties implementation for MongoDbFinishCommand. func (mdfc MongoDbFinishCommand) AsMigrateSyncCompleteCommandProperties() (*MigrateSyncCompleteCommandProperties, bool) { return nil, false @@ -11214,7 +13540,7 @@ type MongoDbRestartCommand struct { Errors *[]ODataError `json:"errors,omitempty"` // State - The state of the command. This is ignored if submitted. Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', 'Failed' State CommandState `json:"state,omitempty"` - // CommandType - Possible values include: 'CommandTypeUnknown', 'CommandTypeMigrateSyncCompleteDatabase', 'CommandTypeCancel', 'CommandTypeFinish', 'CommandTypeRestart' + // CommandType - Possible values include: 'CommandTypeUnknown', 'CommandTypeMigrateSQLServerAzureDbSQLMiComplete', 'CommandTypeMigrateSyncCompleteDatabase', 'CommandTypeCancel', 'CommandTypeFinish', 'CommandTypeRestart' CommandType CommandType `json:"commandType,omitempty"` } @@ -11237,6 +13563,11 @@ func (mdrc MongoDbRestartCommand) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsMigrateMISyncCompleteCommandProperties is the BasicCommandProperties implementation for MongoDbRestartCommand. +func (mdrc MongoDbRestartCommand) AsMigrateMISyncCompleteCommandProperties() (*MigrateMISyncCompleteCommandProperties, bool) { + return nil, false +} + // AsMigrateSyncCompleteCommandProperties is the BasicCommandProperties implementation for MongoDbRestartCommand. func (mdrc MongoDbRestartCommand) AsMigrateSyncCompleteCommandProperties() (*MigrateSyncCompleteCommandProperties, bool) { return nil, false @@ -11311,7 +13642,7 @@ type MySQLConnectionInfo struct { UserName *string `json:"userName,omitempty"` // Password - Password credential. Password *string `json:"password,omitempty"` - // Type - Possible values include: 'TypeUnknown', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeMongoDbConnectionInfo', 'TypeSQLConnectionInfo' + // Type - Possible values include: 'TypeUnknown', 'TypeMiSQLConnectionInfo', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeMongoDbConnectionInfo', 'TypeSQLConnectionInfo' Type Type `json:"type,omitempty"` } @@ -11337,6 +13668,11 @@ func (msci MySQLConnectionInfo) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsMiSQLConnectionInfo is the BasicConnectionInfo implementation for MySQLConnectionInfo. +func (msci MySQLConnectionInfo) AsMiSQLConnectionInfo() (*MiSQLConnectionInfo, bool) { + return nil, false +} + // AsPostgreSQLConnectionInfo is the BasicConnectionInfo implementation for MySQLConnectionInfo. func (msci MySQLConnectionInfo) AsPostgreSQLConnectionInfo() (*PostgreSQLConnectionInfo, bool) { return nil, false @@ -11484,6 +13820,14 @@ type ODataError struct { Details *[]ODataError `json:"details,omitempty"` } +// OrphanedUserInfo information of orphaned users on the SQL server database. +type OrphanedUserInfo struct { + // Name - Name of the orphaned user + Name *string `json:"name,omitempty"` + // DatabaseName - Parent database of the user + DatabaseName *string `json:"databaseName,omitempty"` +} + // PostgreSQLConnectionInfo information for connecting to PostgreSQL server type PostgreSQLConnectionInfo struct { // ServerName - Name of the server @@ -11496,7 +13840,7 @@ type PostgreSQLConnectionInfo struct { UserName *string `json:"userName,omitempty"` // Password - Password credential. Password *string `json:"password,omitempty"` - // Type - Possible values include: 'TypeUnknown', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeMongoDbConnectionInfo', 'TypeSQLConnectionInfo' + // Type - Possible values include: 'TypeUnknown', 'TypeMiSQLConnectionInfo', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeMongoDbConnectionInfo', 'TypeSQLConnectionInfo' Type Type `json:"type,omitempty"` } @@ -11525,6 +13869,11 @@ func (psci PostgreSQLConnectionInfo) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsMiSQLConnectionInfo is the BasicConnectionInfo implementation for PostgreSQLConnectionInfo. +func (psci PostgreSQLConnectionInfo) AsMiSQLConnectionInfo() (*MiSQLConnectionInfo, bool) { + return nil, false +} + // AsPostgreSQLConnectionInfo is the BasicConnectionInfo implementation for PostgreSQLConnectionInfo. func (psci PostgreSQLConnectionInfo) AsPostgreSQLConnectionInfo() (*PostgreSQLConnectionInfo, bool) { return &psci, true @@ -12033,20 +14382,25 @@ func (pt *ProjectTask) UnmarshalJSON(body []byte) error { type BasicProjectTaskProperties interface { AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) AsValidateMongoDbTaskProperties() (*ValidateMongoDbTaskProperties, bool) + AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) + AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) AsMigrateMongoDbTaskProperties() (*MigrateMongoDbTaskProperties, bool) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) + AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) + AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) + AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) AsConnectToMongoDbTaskProperties() (*ConnectToMongoDbTaskProperties, bool) @@ -12066,7 +14420,7 @@ type ProjectTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -12086,6 +14440,10 @@ func unmarshalBasicProjectTaskProperties(body []byte) (BasicProjectTaskPropertie var vmdtp ValidateMongoDbTaskProperties err := json.Unmarshal(body, &vmdtp) return vmdtp, err + case string(TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS): + var vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties + err := json.Unmarshal(body, &vmisssmstp) + return vmisssmstp, err case string(TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI): var vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties err := json.Unmarshal(body, &vmisssmtp) @@ -12110,6 +14468,10 @@ func unmarshalBasicProjectTaskProperties(body []byte) (BasicProjectTaskPropertie var msssdtp MigrateSQLServerSQLDbTaskProperties err := json.Unmarshal(body, &msssdtp) return msssdtp, err + case string(TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS): + var msssmstp MigrateSQLServerSQLMISyncTaskProperties + err := json.Unmarshal(body, &msssmstp) + return msssmstp, err case string(TaskTypeMigrateSQLServerAzureSQLDbMI): var msssmtp MigrateSQLServerSQLMITaskProperties err := json.Unmarshal(body, &msssmtp) @@ -12122,6 +14484,10 @@ func unmarshalBasicProjectTaskProperties(body []byte) (BasicProjectTaskPropertie var cttadfmstp ConnectToTargetAzureDbForMySQLTaskProperties err := json.Unmarshal(body, &cttadfmstp) return cttadfmstp, err + case string(TaskTypeConnectToTargetAzureSQLDbMISyncLRS): + var cttsmstp ConnectToTargetSQLMISyncTaskProperties + err := json.Unmarshal(body, &cttsmstp) + return cttsmstp, err case string(TaskTypeConnectToTargetAzureSQLDbMI): var cttsmtp ConnectToTargetSQLMITaskProperties err := json.Unmarshal(body, &cttsmtp) @@ -12134,6 +14500,10 @@ func unmarshalBasicProjectTaskProperties(body []byte) (BasicProjectTaskPropertie var gutstp GetUserTablesSQLTaskProperties err := json.Unmarshal(body, &gutstp) return gutstp, err + case string(TaskTypeConnectToTargetAzureDbForPostgreSQLSync): + var cttadfpsstp ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties + err := json.Unmarshal(body, &cttadfpsstp) + return cttadfpsstp, err case string(TaskTypeConnectToTargetSQLDbSync): var cttssdstp ConnectToTargetSQLSQLDbSyncTaskProperties err := json.Unmarshal(body, &cttssdstp) @@ -12142,6 +14512,10 @@ func unmarshalBasicProjectTaskProperties(body []byte) (BasicProjectTaskPropertie var cttsdtp ConnectToTargetSQLDbTaskProperties err := json.Unmarshal(body, &cttsdtp) return cttsdtp, err + case string(TaskTypeConnectToSourcePostgreSQLSync): + var ctspsstp ConnectToSourcePostgreSQLSyncTaskProperties + err := json.Unmarshal(body, &ctspsstp) + return ctspsstp, err case string(TaskTypeConnectToSourceSQLServerSync): var ctsssstp ConnectToSourceSQLServerSyncTaskProperties err := json.Unmarshal(body, &ctsssstp) @@ -12219,6 +14593,11 @@ func (ptp ProjectTaskProperties) AsValidateMongoDbTaskProperties() (*ValidateMon return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. func (ptp ProjectTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -12249,6 +14628,11 @@ func (ptp ProjectTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*Migra return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. func (ptp ProjectTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -12264,6 +14648,11 @@ func (ptp ProjectTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties( return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. func (ptp ProjectTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -12279,6 +14668,11 @@ func (ptp ProjectTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTab return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. func (ptp ProjectTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -12289,6 +14683,11 @@ func (ptp ProjectTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*Connec return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. +func (ptp ProjectTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ProjectTaskProperties. func (ptp ProjectTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -13675,7 +16074,7 @@ type SQLConnectionInfo struct { UserName *string `json:"userName,omitempty"` // Password - Password credential. Password *string `json:"password,omitempty"` - // Type - Possible values include: 'TypeUnknown', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeMongoDbConnectionInfo', 'TypeSQLConnectionInfo' + // Type - Possible values include: 'TypeUnknown', 'TypeMiSQLConnectionInfo', 'TypePostgreSQLConnectionInfo', 'TypeMySQLConnectionInfo', 'TypeMongoDbConnectionInfo', 'TypeSQLConnectionInfo' Type Type `json:"type,omitempty"` } @@ -13713,6 +16112,11 @@ func (sci SQLConnectionInfo) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsMiSQLConnectionInfo is the BasicConnectionInfo implementation for SQLConnectionInfo. +func (sci SQLConnectionInfo) AsMiSQLConnectionInfo() (*MiSQLConnectionInfo, bool) { + return nil, false +} + // AsPostgreSQLConnectionInfo is the BasicConnectionInfo implementation for SQLConnectionInfo. func (sci SQLConnectionInfo) AsPostgreSQLConnectionInfo() (*PostgreSQLConnectionInfo, bool) { return nil, false @@ -13751,6 +16155,23 @@ type SQLMigrationTaskInput struct { TargetConnectionInfo *SQLConnectionInfo `json:"targetConnectionInfo,omitempty"` } +// SQLServerSQLMISyncTaskInput input for task that migrates SQL Server databases to Azure SQL Database +// Managed Instance online scenario. +type SQLServerSQLMISyncTaskInput struct { + // SelectedDatabases - Databases to migrate + SelectedDatabases *[]MigrateSQLServerSQLMIDatabaseInput `json:"selectedDatabases,omitempty"` + // BackupFileShare - Backup file share information for all selected databases. + BackupFileShare *FileShare `json:"backupFileShare,omitempty"` + // StorageResourceID - Fully qualified resourceId of storage + StorageResourceID *string `json:"storageResourceId,omitempty"` + // SourceConnectionInfo - Connection information for source SQL Server + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Connection information for Azure SQL Database Managed Instance + TargetConnectionInfo *MiSQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // AzureApp - Azure Active Directory Application the DMS instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account + AzureApp *AzureActiveDirectoryApp `json:"azureApp,omitempty"` +} + // StartMigrationScenarioServerRoleResult server role migration result type StartMigrationScenarioServerRoleResult struct { // Name - Name of server role. @@ -13967,7 +16388,7 @@ type ValidateMigrationInputSQLServerSQLDbSyncTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -14009,6 +16430,11 @@ func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsValid return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -14039,6 +16465,11 @@ func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsMigra return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -14054,6 +16485,11 @@ func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConne return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -14069,6 +16505,11 @@ func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsGetUs return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -14079,6 +16520,11 @@ func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConne return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. +func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLDbSyncTaskProperties. func (vmisssdstp ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -14191,6 +16637,298 @@ func (vmisssdstp *ValidateMigrationInputSQLServerSQLDbSyncTaskProperties) Unmars return nil } +// ValidateMigrationInputSQLServerSQLMISyncTaskInput input for task that migrates SQL Server databases to +// Azure SQL Database Managed Instance online scenario. +type ValidateMigrationInputSQLServerSQLMISyncTaskInput struct { + // SelectedDatabases - Databases to migrate + SelectedDatabases *[]MigrateSQLServerSQLMIDatabaseInput `json:"selectedDatabases,omitempty"` + // BackupFileShare - Backup file share information for all selected databases. + BackupFileShare *FileShare `json:"backupFileShare,omitempty"` + // StorageResourceID - Fully qualified resourceId of storage + StorageResourceID *string `json:"storageResourceId,omitempty"` + // SourceConnectionInfo - Connection information for source SQL Server + SourceConnectionInfo *SQLConnectionInfo `json:"sourceConnectionInfo,omitempty"` + // TargetConnectionInfo - Connection information for Azure SQL Database Managed Instance + TargetConnectionInfo *MiSQLConnectionInfo `json:"targetConnectionInfo,omitempty"` + // AzureApp - Azure Active Directory Application the DMS instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account + AzureApp *AzureActiveDirectoryApp `json:"azureApp,omitempty"` +} + +// ValidateMigrationInputSQLServerSQLMISyncTaskOutput output for task that validates migration input for +// Azure SQL Database Managed Instance online migration +type ValidateMigrationInputSQLServerSQLMISyncTaskOutput struct { + // ID - Database identifier + ID *string `json:"id,omitempty"` + // Name - Name of database + Name *string `json:"name,omitempty"` + // ValidationErrors - Errors associated with a selected database object + ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` +} + +// ValidateMigrationInputSQLServerSQLMISyncTaskProperties properties for task that validates migration +// input for SQL to Azure SQL Database Managed Instance sync scenario +type ValidateMigrationInputSQLServerSQLMISyncTaskProperties struct { + // Input - Task input + Input *ValidateMigrationInputSQLServerSQLMISyncTaskInput `json:"input,omitempty"` + // Output - Task output. This is ignored if submitted. + Output *[]ValidateMigrationInputSQLServerSQLMISyncTaskOutput `json:"output,omitempty"` + // Errors - Array of errors. This is ignored if submitted. + Errors *[]ODataError `json:"errors,omitempty"` + // State - The state of the task. This is ignored if submitted. Possible values include: 'TaskStateUnknown', 'TaskStateQueued', 'TaskStateRunning', 'TaskStateCanceled', 'TaskStateSucceeded', 'TaskStateFailed', 'TaskStateFailedInputValidation', 'TaskStateFaulted' + State TaskState `json:"state,omitempty"` + // Commands - Array of command properties. + Commands *[]BasicCommandProperties `json:"commands,omitempty"` + // ClientData - Key value pairs of client data to attach meta data information to task + ClientData map[string]*string `json:"clientData"` + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + TaskType TaskType `json:"taskType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) MarshalJSON() ([]byte, error) { + vmisssmstp.TaskType = TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS + objectMap := make(map[string]interface{}) + if vmisssmstp.Input != nil { + objectMap["input"] = vmisssmstp.Input + } + if vmisssmstp.Output != nil { + objectMap["output"] = vmisssmstp.Output + } + if vmisssmstp.Errors != nil { + objectMap["errors"] = vmisssmstp.Errors + } + if vmisssmstp.State != "" { + objectMap["state"] = vmisssmstp.State + } + if vmisssmstp.Commands != nil { + objectMap["commands"] = vmisssmstp.Commands + } + if vmisssmstp.ClientData != nil { + objectMap["clientData"] = vmisssmstp.ClientData + } + if vmisssmstp.TaskType != "" { + objectMap["taskType"] = vmisssmstp.TaskType + } + return json.Marshal(objectMap) +} + +// AsGetTdeCertificatesSQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsGetTdeCertificatesSQLTaskProperties() (*GetTdeCertificatesSQLTaskProperties, bool) { + return nil, false +} + +// AsValidateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsValidateMongoDbTaskProperties() (*ValidateMongoDbTaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return &vmisssmstp, true +} + +// AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsValidateMigrationInputSQLServerSQLDbSyncTaskProperties() (*ValidateMigrationInputSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsMigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties() (*MigratePostgreSQLAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateMySQLAzureDbForMySQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsMigrateMySQLAzureDbForMySQLSyncTaskProperties() (*MigrateMySQLAzureDbForMySQLSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLDbSyncTaskProperties() (*MigrateSQLServerSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLDbTaskProperties() (*MigrateSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { + return nil, false +} + +// AsMigrateMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsMigrateMongoDbTaskProperties() (*MigrateMongoDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForMySQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToTargetAzureDbForMySQLTaskProperties() (*ConnectToTargetAzureDbForMySQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsGetUserTablesSQLSyncTaskProperties() (*GetUserTablesSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsGetUserTablesSQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsGetUserTablesSQLTaskProperties() (*GetUserTablesSQLTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToTargetSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToTargetSQLDbTaskProperties() (*ConnectToTargetSQLDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceSQLServerTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToSourceSQLServerTaskProperties() (*ConnectToSourceSQLServerTaskProperties, bool) { + return nil, false +} + +// AsConnectToMongoDbTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToMongoDbTaskProperties() (*ConnectToMongoDbTaskProperties, bool) { + return nil, false +} + +// AsConnectToSourceMySQLTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsConnectToSourceMySQLTaskProperties() (*ConnectToSourceMySQLTaskProperties, bool) { + return nil, false +} + +// AsMigrateSchemaSQLServerSQLDbTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsMigrateSchemaSQLServerSQLDbTaskProperties() (*MigrateSchemaSQLServerSQLDbTaskProperties, bool) { + return nil, false +} + +// AsProjectTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsProjectTaskProperties() (*ProjectTaskProperties, bool) { + return nil, false +} + +// AsBasicProjectTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMISyncTaskProperties. +func (vmisssmstp ValidateMigrationInputSQLServerSQLMISyncTaskProperties) AsBasicProjectTaskProperties() (BasicProjectTaskProperties, bool) { + return &vmisssmstp, true +} + +// UnmarshalJSON is the custom unmarshaler for ValidateMigrationInputSQLServerSQLMISyncTaskProperties struct. +func (vmisssmstp *ValidateMigrationInputSQLServerSQLMISyncTaskProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "input": + if v != nil { + var input ValidateMigrationInputSQLServerSQLMISyncTaskInput + err = json.Unmarshal(*v, &input) + if err != nil { + return err + } + vmisssmstp.Input = &input + } + case "output": + if v != nil { + var output []ValidateMigrationInputSQLServerSQLMISyncTaskOutput + err = json.Unmarshal(*v, &output) + if err != nil { + return err + } + vmisssmstp.Output = &output + } + case "errors": + if v != nil { + var errorsVar []ODataError + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + vmisssmstp.Errors = &errorsVar + } + case "state": + if v != nil { + var state TaskState + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + vmisssmstp.State = state + } + case "commands": + if v != nil { + commands, err := unmarshalBasicCommandPropertiesArray(*v) + if err != nil { + return err + } + vmisssmstp.Commands = &commands + } + case "clientData": + if v != nil { + var clientData map[string]*string + err = json.Unmarshal(*v, &clientData) + if err != nil { + return err + } + vmisssmstp.ClientData = clientData + } + case "taskType": + if v != nil { + var taskType TaskType + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + vmisssmstp.TaskType = taskType + } + } + } + + return nil +} + // ValidateMigrationInputSQLServerSQLMITaskInput input for task that validates migration input for SQL to // Azure SQL Managed Instance type ValidateMigrationInputSQLServerSQLMITaskInput struct { @@ -14246,7 +16984,7 @@ type ValidateMigrationInputSQLServerSQLMITaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -14288,6 +17026,11 @@ func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsValidateMo return nil, false } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return &vmisssmtp, true @@ -14318,6 +17061,11 @@ func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsMigrateSQL return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -14333,6 +17081,11 @@ func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToT return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -14348,6 +17101,11 @@ func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsGetUserTab return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -14358,6 +17116,11 @@ func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToT return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. +func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMigrationInputSQLServerSQLMITaskProperties. func (vmisssmtp ValidateMigrationInputSQLServerSQLMITaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false @@ -14484,7 +17247,7 @@ type ValidateMongoDbTaskProperties struct { Commands *[]BasicCommandProperties `json:"commands,omitempty"` // ClientData - Key value pairs of client data to attach meta data information to task ClientData map[string]*string `json:"clientData"` - // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' + // TaskType - Possible values include: 'TaskTypeUnknown', 'TaskTypeGetTDECertificatesSQL', 'TaskTypeValidateMongoDb', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMISyncLRS', 'TaskTypeValidateMigrationInputSQLServerAzureSQLDbMI', 'TaskTypeValidateMigrationInputSQLServerSQLDbSync', 'TaskTypeMigratePostgreSQLAzureDbForPostgreSQLSync', 'TaskTypeMigrateMySQLAzureDbForMySQLSync', 'TaskTypeMigrateSQLServerAzureSQLDbSync', 'TaskTypeMigrateSQLServerSQLDb', 'TaskTypeMigrateSQLServerAzureSQLDbMISyncLRS', 'TaskTypeMigrateSQLServerAzureSQLDbMI', 'TaskTypeMigrateMongoDb', 'TaskTypeConnectToTargetAzureDbForMySQL', 'TaskTypeConnectToTargetAzureSQLDbMISyncLRS', 'TaskTypeConnectToTargetAzureSQLDbMI', 'TaskTypeGetUserTablesAzureSQLDbSync', 'TaskTypeGetUserTablesSQL', 'TaskTypeConnectToTargetAzureDbForPostgreSQLSync', 'TaskTypeConnectToTargetSQLDbSync', 'TaskTypeConnectToTargetSQLDb', 'TaskTypeConnectToSourcePostgreSQLSync', 'TaskTypeConnectToSourceSQLServerSync', 'TaskTypeConnectToSourceSQLServer', 'TaskTypeConnectMongoDb', 'TaskTypeConnectToSourceMySQL', 'TaskTypeMigrateSchemaSQLServerSQLDb' TaskType TaskType `json:"taskType,omitempty"` } @@ -14526,6 +17289,11 @@ func (vmdtp ValidateMongoDbTaskProperties) AsValidateMongoDbTaskProperties() (*V return &vmdtp, true } +// AsValidateMigrationInputSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMongoDbTaskProperties. +func (vmdtp ValidateMongoDbTaskProperties) AsValidateMigrationInputSQLServerSQLMISyncTaskProperties() (*ValidateMigrationInputSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsValidateMigrationInputSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMongoDbTaskProperties. func (vmdtp ValidateMongoDbTaskProperties) AsValidateMigrationInputSQLServerSQLMITaskProperties() (*ValidateMigrationInputSQLServerSQLMITaskProperties, bool) { return nil, false @@ -14556,6 +17324,11 @@ func (vmdtp ValidateMongoDbTaskProperties) AsMigrateSQLServerSQLDbTaskProperties return nil, false } +// AsMigrateSQLServerSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMongoDbTaskProperties. +func (vmdtp ValidateMongoDbTaskProperties) AsMigrateSQLServerSQLMISyncTaskProperties() (*MigrateSQLServerSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsMigrateSQLServerSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMongoDbTaskProperties. func (vmdtp ValidateMongoDbTaskProperties) AsMigrateSQLServerSQLMITaskProperties() (*MigrateSQLServerSQLMITaskProperties, bool) { return nil, false @@ -14571,6 +17344,11 @@ func (vmdtp ValidateMongoDbTaskProperties) AsConnectToTargetAzureDbForMySQLTaskP return nil, false } +// AsConnectToTargetSQLMISyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMongoDbTaskProperties. +func (vmdtp ValidateMongoDbTaskProperties) AsConnectToTargetSQLMISyncTaskProperties() (*ConnectToTargetSQLMISyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLMITaskProperties is the BasicProjectTaskProperties implementation for ValidateMongoDbTaskProperties. func (vmdtp ValidateMongoDbTaskProperties) AsConnectToTargetSQLMITaskProperties() (*ConnectToTargetSQLMITaskProperties, bool) { return nil, false @@ -14586,6 +17364,11 @@ func (vmdtp ValidateMongoDbTaskProperties) AsGetUserTablesSQLTaskProperties() (* return nil, false } +// AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMongoDbTaskProperties. +func (vmdtp ValidateMongoDbTaskProperties) AsConnectToTargetAzureDbForPostgreSQLSyncTaskProperties() (*ConnectToTargetAzureDbForPostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToTargetSQLSQLDbSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMongoDbTaskProperties. func (vmdtp ValidateMongoDbTaskProperties) AsConnectToTargetSQLSQLDbSyncTaskProperties() (*ConnectToTargetSQLSQLDbSyncTaskProperties, bool) { return nil, false @@ -14596,6 +17379,11 @@ func (vmdtp ValidateMongoDbTaskProperties) AsConnectToTargetSQLDbTaskProperties( return nil, false } +// AsConnectToSourcePostgreSQLSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMongoDbTaskProperties. +func (vmdtp ValidateMongoDbTaskProperties) AsConnectToSourcePostgreSQLSyncTaskProperties() (*ConnectToSourcePostgreSQLSyncTaskProperties, bool) { + return nil, false +} + // AsConnectToSourceSQLServerSyncTaskProperties is the BasicProjectTaskProperties implementation for ValidateMongoDbTaskProperties. func (vmdtp ValidateMongoDbTaskProperties) AsConnectToSourceSQLServerSyncTaskProperties() (*ConnectToSourceSQLServerSyncTaskProperties, bool) { return nil, false