From c33c3b31519dee126087bd98dcf1ac241f29c24c Mon Sep 17 00:00:00 2001 From: Kamil Pajdzik Date: Thu, 11 Oct 2018 10:02:22 -0700 Subject: [PATCH] Generate @azure/arm-datamigration package --- packages/@azure/arm-datamigration/.npmignore | 35 + packages/@azure/arm-datamigration/LICENSE.txt | 21 + packages/@azure/arm-datamigration/README.md | 77 + .../lib/dataMigrationServiceClient.ts | 52 + .../lib/dataMigrationServiceClientContext.ts | 62 + .../arm-datamigration/lib/models/index.ts | 7866 +++++++++++++++++ .../arm-datamigration/lib/models/mappers.ts | 7655 ++++++++++++++++ .../lib/models/operationsMappers.ts | 19 + .../lib/models/parameters.ts | 141 + .../lib/models/projectsMappers.ts | 142 + .../lib/models/resourceSkusMappers.ts | 22 + .../lib/models/servicesMappers.ts | 149 + .../lib/models/tasksMappers.ts | 142 + .../lib/models/usagesMappers.ts | 19 + .../arm-datamigration/lib/operations/index.ts | 16 + .../lib/operations/operations.ts | 125 + .../lib/operations/projects.ts | 421 + .../lib/operations/resourceSkus.ts | 128 + .../lib/operations/services.ts | 935 ++ .../arm-datamigration/lib/operations/tasks.ts | 601 ++ .../lib/operations/usages.ts | 135 + .../@azure/arm-datamigration/package.json | 42 + .../@azure/arm-datamigration/rollup.config.js | 31 + .../@azure/arm-datamigration/tsconfig.json | 19 + 24 files changed, 18855 insertions(+) create mode 100644 packages/@azure/arm-datamigration/.npmignore create mode 100644 packages/@azure/arm-datamigration/LICENSE.txt create mode 100644 packages/@azure/arm-datamigration/README.md create mode 100644 packages/@azure/arm-datamigration/lib/dataMigrationServiceClient.ts create mode 100644 packages/@azure/arm-datamigration/lib/dataMigrationServiceClientContext.ts create mode 100644 packages/@azure/arm-datamigration/lib/models/index.ts create mode 100644 packages/@azure/arm-datamigration/lib/models/mappers.ts create mode 100644 packages/@azure/arm-datamigration/lib/models/operationsMappers.ts create mode 100644 packages/@azure/arm-datamigration/lib/models/parameters.ts create mode 100644 packages/@azure/arm-datamigration/lib/models/projectsMappers.ts create mode 100644 packages/@azure/arm-datamigration/lib/models/resourceSkusMappers.ts create mode 100644 packages/@azure/arm-datamigration/lib/models/servicesMappers.ts create mode 100644 packages/@azure/arm-datamigration/lib/models/tasksMappers.ts create mode 100644 packages/@azure/arm-datamigration/lib/models/usagesMappers.ts create mode 100644 packages/@azure/arm-datamigration/lib/operations/index.ts create mode 100644 packages/@azure/arm-datamigration/lib/operations/operations.ts create mode 100644 packages/@azure/arm-datamigration/lib/operations/projects.ts create mode 100644 packages/@azure/arm-datamigration/lib/operations/resourceSkus.ts create mode 100644 packages/@azure/arm-datamigration/lib/operations/services.ts create mode 100644 packages/@azure/arm-datamigration/lib/operations/tasks.ts create mode 100644 packages/@azure/arm-datamigration/lib/operations/usages.ts create mode 100644 packages/@azure/arm-datamigration/package.json create mode 100644 packages/@azure/arm-datamigration/rollup.config.js create mode 100644 packages/@azure/arm-datamigration/tsconfig.json diff --git a/packages/@azure/arm-datamigration/.npmignore b/packages/@azure/arm-datamigration/.npmignore new file mode 100644 index 000000000000..3b46bc6202d8 --- /dev/null +++ b/packages/@azure/arm-datamigration/.npmignore @@ -0,0 +1,35 @@ +#git +.git +.gitignore +#gulp +gulpfile.js +#documentation +doc/ +docs/ +#dependencies +node_modules/ +#samples +sample/ +samples/ +#tests +test/ +tests/ +coverage/ +#tools and scripts +tools/ +scripts/ +#IDE settings +*.sln +.vscode/ +.idea +.editorconfig +.ntvs_analysis.* +#build tools +.travis.yml +.jenkins.yml +.codeclimate.yml +appveyor.yml +# Nuget packages # +.nuget/ +packages/ +packages.config diff --git a/packages/@azure/arm-datamigration/LICENSE.txt b/packages/@azure/arm-datamigration/LICENSE.txt new file mode 100644 index 000000000000..a70e8cf66038 --- /dev/null +++ b/packages/@azure/arm-datamigration/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/@azure/arm-datamigration/README.md b/packages/@azure/arm-datamigration/README.md new file mode 100644 index 000000000000..8bf74770ccd1 --- /dev/null +++ b/packages/@azure/arm-datamigration/README.md @@ -0,0 +1,77 @@ +# Azure DataMigrationServiceClient SDK for JavaScript +This package contains an isomorphic SDK for DataMigrationServiceClient. + +## Currently supported environments +- Node.js version 6.x.x or higher +- Browser JavaScript + +## How to Install +``` +npm install @azure/arm-datamigration +``` + + +## How to use + +### nodejs - Authentication, client creation and listSkus resourceSkus as an example written in TypeScript. + +```ts +import * as msRest from "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; +import * as msRestNodeAuth from "ms-rest-nodeauth"; +import { DataMigrationServiceClient, DataMigrationServiceModels, DataMigrationServiceMappers } from "@azure/arm-datamigration"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new DataMigrationServiceClient(creds, subscriptionId); + client.resourceSkus.listSkus().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +### browser - Authentication, client creation and listSkus resourceSkus as an example written in JavaScript. +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + @azure/arm-datamigration sample + + + + + + + + + +``` + +# Related projects + - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) diff --git a/packages/@azure/arm-datamigration/lib/dataMigrationServiceClient.ts b/packages/@azure/arm-datamigration/lib/dataMigrationServiceClient.ts new file mode 100644 index 000000000000..026f9af9a97b --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/dataMigrationServiceClient.ts @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { DataMigrationServiceClientContext } from "./dataMigrationServiceClientContext"; + + +class DataMigrationServiceClient extends DataMigrationServiceClientContext { + // Operation groups + resourceSkus: operations.ResourceSkus; + services: operations.Services; + tasks: operations.Tasks; + projects: operations.Projects; + usages: operations.Usages; + operations: operations.Operations; + + /** + * Initializes a new instance of the DataMigrationServiceClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Identifier of the subscription + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.DataMigrationServiceClientOptions) { + super(credentials, subscriptionId, options); + this.resourceSkus = new operations.ResourceSkus(this); + this.services = new operations.Services(this); + this.tasks = new operations.Tasks(this); + this.projects = new operations.Projects(this); + this.usages = new operations.Usages(this); + this.operations = new operations.Operations(this); + } +} + +// Operation Specifications + +export { + DataMigrationServiceClient, + DataMigrationServiceClientContext, + Models as DataMigrationServiceModels, + Mappers as DataMigrationServiceMappers +}; +export * from "./operations"; diff --git a/packages/@azure/arm-datamigration/lib/dataMigrationServiceClientContext.ts b/packages/@azure/arm-datamigration/lib/dataMigrationServiceClientContext.ts new file mode 100644 index 000000000000..19ba18d0bd65 --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/dataMigrationServiceClientContext.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as Models from "./models"; +import * as msRest from "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; + +const packageName = "@azure/arm-datamigration"; +const packageVersion = "1.0.0-preview"; + +export class DataMigrationServiceClientContext extends msRestAzure.AzureServiceClient { + + credentials: msRest.ServiceClientCredentials; + + subscriptionId: string; + + acceptLanguage: string; + + longRunningOperationRetryTimeout: number; + + /** + * Initializes a new instance of the DataMigrationServiceClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Identifier of the subscription + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.DataMigrationServiceClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + super(credentials, options); + + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + this.addUserAgentInfo(`${packageName}/${packageVersion}`); + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/packages/@azure/arm-datamigration/lib/models/index.ts b/packages/@azure/arm-datamigration/lib/models/index.ts new file mode 100644 index 000000000000..c4ed2ed235b9 --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/models/index.ts @@ -0,0 +1,7866 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import { BaseResource, CloudError, AzureServiceClientOptions } from "ms-rest-azure-js"; +import * as msRest from "ms-rest-js"; + +export { BaseResource, CloudError }; + + +/** + * @interface + * An interface representing ODataError. + * Error information in OData format. + * + */ +export interface ODataError { + /** + * @member {string} [code] The machine-readable description of the error, + * such as 'InvalidRequest' or 'InternalServerError' + */ + code?: string; + /** + * @member {string} [message] The human-readable description of the error + */ + message?: string; + /** + * @member {ODataError[]} [details] Inner errors that caused this error + */ + details?: ODataError[]; +} + +/** + * @interface + * An interface representing ReportableException. + * Exception object for all custom exceptions + * + */ +export interface ReportableException { + /** + * @member {string} [message] Error message + */ + message?: string; + /** + * @member {string} [actionableMessage] Actionable steps for this exception + */ + actionableMessage?: string; + /** + * @member {string} [filePath] The path to the file where exception occurred + */ + filePath?: string; + /** + * @member {string} [lineNumber] The line number where exception occurred + */ + lineNumber?: string; + /** + * @member {number} [hResult] Coded numerical value that is assigned to a + * specific exception + */ + hResult?: number; + /** + * @member {string} [stackTrace] Stack trace + */ + stackTrace?: string; +} + +/** + * @interface + * An interface representing MigrateSyncCompleteCommandOutput. + * Output for command that completes sync migration for a database. + * + */ +export interface MigrateSyncCompleteCommandOutput { + /** + * @member {ReportableException[]} [errors] List of errors that happened + * during the command execution + */ + errors?: ReportableException[]; +} + +/** + * @interface + * An interface representing MigrateSyncCompleteCommandInput. + * Input for command that completes sync migration for a database. + * + */ +export interface MigrateSyncCompleteCommandInput { + /** + * @member {string} databaseName Name of database + */ + databaseName: string; + /** + * @member {Date} [commitTimeStamp] Time stamp to complete + */ + commitTimeStamp?: Date; +} + +/** + * Contains the possible cases for CommandProperties. + */ +export type CommandPropertiesUnion = CommandProperties | MigrateSyncCompleteCommandProperties; + +/** + * @interface + * An interface representing CommandProperties. + * Base class for all types of DMS command properties. If command is not + * supported by current client, this object is returned. + * + */ +export interface CommandProperties { + /** + * @member {string} commandType Polymorphic Discriminator + */ + commandType: "Unknown"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {CommandState} [state] The state of the command. This is ignored + * if submitted. Possible values include: 'Unknown', 'Accepted', 'Running', + * 'Succeeded', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: CommandState; +} + +/** + * @interface + * An interface representing MigrateSyncCompleteCommandProperties. + * Properties for the command that completes sync migration for a database. + * + */ +export interface MigrateSyncCompleteCommandProperties { + /** + * @member {string} commandType Polymorphic Discriminator + */ + commandType: "Migrate.Sync.Complete.Database"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {CommandState} [state] The state of the command. This is ignored + * if submitted. Possible values include: 'Unknown', 'Accepted', 'Running', + * 'Succeeded', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: CommandState; + /** + * @member {MigrateSyncCompleteCommandInput} [input] Command input + */ + input?: MigrateSyncCompleteCommandInput; + /** + * @member {MigrateSyncCompleteCommandOutput} [output] Command output. This + * is ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: MigrateSyncCompleteCommandOutput; +} + +/** + * @interface + * An interface representing Resource. + * ARM resource. + * + * @extends BaseResource + */ +export interface Resource extends BaseResource { + /** + * @member {string} [id] Resource ID. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Resource name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] Resource type. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; +} + +/** + * @interface + * An interface representing TrackedResource. + * ARM tracked top level resource. + * + * @extends Resource + */ +export interface TrackedResource extends Resource { + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * @member {string} location Resource location. + */ + location: string; +} + +/** + * @interface + * An interface representing GetTdeCertificatesSqlTaskOutput. + * Output of the task that gets TDE certificates in Base64 encoded format. + * + */ +export interface GetTdeCertificatesSqlTaskOutput { + /** + * @member {{ [propertyName: string]: string[] }} [base64EncodedCertificates] + * Mapping from certificate name to base 64 encoded format. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly base64EncodedCertificates?: { [propertyName: string]: string[] }; + /** + * @member {ReportableException[]} [validationErrors] Validation errors + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly validationErrors?: ReportableException[]; +} + +/** + * @interface + * An interface representing SelectedCertificateInput. + * Info for ertificate to be exported for TDE enabled databases. + * + */ +export interface SelectedCertificateInput { + /** + * @member {string} certificateName Name of certificate to be exported. + */ + certificateName: string; + /** + * @member {string} password Password to use for encrypting the exported + * certificate. + */ + password: string; +} + +/** + * @interface + * An interface representing FileShare. + * File share information with Path, Username, and Password. + * + */ +export interface FileShare { + /** + * @member {string} [userName] User name credential to connect to the share + * location + */ + userName?: string; + /** + * @member {string} [password] Password credential used to connect to the + * share location. + */ + password?: string; + /** + * @member {string} path The folder path for this share. + */ + path: string; +} + +/** + * Contains the possible cases for ConnectionInfo. + */ +export type ConnectionInfoUnion = ConnectionInfo | PostgreSqlConnectionInfo | MySqlConnectionInfo | SqlConnectionInfo; + +/** + * @interface + * An interface representing ConnectionInfo. + * Defines the connection properties of a server + * + */ +export interface ConnectionInfo { + /** + * @member {string} type Polymorphic Discriminator + */ + type: "Unknown"; + /** + * @member {string} [userName] User name + */ + userName?: string; + /** + * @member {string} [password] Password credential. + */ + password?: string; +} + +/** + * @interface + * An interface representing PostgreSqlConnectionInfo. + * Information for connecting to PostgreSQL server + * + */ +export interface PostgreSqlConnectionInfo { + /** + * @member {string} type Polymorphic Discriminator + */ + type: "PostgreSqlConnectionInfo"; + /** + * @member {string} [userName] User name + */ + userName?: string; + /** + * @member {string} [password] Password credential. + */ + password?: string; + /** + * @member {string} serverName Name of the server + */ + serverName: string; + /** + * @member {string} [databaseName] Name of the database + */ + databaseName?: string; + /** + * @member {number} port Port for Server + */ + port: number; +} + +/** + * @interface + * An interface representing MySqlConnectionInfo. + * Information for connecting to MySQL server + * + */ +export interface MySqlConnectionInfo { + /** + * @member {string} type Polymorphic Discriminator + */ + type: "MySqlConnectionInfo"; + /** + * @member {string} [userName] User name + */ + userName?: string; + /** + * @member {string} [password] Password credential. + */ + password?: string; + /** + * @member {string} serverName Name of the server + */ + serverName: string; + /** + * @member {number} port Port for Server + */ + port: number; +} + +/** + * @interface + * An interface representing SqlConnectionInfo. + * Information for connecting to SQL database server + * + */ +export interface SqlConnectionInfo { + /** + * @member {string} type Polymorphic Discriminator + */ + type: "SqlConnectionInfo"; + /** + * @member {string} [userName] User name + */ + userName?: string; + /** + * @member {string} [password] Password credential. + */ + password?: string; + /** + * @member {string} dataSource Data source in the format + * Protocol:MachineName\SQLServerInstanceName,PortNumber + */ + dataSource: string; + /** + * @member {AuthenticationType} [authentication] Authentication type to use + * for connection. Possible values include: 'None', 'WindowsAuthentication', + * 'SqlAuthentication', 'ActiveDirectoryIntegrated', + * 'ActiveDirectoryPassword' + */ + authentication?: AuthenticationType; + /** + * @member {boolean} [encryptConnection] Whether to encrypt the connection. + * Default value: true . + */ + encryptConnection?: boolean; + /** + * @member {string} [additionalSettings] Additional connection settings + */ + additionalSettings?: string; + /** + * @member {boolean} [trustServerCertificate] Whether to trust the server + * certificate. Default value: false . + */ + trustServerCertificate?: boolean; + /** + * @member {SqlSourcePlatform} [platform] Server platform type for + * connection. Possible values include: 'SqlOnPrem' + */ + platform?: SqlSourcePlatform; +} + +/** + * @interface + * An interface representing GetTdeCertificatesSqlTaskInput. + * Input for the task that gets TDE certificates in Base64 encoded format. + * + */ +export interface GetTdeCertificatesSqlTaskInput { + /** + * @member {SqlConnectionInfo} connectionInfo Connection information for SQL + * Server + */ + connectionInfo: SqlConnectionInfo; + /** + * @member {FileShare} backupFileShare Backup file share information for file + * share to be used for temporarily storing files. + */ + backupFileShare: FileShare; + /** + * @member {SelectedCertificateInput[]} selectedCertificates List containing + * certificate names and corresponding password to use for encrypting the + * exported certificate. + */ + selectedCertificates: SelectedCertificateInput[]; +} + +/** + * Contains the possible cases for ProjectTaskProperties. + */ +export type ProjectTaskPropertiesUnion = ProjectTaskProperties | GetTdeCertificatesSqlTaskProperties | ValidateMigrationInputSqlServerSqlMITaskProperties | ValidateMigrationInputSqlServerSqlDbSyncTaskProperties | MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties | MigrateMySqlAzureDbForMySqlSyncTaskProperties | MigrateSqlServerSqlDbSyncTaskProperties | MigrateSqlServerSqlDbTaskProperties | MigrateSqlServerSqlMITaskProperties | ConnectToTargetAzureDbForMySqlTaskProperties | ConnectToTargetSqlMITaskProperties | GetUserTablesSqlSyncTaskProperties | GetUserTablesSqlTaskProperties | ConnectToTargetSqlSqlDbSyncTaskProperties | ConnectToTargetSqlDbTaskProperties | ConnectToSourceSqlServerSyncTaskProperties | ConnectToSourceSqlServerTaskProperties | ConnectToSourceMySqlTaskProperties | MigrateSchemaSqlServerSqlDbTaskProperties; + +/** + * @interface + * An interface representing ProjectTaskProperties. + * Base class for all types of DMS task properties. If task is not supported by + * current client, this object is returned. + * + */ +export interface ProjectTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "Unknown"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; +} + +/** + * @interface + * An interface representing GetTdeCertificatesSqlTaskProperties. + * Properties for the task that gets TDE certificates in Base64 encoded format. + * + */ +export interface GetTdeCertificatesSqlTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "GetTDECertificates.Sql"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {GetTdeCertificatesSqlTaskInput} [input] Task input + */ + input?: GetTdeCertificatesSqlTaskInput; + /** + * @member {GetTdeCertificatesSqlTaskOutput[]} [output] Task output. This is + * ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: GetTdeCertificatesSqlTaskOutput[]; +} + +/** + * @interface + * An interface representing DatabaseBackupInfo. + * Information about backup files when existing backup mode is used. + * + */ +export interface DatabaseBackupInfo { + /** + * @member {string} [databaseName] Database name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {BackupType} [backupType] Backup Type. Possible values include: + * 'Database', 'TransactionLog', 'File', 'DifferentialDatabase', + * 'DifferentialFile', 'Partial', 'DifferentialPartial' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly backupType?: BackupType; + /** + * @member {string[]} [backupFiles] The list of backup files for the current + * database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly backupFiles?: string[]; + /** + * @member {number} [position] Position of current database backup in the + * file. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly position?: number; + /** + * @member {boolean} [isDamaged] Database was damaged when backed up, but the + * backup operation was requested to continue despite errors. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isDamaged?: boolean; + /** + * @member {boolean} [isCompressed] Whether the backup set is compressed + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isCompressed?: boolean; + /** + * @member {number} [familyCount] Number of files in the backup set. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly familyCount?: number; + /** + * @member {Date} [backupFinishDate] Date and time when the backup operation + * finished. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly backupFinishDate?: Date; +} + +/** + * @interface + * An interface representing ValidateMigrationInputSqlServerSqlMITaskOutput. + * Output for task that validates migration input for SQL to Azure SQL Managed + * Instance migrations + * + */ +export interface ValidateMigrationInputSqlServerSqlMITaskOutput { + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Name of database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {ReportableException[]} [restoreDatabaseNameErrors] Errors + * associated with the RestoreDatabaseName + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly restoreDatabaseNameErrors?: ReportableException[]; + /** + * @member {ReportableException[]} [backupFolderErrors] Errors associated + * with the BackupFolder path + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly backupFolderErrors?: ReportableException[]; + /** + * @member {ReportableException[]} [backupShareCredentialsErrors] Errors + * associated with backup share user name and password credentials + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly backupShareCredentialsErrors?: ReportableException[]; + /** + * @member {ReportableException[]} [backupStorageAccountErrors] Errors + * associated with the storage account provided. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly backupStorageAccountErrors?: ReportableException[]; + /** + * @member {ReportableException[]} [existingBackupErrors] Errors associated + * with existing backup files. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly existingBackupErrors?: ReportableException[]; + /** + * @member {DatabaseBackupInfo} [databaseBackupInfo] Information about backup + * files when existing backup mode is used. + */ + databaseBackupInfo?: DatabaseBackupInfo; +} + +/** + * @interface + * An interface representing BlobShare. + * Blob container storage information. + * + */ +export interface BlobShare { + /** + * @member {string} sasUri SAS URI of Azure Storage Account Container. + */ + sasUri: string; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlMIDatabaseInput. + * Database specific information for SQL to Azure SQL DB Managed Instance + * migration task inputs + * + */ +export interface MigrateSqlServerSqlMIDatabaseInput { + /** + * @member {string} name Name of the database + */ + name: string; + /** + * @member {string} restoreDatabaseName Name of the database at destination + */ + restoreDatabaseName: string; + /** + * @member {FileShare} [backupFileShare] Backup file share information for + * backing up this database. + */ + backupFileShare?: FileShare; + /** + * @member {string[]} [backupFilePaths] The list of backup files to be used + * in case of existing backups. + */ + backupFilePaths?: string[]; +} + +/** + * @interface + * An interface representing ValidateMigrationInputSqlServerSqlMITaskInput. + * Input for task that validates migration input for SQL to Azure SQL Managed + * Instance + * + */ +export interface ValidateMigrationInputSqlServerSqlMITaskInput { + /** + * @member {SqlConnectionInfo} sourceConnectionInfo Information for + * connecting to source + */ + sourceConnectionInfo: SqlConnectionInfo; + /** + * @member {SqlConnectionInfo} targetConnectionInfo Information for + * connecting to target + */ + targetConnectionInfo: SqlConnectionInfo; + /** + * @member {MigrateSqlServerSqlMIDatabaseInput[]} selectedDatabases Databases + * to migrate + */ + selectedDatabases: MigrateSqlServerSqlMIDatabaseInput[]; + /** + * @member {string[]} [selectedLogins] Logins to migrate + */ + selectedLogins?: string[]; + /** + * @member {FileShare} [backupFileShare] Backup file share information for + * all selected databases. + */ + backupFileShare?: FileShare; + /** + * @member {BlobShare} backupBlobShare SAS URI of Azure Storage Account + * Container to be used for storing backup files. + */ + backupBlobShare: BlobShare; + /** + * @member {BackupMode} [backupMode] Backup Mode to specify whether to use + * existing backup or create new backup. Possible values include: + * 'CreateBackup', 'ExistingBackup' + */ + backupMode?: BackupMode; +} + +/** + * @interface + * An interface representing ValidateMigrationInputSqlServerSqlMITaskProperties. + * Properties for task that validates migration input for SQL to Azure SQL + * Database Managed Instance + * + */ +export interface ValidateMigrationInputSqlServerSqlMITaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "ValidateMigrationInput.SqlServer.AzureSqlDbMI"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {ValidateMigrationInputSqlServerSqlMITaskInput} [input] Task input + */ + input?: ValidateMigrationInputSqlServerSqlMITaskInput; + /** + * @member {ValidateMigrationInputSqlServerSqlMITaskOutput[]} [output] Task + * output. This is ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: ValidateMigrationInputSqlServerSqlMITaskOutput[]; +} + +/** + * @interface + * An interface representing ValidateSyncMigrationInputSqlServerTaskOutput. + * Output for task that validates migration input for SQL sync migrations + * + */ +export interface ValidateSyncMigrationInputSqlServerTaskOutput { + /** + * @member {string} [id] Database identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Name of database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {ReportableException[]} [validationErrors] Errors associated with + * a selected database object + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly validationErrors?: ReportableException[]; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbSyncDatabaseInput. + * Database specific information for SQL to Azure SQL DB sync migration task + * inputs + * + */ +export interface MigrateSqlServerSqlDbSyncDatabaseInput { + /** + * @member {string} [id] Unique identifier for database + */ + id?: string; + /** + * @member {string} [name] Name of database + */ + name?: string; + /** + * @member {string} [targetDatabaseName] Target database name + */ + targetDatabaseName?: string; + /** + * @member {string} [schemaName] Schema name to be migrated + */ + schemaName?: string; + /** + * @member {{ [propertyName: string]: string }} [tableMap] Mapping of source + * to target tables + */ + tableMap?: { [propertyName: string]: string }; + /** + * @member {{ [propertyName: string]: string }} [migrationSetting] Migration + * settings which tune the migration behavior + */ + migrationSetting?: { [propertyName: string]: string }; + /** + * @member {{ [propertyName: string]: string }} [sourceSetting] Source + * settings to tune source endpoint migration behavior + */ + sourceSetting?: { [propertyName: string]: string }; + /** + * @member {{ [propertyName: string]: string }} [targetSetting] Target + * settings to tune target endpoint migration behavior + */ + targetSetting?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing ValidateSyncMigrationInputSqlServerTaskInput. + * Input for task that validates migration input for SQL sync migrations + * + */ +export interface ValidateSyncMigrationInputSqlServerTaskInput { + /** + * @member {SqlConnectionInfo} sourceConnectionInfo Information for + * connecting to source SQL server + */ + sourceConnectionInfo: SqlConnectionInfo; + /** + * @member {SqlConnectionInfo} targetConnectionInfo Information for + * connecting to target + */ + targetConnectionInfo: SqlConnectionInfo; + /** + * @member {MigrateSqlServerSqlDbSyncDatabaseInput[]} selectedDatabases + * Databases to migrate + */ + selectedDatabases: MigrateSqlServerSqlDbSyncDatabaseInput[]; +} + +/** + * @interface + * An interface representing ValidateMigrationInputSqlServerSqlDbSyncTaskProperties. + * Properties for task that validates migration input for SQL to Azure SQL DB + * sync migrations + * + */ +export interface ValidateMigrationInputSqlServerSqlDbSyncTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "ValidateMigrationInput.SqlServer.SqlDb.Sync"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {ValidateSyncMigrationInputSqlServerTaskInput} [input] Task input + */ + input?: ValidateSyncMigrationInputSqlServerTaskInput; + /** + * @member {ValidateSyncMigrationInputSqlServerTaskOutput[]} [output] Task + * output. This is ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: ValidateSyncMigrationInputSqlServerTaskOutput[]; +} + +/** + * @interface + * An interface representing SyncMigrationDatabaseErrorEvent. + * Database migration errors for online migration + * + */ +export interface SyncMigrationDatabaseErrorEvent { + /** + * @member {string} [timestampString] String value of timestamp. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly timestampString?: string; + /** + * @member {string} [eventTypeString] Event type. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly eventTypeString?: string; + /** + * @member {string} [eventText] Event text. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly eventText?: string; +} + +/** + * Contains the possible cases for MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput. + */ +export type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputUnion = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput | MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError | MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError | MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel | MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel | MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel; + +/** + * @interface + * An interface representing MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput. + * Output for the task that migrates PostgreSQL databases to Azure Database for + * PostgreSQL for online migrations + * + */ +export interface MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; +} + +/** + * @interface + * An interface representing MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError. + */ +export interface MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "DatabaseLevelErrorOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [errorMessage] Error message + */ + errorMessage?: string; + /** + * @member {SyncMigrationDatabaseErrorEvent[]} [events] List of error events. + */ + events?: SyncMigrationDatabaseErrorEvent[]; +} + +/** + * @interface + * An interface representing MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError. + */ +export interface MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "ErrorOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {ReportableException} [error] Migration error + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly error?: ReportableException; +} + +/** + * @interface + * An interface representing MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel. + */ +export interface MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "TableLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [tableName] Name of the table + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly tableName?: string; + /** + * @member {string} [databaseName] Name of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {number} [cdcInsertCounter] Number of applied inserts + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcInsertCounter?: number; + /** + * @member {number} [cdcUpdateCounter] Number of applied updates + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcUpdateCounter?: number; + /** + * @member {number} [cdcDeleteCounter] Number of applied deletes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcDeleteCounter?: number; + /** + * @member {Date} [fullLoadEstFinishTime] Estimate to finish full load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadEstFinishTime?: Date; + /** + * @member {Date} [fullLoadStartedOn] Full load start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadStartedOn?: Date; + /** + * @member {Date} [fullLoadEndedOn] Full load end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadEndedOn?: Date; + /** + * @member {number} [fullLoadTotalRows] Number of rows applied in full load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadTotalRows?: number; + /** + * @member {SyncTableMigrationState} [state] Current state of the table + * migration. Possible values include: 'BEFORE_LOAD', 'FULL_LOAD', + * 'COMPLETED', 'CANCELED', 'ERROR', 'FAILED' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: SyncTableMigrationState; + /** + * @member {number} [totalChangesApplied] Total number of applied changes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly totalChangesApplied?: number; + /** + * @member {number} [dataErrorsCounter] Number of data errors occurred + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly dataErrorsCounter?: number; + /** + * @member {Date} [lastModifiedTime] Last modified time on target + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModifiedTime?: Date; +} + +/** + * @interface + * An interface representing MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel. + */ +export interface MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "DatabaseLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [databaseName] Name of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {SyncDatabaseMigrationReportingState} [migrationState] Migration + * state that this database is in. Possible values include: 'UNDEFINED', + * 'CONFIGURING', 'INITIALIAZING', 'STARTING', 'RUNNING', + * 'READY_TO_COMPLETE', 'COMPLETING', 'COMPLETE', 'CANCELLING', 'CANCELLED', + * 'FAILED' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly migrationState?: SyncDatabaseMigrationReportingState; + /** + * @member {number} [incomingChanges] Number of incoming changes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly incomingChanges?: number; + /** + * @member {number} [appliedChanges] Number of applied changes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly appliedChanges?: number; + /** + * @member {number} [cdcInsertCounter] Number of cdc inserts + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcInsertCounter?: number; + /** + * @member {number} [cdcDeleteCounter] Number of cdc deletes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcDeleteCounter?: number; + /** + * @member {number} [cdcUpdateCounter] Number of cdc updates + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcUpdateCounter?: number; + /** + * @member {number} [fullLoadCompletedTables] Number of tables completed in + * full load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadCompletedTables?: number; + /** + * @member {number} [fullLoadLoadingTables] Number of tables loading in full + * load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadLoadingTables?: number; + /** + * @member {number} [fullLoadQueuedTables] Number of tables queued in full + * load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadQueuedTables?: number; + /** + * @member {number} [fullLoadErroredTables] Number of tables errored in full + * load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadErroredTables?: number; + /** + * @member {boolean} [initializationCompleted] Indicates if initial load + * (full load) has been completed + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly initializationCompleted?: boolean; + /** + * @member {number} [latency] CDC apply latency + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly latency?: number; +} + +/** + * @interface + * An interface representing MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel. + */ +export interface MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "MigrationLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {string} [sourceServerVersion] Source server version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerVersion?: string; + /** + * @member {string} [sourceServer] Source server name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServer?: string; + /** + * @member {string} [targetServerVersion] Target server version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerVersion?: string; + /** + * @member {string} [targetServer] Target server name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServer?: string; +} + +/** + * @interface + * An interface representing MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput. + * Database specific information for PostgreSQL to Azure Database for + * PostgreSQL migration task inputs + * + */ +export interface MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput { + /** + * @member {string} [name] Name of the database + */ + name?: string; + /** + * @member {string} [targetDatabaseName] Name of target database. Note: + * Target database will be truncated before starting migration. + */ + targetDatabaseName?: string; +} + +/** + * @interface + * An interface representing MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput. + * Input for the task that migrates PostgreSQL databases to Azure Database for + * PostgreSQL for online migrations + * + */ +export interface MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput { + /** + * @member {MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput[]} + * selectedDatabases Databases to migrate + */ + selectedDatabases: MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput[]; + /** + * @member {PostgreSqlConnectionInfo} targetConnectionInfo Connection + * information for target Azure Database for PostgreSQL + */ + targetConnectionInfo: PostgreSqlConnectionInfo; + /** + * @member {PostgreSqlConnectionInfo} sourceConnectionInfo Connection + * information for source PostgreSQL + */ + sourceConnectionInfo: PostgreSqlConnectionInfo; +} + +/** + * @interface + * An interface representing MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties. + * Properties for the task that migrates PostgreSQL databases to Azure Database + * for PostgreSQL for online migrations + * + */ +export interface MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "Migrate.PostgreSql.AzureDbForPostgreSql.Sync"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput} [input] Task + * input + */ + input?: MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput; + /** + * @member {MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputUnion[]} + * [output] Task output. This is ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputUnion[]; +} + +/** + * Contains the possible cases for MigrateMySqlAzureDbForMySqlSyncTaskOutput. + */ +export type MigrateMySqlAzureDbForMySqlSyncTaskOutputUnion = MigrateMySqlAzureDbForMySqlSyncTaskOutput | MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError | MigrateMySqlAzureDbForMySqlSyncTaskOutputError | MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel | MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel | MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel; + +/** + * @interface + * An interface representing MigrateMySqlAzureDbForMySqlSyncTaskOutput. + * Output for the task that migrates MySQL databases to Azure Database for + * MySQL for online migrations + * + */ +export interface MigrateMySqlAzureDbForMySqlSyncTaskOutput { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "MigrateMySqlAzureDbForMySqlSyncTaskOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; +} + +/** + * @interface + * An interface representing MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError. + */ +export interface MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "DatabaseLevelErrorOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [errorMessage] Error message + */ + errorMessage?: string; + /** + * @member {SyncMigrationDatabaseErrorEvent[]} [events] List of error events. + */ + events?: SyncMigrationDatabaseErrorEvent[]; +} + +/** + * @interface + * An interface representing MigrateMySqlAzureDbForMySqlSyncTaskOutputError. + */ +export interface MigrateMySqlAzureDbForMySqlSyncTaskOutputError { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "ErrorOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {ReportableException} [error] Migration error + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly error?: ReportableException; +} + +/** + * @interface + * An interface representing MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel. + */ +export interface MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "TableLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [tableName] Name of the table + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly tableName?: string; + /** + * @member {string} [databaseName] Name of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {string} [cdcInsertCounter] Number of applied inserts + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcInsertCounter?: string; + /** + * @member {string} [cdcUpdateCounter] Number of applied updates + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcUpdateCounter?: string; + /** + * @member {string} [cdcDeleteCounter] Number of applied deletes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcDeleteCounter?: string; + /** + * @member {Date} [fullLoadEstFinishTime] Estimate to finish full load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadEstFinishTime?: Date; + /** + * @member {Date} [fullLoadStartedOn] Full load start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadStartedOn?: Date; + /** + * @member {Date} [fullLoadEndedOn] Full load end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadEndedOn?: Date; + /** + * @member {number} [fullLoadTotalRows] Number of rows applied in full load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadTotalRows?: number; + /** + * @member {SyncTableMigrationState} [state] Current state of the table + * migration. Possible values include: 'BEFORE_LOAD', 'FULL_LOAD', + * 'COMPLETED', 'CANCELED', 'ERROR', 'FAILED' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: SyncTableMigrationState; + /** + * @member {number} [totalChangesApplied] Total number of applied changes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly totalChangesApplied?: number; + /** + * @member {number} [dataErrorsCounter] Number of data errors occurred + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly dataErrorsCounter?: number; + /** + * @member {Date} [lastModifiedTime] Last modified time on target + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModifiedTime?: Date; +} + +/** + * @interface + * An interface representing MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel. + */ +export interface MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "DatabaseLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [databaseName] Name of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {SyncDatabaseMigrationReportingState} [migrationState] Migration + * state that this database is in. Possible values include: 'UNDEFINED', + * 'CONFIGURING', 'INITIALIAZING', 'STARTING', 'RUNNING', + * 'READY_TO_COMPLETE', 'COMPLETING', 'COMPLETE', 'CANCELLING', 'CANCELLED', + * 'FAILED' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly migrationState?: SyncDatabaseMigrationReportingState; + /** + * @member {number} [incomingChanges] Number of incoming changes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly incomingChanges?: number; + /** + * @member {number} [appliedChanges] Number of applied changes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly appliedChanges?: number; + /** + * @member {number} [cdcInsertCounter] Number of cdc inserts + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcInsertCounter?: number; + /** + * @member {number} [cdcDeleteCounter] Number of cdc deletes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcDeleteCounter?: number; + /** + * @member {number} [cdcUpdateCounter] Number of cdc updates + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcUpdateCounter?: number; + /** + * @member {number} [fullLoadCompletedTables] Number of tables completed in + * full load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadCompletedTables?: number; + /** + * @member {number} [fullLoadLoadingTables] Number of tables loading in full + * load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadLoadingTables?: number; + /** + * @member {number} [fullLoadQueuedTables] Number of tables queued in full + * load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadQueuedTables?: number; + /** + * @member {number} [fullLoadErroredTables] Number of tables errored in full + * load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadErroredTables?: number; + /** + * @member {boolean} [initializationCompleted] Indicates if initial load + * (full load) has been completed + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly initializationCompleted?: boolean; + /** + * @member {number} [latency] CDC apply latency + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly latency?: number; +} + +/** + * @interface + * An interface representing MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel. + */ +export interface MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "MigrationLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {string} [sourceServerVersion] Source server version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerVersion?: string; + /** + * @member {string} [sourceServer] Source server name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServer?: string; + /** + * @member {string} [targetServerVersion] Target server version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerVersion?: string; + /** + * @member {string} [targetServer] Target server name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServer?: string; +} + +/** + * @interface + * An interface representing MigrateMySqlAzureDbForMySqlSyncDatabaseInput. + * Database specific information for MySQL to Azure Database for MySQL + * migration task inputs + * + */ +export interface MigrateMySqlAzureDbForMySqlSyncDatabaseInput { + /** + * @member {string} [name] Name of the database + */ + name?: string; + /** + * @member {string} [targetDatabaseName] Name of target database. Note: + * Target database will be truncated before starting migration. + */ + targetDatabaseName?: string; +} + +/** + * @interface + * An interface representing MigrateMySqlAzureDbForMySqlSyncTaskInput. + * Input for the task that migrates MySQL databases to Azure Database for MySQL + * for online migrations + * + */ +export interface MigrateMySqlAzureDbForMySqlSyncTaskInput { + /** + * @member {MySqlConnectionInfo} sourceConnectionInfo Connection information + * for source MySQL + */ + sourceConnectionInfo: MySqlConnectionInfo; + /** + * @member {MySqlConnectionInfo} targetConnectionInfo Connection information + * for target Azure Database for MySQL + */ + targetConnectionInfo: MySqlConnectionInfo; + /** + * @member {MigrateMySqlAzureDbForMySqlSyncDatabaseInput[]} selectedDatabases + * Databases to migrate + */ + selectedDatabases: MigrateMySqlAzureDbForMySqlSyncDatabaseInput[]; +} + +/** + * @interface + * An interface representing MigrateMySqlAzureDbForMySqlSyncTaskProperties. + * Properties for the task that migrates MySQL databases to Azure Database for + * MySQL for online migrations + * + */ +export interface MigrateMySqlAzureDbForMySqlSyncTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "Migrate.MySql.AzureDbForMySql.Sync"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {MigrateMySqlAzureDbForMySqlSyncTaskInput} [input] Task input + */ + input?: MigrateMySqlAzureDbForMySqlSyncTaskInput; + /** + * @member {MigrateMySqlAzureDbForMySqlSyncTaskOutputUnion[]} [output] Task + * output. This is ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: MigrateMySqlAzureDbForMySqlSyncTaskOutputUnion[]; +} + +/** + * Contains the possible cases for MigrateSqlServerSqlDbSyncTaskOutput. + */ +export type MigrateSqlServerSqlDbSyncTaskOutputUnion = MigrateSqlServerSqlDbSyncTaskOutput | MigrateSqlServerSqlDbSyncTaskOutputDatabaseError | MigrateSqlServerSqlDbSyncTaskOutputError | MigrateSqlServerSqlDbSyncTaskOutputTableLevel | MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel | MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel; + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbSyncTaskOutput. + * Output for the task that migrates on-prem SQL Server databases to Azure SQL + * Database for online migrations + * + */ +export interface MigrateSqlServerSqlDbSyncTaskOutput { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "MigrateSqlServerSqlDbSyncTaskOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbSyncTaskOutputDatabaseError. + */ +export interface MigrateSqlServerSqlDbSyncTaskOutputDatabaseError { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "DatabaseLevelErrorOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [errorMessage] Error message + */ + errorMessage?: string; + /** + * @member {SyncMigrationDatabaseErrorEvent[]} [events] List of error events. + */ + events?: SyncMigrationDatabaseErrorEvent[]; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbSyncTaskOutputError. + */ +export interface MigrateSqlServerSqlDbSyncTaskOutputError { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "ErrorOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {ReportableException} [error] Migration error + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly error?: ReportableException; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbSyncTaskOutputTableLevel. + */ +export interface MigrateSqlServerSqlDbSyncTaskOutputTableLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "TableLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [tableName] Name of the table + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly tableName?: string; + /** + * @member {string} [databaseName] Name of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {number} [cdcInsertCounter] Number of applied inserts + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcInsertCounter?: number; + /** + * @member {number} [cdcUpdateCounter] Number of applied updates + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcUpdateCounter?: number; + /** + * @member {number} [cdcDeleteCounter] Number of applied deletes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcDeleteCounter?: number; + /** + * @member {Date} [fullLoadEstFinishTime] Estimate to finish full load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadEstFinishTime?: Date; + /** + * @member {Date} [fullLoadStartedOn] Full load start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadStartedOn?: Date; + /** + * @member {Date} [fullLoadEndedOn] Full load end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadEndedOn?: Date; + /** + * @member {number} [fullLoadTotalRows] Number of rows applied in full load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadTotalRows?: number; + /** + * @member {SyncTableMigrationState} [state] Current state of the table + * migration. Possible values include: 'BEFORE_LOAD', 'FULL_LOAD', + * 'COMPLETED', 'CANCELED', 'ERROR', 'FAILED' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: SyncTableMigrationState; + /** + * @member {number} [totalChangesApplied] Total number of applied changes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly totalChangesApplied?: number; + /** + * @member {number} [dataErrorsCounter] Number of data errors occurred + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly dataErrorsCounter?: number; + /** + * @member {Date} [lastModifiedTime] Last modified time on target + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModifiedTime?: Date; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel. + */ +export interface MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "DatabaseLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [databaseName] Name of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {SyncDatabaseMigrationReportingState} [migrationState] Migration + * state that this database is in. Possible values include: 'UNDEFINED', + * 'CONFIGURING', 'INITIALIAZING', 'STARTING', 'RUNNING', + * 'READY_TO_COMPLETE', 'COMPLETING', 'COMPLETE', 'CANCELLING', 'CANCELLED', + * 'FAILED' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly migrationState?: SyncDatabaseMigrationReportingState; + /** + * @member {number} [incomingChanges] Number of incoming changes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly incomingChanges?: number; + /** + * @member {number} [appliedChanges] Number of applied changes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly appliedChanges?: number; + /** + * @member {number} [cdcInsertCounter] Number of cdc inserts + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcInsertCounter?: number; + /** + * @member {number} [cdcDeleteCounter] Number of cdc deletes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcDeleteCounter?: number; + /** + * @member {number} [cdcUpdateCounter] Number of cdc updates + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly cdcUpdateCounter?: number; + /** + * @member {number} [fullLoadCompletedTables] Number of tables completed in + * full load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadCompletedTables?: number; + /** + * @member {number} [fullLoadLoadingTables] Number of tables loading in full + * load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadLoadingTables?: number; + /** + * @member {number} [fullLoadQueuedTables] Number of tables queued in full + * load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadQueuedTables?: number; + /** + * @member {number} [fullLoadErroredTables] Number of tables errored in full + * load + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullLoadErroredTables?: number; + /** + * @member {boolean} [initializationCompleted] Indicates if initial load + * (full load) has been completed + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly initializationCompleted?: boolean; + /** + * @member {number} [latency] CDC apply latency + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly latency?: number; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel. + */ +export interface MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "MigrationLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {string} [sourceServerVersion] Source server version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerVersion?: string; + /** + * @member {string} [sourceServer] Source server name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServer?: string; + /** + * @member {string} [targetServerVersion] Target server version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerVersion?: string; + /** + * @member {string} [targetServer] Target server name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServer?: string; + /** + * @member {number} [databaseCount] Count of databases + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseCount?: number; +} + +/** + * @interface + * An interface representing SqlMigrationTaskInput. + * Base class for migration task input + * + */ +export interface SqlMigrationTaskInput { + /** + * @member {SqlConnectionInfo} sourceConnectionInfo Information for + * connecting to source + */ + sourceConnectionInfo: SqlConnectionInfo; + /** + * @member {SqlConnectionInfo} targetConnectionInfo Information for + * connecting to target + */ + targetConnectionInfo: SqlConnectionInfo; +} + +/** + * @interface + * An interface representing MigrationValidationOptions. + * Types of validations to run after the migration + * + */ +export interface MigrationValidationOptions { + /** + * @member {boolean} [enableSchemaValidation] Allows to compare the schema + * information between source and target. + */ + enableSchemaValidation?: boolean; + /** + * @member {boolean} [enableDataIntegrityValidation] Allows to perform a + * checksum based data integrity validation between source and target for the + * selected database / tables . + */ + enableDataIntegrityValidation?: boolean; + /** + * @member {boolean} [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?: boolean; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbSyncTaskInput. + * Input for the task that migrates on-prem SQL Server databases to Azure SQL + * Database for online migrations + * + * @extends SqlMigrationTaskInput + */ +export interface MigrateSqlServerSqlDbSyncTaskInput extends SqlMigrationTaskInput { + /** + * @member {MigrateSqlServerSqlDbSyncDatabaseInput[]} selectedDatabases + * Databases to migrate + */ + selectedDatabases: MigrateSqlServerSqlDbSyncDatabaseInput[]; + /** + * @member {MigrationValidationOptions} [validationOptions] Validation + * options + */ + validationOptions?: MigrationValidationOptions; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbSyncTaskProperties. + * Properties for the task that migrates on-prem SQL Server databases to Azure + * SQL Database for online migrations + * + */ +export interface MigrateSqlServerSqlDbSyncTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "Migrate.SqlServer.AzureSqlDb.Sync"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {MigrateSqlServerSqlDbSyncTaskInput} [input] Task input + */ + input?: MigrateSqlServerSqlDbSyncTaskInput; + /** + * @member {MigrateSqlServerSqlDbSyncTaskOutputUnion[]} [output] Task output. + * This is ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: MigrateSqlServerSqlDbSyncTaskOutputUnion[]; +} + +/** + * @interface + * An interface representing ValidationError. + * Description about the errors happen while performing migration validation + * + */ +export interface ValidationError { + /** + * @member {string} [text] Error Text + */ + text?: string; + /** + * @member {Severity} [severity] Severity of the error. Possible values + * include: 'Message', 'Warning', 'Error' + */ + severity?: Severity; +} + +/** + * @interface + * An interface representing WaitStatistics. + * Wait statistics gathered during query batch execution + * + */ +export interface WaitStatistics { + /** + * @member {string} [waitType] Type of the Wait + */ + waitType?: string; + /** + * @member {number} [waitTimeMs] Total wait time in millisecond(s) . Default + * value: 0 . + */ + waitTimeMs?: number; + /** + * @member {number} [waitCount] Total no. of waits + */ + waitCount?: number; +} + +/** + * @interface + * An interface representing ExecutionStatistics. + * Description about the errors happen while performing migration validation + * + */ +export interface ExecutionStatistics { + /** + * @member {number} [executionCount] No. of query executions + */ + executionCount?: number; + /** + * @member {number} [cpuTimeMs] CPU Time in millisecond(s) for the query + * execution + */ + cpuTimeMs?: number; + /** + * @member {number} [elapsedTimeMs] Time taken in millisecond(s) for + * executing the query + */ + elapsedTimeMs?: number; + /** + * @member {{ [propertyName: string]: WaitStatistics }} [waitStats] + * Dictionary of sql query execution wait types and the respective statistics + */ + waitStats?: { [propertyName: string]: WaitStatistics }; + /** + * @member {boolean} [hasErrors] Indicates whether the query resulted in an + * error + */ + hasErrors?: boolean; + /** + * @member {string[]} [sqlErrors] List of sql Errors + */ + sqlErrors?: string[]; +} + +/** + * @interface + * An interface representing QueryExecutionResult. + * Describes query analysis results for execution in source and target + * + */ +export interface QueryExecutionResult { + /** + * @member {string} [queryText] Query text retrieved from the source server + */ + queryText?: string; + /** + * @member {number} [statementsInBatch] Total no. of statements in the batch + */ + statementsInBatch?: number; + /** + * @member {ExecutionStatistics} [sourceResult] Query analysis result from + * the source + */ + sourceResult?: ExecutionStatistics; + /** + * @member {ExecutionStatistics} [targetResult] Query analysis result from + * the target + */ + targetResult?: ExecutionStatistics; +} + +/** + * @interface + * An interface representing QueryAnalysisValidationResult. + * Results for query analysis comparison between the source and target + * + */ +export interface QueryAnalysisValidationResult { + /** + * @member {QueryExecutionResult} [queryResults] List of queries executed and + * it's execution results in source and target + */ + queryResults?: QueryExecutionResult; + /** + * @member {ValidationError} [validationErrors] Errors that are part of the + * execution + */ + validationErrors?: ValidationError; +} + +/** + * @interface + * An interface representing SchemaComparisonValidationResultType. + * Description about the errors happen while performing migration validation + * + */ +export interface SchemaComparisonValidationResultType { + /** + * @member {string} [objectName] Name of the object that has the difference + */ + objectName?: string; + /** + * @member {ObjectType} [objectType] Type of the object that has the + * difference. e.g (Table/View/StoredProcedure). Possible values include: + * 'StoredProcedures', 'Table', 'User', 'View', 'Function' + */ + objectType?: ObjectType; + /** + * @member {UpdateActionType} [updateAction] Update action type with respect + * to target. Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', + * 'AddedOnTarget' + */ + updateAction?: UpdateActionType; +} + +/** + * @interface + * An interface representing SchemaComparisonValidationResult. + * Results for schema comparison between the source and target + * + */ +export interface SchemaComparisonValidationResult { + /** + * @member {SchemaComparisonValidationResultType} [schemaDifferences] List of + * schema differences between the source and target databases + */ + schemaDifferences?: SchemaComparisonValidationResultType; + /** + * @member {ValidationError} [validationErrors] List of errors that happened + * while performing schema compare validation + */ + validationErrors?: ValidationError; + /** + * @member {{ [propertyName: string]: number }} [sourceDatabaseObjectCount] + * Count of source database objects + */ + sourceDatabaseObjectCount?: { [propertyName: string]: number }; + /** + * @member {{ [propertyName: string]: number }} [targetDatabaseObjectCount] + * Count of target database objects + */ + targetDatabaseObjectCount?: { [propertyName: string]: number }; +} + +/** + * @interface + * An interface representing DataIntegrityValidationResult. + * Results for checksum based Data Integrity validation results + * + */ +export interface DataIntegrityValidationResult { + /** + * @member {{ [propertyName: string]: string }} [failedObjects] List of + * failed table names of source and target pair + */ + failedObjects?: { [propertyName: string]: string }; + /** + * @member {ValidationError} [validationErrors] List of errors that happened + * while performing data integrity validation + */ + validationErrors?: ValidationError; +} + +/** + * @interface + * An interface representing MigrationValidationDatabaseLevelResult. + * Database level validation results + * + */ +export interface MigrationValidationDatabaseLevelResult { + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [migrationId] Migration Identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly migrationId?: string; + /** + * @member {string} [sourceDatabaseName] Name of the source database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceDatabaseName?: string; + /** + * @member {string} [targetDatabaseName] Name of the target database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetDatabaseName?: string; + /** + * @member {Date} [startedOn] Validation start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Validation end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {DataIntegrityValidationResult} [dataIntegrityValidationResult] + * Provides data integrity validation result between the source and target + * tables that are migrated. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly dataIntegrityValidationResult?: DataIntegrityValidationResult; + /** + * @member {SchemaComparisonValidationResult} [schemaValidationResult] + * Provides schema comparison result between source and target database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly schemaValidationResult?: SchemaComparisonValidationResult; + /** + * @member {QueryAnalysisValidationResult} [queryAnalysisValidationResult] + * Results of some of the query execution result between source and target + * database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly queryAnalysisValidationResult?: QueryAnalysisValidationResult; + /** + * @member {ValidationStatus} [status] Current status of validation at the + * database level. Possible values include: 'Default', 'NotStarted', + * 'Initialized', 'InProgress', 'Completed', 'CompletedWithIssues', + * 'Stopped', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: ValidationStatus; +} + +/** + * @interface + * An interface representing MigrationValidationDatabaseSummaryResult. + * Migration Validation Database level summary result + * + */ +export interface MigrationValidationDatabaseSummaryResult { + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [migrationId] Migration Identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly migrationId?: string; + /** + * @member {string} [sourceDatabaseName] Name of the source database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceDatabaseName?: string; + /** + * @member {string} [targetDatabaseName] Name of the target database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetDatabaseName?: string; + /** + * @member {Date} [startedOn] Validation start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Validation end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {ValidationStatus} [status] Current status of validation at the + * database level. Possible values include: 'Default', 'NotStarted', + * 'Initialized', 'InProgress', 'Completed', 'CompletedWithIssues', + * 'Stopped', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: ValidationStatus; +} + +/** + * @interface + * An interface representing MigrationValidationResult. + * Migration Validation Result + * + */ +export interface MigrationValidationResult { + /** + * @member {string} [id] Migration validation result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [migrationId] Migration Identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly migrationId?: string; + /** + * @member {{ [propertyName: string]: + * MigrationValidationDatabaseSummaryResult }} [summaryResults] Validation + * summary results for each database + */ + summaryResults?: { [propertyName: string]: MigrationValidationDatabaseSummaryResult }; + /** + * @member {ValidationStatus} [status] Current status of validation at the + * migration level. Status from the database validation result status will be + * aggregated here. Possible values include: 'Default', 'NotStarted', + * 'Initialized', 'InProgress', 'Completed', 'CompletedWithIssues', + * 'Stopped', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: ValidationStatus; +} + +/** + * Contains the possible cases for MigrateSqlServerSqlDbTaskOutput. + */ +export type MigrateSqlServerSqlDbTaskOutputUnion = MigrateSqlServerSqlDbTaskOutput | MigrateSqlServerSqlDbTaskOutputError | MigrateSqlServerSqlDbTaskOutputTableLevel | MigrateSqlServerSqlDbTaskOutputDatabaseLevel | MigrateSqlServerSqlDbTaskOutputMigrationLevel; + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbTaskOutput. + * Output for the task that migrates on-prem SQL Server databases to Azure SQL + * Database + * + */ +export interface MigrateSqlServerSqlDbTaskOutput { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "MigrateSqlServerSqlDbTaskOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbTaskOutputError. + */ +export interface MigrateSqlServerSqlDbTaskOutputError { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "ErrorOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {ReportableException} [error] Migration error + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly error?: ReportableException; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbTaskOutputTableLevel. + */ +export interface MigrateSqlServerSqlDbTaskOutputTableLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "TableLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [objectName] Name of the item + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly objectName?: string; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {MigrationState} [state] Current state of migration. Possible + * values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', + * 'Skipped', 'Stopped' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: MigrationState; + /** + * @member {string} [statusMessage] Status message + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly statusMessage?: string; + /** + * @member {number} [itemsCount] Number of items + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly itemsCount?: number; + /** + * @member {number} [itemsCompletedCount] Number of successfully completed + * items + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly itemsCompletedCount?: number; + /** + * @member {string} [errorPrefix] Wildcard string prefix to use for querying + * all errors of the item + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorPrefix?: string; + /** + * @member {string} [resultPrefix] Wildcard string prefix to use for querying + * all sub-tem results of the item + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resultPrefix?: string; +} + +/** + * @interface + * An interface representing DataItemMigrationSummaryResult. + * Basic summary of a data item migration + * + */ +export interface DataItemMigrationSummaryResult { + /** + * @member {string} [name] Name of the item + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {MigrationState} [state] Current state of migration. Possible + * values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', + * 'Skipped', 'Stopped' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: MigrationState; + /** + * @member {string} [statusMessage] Status message + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly statusMessage?: string; + /** + * @member {number} [itemsCount] Number of items + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly itemsCount?: number; + /** + * @member {number} [itemsCompletedCount] Number of successfully completed + * items + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly itemsCompletedCount?: number; + /** + * @member {string} [errorPrefix] Wildcard string prefix to use for querying + * all errors of the item + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorPrefix?: string; + /** + * @member {string} [resultPrefix] Wildcard string prefix to use for querying + * all sub-tem results of the item + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resultPrefix?: string; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbTaskOutputDatabaseLevel. + */ +export interface MigrateSqlServerSqlDbTaskOutputDatabaseLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "DatabaseLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [databaseName] Name of the item + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {MigrationState} [state] Current state of migration. Possible + * values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', + * 'Skipped', 'Stopped' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: MigrationState; + /** + * @member {DatabaseMigrationStage} [stage] Migration stage that this + * database is in. Possible values include: 'None', 'Initialize', 'Backup', + * 'FileCopy', 'Restore', 'Completed' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly stage?: DatabaseMigrationStage; + /** + * @member {string} [statusMessage] Status message + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly statusMessage?: string; + /** + * @member {string} [message] Migration progress message + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly message?: string; + /** + * @member {number} [numberOfObjects] Number of objects + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly numberOfObjects?: number; + /** + * @member {number} [numberOfObjectsCompleted] Number of successfully + * completed objects + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly numberOfObjectsCompleted?: number; + /** + * @member {number} [errorCount] Number of database/object errors. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorCount?: number; + /** + * @member {string} [errorPrefix] Wildcard string prefix to use for querying + * all errors of the item + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorPrefix?: string; + /** + * @member {string} [resultPrefix] Wildcard string prefix to use for querying + * all sub-tem results of the item + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resultPrefix?: string; + /** + * @member {ReportableException[]} [exceptionsAndWarnings] Migration + * exceptions and warnings. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly exceptionsAndWarnings?: ReportableException[]; + /** + * @member {{ [propertyName: string]: DataItemMigrationSummaryResult }} + * [objectSummary] Summary of object results in the migration + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly objectSummary?: { [propertyName: string]: DataItemMigrationSummaryResult }; +} + +/** + * @interface + * An interface representing MigrationReportResult. + * Migration validation report result, contains the url for downloading the + * generated report. + * + */ +export interface MigrationReportResult { + /** + * @member {string} [id] Migration validation result identifier + */ + id?: string; + /** + * @member {string} [reportUrl] The url of the report. + */ + reportUrl?: string; +} + +/** + * @interface + * An interface representing DatabaseSummaryResult. + * Summary of database results in the migration + * + * @extends DataItemMigrationSummaryResult + */ +export interface DatabaseSummaryResult extends DataItemMigrationSummaryResult { + /** + * @member {number} [sizeMB] Size of the database in megabytes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sizeMB?: number; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbTaskOutputMigrationLevel. + */ +export interface MigrateSqlServerSqlDbTaskOutputMigrationLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "MigrationLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {number} [durationInSeconds] Duration of task execution in + * seconds. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly durationInSeconds?: number; + /** + * @member {MigrationStatus} [status] Current status of migration. Possible + * values include: 'Default', 'Connecting', 'SourceAndTargetSelected', + * 'SelectLogins', 'Configured', 'Running', 'Error', 'Stopped', 'Completed', + * 'CompletedWithWarnings' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: MigrationStatus; + /** + * @member {string} [statusMessage] Migration status message + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly statusMessage?: string; + /** + * @member {string} [message] Migration progress message + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly message?: string; + /** + * @member {{ [propertyName: string]: string }} [databases] Selected + * databases as a map from database name to database id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databases?: { [propertyName: string]: string }; + /** + * @member {{ [propertyName: string]: DatabaseSummaryResult }} + * [databaseSummary] Summary of database results in the migration + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseSummary?: { [propertyName: string]: DatabaseSummaryResult }; + /** + * @member {MigrationValidationResult} [migrationValidationResult] Migration + * Validation Results + */ + migrationValidationResult?: MigrationValidationResult; + /** + * @member {MigrationReportResult} [migrationReportResult] Migration Report + * Result, provides unique url for downloading your migration report. + */ + migrationReportResult?: MigrationReportResult; + /** + * @member {string} [sourceServerVersion] Source server version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerVersion?: string; + /** + * @member {string} [sourceServerBrandVersion] Source server brand version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerBrandVersion?: string; + /** + * @member {string} [targetServerVersion] Target server version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerVersion?: string; + /** + * @member {string} [targetServerBrandVersion] Target server brand version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerBrandVersion?: string; + /** + * @member {ReportableException[]} [exceptionsAndWarnings] Migration + * exceptions and warnings. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly exceptionsAndWarnings?: ReportableException[]; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbDatabaseInput. + * Database specific information for SQL to Azure SQL DB migration task inputs + * + */ +export interface MigrateSqlServerSqlDbDatabaseInput { + /** + * @member {string} [name] Name of the database + */ + name?: string; + /** + * @member {string} [targetDatabaseName] Name of target database. Note: + * Target database will be truncated before starting migration. + */ + targetDatabaseName?: string; + /** + * @member {boolean} [makeSourceDbReadOnly] Whether to set database read only + * before migration + */ + makeSourceDbReadOnly?: boolean; + /** + * @member {{ [propertyName: string]: string }} [tableMap] Mapping of source + * to target tables + */ + tableMap?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbTaskInput. + * Input for the task that migrates on-prem SQL Server databases to Azure SQL + * Database + * + * @extends SqlMigrationTaskInput + */ +export interface MigrateSqlServerSqlDbTaskInput extends SqlMigrationTaskInput { + /** + * @member {MigrateSqlServerSqlDbDatabaseInput[]} selectedDatabases Databases + * to migrate + */ + selectedDatabases: MigrateSqlServerSqlDbDatabaseInput[]; + /** + * @member {MigrationValidationOptions} [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; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlDbTaskProperties. + * Properties for the task that migrates on-prem SQL Server databases to Azure + * SQL Database + * + */ +export interface MigrateSqlServerSqlDbTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "Migrate.SqlServer.SqlDb"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {MigrateSqlServerSqlDbTaskInput} [input] Task input + */ + input?: MigrateSqlServerSqlDbTaskInput; + /** + * @member {MigrateSqlServerSqlDbTaskOutputUnion[]} [output] Task output. + * This is ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: MigrateSqlServerSqlDbTaskOutputUnion[]; +} + +/** + * Contains the possible cases for MigrateSqlServerSqlMITaskOutput. + */ +export type MigrateSqlServerSqlMITaskOutputUnion = MigrateSqlServerSqlMITaskOutput | MigrateSqlServerSqlMITaskOutputError | MigrateSqlServerSqlMITaskOutputLoginLevel | MigrateSqlServerSqlMITaskOutputAgentJobLevel | MigrateSqlServerSqlMITaskOutputDatabaseLevel | MigrateSqlServerSqlMITaskOutputMigrationLevel; + +/** + * @interface + * An interface representing MigrateSqlServerSqlMITaskOutput. + * Output for task that migrates SQL Server databases to Azure SQL Database + * Managed Instance. + * + */ +export interface MigrateSqlServerSqlMITaskOutput { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "MigrateSqlServerSqlMITaskOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlMITaskOutputError. + */ +export interface MigrateSqlServerSqlMITaskOutputError { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "ErrorOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {ReportableException} [error] Migration error + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly error?: ReportableException; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlMITaskOutputLoginLevel. + */ +export interface MigrateSqlServerSqlMITaskOutputLoginLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "LoginLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [loginName] Login name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly loginName?: string; + /** + * @member {MigrationState} [state] Current state of login. Possible values + * include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', + * 'Skipped', 'Stopped' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: MigrationState; + /** + * @member {LoginMigrationStage} [stage] Current stage of login. Possible + * values include: 'None', 'Initialize', 'LoginMigration', + * 'EstablishUserMapping', 'AssignRoleMembership', 'AssignRoleOwnership', + * 'EstablishServerPermissions', 'EstablishObjectPermissions', 'Completed' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly stage?: LoginMigrationStage; + /** + * @member {Date} [startedOn] Login migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Login migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {string} [message] Login migration progress message + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly message?: string; + /** + * @member {ReportableException[]} [exceptionsAndWarnings] Login migration + * errors and warnings per login + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly exceptionsAndWarnings?: ReportableException[]; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlMITaskOutputAgentJobLevel. + */ +export interface MigrateSqlServerSqlMITaskOutputAgentJobLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "AgentJobLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Agent Job name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {boolean} [isEnabled] The state of the original Agent Job. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isEnabled?: boolean; + /** + * @member {MigrationState} [state] Current state of migration. Possible + * values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', + * 'Skipped', 'Stopped' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: MigrationState; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {string} [message] Migration progress message + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly message?: string; + /** + * @member {ReportableException[]} [exceptionsAndWarnings] Migration errors + * and warnings per job + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly exceptionsAndWarnings?: ReportableException[]; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlMITaskOutputDatabaseLevel. + */ +export interface MigrateSqlServerSqlMITaskOutputDatabaseLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "DatabaseLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [databaseName] Name of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {number} [sizeMB] Size of the database in megabytes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sizeMB?: number; + /** + * @member {MigrationState} [state] Current state of migration. Possible + * values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', + * 'Skipped', 'Stopped' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: MigrationState; + /** + * @member {DatabaseMigrationStage} [stage] Current stage of migration. + * Possible values include: 'None', 'Initialize', 'Backup', 'FileCopy', + * 'Restore', 'Completed' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly stage?: DatabaseMigrationStage; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {string} [message] Migration progress message + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly message?: string; + /** + * @member {ReportableException[]} [exceptionsAndWarnings] Migration + * exceptions and warnings + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly exceptionsAndWarnings?: ReportableException[]; +} + +/** + * @interface + * An interface representing StartMigrationScenarioServerRoleResult. + * Server role migration result + * + */ +export interface StartMigrationScenarioServerRoleResult { + /** + * @member {string} [name] Name of server role. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {MigrationState} [state] Current state of migration. Possible + * values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', + * 'Skipped', 'Stopped' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: MigrationState; + /** + * @member {ReportableException[]} [exceptionsAndWarnings] Migration + * exceptions and warnings. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly exceptionsAndWarnings?: ReportableException[]; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlMITaskOutputMigrationLevel. + */ +export interface MigrateSqlServerSqlMITaskOutputMigrationLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "MigrationLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {MigrationStatus} [status] Current status of migration. Possible + * values include: 'Default', 'Connecting', 'SourceAndTargetSelected', + * 'SelectLogins', 'Configured', 'Running', 'Error', 'Stopped', 'Completed', + * 'CompletedWithWarnings' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: MigrationStatus; + /** + * @member {MigrationState} [state] Current state of migration. Possible + * values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', + * 'Skipped', 'Stopped' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: MigrationState; + /** + * @member {{ [propertyName: string]: string }} [agentJobs] Selected agent + * jobs as a map from name to id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly agentJobs?: { [propertyName: string]: string }; + /** + * @member {{ [propertyName: string]: string }} [logins] Selected logins as a + * map from name to id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly logins?: { [propertyName: string]: string }; + /** + * @member {string} [message] Migration progress message + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly message?: string; + /** + * @member {{ [propertyName: string]: StartMigrationScenarioServerRoleResult + * }} [serverRoleResults] Map of server role migration results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverRoleResults?: { [propertyName: string]: StartMigrationScenarioServerRoleResult }; + /** + * @member {{ [propertyName: string]: string }} [orphanedUsers] Map of users + * to database name of orphaned users. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly orphanedUsers?: { [propertyName: string]: string }; + /** + * @member {{ [propertyName: string]: string }} [databases] Selected + * databases as a map from database name to database id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databases?: { [propertyName: string]: string }; + /** + * @member {string} [sourceServerVersion] Source server version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerVersion?: string; + /** + * @member {string} [sourceServerBrandVersion] Source server brand version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerBrandVersion?: string; + /** + * @member {string} [targetServerVersion] Target server version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerVersion?: string; + /** + * @member {string} [targetServerBrandVersion] Target server brand version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerBrandVersion?: string; + /** + * @member {ReportableException[]} [exceptionsAndWarnings] Migration + * exceptions and warnings. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly exceptionsAndWarnings?: ReportableException[]; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlMITaskInput. + * Input for task that migrates SQL Server databases to Azure SQL Database + * Managed Instance. + * + * @extends SqlMigrationTaskInput + */ +export interface MigrateSqlServerSqlMITaskInput extends SqlMigrationTaskInput { + /** + * @member {MigrateSqlServerSqlMIDatabaseInput[]} selectedDatabases Databases + * to migrate + */ + selectedDatabases: MigrateSqlServerSqlMIDatabaseInput[]; + /** + * @member {string[]} [selectedLogins] Logins to migrate. + */ + selectedLogins?: string[]; + /** + * @member {string[]} [selectedAgentJobs] Agent Jobs to migrate. + */ + selectedAgentJobs?: string[]; + /** + * @member {FileShare} [backupFileShare] Backup file share information for + * all selected databases. + */ + backupFileShare?: FileShare; + /** + * @member {BlobShare} backupBlobShare SAS URI of Azure Storage Account + * Container to be used for storing backup files. + */ + backupBlobShare: BlobShare; + /** + * @member {BackupMode} [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; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlMITaskProperties. + * Properties for task that migrates SQL Server databases to Azure SQL Database + * Managed Instance + * + */ +export interface MigrateSqlServerSqlMITaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "Migrate.SqlServer.AzureSqlDbMI"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {MigrateSqlServerSqlMITaskInput} [input] Task input + */ + input?: MigrateSqlServerSqlMITaskInput; + /** + * @member {MigrateSqlServerSqlMITaskOutputUnion[]} [output] Task output. + * This is ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: MigrateSqlServerSqlMITaskOutputUnion[]; +} + +/** + * @interface + * An interface representing ConnectToTargetAzureDbForMySqlTaskOutput. + * Output for the task that validates connection to Azure Database for MySQL + * and target server requirements + * + */ +export interface ConnectToTargetAzureDbForMySqlTaskOutput { + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [serverVersion] Version of the target server + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverVersion?: string; + /** + * @member {string[]} [databases] List of databases on target server + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databases?: string[]; + /** + * @member {string} [targetServerBrandVersion] Target server brand version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerBrandVersion?: string; + /** + * @member {ReportableException[]} [validationErrors] Validation errors + * associated with the task + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly validationErrors?: ReportableException[]; +} + +/** + * @interface + * An interface representing ConnectToTargetAzureDbForMySqlTaskInput. + * Input for the task that validates connection to Azure Database for MySQL and + * target server requirements + * + */ +export interface ConnectToTargetAzureDbForMySqlTaskInput { + /** + * @member {MySqlConnectionInfo} sourceConnectionInfo Connection information + * for source MySQL server + */ + sourceConnectionInfo: MySqlConnectionInfo; + /** + * @member {MySqlConnectionInfo} targetConnectionInfo Connection information + * for target Azure Database for MySQL server + */ + targetConnectionInfo: MySqlConnectionInfo; +} + +/** + * @interface + * An interface representing ConnectToTargetAzureDbForMySqlTaskProperties. + * Properties for the task that validates connection to Azure Database for + * MySQL and target server requirements + * + */ +export interface ConnectToTargetAzureDbForMySqlTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "ConnectToTarget.AzureDbForMySql"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {ConnectToTargetAzureDbForMySqlTaskInput} [input] Task input + */ + input?: ConnectToTargetAzureDbForMySqlTaskInput; + /** + * @member {ConnectToTargetAzureDbForMySqlTaskOutput[]} [output] Task output. + * This is ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: ConnectToTargetAzureDbForMySqlTaskOutput[]; +} + +/** + * @interface + * An interface representing ConnectToTargetSqlMITaskOutput. + * Output for the task that validates connection to Azure SQL Database Managed + * Instance. + * + */ +export interface ConnectToTargetSqlMITaskOutput { + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [targetServerVersion] Target server version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerVersion?: string; + /** + * @member {string} [targetServerBrandVersion] Target server brand version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerBrandVersion?: string; + /** + * @member {string[]} [logins] List of logins on the target server. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly logins?: string[]; + /** + * @member {string[]} [agentJobs] List of agent jobs on the target server. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly agentJobs?: string[]; + /** + * @member {ReportableException[]} [validationErrors] Validation errors + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly validationErrors?: ReportableException[]; +} + +/** + * @interface + * An interface representing ConnectToTargetSqlMITaskInput. + * Input for the task that validates connection to Azure SQL Database Managed + * Instance. + * + */ +export interface ConnectToTargetSqlMITaskInput { + /** + * @member {SqlConnectionInfo} targetConnectionInfo Connection information + * for target SQL Server + */ + targetConnectionInfo: SqlConnectionInfo; +} + +/** + * @interface + * An interface representing ConnectToTargetSqlMITaskProperties. + * Properties for the task that validates connection to Azure SQL Database + * Managed Instance + * + */ +export interface ConnectToTargetSqlMITaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "ConnectToTarget.AzureSqlDbMI"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {ConnectToTargetSqlMITaskInput} [input] Task input + */ + input?: ConnectToTargetSqlMITaskInput; + /** + * @member {ConnectToTargetSqlMITaskOutput[]} [output] Task output. This is + * ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: ConnectToTargetSqlMITaskOutput[]; +} + +/** + * @interface + * An interface representing DatabaseTable. + * Table properties + * + */ +export interface DatabaseTable { + /** + * @member {boolean} [hasRows] Indicates whether table is empty or not + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly hasRows?: boolean; + /** + * @member {string} [name] Schema-qualified name of the table + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; +} + +/** + * @interface + * An interface representing GetUserTablesSqlSyncTaskOutput. + * Output of the task that collects user tables for the given list of databases + * + */ +export interface GetUserTablesSqlSyncTaskOutput { + /** + * @member {{ [propertyName: string]: DatabaseTable[] }} + * [databasesToSourceTables] Mapping from database name to list of source + * tables + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databasesToSourceTables?: { [propertyName: string]: DatabaseTable[] }; + /** + * @member {{ [propertyName: string]: DatabaseTable[] }} + * [databasesToTargetTables] Mapping from database name to list of target + * tables + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databasesToTargetTables?: { [propertyName: string]: DatabaseTable[] }; + /** + * @member {{ [propertyName: string]: string[] }} [tableValidationErrors] + * Mapping from database name to list of validation errors + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly tableValidationErrors?: { [propertyName: string]: string[] }; + /** + * @member {ReportableException[]} [validationErrors] Validation errors + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly validationErrors?: ReportableException[]; +} + +/** + * @interface + * An interface representing GetUserTablesSqlSyncTaskInput. + * Input for the task that collects user tables for the given list of databases + * + */ +export interface GetUserTablesSqlSyncTaskInput { + /** + * @member {SqlConnectionInfo} sourceConnectionInfo Connection information + * for SQL Server + */ + sourceConnectionInfo: SqlConnectionInfo; + /** + * @member {SqlConnectionInfo} targetConnectionInfo Connection information + * for SQL DB + */ + targetConnectionInfo: SqlConnectionInfo; + /** + * @member {string[]} selectedSourceDatabases List of source database names + * to collect tables for + */ + selectedSourceDatabases: string[]; + /** + * @member {string[]} selectedTargetDatabases List of target database names + * to collect tables for + */ + selectedTargetDatabases: string[]; +} + +/** + * @interface + * An interface representing GetUserTablesSqlSyncTaskProperties. + * Properties for the task that collects user tables for the given list of + * databases + * + */ +export interface GetUserTablesSqlSyncTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "GetUserTables.AzureSqlDb.Sync"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {GetUserTablesSqlSyncTaskInput} [input] Task input + */ + input?: GetUserTablesSqlSyncTaskInput; + /** + * @member {GetUserTablesSqlSyncTaskOutput[]} [output] Task output. This is + * ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: GetUserTablesSqlSyncTaskOutput[]; +} + +/** + * @interface + * An interface representing GetUserTablesSqlTaskOutput. + * Output of the task that collects user tables for the given list of databases + * + */ +export interface GetUserTablesSqlTaskOutput { + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {{ [propertyName: string]: DatabaseTable[] }} [databasesToTables] + * Mapping from database name to list of tables + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databasesToTables?: { [propertyName: string]: DatabaseTable[] }; + /** + * @member {ReportableException[]} [validationErrors] Validation errors + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly validationErrors?: ReportableException[]; +} + +/** + * @interface + * An interface representing GetUserTablesSqlTaskInput. + * Input for the task that collects user tables for the given list of databases + * + */ +export interface GetUserTablesSqlTaskInput { + /** + * @member {SqlConnectionInfo} connectionInfo Connection information for SQL + * Server + */ + connectionInfo: SqlConnectionInfo; + /** + * @member {string[]} selectedDatabases List of database names to collect + * tables for + */ + selectedDatabases: string[]; +} + +/** + * @interface + * An interface representing GetUserTablesSqlTaskProperties. + * Properties for the task that collects user tables for the given list of + * databases + * + */ +export interface GetUserTablesSqlTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "GetUserTables.Sql"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {GetUserTablesSqlTaskInput} [input] Task input + */ + input?: GetUserTablesSqlTaskInput; + /** + * @member {GetUserTablesSqlTaskOutput[]} [output] Task output. This is + * ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: GetUserTablesSqlTaskOutput[]; +} + +/** + * @interface + * An interface representing ConnectToTargetSqlDbTaskOutput. + * Output for the task that validates connection to SQL DB and target server + * requirements + * + */ +export interface ConnectToTargetSqlDbTaskOutput { + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {{ [propertyName: string]: string }} [databases] Source databases + * as a map from database name to database id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databases?: { [propertyName: string]: string }; + /** + * @member {string} [targetServerVersion] Version of the target server + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerVersion?: string; + /** + * @member {string} [targetServerBrandVersion] Target server brand version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerBrandVersion?: string; +} + +/** + * @interface + * An interface representing ConnectToTargetSqlSqlDbSyncTaskInput. + * Input for the task that validates connection to Azure SQL DB and target + * server requirements + * + */ +export interface ConnectToTargetSqlSqlDbSyncTaskInput { + /** + * @member {SqlConnectionInfo} sourceConnectionInfo Connection information + * for source SQL Server + */ + sourceConnectionInfo: SqlConnectionInfo; + /** + * @member {SqlConnectionInfo} targetConnectionInfo Connection information + * for target SQL DB + */ + targetConnectionInfo: SqlConnectionInfo; +} + +/** + * @interface + * An interface representing ConnectToTargetSqlSqlDbSyncTaskProperties. + * Properties for the task that validates connection to SQL DB and target + * server requirements for online migration + * + */ +export interface ConnectToTargetSqlSqlDbSyncTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "ConnectToTarget.SqlDb.Sync"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {ConnectToTargetSqlSqlDbSyncTaskInput} [input] Task input + */ + input?: ConnectToTargetSqlSqlDbSyncTaskInput; + /** + * @member {ConnectToTargetSqlDbTaskOutput[]} [output] Task output. This is + * ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: ConnectToTargetSqlDbTaskOutput[]; +} + +/** + * @interface + * An interface representing ConnectToTargetSqlDbTaskInput. + * Input for the task that validates connection to SQL DB and target server + * requirements + * + */ +export interface ConnectToTargetSqlDbTaskInput { + /** + * @member {SqlConnectionInfo} targetConnectionInfo Connection information + * for target SQL DB + */ + targetConnectionInfo: SqlConnectionInfo; +} + +/** + * @interface + * An interface representing ConnectToTargetSqlDbTaskProperties. + * Properties for the task that validates connection to SQL DB and target + * server requirements + * + */ +export interface ConnectToTargetSqlDbTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "ConnectToTarget.SqlDb"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {ConnectToTargetSqlDbTaskInput} [input] Task input + */ + input?: ConnectToTargetSqlDbTaskInput; + /** + * @member {ConnectToTargetSqlDbTaskOutput[]} [output] Task output. This is + * ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: ConnectToTargetSqlDbTaskOutput[]; +} + +/** + * @interface + * An interface representing MigrationEligibilityInfo. + * Information about migration eligibility of a server object + * + */ +export interface MigrationEligibilityInfo { + /** + * @member {boolean} [isEligibileForMigration] Whether object is eligible for + * migration or not. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isEligibileForMigration?: boolean; + /** + * @member {string[]} [validationMessages] Information about eligibility + * failure for the server object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly validationMessages?: string[]; +} + +/** + * Contains the possible cases for ConnectToSourceSqlServerTaskOutput. + */ +export type ConnectToSourceSqlServerTaskOutputUnion = ConnectToSourceSqlServerTaskOutput | ConnectToSourceSqlServerTaskOutputAgentJobLevel | ConnectToSourceSqlServerTaskOutputLoginLevel | ConnectToSourceSqlServerTaskOutputDatabaseLevel | ConnectToSourceSqlServerTaskOutputTaskLevel; + +/** + * @interface + * An interface representing ConnectToSourceSqlServerTaskOutput. + * Output for the task that validates connection to SQL Server and also + * validates source server requirements + * + */ +export interface ConnectToSourceSqlServerTaskOutput { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "ConnectToSourceSqlServerTaskOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; +} + +/** + * @interface + * An interface representing ConnectToSourceSqlServerTaskOutputAgentJobLevel. + * Agent Job level output for the task that validates connection to SQL Server + * and also validates source server requirements + * + */ +export interface ConnectToSourceSqlServerTaskOutputAgentJobLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "AgentJobLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Agent Job name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [jobCategory] The type of Agent Job. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly jobCategory?: string; + /** + * @member {boolean} [isEnabled] The state of the original Agent Job. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isEnabled?: boolean; + /** + * @member {string} [jobOwner] The owner of the Agent Job + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly jobOwner?: string; + /** + * @member {Date} [lastExecutedOn] UTC Date and time when the Agent Job was + * last executed. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastExecutedOn?: Date; + /** + * @member {ReportableException[]} [validationErrors] Validation errors + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly validationErrors?: ReportableException[]; + /** + * @member {MigrationEligibilityInfo} [migrationEligibility] Information + * about eligiblity of agent job for migration. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly migrationEligibility?: MigrationEligibilityInfo; +} + +/** + * @interface + * An interface representing ConnectToSourceSqlServerTaskOutputLoginLevel. + * Login level output for the task that validates connection to SQL Server and + * also validates source server requirements + * + */ +export interface ConnectToSourceSqlServerTaskOutputLoginLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "LoginLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Login name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {LoginType} [loginType] The type of login. Possible values + * include: 'WindowsUser', 'WindowsGroup', 'SqlLogin', 'Certificate', + * 'AsymmetricKey', 'ExternalUser', 'ExternalGroup' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly loginType?: LoginType; + /** + * @member {string} [defaultDatabase] The default database for the login. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly defaultDatabase?: string; + /** + * @member {boolean} [isEnabled] The state of the login. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isEnabled?: boolean; + /** + * @member {MigrationEligibilityInfo} [migrationEligibility] Information + * about eligiblity of login for migration. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly migrationEligibility?: MigrationEligibilityInfo; +} + +/** + * @interface + * An interface representing DatabaseFileInfo. + * Database file specific information + * + */ +export interface DatabaseFileInfo { + /** + * @member {string} [databaseName] Name of the database + */ + databaseName?: string; + /** + * @member {string} [id] Unique identifier for database file + */ + id?: string; + /** + * @member {string} [logicalName] Logical name of the file + */ + logicalName?: string; + /** + * @member {string} [physicalFullName] Operating-system full path of the file + */ + physicalFullName?: string; + /** + * @member {string} [restoreFullName] Suggested full path of the file for + * restoring + */ + restoreFullName?: string; + /** + * @member {DatabaseFileType} [fileType] Database file type. Possible values + * include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext' + */ + fileType?: DatabaseFileType; + /** + * @member {number} [sizeMB] Size of the file in megabytes + */ + sizeMB?: number; +} + +/** + * @interface + * An interface representing ConnectToSourceSqlServerTaskOutputDatabaseLevel. + * Database level output for the task that validates connection to SQL Server + * and also validates source server requirements + * + */ +export interface ConnectToSourceSqlServerTaskOutputDatabaseLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "DatabaseLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Database name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {number} [sizeMB] Size of the file in megabytes + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sizeMB?: number; + /** + * @member {DatabaseFileInfo[]} [databaseFiles] The list of database files + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseFiles?: DatabaseFileInfo[]; + /** + * @member {DatabaseCompatLevel} [compatibilityLevel] SQL Server + * compatibility level of database. Possible values include: 'CompatLevel80', + * 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', + * 'CompatLevel130', 'CompatLevel140' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly compatibilityLevel?: DatabaseCompatLevel; + /** + * @member {DatabaseState} [databaseState] State of the database. Possible + * values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', + * 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseState?: DatabaseState; +} + +/** + * @interface + * An interface representing ConnectToSourceSqlServerTaskOutputTaskLevel. + * Task level output for the task that validates connection to SQL Server and + * also validates source server requirements + * + */ +export interface ConnectToSourceSqlServerTaskOutputTaskLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "TaskLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {{ [propertyName: string]: string }} [databases] Source databases + * as a map from database name to database id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databases?: { [propertyName: string]: string }; + /** + * @member {{ [propertyName: string]: string }} [logins] Source logins as a + * map from login name to login id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly logins?: { [propertyName: string]: string }; + /** + * @member {{ [propertyName: string]: string }} [agentJobs] Source agent jobs + * as a map from agent job name to id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly agentJobs?: { [propertyName: string]: string }; + /** + * @member {{ [propertyName: string]: string }} + * [databaseTdeCertificateMapping] Mapping from database name to TDE + * certificate name, if applicable + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseTdeCertificateMapping?: { [propertyName: string]: string }; + /** + * @member {string} [sourceServerVersion] Source server version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerVersion?: string; + /** + * @member {string} [sourceServerBrandVersion] Source server brand version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerBrandVersion?: string; + /** + * @member {ReportableException[]} [validationErrors] Validation errors + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly validationErrors?: ReportableException[]; +} + +/** + * @interface + * An interface representing ConnectToSourceSqlServerTaskInput. + * Input for the task that validates connection to SQL Server and also + * validates source server requirements + * + */ +export interface ConnectToSourceSqlServerTaskInput { + /** + * @member {SqlConnectionInfo} sourceConnectionInfo Connection information + * for Source SQL Server + */ + sourceConnectionInfo: SqlConnectionInfo; + /** + * @member {ServerLevelPermissionsGroup} [checkPermissionsGroup] Permission + * group for validations. Possible values include: 'Default', + * 'MigrationFromSqlServerToAzureDB', 'MigrationFromSqlServerToAzureMI', + * 'MigrationFromMySQLToAzureDBForMySQL' + */ + checkPermissionsGroup?: ServerLevelPermissionsGroup; + /** + * @member {boolean} [collectLogins] Flag for whether to collect logins from + * source server. Default value: false . + */ + collectLogins?: boolean; + /** + * @member {boolean} [collectAgentJobs] Flag for whether to collect agent + * jobs from source server. Default value: false . + */ + collectAgentJobs?: boolean; + /** + * @member {boolean} [collectTdeCertificateInfo] Flag for whether to collect + * TDE Certificate names from source server. Default value: false . + */ + collectTdeCertificateInfo?: boolean; +} + +/** + * @interface + * An interface representing ConnectToSourceSqlServerSyncTaskProperties. + * Properties for the task that validates connection to SQL Server and source + * server requirements for online migration + * + */ +export interface ConnectToSourceSqlServerSyncTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "ConnectToSource.SqlServer.Sync"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {ConnectToSourceSqlServerTaskInput} [input] Task input + */ + input?: ConnectToSourceSqlServerTaskInput; + /** + * @member {ConnectToSourceSqlServerTaskOutputUnion[]} [output] Task output. + * This is ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: ConnectToSourceSqlServerTaskOutputUnion[]; +} + +/** + * @interface + * An interface representing ConnectToSourceSqlServerTaskProperties. + * Properties for the task that validates connection to SQL Server and also + * validates source server requirements + * + */ +export interface ConnectToSourceSqlServerTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "ConnectToSource.SqlServer"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {ConnectToSourceSqlServerTaskInput} [input] Task input + */ + input?: ConnectToSourceSqlServerTaskInput; + /** + * @member {ConnectToSourceSqlServerTaskOutputUnion[]} [output] Task output. + * This is ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: ConnectToSourceSqlServerTaskOutputUnion[]; +} + +/** + * @interface + * An interface representing ProjectTask. + * A task resource + * + * @extends Resource + */ +export interface ProjectTask extends Resource { + /** + * @member {string} [etag] HTTP strong entity tag value. This is ignored if + * submitted. + */ + etag?: string; + /** + * @member {ProjectTaskPropertiesUnion} [properties] Custom task properties + */ + properties?: ProjectTaskPropertiesUnion; +} + +/** + * @interface + * An interface representing ServiceSku. + * An Azure SKU instance + * + */ +export interface ServiceSku { + /** + * @member {string} [name] The unique name of the SKU, such as 'P3' + */ + name?: string; + /** + * @member {string} [tier] The tier of the SKU, such as 'Basic', 'General + * Purpose', or 'Business Critical' + */ + tier?: string; + /** + * @member {string} [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; + /** + * @member {string} [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; + /** + * @member {number} [capacity] The capacity of the SKU, if it supports + * scaling + */ + capacity?: number; +} + +/** + * @interface + * An interface representing DataMigrationServiceProperties. + * Properties of the Database Migration Service instance + * + */ +export interface DataMigrationServiceProperties { + /** + * @member {ServiceProvisioningState} [provisioningState] The resource's + * provisioning state. Possible values include: 'Accepted', 'Deleting', + * 'Deploying', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', + * 'FailedToStop', 'Succeeded', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: ServiceProvisioningState; + /** + * @member {string} [publicKey] The public key of the service, used to + * encrypt secrets sent to the service + */ + publicKey?: string; + /** + * @member {string} virtualSubnetId The ID of the + * Microsoft.Network/virtualNetworks/subnets resource to which the service + * should be joined + */ + virtualSubnetId: string; +} + +/** + * @interface + * An interface representing DataMigrationService. + * A Database Migration Service resource + * + * @extends TrackedResource + */ +export interface DataMigrationService extends TrackedResource { + /** + * @member {string} [etag] HTTP strong entity tag value. Ignored if submitted + */ + etag?: string; + /** + * @member {string} [kind] The resource kind. Only 'vm' (the default) is + * supported. + */ + kind?: string; + /** + * @member {ServiceProvisioningState} [provisioningState] The resource's + * provisioning state. Possible values include: 'Accepted', 'Deleting', + * 'Deploying', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', + * 'FailedToStop', 'Succeeded', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: ServiceProvisioningState; + /** + * @member {string} [publicKey] The public key of the service, used to + * encrypt secrets sent to the service + */ + publicKey?: string; + /** + * @member {string} virtualSubnetId The ID of the + * Microsoft.Network/virtualNetworks/subnets resource to which the service + * should be joined + */ + virtualSubnetId: string; + /** + * @member {ServiceSku} [sku] Service SKU + */ + sku?: ServiceSku; +} + +/** + * @interface + * An interface representing NameAvailabilityRequest. + * A resource type and proposed name + * + */ +export interface NameAvailabilityRequest { + /** + * @member {string} [name] The proposed resource name + */ + name?: string; + /** + * @member {string} [type] The resource type chain (e.g. + * virtualMachines/extensions) + */ + type?: string; +} + +/** + * @interface + * An interface representing DatabaseInfo. + * Project Database Details + * + */ +export interface DatabaseInfo { + /** + * @member {string} sourceDatabaseName Name of the database + */ + sourceDatabaseName: string; +} + +/** + * @interface + * An interface representing ProjectProperties. + * Project-specific properties + * + */ +export interface ProjectProperties { + /** + * @member {ProjectSourcePlatform} sourcePlatform Source platform for the + * project. Possible values include: 'SQL', 'MySQL', 'PostgreSql', 'Unknown' + */ + sourcePlatform: ProjectSourcePlatform; + /** + * @member {ProjectTargetPlatform} targetPlatform Target platform for the + * project. Possible values include: 'SQLDB', 'SQLMI', 'AzureDbForMySql', + * 'AzureDbForPostgreSql', 'Unknown' + */ + targetPlatform: ProjectTargetPlatform; + /** + * @member {Date} [creationTime] UTC Date and time when project was created + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationTime?: Date; + /** + * @member {ConnectionInfoUnion} [sourceConnectionInfo] Information for + * connecting to source + */ + sourceConnectionInfo?: ConnectionInfoUnion; + /** + * @member {ConnectionInfoUnion} [targetConnectionInfo] Information for + * connecting to target + */ + targetConnectionInfo?: ConnectionInfoUnion; + /** + * @member {DatabaseInfo[]} [databasesInfo] List of DatabaseInfo + */ + databasesInfo?: DatabaseInfo[]; + /** + * @member {ProjectProvisioningState} [provisioningState] The project's + * provisioning state. Possible values include: 'Deleting', 'Succeeded' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: ProjectProvisioningState; +} + +/** + * @interface + * An interface representing Project. + * A project resource + * + * @extends TrackedResource + */ +export interface Project extends TrackedResource { + /** + * @member {ProjectSourcePlatform} sourcePlatform Source platform for the + * project. Possible values include: 'SQL', 'MySQL', 'PostgreSql', 'Unknown' + */ + sourcePlatform: ProjectSourcePlatform; + /** + * @member {ProjectTargetPlatform} targetPlatform Target platform for the + * project. Possible values include: 'SQLDB', 'SQLMI', 'AzureDbForMySql', + * 'AzureDbForPostgreSql', 'Unknown' + */ + targetPlatform: ProjectTargetPlatform; + /** + * @member {Date} [creationTime] UTC Date and time when project was created + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationTime?: Date; + /** + * @member {ConnectionInfoUnion} [sourceConnectionInfo] Information for + * connecting to source + */ + sourceConnectionInfo?: ConnectionInfoUnion; + /** + * @member {ConnectionInfoUnion} [targetConnectionInfo] Information for + * connecting to target + */ + targetConnectionInfo?: ConnectionInfoUnion; + /** + * @member {DatabaseInfo[]} [databasesInfo] List of DatabaseInfo + */ + databasesInfo?: DatabaseInfo[]; + /** + * @member {ProjectProvisioningState} [provisioningState] The project's + * provisioning state. Possible values include: 'Deleting', 'Succeeded' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: ProjectProvisioningState; +} + +/** + * @interface + * An interface representing ApiError. + * Error information. + * + */ +export interface ApiError { + /** + * @member {ODataError} [error] Error information in OData format + */ + error?: ODataError; +} + +/** + * @interface + * An interface representing ServiceOperationDisplay. + * Localized display text + * + */ +export interface ServiceOperationDisplay { + /** + * @member {string} [provider] The localized resource provider name + */ + provider?: string; + /** + * @member {string} [resource] The localized resource type name + */ + resource?: string; + /** + * @member {string} [operation] The localized operation name + */ + operation?: string; + /** + * @member {string} [description] The localized operation description + */ + description?: string; +} + +/** + * @interface + * An interface representing ServiceOperation. + * Description of an action supported by the Database Migration Service + * + */ +export interface ServiceOperation { + /** + * @member {string} [name] The fully qualified action name, e.g. + * Microsoft.DataMigration/services/read + */ + name?: string; + /** + * @member {ServiceOperationDisplay} [display] Localized display text + */ + display?: ServiceOperationDisplay; +} + +/** + * @interface + * An interface representing QuotaName. + * The name of the quota + * + */ +export interface QuotaName { + /** + * @member {string} [localizedValue] The localized name of the quota + */ + localizedValue?: string; + /** + * @member {string} [value] The unlocalized name (or ID) of the quota + */ + value?: string; +} + +/** + * @interface + * An interface representing Quota. + * Describes a quota for or usage details about a resource + * + */ +export interface Quota { + /** + * @member {number} [currentValue] The current value of the quota. If null or + * missing, the current value cannot be determined in the context of the + * request. + */ + currentValue?: number; + /** + * @member {string} [id] The resource ID of the quota object + */ + id?: string; + /** + * @member {number} [limit] The maximum value of the quota. If null or + * missing, the quota has no maximum, in which case it merely tracks usage. + */ + limit?: number; + /** + * @member {QuotaName} [name] The name of the quota + */ + name?: QuotaName; + /** + * @member {string} [unit] The unit for the quota, such as Count, Bytes, + * BytesPerSecond, etc. + */ + unit?: string; +} + +/** + * @interface + * An interface representing NameAvailabilityResponse. + * Indicates whether a proposed resource name is available + * + */ +export interface NameAvailabilityResponse { + /** + * @member {boolean} [nameAvailable] If true, the name is valid and + * available. If false, 'reason' describes why not. + */ + nameAvailable?: boolean; + /** + * @member {NameCheckFailureReason} [reason] The reason why the name is not + * available, if nameAvailable is false. Possible values include: + * 'AlreadyExists', 'Invalid' + */ + reason?: NameCheckFailureReason; + /** + * @member {string} [message] The localized reason why the name is not + * available, if nameAvailable is false + */ + message?: string; +} + +/** + * @interface + * An interface representing AvailableServiceSkuSku. + * SKU name, tier, etc. + * + */ +export interface AvailableServiceSkuSku { + /** + * @member {string} [name] The name of the SKU + */ + name?: string; + /** + * @member {string} [family] SKU family + */ + family?: string; + /** + * @member {string} [size] SKU size + */ + size?: string; + /** + * @member {string} [tier] The tier of the SKU, such as "Basic", "General + * Purpose", or "Business Critical" + */ + tier?: string; +} + +/** + * @interface + * An interface representing AvailableServiceSkuCapacity. + * A description of the scaling capacities of the SKU + * + */ +export interface AvailableServiceSkuCapacity { + /** + * @member {number} [minimum] The minimum capacity, usually 0 or 1. + */ + minimum?: number; + /** + * @member {number} [maximum] The maximum capacity + */ + maximum?: number; + /** + * @member {number} [default] The default capacity + */ + default?: number; + /** + * @member {ServiceScalability} [scaleType] The scalability approach. + * Possible values include: 'none', 'manual', 'automatic' + */ + scaleType?: ServiceScalability; +} + +/** + * @interface + * An interface representing AvailableServiceSku. + * Describes the available service SKU. + * + */ +export interface AvailableServiceSku { + /** + * @member {string} [resourceType] The resource type, including the provider + * namespace + */ + resourceType?: string; + /** + * @member {AvailableServiceSkuSku} [sku] SKU name, tier, etc. + */ + sku?: AvailableServiceSkuSku; + /** + * @member {AvailableServiceSkuCapacity} [capacity] A description of the + * scaling capacities of the SKU + */ + capacity?: AvailableServiceSkuCapacity; +} + +/** + * @interface + * An interface representing DataMigrationServiceStatusResponse. + * Service health status + * + */ +export interface DataMigrationServiceStatusResponse { + /** + * @member {string} [agentVersion] The DMS instance agent version + */ + agentVersion?: string; + /** + * @member {string} [status] The machine-readable status, such as + * 'Initializing', 'Offline', 'Online', 'Deploying', 'Deleting', 'Stopped', + * 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or 'Failed' + */ + status?: string; + /** + * @member {string} [vmSize] The services virtual machine size, such as + * 'Standard_D2_v2' + */ + vmSize?: string; + /** + * @member {string[]} [supportedTaskTypes] The list of supported task types + */ + supportedTaskTypes?: string[]; +} + +/** + * @interface + * An interface representing ResourceSkuRestrictions. + * Describes scaling information of a SKU. + * + */ +export interface ResourceSkuRestrictions { + /** + * @member {ResourceSkuRestrictionsType} [type] The type of restrictions. + * Possible values include: 'location' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: ResourceSkuRestrictionsType; + /** + * @member {string[]} [values] The value of restrictions. If the restriction + * type is set to location. This would be different locations where the SKU + * is restricted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly values?: string[]; + /** + * @member {ResourceSkuRestrictionsReasonCode} [reasonCode] The reason code + * for restriction. Possible values include: 'QuotaId', + * 'NotAvailableForSubscription' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly reasonCode?: ResourceSkuRestrictionsReasonCode; +} + +/** + * @interface + * An interface representing ResourceSkuCapabilities. + * Describes The SKU capabilites object. + * + */ +export interface ResourceSkuCapabilities { + /** + * @member {string} [name] An invariant to describe the feature. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [value] An invariant if the feature is measured by + * quantity. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: string; +} + +/** + * @interface + * An interface representing ResourceSkuCosts. + * Describes metadata for retrieving price info. + * + */ +export interface ResourceSkuCosts { + /** + * @member {string} [meterID] Used for querying price from commerce. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly meterID?: string; + /** + * @member {number} [quantity] The multiplier is needed to extend the base + * metered cost. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly quantity?: number; + /** + * @member {string} [extendedUnit] An invariant to show the extended unit. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly extendedUnit?: string; +} + +/** + * @interface + * An interface representing ResourceSkuCapacity. + * Describes scaling information of a SKU. + * + */ +export interface ResourceSkuCapacity { + /** + * @member {number} [minimum] The minimum capacity. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly minimum?: number; + /** + * @member {number} [maximum] The maximum capacity. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly maximum?: number; + /** + * @member {number} [default] The default capacity. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly default?: number; + /** + * @member {ResourceSkuCapacityScaleType} [scaleType] The scale type + * applicable to the SKU. Possible values include: 'Automatic', 'Manual', + * 'None' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly scaleType?: ResourceSkuCapacityScaleType; +} + +/** + * @interface + * An interface representing ResourceSku. + * Describes an available DMS SKU. + * + */ +export interface ResourceSku { + /** + * @member {string} [resourceType] The type of resource the SKU applies to. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resourceType?: string; + /** + * @member {string} [name] The name of SKU. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [tier] Specifies the tier of DMS in a scale set. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly tier?: string; + /** + * @member {string} [size] The Size of the SKU. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly size?: string; + /** + * @member {string} [family] The Family of this particular SKU. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly family?: string; + /** + * @member {string} [kind] The Kind of resources that are supported in this + * SKU. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly kind?: string; + /** + * @member {ResourceSkuCapacity} [capacity] Not used. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly capacity?: ResourceSkuCapacity; + /** + * @member {string[]} [locations] The set of locations that the SKU is + * available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly locations?: string[]; + /** + * @member {string[]} [apiVersions] The api versions that support this SKU. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly apiVersions?: string[]; + /** + * @member {ResourceSkuCosts[]} [costs] Metadata for retrieving price info. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly costs?: ResourceSkuCosts[]; + /** + * @member {ResourceSkuCapabilities[]} [capabilities] A name value pair to + * describe the capability. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly capabilities?: ResourceSkuCapabilities[]; + /** + * @member {ResourceSkuRestrictions[]} [restrictions] The restrictions + * because of which SKU cannot be used. This is empty if there are no + * restrictions. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly restrictions?: ResourceSkuRestrictions[]; +} + +/** + * @interface + * An interface representing ConnectToSourceMySqlTaskInput. + * Input for the task that validates MySQL database connection + * + */ +export interface ConnectToSourceMySqlTaskInput { + /** + * @member {MySqlConnectionInfo} sourceConnectionInfo Information for + * connecting to MySQL source + */ + sourceConnectionInfo: MySqlConnectionInfo; + /** + * @member {MySqlTargetPlatformType} [targetPlatform] Target Platform for the + * migration. Possible values include: 'AzureDbForMySQL' + */ + targetPlatform?: MySqlTargetPlatformType; + /** + * @member {ServerLevelPermissionsGroup} [checkPermissionsGroup] Permission + * group for validations. Possible values include: 'Default', + * 'MigrationFromSqlServerToAzureDB', 'MigrationFromSqlServerToAzureMI', + * 'MigrationFromMySQLToAzureDBForMySQL' + */ + checkPermissionsGroup?: ServerLevelPermissionsGroup; +} + +/** + * @interface + * An interface representing ServerProperties. + * Server properties for Oracle, MySQL type source + * + */ +export interface ServerProperties { + /** + * @member {string} [serverPlatform] Name of the server platform + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverPlatform?: string; + /** + * @member {string} [serverName] Name of the server + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverName?: string; + /** + * @member {string} [serverVersion] Version of the database server + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverVersion?: string; + /** + * @member {string} [serverEdition] Edition of the database server + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverEdition?: string; + /** + * @member {string} [serverOperatingSystemVersion] Version of the operating + * system + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverOperatingSystemVersion?: string; + /** + * @member {number} [serverDatabaseCount] Number of databases in the server + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverDatabaseCount?: number; +} + +/** + * @interface + * An interface representing ConnectToSourceNonSqlTaskOutput. + * Output for connect to Oracle, MySQL type source + * + */ +export interface ConnectToSourceNonSqlTaskOutput { + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [sourceServerBrandVersion] Server brand version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerBrandVersion?: string; + /** + * @member {ServerProperties} [serverProperties] Server properties + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverProperties?: ServerProperties; + /** + * @member {string[]} [databases] List of databases on the server + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databases?: string[]; + /** + * @member {ReportableException[]} [validationErrors] Validation errors + * associated with the task + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly validationErrors?: ReportableException[]; +} + +/** + * @interface + * An interface representing ConnectToSourceMySqlTaskProperties. + * Properties for the task that validates MySQL database connection + * + */ +export interface ConnectToSourceMySqlTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "ConnectToSource.MySql"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {ConnectToSourceMySqlTaskInput} [input] Task input + */ + input?: ConnectToSourceMySqlTaskInput; + /** + * @member {ConnectToSourceNonSqlTaskOutput[]} [output] Task output. This is + * ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: ConnectToSourceNonSqlTaskOutput[]; +} + +/** + * @interface + * An interface representing SchemaMigrationSetting. + * Settings for migrating schema from source to target + * + */ +export interface SchemaMigrationSetting { + /** + * @member {SchemaMigrationOption} [schemaOption] Option on how to migrate + * the schema. Possible values include: 'None', 'ExtractFromSource', + * 'UseStorageFile' + */ + schemaOption?: SchemaMigrationOption; + /** + * @member {string} [fileId] Resource Identifier of a file resource + * containing the uploaded schema file + */ + fileId?: string; +} + +/** + * @interface + * An interface representing MigrateSchemaSqlServerSqlDbDatabaseInput. + * Database input for migrate schema Sql Server to Azure SQL Server scenario + * + */ +export interface MigrateSchemaSqlServerSqlDbDatabaseInput { + /** + * @member {string} [targetDatabaseName] Name of target database + */ + targetDatabaseName?: string; + /** + * @member {SchemaMigrationSetting} [schemaSetting] Database schema migration + * settings + */ + schemaSetting?: SchemaMigrationSetting; +} + +/** + * @interface + * An interface representing MigrateSchemaSqlServerSqlDbTaskInput. + * Input for task that migrates Schema for SQL Server databases to Azure SQL + * databases + * + * @extends SqlMigrationTaskInput + */ +export interface MigrateSchemaSqlServerSqlDbTaskInput extends SqlMigrationTaskInput { + /** + * @member {MigrateSchemaSqlServerSqlDbDatabaseInput[]} selectedDatabases + * Databases to migrate + */ + selectedDatabases: MigrateSchemaSqlServerSqlDbDatabaseInput[]; +} + +/** + * Contains the possible cases for MigrateSchemaSqlServerSqlDbTaskOutput. + */ +export type MigrateSchemaSqlServerSqlDbTaskOutputUnion = MigrateSchemaSqlServerSqlDbTaskOutput | MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel | MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel | MigrateSchemaSqlServerSqlDbTaskOutputError | MigrateSchemaSqlTaskOutputError; + +/** + * @interface + * An interface representing MigrateSchemaSqlServerSqlDbTaskOutput. + * Output for the task that migrates Schema for SQL Server databases to Azure + * SQL databases + * + */ +export interface MigrateSchemaSqlServerSqlDbTaskOutput { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "MigrateSchemaSqlServerSqlDbTaskOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; +} + +/** + * @interface + * An interface representing MigrateSchemaSqlServerSqlDbTaskProperties. + * Properties for task that migrates Schema for SQL Server databases to Azure + * SQL databases + * + */ +export interface MigrateSchemaSqlServerSqlDbTaskProperties { + /** + * @member {string} taskType Polymorphic Discriminator + */ + taskType: "MigrateSchemaSqlServerSqlDb"; + /** + * @member {ODataError[]} [errors] Array of errors. This is ignored if + * submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: ODataError[]; + /** + * @member {TaskState} [state] The state of the task. This is ignored if + * submitted. Possible values include: 'Unknown', 'Queued', 'Running', + * 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: TaskState; + /** + * @member {CommandPropertiesUnion[]} [commands] Array of command properties. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commands?: CommandPropertiesUnion[]; + /** + * @member {MigrateSchemaSqlServerSqlDbTaskInput} [input] Task input + */ + input?: MigrateSchemaSqlServerSqlDbTaskInput; + /** + * @member {MigrateSchemaSqlServerSqlDbTaskOutputUnion[]} [output] Task + * output. This is ignored if submitted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly output?: MigrateSchemaSqlServerSqlDbTaskOutputUnion[]; +} + +/** + * @interface + * An interface representing MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel. + */ +export interface MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "MigrationLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {MigrationState} [state] Overall state of the schema migration. + * Possible values include: 'None', 'InProgress', 'Failed', 'Warning', + * 'Completed', 'Skipped', 'Stopped' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: MigrationState; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {string} [sourceServerVersion] Source server version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerVersion?: string; + /** + * @member {string} [sourceServerBrandVersion] Source server brand version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerBrandVersion?: string; + /** + * @member {string} [targetServerVersion] Target server version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerVersion?: string; + /** + * @member {string} [targetServerBrandVersion] Target server brand version + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerBrandVersion?: string; +} + +/** + * @interface + * An interface representing MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel. + */ +export interface MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "DatabaseLevelOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [databaseName] The name of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {MigrationState} [state] State of the schema migration for this + * database. Possible values include: 'None', 'InProgress', 'Failed', + * 'Warning', 'Completed', 'Skipped', 'Stopped' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: MigrationState; + /** + * @member {SchemaMigrationStage} [stage] Schema migration stage for this + * database. Possible values include: 'NotStarted', 'ValidatingInputs', + * 'CollectingObjects', 'DownloadingScript', 'GeneratingScript', + * 'UploadingScript', 'DeployingSchema', 'Completed', + * 'CompletedWithWarnings', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly stage?: SchemaMigrationStage; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {string} [databaseErrorResultPrefix] Prefix string to use for + * querying errors for this database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseErrorResultPrefix?: string; + /** + * @member {string} [schemaErrorResultPrefix] Prefix string to use for + * querying schema errors for this database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly schemaErrorResultPrefix?: string; + /** + * @member {number} [numberOfSuccessfulOperations] Number of successful + * operations for this database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly numberOfSuccessfulOperations?: number; + /** + * @member {number} [numberOfFailedOperations] Number of failed operations + * for this database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly numberOfFailedOperations?: number; + /** + * @member {string} [fileId] Identifier for the file resource containing the + * schema of this database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fileId?: string; +} + +/** + * @interface + * An interface representing MigrateSchemaSqlServerSqlDbTaskOutputError. + */ +export interface MigrateSchemaSqlServerSqlDbTaskOutputError { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "SchemaErrorOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [commandText] Schema command which failed + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly commandText?: string; + /** + * @member {string} [errorText] Reason of failure + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorText?: string; +} + +/** + * @interface + * An interface representing MigrateSchemaSqlTaskOutputError. + */ +export interface MigrateSchemaSqlTaskOutputError { + /** + * @member {string} resultType Polymorphic Discriminator + */ + resultType: "ErrorOutput"; + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {ReportableException} [error] Migration error + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly error?: ReportableException; +} + +/** + * @interface + * An interface representing Database. + * Information about a single database + * + */ +export interface Database { + /** + * @member {string} [id] Unique identifier for the database + */ + id?: string; + /** + * @member {string} [name] Name of the database + */ + name?: string; + /** + * @member {DatabaseCompatLevel} [compatibilityLevel] SQL Server + * compatibility level of database. Possible values include: 'CompatLevel80', + * 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', + * 'CompatLevel130', 'CompatLevel140' + */ + compatibilityLevel?: DatabaseCompatLevel; + /** + * @member {string} [collation] Collation name of the database + */ + collation?: string; + /** + * @member {string} [serverName] Name of the server + */ + serverName?: string; + /** + * @member {string} [fqdn] Fully qualified name + */ + fqdn?: string; + /** + * @member {string} [installId] Install id of the database + */ + installId?: string; + /** + * @member {string} [serverVersion] Version of the server + */ + serverVersion?: string; + /** + * @member {string} [serverEdition] Edition of the server + */ + serverEdition?: string; + /** + * @member {string} [serverLevel] Product level of the server (RTM, SP, CTP). + */ + serverLevel?: string; + /** + * @member {string} [serverDefaultDataPath] Default path of the data files + */ + serverDefaultDataPath?: string; + /** + * @member {string} [serverDefaultLogPath] Default path of the log files + */ + serverDefaultLogPath?: string; + /** + * @member {string} [serverDefaultBackupPath] Default path of the backup + * folder + */ + serverDefaultBackupPath?: string; + /** + * @member {number} [serverCoreCount] Number of cores on the server + */ + serverCoreCount?: number; + /** + * @member {number} [serverVisibleOnlineCoreCount] Number of cores on the + * server that have VISIBLE ONLINE status + */ + serverVisibleOnlineCoreCount?: number; + /** + * @member {DatabaseState} [databaseState] State of the database. Possible + * values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', + * 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary' + */ + databaseState?: DatabaseState; + /** + * @member {string} [serverId] The unique Server Id + */ + serverId?: string; +} + +/** + * @interface + * An interface representing DatabaseObjectName. + * A representation of the name of an object in a database + * + */ +export interface DatabaseObjectName { + /** + * @member {string} [databaseName] The unescaped name of the database + * containing the object + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {string} [objectName] The unescaped name of the object + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly objectName?: string; + /** + * @member {string} [schemaName] The unescaped name of the schema containing + * the object + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly schemaName?: string; + /** + * @member {ObjectType} [objectType] Type of the object in the database. + * Possible values include: 'StoredProcedures', 'Table', 'User', 'View', + * 'Function' + */ + objectType?: ObjectType; +} + +/** + * @interface + * An interface representing MigrationTableMetadata. + * Metadata for tables selected in migration project + * + */ +export interface MigrationTableMetadata { + /** + * @member {string} [sourceTableName] Source table name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceTableName?: string; + /** + * @member {string} [targetTableName] Target table name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetTableName?: string; +} + +/** + * @interface + * An interface representing DataMigrationProjectMetadata. + * Common metadata for migration projects + * + */ +export interface DataMigrationProjectMetadata { + /** + * @member {string} [sourceServerName] Source server name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerName?: string; + /** + * @member {string} [sourceServerPort] Source server port number + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerPort?: string; + /** + * @member {string} [sourceUsername] Source username + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceUsername?: string; + /** + * @member {string} [targetServerName] Target server name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerName?: string; + /** + * @member {string} [targetUsername] Target username + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetUsername?: string; + /** + * @member {string} [targetDbName] Target database name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetDbName?: string; + /** + * @member {boolean} [targetUsingWinAuth] Whether target connection is + * Windows authentication + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetUsingWinAuth?: boolean; + /** + * @member {MigrationTableMetadata[]} [selectedMigrationTables] List of + * tables selected for migration + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly selectedMigrationTables?: MigrationTableMetadata[]; +} + +/** + * @interface + * An interface representing GetProjectDetailsNonSqlTaskInput. + * Input for the task that reads configuration from project artifacts + * + */ +export interface GetProjectDetailsNonSqlTaskInput { + /** + * @member {string} projectName Name of the migration project + */ + projectName: string; + /** + * @member {string} projectLocation A URL that points to the location to + * access project artifacts + */ + projectLocation: string; +} + +/** + * @interface + * An interface representing NonSqlDataMigrationTable. + * Defines metadata for table to be migrated + * + */ +export interface NonSqlDataMigrationTable { + /** + * @member {string} [sourceName] Source table name + */ + sourceName?: string; +} + +/** + * @interface + * An interface representing NonSqlMigrationTaskInput. + * Base class for non sql migration task input + * + */ +export interface NonSqlMigrationTaskInput { + /** + * @member {SqlConnectionInfo} targetConnectionInfo Information for + * connecting to target + */ + targetConnectionInfo: SqlConnectionInfo; + /** + * @member {string} targetDatabaseName Target database name + */ + targetDatabaseName: string; + /** + * @member {string} projectName Name of the migration project + */ + projectName: string; + /** + * @member {string} projectLocation A URL that points to the drop location to + * access project artifacts + */ + projectLocation: string; + /** + * @member {NonSqlDataMigrationTable[]} selectedTables Metadata of the tables + * selected for migration + */ + selectedTables: NonSqlDataMigrationTable[]; +} + +/** + * @interface + * An interface representing DataMigrationError. + * Migration Task errors + * + */ +export interface DataMigrationError { + /** + * @member {string} [message] Error description + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly message?: string; + /** + * @member {ErrorType} [type] Possible values include: 'Default', 'Warning', + * 'Error' + */ + type?: ErrorType; +} + +/** + * @interface + * An interface representing NonSqlDataMigrationTableResult. + * Object used to report the data migration results of a table + * + */ +export interface NonSqlDataMigrationTableResult { + /** + * @member {DataMigrationResultCode} [resultCode] Result code of the data + * migration. Possible values include: 'Initial', 'Completed', + * 'ObjectNotExistsInSource', 'ObjectNotExistsInTarget', + * 'TargetObjectIsInaccessible', 'FatalError' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resultCode?: DataMigrationResultCode; + /** + * @member {string} [sourceName] Name of the source table + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceName?: string; + /** + * @member {string} [targetName] Name of the target table + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetName?: string; + /** + * @member {number} [sourceRowCount] Number of rows in the source table + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceRowCount?: number; + /** + * @member {number} [targetRowCount] Number of rows in the target table + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetRowCount?: number; + /** + * @member {number} [elapsedTimeInMiliseconds] Time taken to migrate the data + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly elapsedTimeInMiliseconds?: number; + /** + * @member {DataMigrationError[]} [errors] List of errors, if any, during + * migration + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: DataMigrationError[]; +} + +/** + * @interface + * An interface representing NonSqlMigrationTaskOutput. + * Base class for non sql migration task output + * + */ +export interface NonSqlMigrationTaskOutput { + /** + * @member {string} [id] Result identifier + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {Date} [startedOn] Migration start time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startedOn?: Date; + /** + * @member {Date} [endedOn] Migration end time + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endedOn?: Date; + /** + * @member {MigrationStatus} [status] Current state of migration. Possible + * values include: 'Default', 'Connecting', 'SourceAndTargetSelected', + * 'SelectLogins', 'Configured', 'Running', 'Error', 'Stopped', 'Completed', + * 'CompletedWithWarnings' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: MigrationStatus; + /** + * @member {{ [propertyName: string]: NonSqlDataMigrationTableResult }} + * [dataMigrationTableResults] Results of the migration. The key contains the + * table name and the value the table result object + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly dataMigrationTableResults?: { [propertyName: string]: NonSqlDataMigrationTableResult }; + /** + * @member {string} [progressMessage] Message about the progress of the + * migration + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly progressMessage?: string; + /** + * @member {string} [sourceServerName] Name of source server + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sourceServerName?: string; + /** + * @member {string} [targetServerName] Name of target server + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly targetServerName?: string; +} + +/** + * @interface + * An interface representing DatabaseFileInput. + * Database file specific information for input + * + */ +export interface DatabaseFileInput { + /** + * @member {string} [id] Unique identifier for database file + */ + id?: string; + /** + * @member {string} [logicalName] Logical name of the file + */ + logicalName?: string; + /** + * @member {string} [physicalFullName] Operating-system full path of the file + */ + physicalFullName?: string; + /** + * @member {string} [restoreFullName] Suggested full path of the file for + * restoring + */ + restoreFullName?: string; + /** + * @member {DatabaseFileType} [fileType] Database file type. Possible values + * include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext' + */ + fileType?: DatabaseFileType; +} + +/** + * @interface + * An interface representing MigrateSqlServerSqlServerDatabaseInput. + * Database specific information for SQL to SQL migration task inputs + * + */ +export interface MigrateSqlServerSqlServerDatabaseInput { + /** + * @member {string} [name] Name of the database + */ + name?: string; + /** + * @member {string} [restoreDatabaseName] Name of the database at destination + */ + restoreDatabaseName?: string; + /** + * @member {string} [backupAndRestoreFolder] The backup and restore folder + */ + backupAndRestoreFolder?: string; + /** + * @member {DatabaseFileInput[]} [databaseFiles] The list of database files + */ + databaseFiles?: DatabaseFileInput[]; +} + +/** + * @interface + * An interface representing ServicesDeleteMethodOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ServicesDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {boolean} [deleteRunningTasks] Delete the resource even if it + * contains running tasks + */ + deleteRunningTasks?: boolean; +} + +/** + * @interface + * An interface representing ServicesBeginDeleteMethodOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ServicesBeginDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {boolean} [deleteRunningTasks] Delete the resource even if it + * contains running tasks + */ + deleteRunningTasks?: boolean; +} + +/** + * @interface + * An interface representing TasksListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface TasksListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [taskType] Filter tasks by task type + */ + taskType?: string; +} + +/** + * @interface + * An interface representing TasksGetOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface TasksGetOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] Expand the response + */ + expand?: string; +} + +/** + * @interface + * An interface representing TasksDeleteMethodOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface TasksDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {boolean} [deleteRunningTasks] Delete the resource even if it + * contains running tasks + */ + deleteRunningTasks?: boolean; +} + +/** + * @interface + * An interface representing ProjectsDeleteMethodOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ProjectsDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {boolean} [deleteRunningTasks] Delete the resource even if it + * contains running tasks + */ + deleteRunningTasks?: boolean; +} + +/** + * @interface + * An interface representing DataMigrationServiceClientOptions. + * @extends AzureServiceClientOptions + */ +export interface DataMigrationServiceClientOptions extends AzureServiceClientOptions { + /** + * @member {string} [baseUri] + */ + baseUri?: string; +} + + +/** + * @interface + * An interface representing the ResourceSkusResult. + * The DMS List SKUs operation response. + * + * @extends Array + */ +export interface ResourceSkusResult extends Array { + /** + * @member {string} [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; +} + +/** + * @interface + * An interface representing the ServiceSkuList. + * OData page of available SKUs + * + * @extends Array + */ +export interface ServiceSkuList extends Array { + /** + * @member {string} [nextLink] URL to load the next page of service SKUs + */ + nextLink?: string; +} + +/** + * @interface + * An interface representing the DataMigrationServiceList. + * OData page of service objects + * + * @extends Array + */ +export interface DataMigrationServiceList extends Array { + /** + * @member {string} [nextLink] URL to load the next page of services + */ + nextLink?: string; +} + +/** + * @interface + * An interface representing the TaskList. + * OData page of tasks + * + * @extends Array + */ +export interface TaskList extends Array { + /** + * @member {string} [nextLink] URL to load the next page of tasks + */ + nextLink?: string; +} + +/** + * @interface + * An interface representing the ProjectList. + * OData page of project resources + * + * @extends Array + */ +export interface ProjectList extends Array { + /** + * @member {string} [nextLink] URL to load the next page of projects + */ + nextLink?: string; +} + +/** + * @interface + * An interface representing the QuotaList. + * OData page of quota objects + * + * @extends Array + */ +export interface QuotaList extends Array { + /** + * @member {string} [nextLink] URL to load the next page of quotas, or null + * or missing if this is the last page + */ + nextLink?: string; +} + +/** + * @interface + * An interface representing the ServiceOperationList. + * OData page of action (operation) objects + * + * @extends Array + */ +export interface ServiceOperationList extends Array { + /** + * @member {string} [nextLink] URL to load the next page of actions + */ + nextLink?: string; +} + +/** + * Defines values for CommandState. + * Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', + * 'Failed' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: CommandState = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum CommandState { + Unknown = 'Unknown', + Accepted = 'Accepted', + Running = 'Running', + Succeeded = 'Succeeded', + Failed = 'Failed', +} + +/** + * Defines values for SqlSourcePlatform. + * Possible values include: 'SqlOnPrem' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: SqlSourcePlatform = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum SqlSourcePlatform { + SqlOnPrem = 'SqlOnPrem', +} + +/** + * Defines values for AuthenticationType. + * Possible values include: 'None', 'WindowsAuthentication', + * 'SqlAuthentication', 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: AuthenticationType = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum AuthenticationType { + None = 'None', + WindowsAuthentication = 'WindowsAuthentication', + SqlAuthentication = 'SqlAuthentication', + ActiveDirectoryIntegrated = 'ActiveDirectoryIntegrated', + ActiveDirectoryPassword = 'ActiveDirectoryPassword', +} + +/** + * Defines values for BackupType. + * Possible values include: 'Database', 'TransactionLog', 'File', + * 'DifferentialDatabase', 'DifferentialFile', 'Partial', 'DifferentialPartial' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: BackupType = "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum BackupType { + Database = 'Database', + TransactionLog = 'TransactionLog', + File = 'File', + DifferentialDatabase = 'DifferentialDatabase', + DifferentialFile = 'DifferentialFile', + Partial = 'Partial', + DifferentialPartial = 'DifferentialPartial', +} + +/** + * Defines values for BackupMode. + * Possible values include: 'CreateBackup', 'ExistingBackup' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: BackupMode = "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum BackupMode { + CreateBackup = 'CreateBackup', + ExistingBackup = 'ExistingBackup', +} + +/** + * Defines values for SyncTableMigrationState. + * Possible values include: 'BEFORE_LOAD', 'FULL_LOAD', 'COMPLETED', + * 'CANCELED', 'ERROR', 'FAILED' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: SyncTableMigrationState = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum SyncTableMigrationState { + BEFORELOAD = 'BEFORE_LOAD', + FULLLOAD = 'FULL_LOAD', + COMPLETED = 'COMPLETED', + CANCELED = 'CANCELED', + ERROR = 'ERROR', + FAILED = 'FAILED', +} + +/** + * Defines values for SyncDatabaseMigrationReportingState. + * Possible values include: 'UNDEFINED', 'CONFIGURING', 'INITIALIAZING', + * 'STARTING', 'RUNNING', 'READY_TO_COMPLETE', 'COMPLETING', 'COMPLETE', + * 'CANCELLING', 'CANCELLED', 'FAILED' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: SyncDatabaseMigrationReportingState = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum SyncDatabaseMigrationReportingState { + UNDEFINED = 'UNDEFINED', + CONFIGURING = 'CONFIGURING', + INITIALIAZING = 'INITIALIAZING', + STARTING = 'STARTING', + RUNNING = 'RUNNING', + READYTOCOMPLETE = 'READY_TO_COMPLETE', + COMPLETING = 'COMPLETING', + COMPLETE = 'COMPLETE', + CANCELLING = 'CANCELLING', + CANCELLED = 'CANCELLED', + FAILED = 'FAILED', +} + +/** + * Defines values for ValidationStatus. + * Possible values include: 'Default', 'NotStarted', 'Initialized', + * 'InProgress', 'Completed', 'CompletedWithIssues', 'Stopped', 'Failed' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ValidationStatus = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ValidationStatus { + Default = 'Default', + NotStarted = 'NotStarted', + Initialized = 'Initialized', + InProgress = 'InProgress', + Completed = 'Completed', + CompletedWithIssues = 'CompletedWithIssues', + Stopped = 'Stopped', + Failed = 'Failed', +} + +/** + * Defines values for Severity. + * Possible values include: 'Message', 'Warning', 'Error' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: Severity = "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum Severity { + Message = 'Message', + Warning = 'Warning', + Error = 'Error', +} + +/** + * Defines values for UpdateActionType. + * Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', + * 'AddedOnTarget' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: UpdateActionType = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum UpdateActionType { + DeletedOnTarget = 'DeletedOnTarget', + ChangedOnTarget = 'ChangedOnTarget', + AddedOnTarget = 'AddedOnTarget', +} + +/** + * Defines values for ObjectType. + * Possible values include: 'StoredProcedures', 'Table', 'User', 'View', + * 'Function' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ObjectType = "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ObjectType { + StoredProcedures = 'StoredProcedures', + Table = 'Table', + User = 'User', + View = 'View', + Function = 'Function', +} + +/** + * Defines values for MigrationState. + * Possible values include: 'None', 'InProgress', 'Failed', 'Warning', + * 'Completed', 'Skipped', 'Stopped' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: MigrationState = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum MigrationState { + None = 'None', + InProgress = 'InProgress', + Failed = 'Failed', + Warning = 'Warning', + Completed = 'Completed', + Skipped = 'Skipped', + Stopped = 'Stopped', +} + +/** + * Defines values for DatabaseMigrationStage. + * Possible values include: 'None', 'Initialize', 'Backup', 'FileCopy', + * 'Restore', 'Completed' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: DatabaseMigrationStage = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum DatabaseMigrationStage { + None = 'None', + Initialize = 'Initialize', + Backup = 'Backup', + FileCopy = 'FileCopy', + Restore = 'Restore', + Completed = 'Completed', +} + +/** + * Defines values for MigrationStatus. + * Possible values include: 'Default', 'Connecting', 'SourceAndTargetSelected', + * 'SelectLogins', 'Configured', 'Running', 'Error', 'Stopped', 'Completed', + * 'CompletedWithWarnings' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: MigrationStatus = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum MigrationStatus { + Default = 'Default', + Connecting = 'Connecting', + SourceAndTargetSelected = 'SourceAndTargetSelected', + SelectLogins = 'SelectLogins', + Configured = 'Configured', + Running = 'Running', + Error = 'Error', + Stopped = 'Stopped', + Completed = 'Completed', + CompletedWithWarnings = 'CompletedWithWarnings', +} + +/** + * Defines values for LoginMigrationStage. + * Possible values include: 'None', 'Initialize', 'LoginMigration', + * 'EstablishUserMapping', 'AssignRoleMembership', 'AssignRoleOwnership', + * 'EstablishServerPermissions', 'EstablishObjectPermissions', 'Completed' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: LoginMigrationStage = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum LoginMigrationStage { + None = 'None', + Initialize = 'Initialize', + LoginMigration = 'LoginMigration', + EstablishUserMapping = 'EstablishUserMapping', + AssignRoleMembership = 'AssignRoleMembership', + AssignRoleOwnership = 'AssignRoleOwnership', + EstablishServerPermissions = 'EstablishServerPermissions', + EstablishObjectPermissions = 'EstablishObjectPermissions', + Completed = 'Completed', +} + +/** + * Defines values for LoginType. + * Possible values include: 'WindowsUser', 'WindowsGroup', 'SqlLogin', + * 'Certificate', 'AsymmetricKey', 'ExternalUser', 'ExternalGroup' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: LoginType = "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum LoginType { + WindowsUser = 'WindowsUser', + WindowsGroup = 'WindowsGroup', + SqlLogin = 'SqlLogin', + Certificate = 'Certificate', + AsymmetricKey = 'AsymmetricKey', + ExternalUser = 'ExternalUser', + ExternalGroup = 'ExternalGroup', +} + +/** + * Defines values for DatabaseState. + * Possible values include: 'Online', 'Restoring', 'Recovering', + * 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', + * 'OfflineSecondary' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: DatabaseState = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum DatabaseState { + Online = 'Online', + Restoring = 'Restoring', + Recovering = 'Recovering', + RecoveryPending = 'RecoveryPending', + Suspect = 'Suspect', + Emergency = 'Emergency', + Offline = 'Offline', + Copying = 'Copying', + OfflineSecondary = 'OfflineSecondary', +} + +/** + * Defines values for DatabaseCompatLevel. + * Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', + * 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: DatabaseCompatLevel = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum DatabaseCompatLevel { + CompatLevel80 = 'CompatLevel80', + CompatLevel90 = 'CompatLevel90', + CompatLevel100 = 'CompatLevel100', + CompatLevel110 = 'CompatLevel110', + CompatLevel120 = 'CompatLevel120', + CompatLevel130 = 'CompatLevel130', + CompatLevel140 = 'CompatLevel140', +} + +/** + * Defines values for DatabaseFileType. + * Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', + * 'Fulltext' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: DatabaseFileType = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum DatabaseFileType { + Rows = 'Rows', + Log = 'Log', + Filestream = 'Filestream', + NotSupported = 'NotSupported', + Fulltext = 'Fulltext', +} + +/** + * Defines values for ServerLevelPermissionsGroup. + * Possible values include: 'Default', 'MigrationFromSqlServerToAzureDB', + * 'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ServerLevelPermissionsGroup = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ServerLevelPermissionsGroup { + Default = 'Default', + MigrationFromSqlServerToAzureDB = 'MigrationFromSqlServerToAzureDB', + MigrationFromSqlServerToAzureMI = 'MigrationFromSqlServerToAzureMI', + MigrationFromMySQLToAzureDBForMySQL = 'MigrationFromMySQLToAzureDBForMySQL', +} + +/** + * Defines values for TaskState. + * Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', + * 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: TaskState = "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum TaskState { + Unknown = 'Unknown', + Queued = 'Queued', + Running = 'Running', + Canceled = 'Canceled', + Succeeded = 'Succeeded', + Failed = 'Failed', + FailedInputValidation = 'FailedInputValidation', + Faulted = 'Faulted', +} + +/** + * Defines values for ServiceProvisioningState. + * Possible values include: 'Accepted', 'Deleting', 'Deploying', 'Stopped', + * 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop', 'Succeeded', + * 'Failed' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ServiceProvisioningState = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ServiceProvisioningState { + Accepted = 'Accepted', + Deleting = 'Deleting', + Deploying = 'Deploying', + Stopped = 'Stopped', + Stopping = 'Stopping', + Starting = 'Starting', + FailedToStart = 'FailedToStart', + FailedToStop = 'FailedToStop', + Succeeded = 'Succeeded', + Failed = 'Failed', +} + +/** + * Defines values for ProjectTargetPlatform. + * Possible values include: 'SQLDB', 'SQLMI', 'AzureDbForMySql', + * 'AzureDbForPostgreSql', 'Unknown' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ProjectTargetPlatform = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ProjectTargetPlatform { + SQLDB = 'SQLDB', + SQLMI = 'SQLMI', + AzureDbForMySql = 'AzureDbForMySql', + AzureDbForPostgreSql = 'AzureDbForPostgreSql', + Unknown = 'Unknown', +} + +/** + * Defines values for ProjectSourcePlatform. + * Possible values include: 'SQL', 'MySQL', 'PostgreSql', 'Unknown' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ProjectSourcePlatform = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ProjectSourcePlatform { + SQL = 'SQL', + MySQL = 'MySQL', + PostgreSql = 'PostgreSql', + Unknown = 'Unknown', +} + +/** + * Defines values for ProjectProvisioningState. + * Possible values include: 'Deleting', 'Succeeded' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ProjectProvisioningState = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ProjectProvisioningState { + Deleting = 'Deleting', + Succeeded = 'Succeeded', +} + +/** + * Defines values for NameCheckFailureReason. + * Possible values include: 'AlreadyExists', 'Invalid' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: NameCheckFailureReason = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum NameCheckFailureReason { + AlreadyExists = 'AlreadyExists', + Invalid = 'Invalid', +} + +/** + * Defines values for ServiceScalability. + * Possible values include: 'none', 'manual', 'automatic' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ServiceScalability = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ServiceScalability { + None = 'none', + Manual = 'manual', + Automatic = 'automatic', +} + +/** + * Defines values for ResourceSkuRestrictionsType. + * Possible values include: 'location' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ResourceSkuRestrictionsType = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ResourceSkuRestrictionsType { + Location = 'location', +} + +/** + * Defines values for ResourceSkuRestrictionsReasonCode. + * Possible values include: 'QuotaId', 'NotAvailableForSubscription' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ResourceSkuRestrictionsReasonCode = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ResourceSkuRestrictionsReasonCode { + QuotaId = 'QuotaId', + NotAvailableForSubscription = 'NotAvailableForSubscription', +} + +/** + * Defines values for ResourceSkuCapacityScaleType. + * Possible values include: 'Automatic', 'Manual', 'None' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ResourceSkuCapacityScaleType = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ResourceSkuCapacityScaleType { + Automatic = 'Automatic', + Manual = 'Manual', + None = 'None', +} + +/** + * Defines values for MySqlTargetPlatformType. + * Possible values include: 'AzureDbForMySQL' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: MySqlTargetPlatformType = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum MySqlTargetPlatformType { + AzureDbForMySQL = 'AzureDbForMySQL', +} + +/** + * Defines values for SchemaMigrationOption. + * Possible values include: 'None', 'ExtractFromSource', 'UseStorageFile' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: SchemaMigrationOption = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum SchemaMigrationOption { + None = 'None', + ExtractFromSource = 'ExtractFromSource', + UseStorageFile = 'UseStorageFile', +} + +/** + * Defines values for SchemaMigrationStage. + * Possible values include: 'NotStarted', 'ValidatingInputs', + * 'CollectingObjects', 'DownloadingScript', 'GeneratingScript', + * 'UploadingScript', 'DeployingSchema', 'Completed', 'CompletedWithWarnings', + * 'Failed' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: SchemaMigrationStage = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum SchemaMigrationStage { + NotStarted = 'NotStarted', + ValidatingInputs = 'ValidatingInputs', + CollectingObjects = 'CollectingObjects', + DownloadingScript = 'DownloadingScript', + GeneratingScript = 'GeneratingScript', + UploadingScript = 'UploadingScript', + DeployingSchema = 'DeployingSchema', + Completed = 'Completed', + CompletedWithWarnings = 'CompletedWithWarnings', + Failed = 'Failed', +} + +/** + * Defines values for DataMigrationResultCode. + * Possible values include: 'Initial', 'Completed', 'ObjectNotExistsInSource', + * 'ObjectNotExistsInTarget', 'TargetObjectIsInaccessible', 'FatalError' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: DataMigrationResultCode = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum DataMigrationResultCode { + Initial = 'Initial', + Completed = 'Completed', + ObjectNotExistsInSource = 'ObjectNotExistsInSource', + ObjectNotExistsInTarget = 'ObjectNotExistsInTarget', + TargetObjectIsInaccessible = 'TargetObjectIsInaccessible', + FatalError = 'FatalError', +} + +/** + * Defines values for ErrorType. + * Possible values include: 'Default', 'Warning', 'Error' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ErrorType = "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ErrorType { + Default = 'Default', + Warning = 'Warning', + Error = 'Error', +} + +/** + * Contains response data for the listSkus operation. + */ +export type ResourceSkusListSkusResponse = ResourceSkusResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ResourceSkusResult; + }; +}; + +/** + * Contains response data for the listSkusNext operation. + */ +export type ResourceSkusListSkusNextResponse = ResourceSkusResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ResourceSkusResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServicesCreateOrUpdateResponse = DataMigrationService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataMigrationService; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServicesGetResponse = DataMigrationService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataMigrationService; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ServicesUpdateResponse = DataMigrationService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataMigrationService; + }; +}; + +/** + * Contains response data for the checkStatus operation. + */ +export type ServicesCheckStatusResponse = DataMigrationServiceStatusResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataMigrationServiceStatusResponse; + }; +}; + +/** + * Contains response data for the listSkus operation. + */ +export type ServicesListSkusResponse = ServiceSkuList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServiceSkuList; + }; +}; + +/** + * Contains response data for the checkChildrenNameAvailability operation. + */ +export type ServicesCheckChildrenNameAvailabilityResponse = NameAvailabilityResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: NameAvailabilityResponse; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type ServicesListByResourceGroupResponse = DataMigrationServiceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataMigrationServiceList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ServicesListResponse = DataMigrationServiceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataMigrationServiceList; + }; +}; + +/** + * Contains response data for the checkNameAvailability operation. + */ +export type ServicesCheckNameAvailabilityResponse = NameAvailabilityResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: NameAvailabilityResponse; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ServicesBeginCreateOrUpdateResponse = DataMigrationService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataMigrationService; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type ServicesBeginUpdateResponse = DataMigrationService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataMigrationService; + }; +}; + +/** + * Contains response data for the listSkusNext operation. + */ +export type ServicesListSkusNextResponse = ServiceSkuList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServiceSkuList; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type ServicesListByResourceGroupNextResponse = DataMigrationServiceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataMigrationServiceList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ServicesListNextResponse = DataMigrationServiceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataMigrationServiceList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type TasksListResponse = TaskList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TaskList; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type TasksCreateOrUpdateResponse = ProjectTask & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProjectTask; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type TasksGetResponse = ProjectTask & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProjectTask; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type TasksUpdateResponse = ProjectTask & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProjectTask; + }; +}; + +/** + * Contains response data for the cancel operation. + */ +export type TasksCancelResponse = ProjectTask & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProjectTask; + }; +}; + +/** + * Contains response data for the command operation. + */ +export type TasksCommandResponse = CommandPropertiesUnion & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: CommandPropertiesUnion; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type TasksListNextResponse = TaskList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TaskList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ProjectsListResponse = ProjectList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProjectList; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ProjectsCreateOrUpdateResponse = Project & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Project; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ProjectsGetResponse = Project & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Project; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ProjectsUpdateResponse = Project & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Project; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ProjectsListNextResponse = ProjectList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProjectList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type UsagesListResponse = QuotaList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: QuotaList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type UsagesListNextResponse = QuotaList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: QuotaList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = ServiceOperationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServiceOperationList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = ServiceOperationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServiceOperationList; + }; +}; diff --git a/packages/@azure/arm-datamigration/lib/models/mappers.ts b/packages/@azure/arm-datamigration/lib/models/mappers.ts new file mode 100644 index 000000000000..d54d849f05a6 --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/models/mappers.ts @@ -0,0 +1,7655 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import { CloudErrorMapper, BaseResourceMapper } from "ms-rest-azure-js"; +import * as msRest from "ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const ODataError: msRest.CompositeMapper = { + serializedName: "ODataError", + type: { + name: "Composite", + className: "ODataError", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ODataError" + } + } + } + } + } + } +}; + +export const ReportableException: msRest.CompositeMapper = { + serializedName: "ReportableException", + type: { + name: "Composite", + className: "ReportableException", + modelProperties: { + message: { + serializedName: "message", + type: { + name: "String" + } + }, + actionableMessage: { + serializedName: "actionableMessage", + type: { + name: "String" + } + }, + filePath: { + serializedName: "filePath", + type: { + name: "String" + } + }, + lineNumber: { + serializedName: "lineNumber", + type: { + name: "String" + } + }, + hResult: { + serializedName: "hResult", + type: { + name: "Number" + } + }, + stackTrace: { + serializedName: "stackTrace", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSyncCompleteCommandOutput: msRest.CompositeMapper = { + serializedName: "MigrateSyncCompleteCommandOutput", + type: { + name: "Composite", + className: "MigrateSyncCompleteCommandOutput", + modelProperties: { + errors: { + serializedName: "errors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const MigrateSyncCompleteCommandInput: msRest.CompositeMapper = { + serializedName: "MigrateSyncCompleteCommandInput", + type: { + name: "Composite", + className: "MigrateSyncCompleteCommandInput", + modelProperties: { + databaseName: { + required: true, + serializedName: "databaseName", + type: { + name: "String" + } + }, + commitTimeStamp: { + serializedName: "commitTimeStamp", + type: { + name: "DateTime" + } + } + } + } +}; + +export const CommandProperties: msRest.CompositeMapper = { + serializedName: "Unknown", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "commandType", + clientName: "commandType" + }, + uberParent: "CommandProperties", + className: "CommandProperties", + modelProperties: { + errors: { + readOnly: true, + serializedName: "errors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ODataError" + } + } + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + commandType: { + required: true, + serializedName: "commandType", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSyncCompleteCommandProperties: msRest.CompositeMapper = { + serializedName: "Migrate.Sync.Complete.Database", + type: { + name: "Composite", + polymorphicDiscriminator: CommandProperties.type.polymorphicDiscriminator, + uberParent: "CommandProperties", + className: "MigrateSyncCompleteCommandProperties", + modelProperties: { + ...CommandProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "MigrateSyncCompleteCommandInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Composite", + className: "MigrateSyncCompleteCommandOutput" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const GetTdeCertificatesSqlTaskOutput: msRest.CompositeMapper = { + serializedName: "GetTdeCertificatesSqlTaskOutput", + type: { + name: "Composite", + className: "GetTdeCertificatesSqlTaskOutput", + modelProperties: { + base64EncodedCertificates: { + readOnly: true, + serializedName: "base64EncodedCertificates", + type: { + name: "Dictionary", + value: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + }, + validationErrors: { + readOnly: true, + serializedName: "validationErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const SelectedCertificateInput: msRest.CompositeMapper = { + serializedName: "SelectedCertificateInput", + type: { + name: "Composite", + className: "SelectedCertificateInput", + modelProperties: { + certificateName: { + required: true, + serializedName: "certificateName", + type: { + name: "String" + } + }, + password: { + required: true, + serializedName: "password", + type: { + name: "String" + } + } + } + } +}; + +export const FileShare: msRest.CompositeMapper = { + serializedName: "FileShare", + type: { + name: "Composite", + className: "FileShare", + modelProperties: { + userName: { + serializedName: "userName", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + type: { + name: "String" + } + }, + path: { + required: true, + serializedName: "path", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectionInfo: msRest.CompositeMapper = { + serializedName: "Unknown", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + uberParent: "ConnectionInfo", + className: "ConnectionInfo", + modelProperties: { + userName: { + serializedName: "userName", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + type: { + name: "String" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const PostgreSqlConnectionInfo: msRest.CompositeMapper = { + serializedName: "PostgreSqlConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "PostgreSqlConnectionInfo", + modelProperties: { + ...ConnectionInfo.type.modelProperties, + serverName: { + required: true, + serializedName: "serverName", + type: { + name: "String" + } + }, + databaseName: { + serializedName: "databaseName", + type: { + name: "String" + } + }, + port: { + required: true, + serializedName: "port", + type: { + name: "Number" + } + } + } + } +}; + +export const MySqlConnectionInfo: msRest.CompositeMapper = { + serializedName: "MySqlConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "MySqlConnectionInfo", + modelProperties: { + ...ConnectionInfo.type.modelProperties, + serverName: { + required: true, + serializedName: "serverName", + type: { + name: "String" + } + }, + port: { + required: true, + serializedName: "port", + type: { + name: "Number" + } + } + } + } +}; + +export const SqlConnectionInfo: msRest.CompositeMapper = { + serializedName: "SqlConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo", + modelProperties: { + ...ConnectionInfo.type.modelProperties, + dataSource: { + required: true, + serializedName: "dataSource", + type: { + name: "String" + } + }, + authentication: { + serializedName: "authentication", + type: { + name: "String" + } + }, + encryptConnection: { + serializedName: "encryptConnection", + defaultValue: true, + type: { + name: "Boolean" + } + }, + additionalSettings: { + serializedName: "additionalSettings", + type: { + name: "String" + } + }, + trustServerCertificate: { + serializedName: "trustServerCertificate", + defaultValue: false, + type: { + name: "Boolean" + } + }, + platform: { + serializedName: "platform", + type: { + name: "String" + } + } + } + } +}; + +export const GetTdeCertificatesSqlTaskInput: msRest.CompositeMapper = { + serializedName: "GetTdeCertificatesSqlTaskInput", + type: { + name: "Composite", + className: "GetTdeCertificatesSqlTaskInput", + modelProperties: { + connectionInfo: { + required: true, + serializedName: "connectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + }, + backupFileShare: { + required: true, + serializedName: "backupFileShare", + type: { + name: "Composite", + className: "FileShare" + } + }, + selectedCertificates: { + required: true, + serializedName: "selectedCertificates", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SelectedCertificateInput" + } + } + } + } + } + } +}; + +export const ProjectTaskProperties: msRest.CompositeMapper = { + serializedName: "Unknown", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "taskType", + clientName: "taskType" + }, + uberParent: "ProjectTaskProperties", + className: "ProjectTaskProperties", + modelProperties: { + errors: { + readOnly: true, + serializedName: "errors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ODataError" + } + } + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + commands: { + readOnly: true, + serializedName: "commands", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "commandType", + clientName: "commandType" + }, + uberParent: "CommandProperties", + className: "CommandProperties" + } + } + } + }, + taskType: { + required: true, + serializedName: "taskType", + type: { + name: "String" + } + } + } + } +}; + +export const GetTdeCertificatesSqlTaskProperties: msRest.CompositeMapper = { + serializedName: "GetTDECertificates.Sql", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "GetTdeCertificatesSqlTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "GetTdeCertificatesSqlTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GetTdeCertificatesSqlTaskOutput" + } + } + } + } + } + } +}; + +export const DatabaseBackupInfo: msRest.CompositeMapper = { + serializedName: "DatabaseBackupInfo", + type: { + name: "Composite", + className: "DatabaseBackupInfo", + modelProperties: { + databaseName: { + readOnly: true, + serializedName: "databaseName", + type: { + name: "String" + } + }, + backupType: { + readOnly: true, + serializedName: "backupType", + type: { + name: "String" + } + }, + backupFiles: { + readOnly: true, + serializedName: "backupFiles", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + position: { + readOnly: true, + serializedName: "position", + type: { + name: "Number" + } + }, + isDamaged: { + readOnly: true, + serializedName: "isDamaged", + type: { + name: "Boolean" + } + }, + isCompressed: { + readOnly: true, + serializedName: "isCompressed", + type: { + name: "Boolean" + } + }, + familyCount: { + readOnly: true, + serializedName: "familyCount", + type: { + name: "Number" + } + }, + backupFinishDate: { + readOnly: true, + serializedName: "backupFinishDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ValidateMigrationInputSqlServerSqlMITaskOutput: msRest.CompositeMapper = { + serializedName: "ValidateMigrationInputSqlServerSqlMITaskOutput", + type: { + name: "Composite", + className: "ValidateMigrationInputSqlServerSqlMITaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + restoreDatabaseNameErrors: { + readOnly: true, + serializedName: "restoreDatabaseNameErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + }, + backupFolderErrors: { + readOnly: true, + serializedName: "backupFolderErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + }, + backupShareCredentialsErrors: { + readOnly: true, + serializedName: "backupShareCredentialsErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + }, + backupStorageAccountErrors: { + readOnly: true, + serializedName: "backupStorageAccountErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + }, + existingBackupErrors: { + readOnly: true, + serializedName: "existingBackupErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + }, + databaseBackupInfo: { + serializedName: "databaseBackupInfo", + type: { + name: "Composite", + className: "DatabaseBackupInfo" + } + } + } + } +}; + +export const BlobShare: msRest.CompositeMapper = { + serializedName: "BlobShare", + type: { + name: "Composite", + className: "BlobShare", + modelProperties: { + sasUri: { + required: true, + serializedName: "sasUri", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSqlServerSqlMIDatabaseInput: msRest.CompositeMapper = { + serializedName: "MigrateSqlServerSqlMIDatabaseInput", + type: { + name: "Composite", + className: "MigrateSqlServerSqlMIDatabaseInput", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + restoreDatabaseName: { + required: true, + serializedName: "restoreDatabaseName", + type: { + name: "String" + } + }, + backupFileShare: { + serializedName: "backupFileShare", + type: { + name: "Composite", + className: "FileShare" + } + }, + backupFilePaths: { + serializedName: "backupFilePaths", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ValidateMigrationInputSqlServerSqlMITaskInput: msRest.CompositeMapper = { + serializedName: "ValidateMigrationInputSqlServerSqlMITaskInput", + type: { + name: "Composite", + className: "ValidateMigrationInputSqlServerSqlMITaskInput", + modelProperties: { + sourceConnectionInfo: { + required: true, + serializedName: "sourceConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + }, + targetConnectionInfo: { + required: true, + serializedName: "targetConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + }, + selectedDatabases: { + required: true, + serializedName: "selectedDatabases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MigrateSqlServerSqlMIDatabaseInput" + } + } + } + }, + selectedLogins: { + serializedName: "selectedLogins", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + backupFileShare: { + serializedName: "backupFileShare", + type: { + name: "Composite", + className: "FileShare" + } + }, + backupBlobShare: { + required: true, + serializedName: "backupBlobShare", + type: { + name: "Composite", + className: "BlobShare" + } + }, + backupMode: { + serializedName: "backupMode", + type: { + name: "String" + } + } + } + } +}; + +export const ValidateMigrationInputSqlServerSqlMITaskProperties: msRest.CompositeMapper = { + serializedName: "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "ValidateMigrationInputSqlServerSqlMITaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "ValidateMigrationInputSqlServerSqlMITaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ValidateMigrationInputSqlServerSqlMITaskOutput" + } + } + } + } + } + } +}; + +export const ValidateSyncMigrationInputSqlServerTaskOutput: msRest.CompositeMapper = { + serializedName: "ValidateSyncMigrationInputSqlServerTaskOutput", + type: { + name: "Composite", + className: "ValidateSyncMigrationInputSqlServerTaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + validationErrors: { + readOnly: true, + serializedName: "validationErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const MigrateSqlServerSqlDbSyncDatabaseInput: msRest.CompositeMapper = { + serializedName: "MigrateSqlServerSqlDbSyncDatabaseInput", + type: { + name: "Composite", + className: "MigrateSqlServerSqlDbSyncDatabaseInput", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + targetDatabaseName: { + serializedName: "targetDatabaseName", + type: { + name: "String" + } + }, + schemaName: { + serializedName: "schemaName", + type: { + name: "String" + } + }, + tableMap: { + serializedName: "tableMap", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + migrationSetting: { + serializedName: "migrationSetting", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + sourceSetting: { + serializedName: "sourceSetting", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + targetSetting: { + serializedName: "targetSetting", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ValidateSyncMigrationInputSqlServerTaskInput: msRest.CompositeMapper = { + serializedName: "ValidateSyncMigrationInputSqlServerTaskInput", + type: { + name: "Composite", + className: "ValidateSyncMigrationInputSqlServerTaskInput", + modelProperties: { + sourceConnectionInfo: { + required: true, + serializedName: "sourceConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + }, + targetConnectionInfo: { + required: true, + serializedName: "targetConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + }, + selectedDatabases: { + required: true, + serializedName: "selectedDatabases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MigrateSqlServerSqlDbSyncDatabaseInput" + } + } + } + } + } + } +}; + +export const ValidateMigrationInputSqlServerSqlDbSyncTaskProperties: msRest.CompositeMapper = { + serializedName: "ValidateMigrationInput.SqlServer.SqlDb.Sync", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "ValidateMigrationInputSqlServerSqlDbSyncTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "ValidateSyncMigrationInputSqlServerTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ValidateSyncMigrationInputSqlServerTaskOutput" + } + } + } + } + } + } +}; + +export const SyncMigrationDatabaseErrorEvent: msRest.CompositeMapper = { + serializedName: "SyncMigrationDatabaseErrorEvent", + type: { + name: "Composite", + className: "SyncMigrationDatabaseErrorEvent", + modelProperties: { + timestampString: { + readOnly: true, + serializedName: "timestampString", + type: { + name: "String" + } + }, + eventTypeString: { + readOnly: true, + serializedName: "eventTypeString", + type: { + name: "String" + } + }, + eventText: { + readOnly: true, + serializedName: "eventText", + type: { + name: "String" + } + } + } + } +}; + +export const MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput: msRest.CompositeMapper = { + serializedName: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput", + className: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + resultType: { + required: true, + serializedName: "resultType", + type: { + name: "String" + } + } + } + } +}; + +export const MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError: msRest.CompositeMapper = { + serializedName: "DatabaseLevelErrorOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput", + className: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError", + modelProperties: { + ...MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.type.modelProperties, + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } + }, + events: { + serializedName: "events", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncMigrationDatabaseErrorEvent" + } + } + } + } + } + } +}; + +export const MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError: msRest.CompositeMapper = { + serializedName: "ErrorOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput", + className: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError", + modelProperties: { + ...MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.type.modelProperties, + error: { + readOnly: true, + serializedName: "error", + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } +}; + +export const MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel: msRest.CompositeMapper = { + serializedName: "TableLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput", + className: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel", + modelProperties: { + ...MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.type.modelProperties, + tableName: { + readOnly: true, + serializedName: "tableName", + type: { + name: "String" + } + }, + databaseName: { + readOnly: true, + serializedName: "databaseName", + type: { + name: "String" + } + }, + cdcInsertCounter: { + readOnly: true, + serializedName: "cdcInsertCounter", + type: { + name: "Number" + } + }, + cdcUpdateCounter: { + readOnly: true, + serializedName: "cdcUpdateCounter", + type: { + name: "Number" + } + }, + cdcDeleteCounter: { + readOnly: true, + serializedName: "cdcDeleteCounter", + type: { + name: "Number" + } + }, + fullLoadEstFinishTime: { + readOnly: true, + serializedName: "fullLoadEstFinishTime", + type: { + name: "DateTime" + } + }, + fullLoadStartedOn: { + readOnly: true, + serializedName: "fullLoadStartedOn", + type: { + name: "DateTime" + } + }, + fullLoadEndedOn: { + readOnly: true, + serializedName: "fullLoadEndedOn", + type: { + name: "DateTime" + } + }, + fullLoadTotalRows: { + readOnly: true, + serializedName: "fullLoadTotalRows", + type: { + name: "Number" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + totalChangesApplied: { + readOnly: true, + serializedName: "totalChangesApplied", + type: { + name: "Number" + } + }, + dataErrorsCounter: { + readOnly: true, + serializedName: "dataErrorsCounter", + type: { + name: "Number" + } + }, + lastModifiedTime: { + readOnly: true, + serializedName: "lastModifiedTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel: msRest.CompositeMapper = { + serializedName: "DatabaseLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput", + className: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel", + modelProperties: { + ...MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.type.modelProperties, + databaseName: { + readOnly: true, + serializedName: "databaseName", + type: { + name: "String" + } + }, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + migrationState: { + readOnly: true, + serializedName: "migrationState", + type: { + name: "String" + } + }, + incomingChanges: { + readOnly: true, + serializedName: "incomingChanges", + type: { + name: "Number" + } + }, + appliedChanges: { + readOnly: true, + serializedName: "appliedChanges", + type: { + name: "Number" + } + }, + cdcInsertCounter: { + readOnly: true, + serializedName: "cdcInsertCounter", + type: { + name: "Number" + } + }, + cdcDeleteCounter: { + readOnly: true, + serializedName: "cdcDeleteCounter", + type: { + name: "Number" + } + }, + cdcUpdateCounter: { + readOnly: true, + serializedName: "cdcUpdateCounter", + type: { + name: "Number" + } + }, + fullLoadCompletedTables: { + readOnly: true, + serializedName: "fullLoadCompletedTables", + type: { + name: "Number" + } + }, + fullLoadLoadingTables: { + readOnly: true, + serializedName: "fullLoadLoadingTables", + type: { + name: "Number" + } + }, + fullLoadQueuedTables: { + readOnly: true, + serializedName: "fullLoadQueuedTables", + type: { + name: "Number" + } + }, + fullLoadErroredTables: { + readOnly: true, + serializedName: "fullLoadErroredTables", + type: { + name: "Number" + } + }, + initializationCompleted: { + readOnly: true, + serializedName: "initializationCompleted", + type: { + name: "Boolean" + } + }, + latency: { + readOnly: true, + serializedName: "latency", + type: { + name: "Number" + } + } + } + } +}; + +export const MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel: msRest.CompositeMapper = { + serializedName: "MigrationLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput", + className: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel", + modelProperties: { + ...MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.type.modelProperties, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + sourceServerVersion: { + readOnly: true, + serializedName: "sourceServerVersion", + type: { + name: "String" + } + }, + sourceServer: { + readOnly: true, + serializedName: "sourceServer", + type: { + name: "String" + } + }, + targetServerVersion: { + readOnly: true, + serializedName: "targetServerVersion", + type: { + name: "String" + } + }, + targetServer: { + readOnly: true, + serializedName: "targetServer", + type: { + name: "String" + } + } + } + } +}; + +export const MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput: msRest.CompositeMapper = { + serializedName: "MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput", + type: { + name: "Composite", + className: "MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + targetDatabaseName: { + serializedName: "targetDatabaseName", + type: { + name: "String" + } + } + } + } +}; + +export const MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput: msRest.CompositeMapper = { + serializedName: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput", + type: { + name: "Composite", + className: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput", + modelProperties: { + selectedDatabases: { + required: true, + serializedName: "selectedDatabases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput" + } + } + } + }, + targetConnectionInfo: { + required: true, + serializedName: "targetConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "PostgreSqlConnectionInfo" + } + }, + sourceConnectionInfo: { + required: true, + serializedName: "sourceConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "PostgreSqlConnectionInfo" + } + } + } + } +}; + +export const MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties: msRest.CompositeMapper = { + serializedName: "Migrate.PostgreSql.AzureDbForPostgreSql.Sync", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput", + className: "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput" + } + } + } + } + } + } +}; + +export const MigrateMySqlAzureDbForMySqlSyncTaskOutput: msRest.CompositeMapper = { + serializedName: "MigrateMySqlAzureDbForMySqlSyncTaskOutput", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "MigrateMySqlAzureDbForMySqlSyncTaskOutput", + className: "MigrateMySqlAzureDbForMySqlSyncTaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + resultType: { + required: true, + serializedName: "resultType", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError: msRest.CompositeMapper = { + serializedName: "DatabaseLevelErrorOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateMySqlAzureDbForMySqlSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateMySqlAzureDbForMySqlSyncTaskOutput", + className: "MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError", + modelProperties: { + ...MigrateMySqlAzureDbForMySqlSyncTaskOutput.type.modelProperties, + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } + }, + events: { + serializedName: "events", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncMigrationDatabaseErrorEvent" + } + } + } + } + } + } +}; + +export const MigrateMySqlAzureDbForMySqlSyncTaskOutputError: msRest.CompositeMapper = { + serializedName: "ErrorOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateMySqlAzureDbForMySqlSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateMySqlAzureDbForMySqlSyncTaskOutput", + className: "MigrateMySqlAzureDbForMySqlSyncTaskOutputError", + modelProperties: { + ...MigrateMySqlAzureDbForMySqlSyncTaskOutput.type.modelProperties, + error: { + readOnly: true, + serializedName: "error", + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } +}; + +export const MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel: msRest.CompositeMapper = { + serializedName: "TableLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateMySqlAzureDbForMySqlSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateMySqlAzureDbForMySqlSyncTaskOutput", + className: "MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel", + modelProperties: { + ...MigrateMySqlAzureDbForMySqlSyncTaskOutput.type.modelProperties, + tableName: { + readOnly: true, + serializedName: "tableName", + type: { + name: "String" + } + }, + databaseName: { + readOnly: true, + serializedName: "databaseName", + type: { + name: "String" + } + }, + cdcInsertCounter: { + readOnly: true, + serializedName: "cdcInsertCounter", + type: { + name: "String" + } + }, + cdcUpdateCounter: { + readOnly: true, + serializedName: "cdcUpdateCounter", + type: { + name: "String" + } + }, + cdcDeleteCounter: { + readOnly: true, + serializedName: "cdcDeleteCounter", + type: { + name: "String" + } + }, + fullLoadEstFinishTime: { + readOnly: true, + serializedName: "fullLoadEstFinishTime", + type: { + name: "DateTime" + } + }, + fullLoadStartedOn: { + readOnly: true, + serializedName: "fullLoadStartedOn", + type: { + name: "DateTime" + } + }, + fullLoadEndedOn: { + readOnly: true, + serializedName: "fullLoadEndedOn", + type: { + name: "DateTime" + } + }, + fullLoadTotalRows: { + readOnly: true, + serializedName: "fullLoadTotalRows", + type: { + name: "Number" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + totalChangesApplied: { + readOnly: true, + serializedName: "totalChangesApplied", + type: { + name: "Number" + } + }, + dataErrorsCounter: { + readOnly: true, + serializedName: "dataErrorsCounter", + type: { + name: "Number" + } + }, + lastModifiedTime: { + readOnly: true, + serializedName: "lastModifiedTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel: msRest.CompositeMapper = { + serializedName: "DatabaseLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateMySqlAzureDbForMySqlSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateMySqlAzureDbForMySqlSyncTaskOutput", + className: "MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel", + modelProperties: { + ...MigrateMySqlAzureDbForMySqlSyncTaskOutput.type.modelProperties, + databaseName: { + readOnly: true, + serializedName: "databaseName", + type: { + name: "String" + } + }, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + migrationState: { + readOnly: true, + serializedName: "migrationState", + type: { + name: "String" + } + }, + incomingChanges: { + readOnly: true, + serializedName: "incomingChanges", + type: { + name: "Number" + } + }, + appliedChanges: { + readOnly: true, + serializedName: "appliedChanges", + type: { + name: "Number" + } + }, + cdcInsertCounter: { + readOnly: true, + serializedName: "cdcInsertCounter", + type: { + name: "Number" + } + }, + cdcDeleteCounter: { + readOnly: true, + serializedName: "cdcDeleteCounter", + type: { + name: "Number" + } + }, + cdcUpdateCounter: { + readOnly: true, + serializedName: "cdcUpdateCounter", + type: { + name: "Number" + } + }, + fullLoadCompletedTables: { + readOnly: true, + serializedName: "fullLoadCompletedTables", + type: { + name: "Number" + } + }, + fullLoadLoadingTables: { + readOnly: true, + serializedName: "fullLoadLoadingTables", + type: { + name: "Number" + } + }, + fullLoadQueuedTables: { + readOnly: true, + serializedName: "fullLoadQueuedTables", + type: { + name: "Number" + } + }, + fullLoadErroredTables: { + readOnly: true, + serializedName: "fullLoadErroredTables", + type: { + name: "Number" + } + }, + initializationCompleted: { + readOnly: true, + serializedName: "initializationCompleted", + type: { + name: "Boolean" + } + }, + latency: { + readOnly: true, + serializedName: "latency", + type: { + name: "Number" + } + } + } + } +}; + +export const MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel: msRest.CompositeMapper = { + serializedName: "MigrationLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateMySqlAzureDbForMySqlSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateMySqlAzureDbForMySqlSyncTaskOutput", + className: "MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel", + modelProperties: { + ...MigrateMySqlAzureDbForMySqlSyncTaskOutput.type.modelProperties, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + sourceServerVersion: { + readOnly: true, + serializedName: "sourceServerVersion", + type: { + name: "String" + } + }, + sourceServer: { + readOnly: true, + serializedName: "sourceServer", + type: { + name: "String" + } + }, + targetServerVersion: { + readOnly: true, + serializedName: "targetServerVersion", + type: { + name: "String" + } + }, + targetServer: { + readOnly: true, + serializedName: "targetServer", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateMySqlAzureDbForMySqlSyncDatabaseInput: msRest.CompositeMapper = { + serializedName: "MigrateMySqlAzureDbForMySqlSyncDatabaseInput", + type: { + name: "Composite", + className: "MigrateMySqlAzureDbForMySqlSyncDatabaseInput", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + targetDatabaseName: { + serializedName: "targetDatabaseName", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateMySqlAzureDbForMySqlSyncTaskInput: msRest.CompositeMapper = { + serializedName: "MigrateMySqlAzureDbForMySqlSyncTaskInput", + type: { + name: "Composite", + className: "MigrateMySqlAzureDbForMySqlSyncTaskInput", + modelProperties: { + sourceConnectionInfo: { + required: true, + serializedName: "sourceConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "MySqlConnectionInfo" + } + }, + targetConnectionInfo: { + required: true, + serializedName: "targetConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "MySqlConnectionInfo" + } + }, + selectedDatabases: { + required: true, + serializedName: "selectedDatabases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MigrateMySqlAzureDbForMySqlSyncDatabaseInput" + } + } + } + } + } + } +}; + +export const MigrateMySqlAzureDbForMySqlSyncTaskProperties: msRest.CompositeMapper = { + serializedName: "Migrate.MySql.AzureDbForMySql.Sync", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "MigrateMySqlAzureDbForMySqlSyncTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "MigrateMySqlAzureDbForMySqlSyncTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "MigrateMySqlAzureDbForMySqlSyncTaskOutput", + className: "MigrateMySqlAzureDbForMySqlSyncTaskOutput" + } + } + } + } + } + } +}; + +export const MigrateSqlServerSqlDbSyncTaskOutput: msRest.CompositeMapper = { + serializedName: "MigrateSqlServerSqlDbSyncTaskOutput", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "MigrateSqlServerSqlDbSyncTaskOutput", + className: "MigrateSqlServerSqlDbSyncTaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + resultType: { + required: true, + serializedName: "resultType", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSqlServerSqlDbSyncTaskOutputDatabaseError: msRest.CompositeMapper = { + serializedName: "DatabaseLevelErrorOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSqlServerSqlDbSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSqlServerSqlDbSyncTaskOutput", + className: "MigrateSqlServerSqlDbSyncTaskOutputDatabaseError", + modelProperties: { + ...MigrateSqlServerSqlDbSyncTaskOutput.type.modelProperties, + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } + }, + events: { + serializedName: "events", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncMigrationDatabaseErrorEvent" + } + } + } + } + } + } +}; + +export const MigrateSqlServerSqlDbSyncTaskOutputError: msRest.CompositeMapper = { + serializedName: "ErrorOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSqlServerSqlDbSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSqlServerSqlDbSyncTaskOutput", + className: "MigrateSqlServerSqlDbSyncTaskOutputError", + modelProperties: { + ...MigrateSqlServerSqlDbSyncTaskOutput.type.modelProperties, + error: { + readOnly: true, + serializedName: "error", + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } +}; + +export const MigrateSqlServerSqlDbSyncTaskOutputTableLevel: msRest.CompositeMapper = { + serializedName: "TableLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSqlServerSqlDbSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSqlServerSqlDbSyncTaskOutput", + className: "MigrateSqlServerSqlDbSyncTaskOutputTableLevel", + modelProperties: { + ...MigrateSqlServerSqlDbSyncTaskOutput.type.modelProperties, + tableName: { + readOnly: true, + serializedName: "tableName", + type: { + name: "String" + } + }, + databaseName: { + readOnly: true, + serializedName: "databaseName", + type: { + name: "String" + } + }, + cdcInsertCounter: { + readOnly: true, + serializedName: "cdcInsertCounter", + type: { + name: "Number" + } + }, + cdcUpdateCounter: { + readOnly: true, + serializedName: "cdcUpdateCounter", + type: { + name: "Number" + } + }, + cdcDeleteCounter: { + readOnly: true, + serializedName: "cdcDeleteCounter", + type: { + name: "Number" + } + }, + fullLoadEstFinishTime: { + readOnly: true, + serializedName: "fullLoadEstFinishTime", + type: { + name: "DateTime" + } + }, + fullLoadStartedOn: { + readOnly: true, + serializedName: "fullLoadStartedOn", + type: { + name: "DateTime" + } + }, + fullLoadEndedOn: { + readOnly: true, + serializedName: "fullLoadEndedOn", + type: { + name: "DateTime" + } + }, + fullLoadTotalRows: { + readOnly: true, + serializedName: "fullLoadTotalRows", + type: { + name: "Number" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + totalChangesApplied: { + readOnly: true, + serializedName: "totalChangesApplied", + type: { + name: "Number" + } + }, + dataErrorsCounter: { + readOnly: true, + serializedName: "dataErrorsCounter", + type: { + name: "Number" + } + }, + lastModifiedTime: { + readOnly: true, + serializedName: "lastModifiedTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel: msRest.CompositeMapper = { + serializedName: "DatabaseLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSqlServerSqlDbSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSqlServerSqlDbSyncTaskOutput", + className: "MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel", + modelProperties: { + ...MigrateSqlServerSqlDbSyncTaskOutput.type.modelProperties, + databaseName: { + readOnly: true, + serializedName: "databaseName", + type: { + name: "String" + } + }, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + migrationState: { + readOnly: true, + serializedName: "migrationState", + type: { + name: "String" + } + }, + incomingChanges: { + readOnly: true, + serializedName: "incomingChanges", + type: { + name: "Number" + } + }, + appliedChanges: { + readOnly: true, + serializedName: "appliedChanges", + type: { + name: "Number" + } + }, + cdcInsertCounter: { + readOnly: true, + serializedName: "cdcInsertCounter", + type: { + name: "Number" + } + }, + cdcDeleteCounter: { + readOnly: true, + serializedName: "cdcDeleteCounter", + type: { + name: "Number" + } + }, + cdcUpdateCounter: { + readOnly: true, + serializedName: "cdcUpdateCounter", + type: { + name: "Number" + } + }, + fullLoadCompletedTables: { + readOnly: true, + serializedName: "fullLoadCompletedTables", + type: { + name: "Number" + } + }, + fullLoadLoadingTables: { + readOnly: true, + serializedName: "fullLoadLoadingTables", + type: { + name: "Number" + } + }, + fullLoadQueuedTables: { + readOnly: true, + serializedName: "fullLoadQueuedTables", + type: { + name: "Number" + } + }, + fullLoadErroredTables: { + readOnly: true, + serializedName: "fullLoadErroredTables", + type: { + name: "Number" + } + }, + initializationCompleted: { + readOnly: true, + serializedName: "initializationCompleted", + type: { + name: "Boolean" + } + }, + latency: { + readOnly: true, + serializedName: "latency", + type: { + name: "Number" + } + } + } + } +}; + +export const MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel: msRest.CompositeMapper = { + serializedName: "MigrationLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSqlServerSqlDbSyncTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSqlServerSqlDbSyncTaskOutput", + className: "MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel", + modelProperties: { + ...MigrateSqlServerSqlDbSyncTaskOutput.type.modelProperties, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + sourceServerVersion: { + readOnly: true, + serializedName: "sourceServerVersion", + type: { + name: "String" + } + }, + sourceServer: { + readOnly: true, + serializedName: "sourceServer", + type: { + name: "String" + } + }, + targetServerVersion: { + readOnly: true, + serializedName: "targetServerVersion", + type: { + name: "String" + } + }, + targetServer: { + readOnly: true, + serializedName: "targetServer", + type: { + name: "String" + } + }, + databaseCount: { + readOnly: true, + serializedName: "databaseCount", + type: { + name: "Number" + } + } + } + } +}; + +export const SqlMigrationTaskInput: msRest.CompositeMapper = { + serializedName: "SqlMigrationTaskInput", + type: { + name: "Composite", + className: "SqlMigrationTaskInput", + modelProperties: { + sourceConnectionInfo: { + required: true, + serializedName: "sourceConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + }, + targetConnectionInfo: { + required: true, + serializedName: "targetConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + } + } + } +}; + +export const MigrationValidationOptions: msRest.CompositeMapper = { + serializedName: "MigrationValidationOptions", + type: { + name: "Composite", + className: "MigrationValidationOptions", + modelProperties: { + enableSchemaValidation: { + serializedName: "enableSchemaValidation", + type: { + name: "Boolean" + } + }, + enableDataIntegrityValidation: { + serializedName: "enableDataIntegrityValidation", + type: { + name: "Boolean" + } + }, + enableQueryAnalysisValidation: { + serializedName: "enableQueryAnalysisValidation", + type: { + name: "Boolean" + } + } + } + } +}; + +export const MigrateSqlServerSqlDbSyncTaskInput: msRest.CompositeMapper = { + serializedName: "MigrateSqlServerSqlDbSyncTaskInput", + type: { + name: "Composite", + className: "MigrateSqlServerSqlDbSyncTaskInput", + modelProperties: { + ...SqlMigrationTaskInput.type.modelProperties, + selectedDatabases: { + required: true, + serializedName: "selectedDatabases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MigrateSqlServerSqlDbSyncDatabaseInput" + } + } + } + }, + validationOptions: { + serializedName: "validationOptions", + type: { + name: "Composite", + className: "MigrationValidationOptions" + } + } + } + } +}; + +export const MigrateSqlServerSqlDbSyncTaskProperties: msRest.CompositeMapper = { + serializedName: "Migrate.SqlServer.AzureSqlDb.Sync", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "MigrateSqlServerSqlDbSyncTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "MigrateSqlServerSqlDbSyncTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "MigrateSqlServerSqlDbSyncTaskOutput", + className: "MigrateSqlServerSqlDbSyncTaskOutput" + } + } + } + } + } + } +}; + +export const ValidationError: msRest.CompositeMapper = { + serializedName: "ValidationError", + type: { + name: "Composite", + className: "ValidationError", + modelProperties: { + text: { + serializedName: "text", + type: { + name: "String" + } + }, + severity: { + serializedName: "severity", + type: { + name: "String" + } + } + } + } +}; + +export const WaitStatistics: msRest.CompositeMapper = { + serializedName: "WaitStatistics", + type: { + name: "Composite", + className: "WaitStatistics", + modelProperties: { + waitType: { + serializedName: "waitType", + type: { + name: "String" + } + }, + waitTimeMs: { + serializedName: "waitTimeMs", + defaultValue: 0, + type: { + name: "Number" + } + }, + waitCount: { + serializedName: "waitCount", + type: { + name: "Number" + } + } + } + } +}; + +export const ExecutionStatistics: msRest.CompositeMapper = { + serializedName: "ExecutionStatistics", + type: { + name: "Composite", + className: "ExecutionStatistics", + modelProperties: { + executionCount: { + serializedName: "executionCount", + type: { + name: "Number" + } + }, + cpuTimeMs: { + serializedName: "cpuTimeMs", + type: { + name: "Number" + } + }, + elapsedTimeMs: { + serializedName: "elapsedTimeMs", + type: { + name: "Number" + } + }, + waitStats: { + serializedName: "waitStats", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "WaitStatistics" + } + } + } + }, + hasErrors: { + serializedName: "hasErrors", + type: { + name: "Boolean" + } + }, + sqlErrors: { + serializedName: "sqlErrors", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const QueryExecutionResult: msRest.CompositeMapper = { + serializedName: "QueryExecutionResult", + type: { + name: "Composite", + className: "QueryExecutionResult", + modelProperties: { + queryText: { + serializedName: "queryText", + type: { + name: "String" + } + }, + statementsInBatch: { + serializedName: "statementsInBatch", + type: { + name: "Number" + } + }, + sourceResult: { + serializedName: "sourceResult", + type: { + name: "Composite", + className: "ExecutionStatistics" + } + }, + targetResult: { + serializedName: "targetResult", + type: { + name: "Composite", + className: "ExecutionStatistics" + } + } + } + } +}; + +export const QueryAnalysisValidationResult: msRest.CompositeMapper = { + serializedName: "QueryAnalysisValidationResult", + type: { + name: "Composite", + className: "QueryAnalysisValidationResult", + modelProperties: { + queryResults: { + serializedName: "queryResults", + type: { + name: "Composite", + className: "QueryExecutionResult" + } + }, + validationErrors: { + serializedName: "validationErrors", + type: { + name: "Composite", + className: "ValidationError" + } + } + } + } +}; + +export const SchemaComparisonValidationResultType: msRest.CompositeMapper = { + serializedName: "SchemaComparisonValidationResultType", + type: { + name: "Composite", + className: "SchemaComparisonValidationResultType", + modelProperties: { + objectName: { + serializedName: "objectName", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + }, + updateAction: { + serializedName: "updateAction", + type: { + name: "String" + } + } + } + } +}; + +export const SchemaComparisonValidationResult: msRest.CompositeMapper = { + serializedName: "SchemaComparisonValidationResult", + type: { + name: "Composite", + className: "SchemaComparisonValidationResult", + modelProperties: { + schemaDifferences: { + serializedName: "schemaDifferences", + type: { + name: "Composite", + className: "SchemaComparisonValidationResultType" + } + }, + validationErrors: { + serializedName: "validationErrors", + type: { + name: "Composite", + className: "ValidationError" + } + }, + sourceDatabaseObjectCount: { + serializedName: "sourceDatabaseObjectCount", + type: { + name: "Dictionary", + value: { + type: { + name: "Number" + } + } + } + }, + targetDatabaseObjectCount: { + serializedName: "targetDatabaseObjectCount", + type: { + name: "Dictionary", + value: { + type: { + name: "Number" + } + } + } + } + } + } +}; + +export const DataIntegrityValidationResult: msRest.CompositeMapper = { + serializedName: "DataIntegrityValidationResult", + type: { + name: "Composite", + className: "DataIntegrityValidationResult", + modelProperties: { + failedObjects: { + serializedName: "failedObjects", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + validationErrors: { + serializedName: "validationErrors", + type: { + name: "Composite", + className: "ValidationError" + } + } + } + } +}; + +export const MigrationValidationDatabaseLevelResult: msRest.CompositeMapper = { + serializedName: "MigrationValidationDatabaseLevelResult", + type: { + name: "Composite", + className: "MigrationValidationDatabaseLevelResult", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + migrationId: { + readOnly: true, + serializedName: "migrationId", + type: { + name: "String" + } + }, + sourceDatabaseName: { + readOnly: true, + serializedName: "sourceDatabaseName", + type: { + name: "String" + } + }, + targetDatabaseName: { + readOnly: true, + serializedName: "targetDatabaseName", + type: { + name: "String" + } + }, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + dataIntegrityValidationResult: { + readOnly: true, + serializedName: "dataIntegrityValidationResult", + type: { + name: "Composite", + className: "DataIntegrityValidationResult" + } + }, + schemaValidationResult: { + readOnly: true, + serializedName: "schemaValidationResult", + type: { + name: "Composite", + className: "SchemaComparisonValidationResult" + } + }, + queryAnalysisValidationResult: { + readOnly: true, + serializedName: "queryAnalysisValidationResult", + type: { + name: "Composite", + className: "QueryAnalysisValidationResult" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const MigrationValidationDatabaseSummaryResult: msRest.CompositeMapper = { + serializedName: "MigrationValidationDatabaseSummaryResult", + type: { + name: "Composite", + className: "MigrationValidationDatabaseSummaryResult", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + migrationId: { + readOnly: true, + serializedName: "migrationId", + type: { + name: "String" + } + }, + sourceDatabaseName: { + readOnly: true, + serializedName: "sourceDatabaseName", + type: { + name: "String" + } + }, + targetDatabaseName: { + readOnly: true, + serializedName: "targetDatabaseName", + type: { + name: "String" + } + }, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const MigrationValidationResult: msRest.CompositeMapper = { + serializedName: "MigrationValidationResult", + type: { + name: "Composite", + className: "MigrationValidationResult", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + migrationId: { + readOnly: true, + serializedName: "migrationId", + type: { + name: "String" + } + }, + summaryResults: { + serializedName: "summaryResults", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "MigrationValidationDatabaseSummaryResult" + } + } + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSqlServerSqlDbTaskOutput: msRest.CompositeMapper = { + serializedName: "MigrateSqlServerSqlDbTaskOutput", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "MigrateSqlServerSqlDbTaskOutput", + className: "MigrateSqlServerSqlDbTaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + resultType: { + required: true, + serializedName: "resultType", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSqlServerSqlDbTaskOutputError: msRest.CompositeMapper = { + serializedName: "ErrorOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSqlServerSqlDbTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSqlServerSqlDbTaskOutput", + className: "MigrateSqlServerSqlDbTaskOutputError", + modelProperties: { + ...MigrateSqlServerSqlDbTaskOutput.type.modelProperties, + error: { + readOnly: true, + serializedName: "error", + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } +}; + +export const MigrateSqlServerSqlDbTaskOutputTableLevel: msRest.CompositeMapper = { + serializedName: "TableLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSqlServerSqlDbTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSqlServerSqlDbTaskOutput", + className: "MigrateSqlServerSqlDbTaskOutputTableLevel", + modelProperties: { + ...MigrateSqlServerSqlDbTaskOutput.type.modelProperties, + objectName: { + readOnly: true, + serializedName: "objectName", + type: { + name: "String" + } + }, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + statusMessage: { + readOnly: true, + serializedName: "statusMessage", + type: { + name: "String" + } + }, + itemsCount: { + readOnly: true, + serializedName: "itemsCount", + type: { + name: "Number" + } + }, + itemsCompletedCount: { + readOnly: true, + serializedName: "itemsCompletedCount", + type: { + name: "Number" + } + }, + errorPrefix: { + readOnly: true, + serializedName: "errorPrefix", + type: { + name: "String" + } + }, + resultPrefix: { + readOnly: true, + serializedName: "resultPrefix", + type: { + name: "String" + } + } + } + } +}; + +export const DataItemMigrationSummaryResult: msRest.CompositeMapper = { + serializedName: "DataItemMigrationSummaryResult", + type: { + name: "Composite", + className: "DataItemMigrationSummaryResult", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + statusMessage: { + readOnly: true, + serializedName: "statusMessage", + type: { + name: "String" + } + }, + itemsCount: { + readOnly: true, + serializedName: "itemsCount", + type: { + name: "Number" + } + }, + itemsCompletedCount: { + readOnly: true, + serializedName: "itemsCompletedCount", + type: { + name: "Number" + } + }, + errorPrefix: { + readOnly: true, + serializedName: "errorPrefix", + type: { + name: "String" + } + }, + resultPrefix: { + readOnly: true, + serializedName: "resultPrefix", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSqlServerSqlDbTaskOutputDatabaseLevel: msRest.CompositeMapper = { + serializedName: "DatabaseLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSqlServerSqlDbTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSqlServerSqlDbTaskOutput", + className: "MigrateSqlServerSqlDbTaskOutputDatabaseLevel", + modelProperties: { + ...MigrateSqlServerSqlDbTaskOutput.type.modelProperties, + databaseName: { + readOnly: true, + serializedName: "databaseName", + type: { + name: "String" + } + }, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + stage: { + readOnly: true, + serializedName: "stage", + type: { + name: "String" + } + }, + statusMessage: { + readOnly: true, + serializedName: "statusMessage", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + numberOfObjects: { + readOnly: true, + serializedName: "numberOfObjects", + type: { + name: "Number" + } + }, + numberOfObjectsCompleted: { + readOnly: true, + serializedName: "numberOfObjectsCompleted", + type: { + name: "Number" + } + }, + errorCount: { + readOnly: true, + serializedName: "errorCount", + type: { + name: "Number" + } + }, + errorPrefix: { + readOnly: true, + serializedName: "errorPrefix", + type: { + name: "String" + } + }, + resultPrefix: { + readOnly: true, + serializedName: "resultPrefix", + type: { + name: "String" + } + }, + exceptionsAndWarnings: { + readOnly: true, + serializedName: "exceptionsAndWarnings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + }, + objectSummary: { + readOnly: true, + serializedName: "objectSummary", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "DataItemMigrationSummaryResult" + } + } + } + } + } + } +}; + +export const MigrationReportResult: msRest.CompositeMapper = { + serializedName: "MigrationReportResult", + type: { + name: "Composite", + className: "MigrationReportResult", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + reportUrl: { + serializedName: "reportUrl", + type: { + name: "String" + } + } + } + } +}; + +export const DatabaseSummaryResult: msRest.CompositeMapper = { + serializedName: "DatabaseSummaryResult", + type: { + name: "Composite", + className: "DatabaseSummaryResult", + modelProperties: { + ...DataItemMigrationSummaryResult.type.modelProperties, + sizeMB: { + readOnly: true, + serializedName: "sizeMB", + type: { + name: "Number" + } + } + } + } +}; + +export const MigrateSqlServerSqlDbTaskOutputMigrationLevel: msRest.CompositeMapper = { + serializedName: "MigrationLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSqlServerSqlDbTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSqlServerSqlDbTaskOutput", + className: "MigrateSqlServerSqlDbTaskOutputMigrationLevel", + modelProperties: { + ...MigrateSqlServerSqlDbTaskOutput.type.modelProperties, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + durationInSeconds: { + readOnly: true, + serializedName: "durationInSeconds", + type: { + name: "Number" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + statusMessage: { + readOnly: true, + serializedName: "statusMessage", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + databases: { + readOnly: true, + serializedName: "databases", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + databaseSummary: { + readOnly: true, + serializedName: "databaseSummary", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "DatabaseSummaryResult" + } + } + } + }, + migrationValidationResult: { + serializedName: "migrationValidationResult", + type: { + name: "Composite", + className: "MigrationValidationResult" + } + }, + migrationReportResult: { + serializedName: "migrationReportResult", + type: { + name: "Composite", + className: "MigrationReportResult" + } + }, + sourceServerVersion: { + readOnly: true, + serializedName: "sourceServerVersion", + type: { + name: "String" + } + }, + sourceServerBrandVersion: { + readOnly: true, + serializedName: "sourceServerBrandVersion", + type: { + name: "String" + } + }, + targetServerVersion: { + readOnly: true, + serializedName: "targetServerVersion", + type: { + name: "String" + } + }, + targetServerBrandVersion: { + readOnly: true, + serializedName: "targetServerBrandVersion", + type: { + name: "String" + } + }, + exceptionsAndWarnings: { + readOnly: true, + serializedName: "exceptionsAndWarnings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const MigrateSqlServerSqlDbDatabaseInput: msRest.CompositeMapper = { + serializedName: "MigrateSqlServerSqlDbDatabaseInput", + type: { + name: "Composite", + className: "MigrateSqlServerSqlDbDatabaseInput", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + targetDatabaseName: { + serializedName: "targetDatabaseName", + type: { + name: "String" + } + }, + makeSourceDbReadOnly: { + serializedName: "makeSourceDbReadOnly", + type: { + name: "Boolean" + } + }, + tableMap: { + serializedName: "tableMap", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const MigrateSqlServerSqlDbTaskInput: msRest.CompositeMapper = { + serializedName: "MigrateSqlServerSqlDbTaskInput", + type: { + name: "Composite", + className: "MigrateSqlServerSqlDbTaskInput", + modelProperties: { + ...SqlMigrationTaskInput.type.modelProperties, + selectedDatabases: { + required: true, + serializedName: "selectedDatabases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MigrateSqlServerSqlDbDatabaseInput" + } + } + } + }, + validationOptions: { + serializedName: "validationOptions", + type: { + name: "Composite", + className: "MigrationValidationOptions" + } + } + } + } +}; + +export const MigrateSqlServerSqlDbTaskProperties: msRest.CompositeMapper = { + serializedName: "Migrate.SqlServer.SqlDb", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "MigrateSqlServerSqlDbTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "MigrateSqlServerSqlDbTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "MigrateSqlServerSqlDbTaskOutput", + className: "MigrateSqlServerSqlDbTaskOutput" + } + } + } + } + } + } +}; + +export const MigrateSqlServerSqlMITaskOutput: msRest.CompositeMapper = { + serializedName: "MigrateSqlServerSqlMITaskOutput", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "MigrateSqlServerSqlMITaskOutput", + className: "MigrateSqlServerSqlMITaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + resultType: { + required: true, + serializedName: "resultType", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSqlServerSqlMITaskOutputError: msRest.CompositeMapper = { + serializedName: "ErrorOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSqlServerSqlMITaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSqlServerSqlMITaskOutput", + className: "MigrateSqlServerSqlMITaskOutputError", + modelProperties: { + ...MigrateSqlServerSqlMITaskOutput.type.modelProperties, + error: { + readOnly: true, + serializedName: "error", + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } +}; + +export const MigrateSqlServerSqlMITaskOutputLoginLevel: msRest.CompositeMapper = { + serializedName: "LoginLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSqlServerSqlMITaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSqlServerSqlMITaskOutput", + className: "MigrateSqlServerSqlMITaskOutputLoginLevel", + modelProperties: { + ...MigrateSqlServerSqlMITaskOutput.type.modelProperties, + loginName: { + readOnly: true, + serializedName: "loginName", + type: { + name: "String" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + stage: { + readOnly: true, + serializedName: "stage", + type: { + name: "String" + } + }, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + exceptionsAndWarnings: { + readOnly: true, + serializedName: "exceptionsAndWarnings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const MigrateSqlServerSqlMITaskOutputAgentJobLevel: msRest.CompositeMapper = { + serializedName: "AgentJobLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSqlServerSqlMITaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSqlServerSqlMITaskOutput", + className: "MigrateSqlServerSqlMITaskOutputAgentJobLevel", + modelProperties: { + ...MigrateSqlServerSqlMITaskOutput.type.modelProperties, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + isEnabled: { + readOnly: true, + serializedName: "isEnabled", + type: { + name: "Boolean" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + exceptionsAndWarnings: { + readOnly: true, + serializedName: "exceptionsAndWarnings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const MigrateSqlServerSqlMITaskOutputDatabaseLevel: msRest.CompositeMapper = { + serializedName: "DatabaseLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSqlServerSqlMITaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSqlServerSqlMITaskOutput", + className: "MigrateSqlServerSqlMITaskOutputDatabaseLevel", + modelProperties: { + ...MigrateSqlServerSqlMITaskOutput.type.modelProperties, + databaseName: { + readOnly: true, + serializedName: "databaseName", + type: { + name: "String" + } + }, + sizeMB: { + readOnly: true, + serializedName: "sizeMB", + type: { + name: "Number" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + stage: { + readOnly: true, + serializedName: "stage", + type: { + name: "String" + } + }, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + exceptionsAndWarnings: { + readOnly: true, + serializedName: "exceptionsAndWarnings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const StartMigrationScenarioServerRoleResult: msRest.CompositeMapper = { + serializedName: "StartMigrationScenarioServerRoleResult", + type: { + name: "Composite", + className: "StartMigrationScenarioServerRoleResult", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + exceptionsAndWarnings: { + readOnly: true, + serializedName: "exceptionsAndWarnings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const MigrateSqlServerSqlMITaskOutputMigrationLevel: msRest.CompositeMapper = { + serializedName: "MigrationLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSqlServerSqlMITaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSqlServerSqlMITaskOutput", + className: "MigrateSqlServerSqlMITaskOutputMigrationLevel", + modelProperties: { + ...MigrateSqlServerSqlMITaskOutput.type.modelProperties, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + agentJobs: { + readOnly: true, + serializedName: "agentJobs", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + logins: { + readOnly: true, + serializedName: "logins", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + serverRoleResults: { + readOnly: true, + serializedName: "serverRoleResults", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "StartMigrationScenarioServerRoleResult" + } + } + } + }, + orphanedUsers: { + readOnly: true, + serializedName: "orphanedUsers", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + databases: { + readOnly: true, + serializedName: "databases", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + sourceServerVersion: { + readOnly: true, + serializedName: "sourceServerVersion", + type: { + name: "String" + } + }, + sourceServerBrandVersion: { + readOnly: true, + serializedName: "sourceServerBrandVersion", + type: { + name: "String" + } + }, + targetServerVersion: { + readOnly: true, + serializedName: "targetServerVersion", + type: { + name: "String" + } + }, + targetServerBrandVersion: { + readOnly: true, + serializedName: "targetServerBrandVersion", + type: { + name: "String" + } + }, + exceptionsAndWarnings: { + readOnly: true, + serializedName: "exceptionsAndWarnings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const MigrateSqlServerSqlMITaskInput: msRest.CompositeMapper = { + serializedName: "MigrateSqlServerSqlMITaskInput", + type: { + name: "Composite", + className: "MigrateSqlServerSqlMITaskInput", + modelProperties: { + ...SqlMigrationTaskInput.type.modelProperties, + selectedDatabases: { + required: true, + serializedName: "selectedDatabases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MigrateSqlServerSqlMIDatabaseInput" + } + } + } + }, + selectedLogins: { + serializedName: "selectedLogins", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + selectedAgentJobs: { + serializedName: "selectedAgentJobs", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + backupFileShare: { + serializedName: "backupFileShare", + type: { + name: "Composite", + className: "FileShare" + } + }, + backupBlobShare: { + required: true, + serializedName: "backupBlobShare", + type: { + name: "Composite", + className: "BlobShare" + } + }, + backupMode: { + serializedName: "backupMode", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSqlServerSqlMITaskProperties: msRest.CompositeMapper = { + serializedName: "Migrate.SqlServer.AzureSqlDbMI", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "MigrateSqlServerSqlMITaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "MigrateSqlServerSqlMITaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "MigrateSqlServerSqlMITaskOutput", + className: "MigrateSqlServerSqlMITaskOutput" + } + } + } + } + } + } +}; + +export const ConnectToTargetAzureDbForMySqlTaskOutput: msRest.CompositeMapper = { + serializedName: "ConnectToTargetAzureDbForMySqlTaskOutput", + type: { + name: "Composite", + className: "ConnectToTargetAzureDbForMySqlTaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + serverVersion: { + readOnly: true, + serializedName: "serverVersion", + type: { + name: "String" + } + }, + databases: { + readOnly: true, + serializedName: "databases", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + targetServerBrandVersion: { + readOnly: true, + serializedName: "targetServerBrandVersion", + type: { + name: "String" + } + }, + validationErrors: { + readOnly: true, + serializedName: "validationErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const ConnectToTargetAzureDbForMySqlTaskInput: msRest.CompositeMapper = { + serializedName: "ConnectToTargetAzureDbForMySqlTaskInput", + type: { + name: "Composite", + className: "ConnectToTargetAzureDbForMySqlTaskInput", + modelProperties: { + sourceConnectionInfo: { + required: true, + serializedName: "sourceConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "MySqlConnectionInfo" + } + }, + targetConnectionInfo: { + required: true, + serializedName: "targetConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "MySqlConnectionInfo" + } + } + } + } +}; + +export const ConnectToTargetAzureDbForMySqlTaskProperties: msRest.CompositeMapper = { + serializedName: "ConnectToTarget.AzureDbForMySql", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "ConnectToTargetAzureDbForMySqlTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "ConnectToTargetAzureDbForMySqlTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectToTargetAzureDbForMySqlTaskOutput" + } + } + } + } + } + } +}; + +export const ConnectToTargetSqlMITaskOutput: msRest.CompositeMapper = { + serializedName: "ConnectToTargetSqlMITaskOutput", + type: { + name: "Composite", + className: "ConnectToTargetSqlMITaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + targetServerVersion: { + readOnly: true, + serializedName: "targetServerVersion", + type: { + name: "String" + } + }, + targetServerBrandVersion: { + readOnly: true, + serializedName: "targetServerBrandVersion", + type: { + name: "String" + } + }, + logins: { + readOnly: true, + serializedName: "logins", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + agentJobs: { + readOnly: true, + serializedName: "agentJobs", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + validationErrors: { + readOnly: true, + serializedName: "validationErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const ConnectToTargetSqlMITaskInput: msRest.CompositeMapper = { + serializedName: "ConnectToTargetSqlMITaskInput", + type: { + name: "Composite", + className: "ConnectToTargetSqlMITaskInput", + modelProperties: { + targetConnectionInfo: { + required: true, + serializedName: "targetConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + } + } + } +}; + +export const ConnectToTargetSqlMITaskProperties: msRest.CompositeMapper = { + serializedName: "ConnectToTarget.AzureSqlDbMI", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "ConnectToTargetSqlMITaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "ConnectToTargetSqlMITaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectToTargetSqlMITaskOutput" + } + } + } + } + } + } +}; + +export const DatabaseTable: msRest.CompositeMapper = { + serializedName: "DatabaseTable", + type: { + name: "Composite", + className: "DatabaseTable", + modelProperties: { + hasRows: { + readOnly: true, + serializedName: "hasRows", + type: { + name: "Boolean" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const GetUserTablesSqlSyncTaskOutput: msRest.CompositeMapper = { + serializedName: "GetUserTablesSqlSyncTaskOutput", + type: { + name: "Composite", + className: "GetUserTablesSqlSyncTaskOutput", + modelProperties: { + databasesToSourceTables: { + readOnly: true, + serializedName: "databasesToSourceTables", + type: { + name: "Dictionary", + value: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseTable" + } + } + } + } + } + }, + databasesToTargetTables: { + readOnly: true, + serializedName: "databasesToTargetTables", + type: { + name: "Dictionary", + value: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseTable" + } + } + } + } + } + }, + tableValidationErrors: { + readOnly: true, + serializedName: "tableValidationErrors", + type: { + name: "Dictionary", + value: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + }, + validationErrors: { + readOnly: true, + serializedName: "validationErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const GetUserTablesSqlSyncTaskInput: msRest.CompositeMapper = { + serializedName: "GetUserTablesSqlSyncTaskInput", + type: { + name: "Composite", + className: "GetUserTablesSqlSyncTaskInput", + modelProperties: { + sourceConnectionInfo: { + required: true, + serializedName: "sourceConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + }, + targetConnectionInfo: { + required: true, + serializedName: "targetConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + }, + selectedSourceDatabases: { + required: true, + serializedName: "selectedSourceDatabases", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + selectedTargetDatabases: { + required: true, + serializedName: "selectedTargetDatabases", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const GetUserTablesSqlSyncTaskProperties: msRest.CompositeMapper = { + serializedName: "GetUserTables.AzureSqlDb.Sync", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "GetUserTablesSqlSyncTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "GetUserTablesSqlSyncTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GetUserTablesSqlSyncTaskOutput" + } + } + } + } + } + } +}; + +export const GetUserTablesSqlTaskOutput: msRest.CompositeMapper = { + serializedName: "GetUserTablesSqlTaskOutput", + type: { + name: "Composite", + className: "GetUserTablesSqlTaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + databasesToTables: { + readOnly: true, + serializedName: "databasesToTables", + type: { + name: "Dictionary", + value: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseTable" + } + } + } + } + } + }, + validationErrors: { + readOnly: true, + serializedName: "validationErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const GetUserTablesSqlTaskInput: msRest.CompositeMapper = { + serializedName: "GetUserTablesSqlTaskInput", + type: { + name: "Composite", + className: "GetUserTablesSqlTaskInput", + modelProperties: { + connectionInfo: { + required: true, + serializedName: "connectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + }, + selectedDatabases: { + required: true, + serializedName: "selectedDatabases", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const GetUserTablesSqlTaskProperties: msRest.CompositeMapper = { + serializedName: "GetUserTables.Sql", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "GetUserTablesSqlTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "GetUserTablesSqlTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GetUserTablesSqlTaskOutput" + } + } + } + } + } + } +}; + +export const ConnectToTargetSqlDbTaskOutput: msRest.CompositeMapper = { + serializedName: "ConnectToTargetSqlDbTaskOutput", + type: { + name: "Composite", + className: "ConnectToTargetSqlDbTaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + databases: { + readOnly: true, + serializedName: "databases", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + targetServerVersion: { + readOnly: true, + serializedName: "targetServerVersion", + type: { + name: "String" + } + }, + targetServerBrandVersion: { + readOnly: true, + serializedName: "targetServerBrandVersion", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectToTargetSqlSqlDbSyncTaskInput: msRest.CompositeMapper = { + serializedName: "ConnectToTargetSqlSqlDbSyncTaskInput", + type: { + name: "Composite", + className: "ConnectToTargetSqlSqlDbSyncTaskInput", + modelProperties: { + sourceConnectionInfo: { + required: true, + serializedName: "sourceConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + }, + targetConnectionInfo: { + required: true, + serializedName: "targetConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + } + } + } +}; + +export const ConnectToTargetSqlSqlDbSyncTaskProperties: msRest.CompositeMapper = { + serializedName: "ConnectToTarget.SqlDb.Sync", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "ConnectToTargetSqlSqlDbSyncTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "ConnectToTargetSqlSqlDbSyncTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectToTargetSqlDbTaskOutput" + } + } + } + } + } + } +}; + +export const ConnectToTargetSqlDbTaskInput: msRest.CompositeMapper = { + serializedName: "ConnectToTargetSqlDbTaskInput", + type: { + name: "Composite", + className: "ConnectToTargetSqlDbTaskInput", + modelProperties: { + targetConnectionInfo: { + required: true, + serializedName: "targetConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + } + } + } +}; + +export const ConnectToTargetSqlDbTaskProperties: msRest.CompositeMapper = { + serializedName: "ConnectToTarget.SqlDb", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "ConnectToTargetSqlDbTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "ConnectToTargetSqlDbTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectToTargetSqlDbTaskOutput" + } + } + } + } + } + } +}; + +export const MigrationEligibilityInfo: msRest.CompositeMapper = { + serializedName: "MigrationEligibilityInfo", + type: { + name: "Composite", + className: "MigrationEligibilityInfo", + modelProperties: { + isEligibileForMigration: { + readOnly: true, + serializedName: "isEligibileForMigration", + type: { + name: "Boolean" + } + }, + validationMessages: { + readOnly: true, + serializedName: "validationMessages", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ConnectToSourceSqlServerTaskOutput: msRest.CompositeMapper = { + serializedName: "ConnectToSourceSqlServerTaskOutput", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "ConnectToSourceSqlServerTaskOutput", + className: "ConnectToSourceSqlServerTaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + resultType: { + required: true, + serializedName: "resultType", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectToSourceSqlServerTaskOutputAgentJobLevel: msRest.CompositeMapper = { + serializedName: "AgentJobLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectToSourceSqlServerTaskOutput.type.polymorphicDiscriminator, + uberParent: "ConnectToSourceSqlServerTaskOutput", + className: "ConnectToSourceSqlServerTaskOutputAgentJobLevel", + modelProperties: { + ...ConnectToSourceSqlServerTaskOutput.type.modelProperties, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + jobCategory: { + readOnly: true, + serializedName: "jobCategory", + type: { + name: "String" + } + }, + isEnabled: { + readOnly: true, + serializedName: "isEnabled", + type: { + name: "Boolean" + } + }, + jobOwner: { + readOnly: true, + serializedName: "jobOwner", + type: { + name: "String" + } + }, + lastExecutedOn: { + readOnly: true, + serializedName: "lastExecutedOn", + type: { + name: "DateTime" + } + }, + validationErrors: { + readOnly: true, + serializedName: "validationErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + }, + migrationEligibility: { + readOnly: true, + serializedName: "migrationEligibility", + type: { + name: "Composite", + className: "MigrationEligibilityInfo" + } + } + } + } +}; + +export const ConnectToSourceSqlServerTaskOutputLoginLevel: msRest.CompositeMapper = { + serializedName: "LoginLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectToSourceSqlServerTaskOutput.type.polymorphicDiscriminator, + uberParent: "ConnectToSourceSqlServerTaskOutput", + className: "ConnectToSourceSqlServerTaskOutputLoginLevel", + modelProperties: { + ...ConnectToSourceSqlServerTaskOutput.type.modelProperties, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + loginType: { + readOnly: true, + serializedName: "loginType", + type: { + name: "String" + } + }, + defaultDatabase: { + readOnly: true, + serializedName: "defaultDatabase", + type: { + name: "String" + } + }, + isEnabled: { + readOnly: true, + serializedName: "isEnabled", + type: { + name: "Boolean" + } + }, + migrationEligibility: { + readOnly: true, + serializedName: "migrationEligibility", + type: { + name: "Composite", + className: "MigrationEligibilityInfo" + } + } + } + } +}; + +export const DatabaseFileInfo: msRest.CompositeMapper = { + serializedName: "DatabaseFileInfo", + type: { + name: "Composite", + className: "DatabaseFileInfo", + modelProperties: { + databaseName: { + serializedName: "databaseName", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + logicalName: { + serializedName: "logicalName", + type: { + name: "String" + } + }, + physicalFullName: { + serializedName: "physicalFullName", + type: { + name: "String" + } + }, + restoreFullName: { + serializedName: "restoreFullName", + type: { + name: "String" + } + }, + fileType: { + serializedName: "fileType", + type: { + name: "String" + } + }, + sizeMB: { + serializedName: "sizeMB", + type: { + name: "Number" + } + } + } + } +}; + +export const ConnectToSourceSqlServerTaskOutputDatabaseLevel: msRest.CompositeMapper = { + serializedName: "DatabaseLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectToSourceSqlServerTaskOutput.type.polymorphicDiscriminator, + uberParent: "ConnectToSourceSqlServerTaskOutput", + className: "ConnectToSourceSqlServerTaskOutputDatabaseLevel", + modelProperties: { + ...ConnectToSourceSqlServerTaskOutput.type.modelProperties, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + sizeMB: { + readOnly: true, + serializedName: "sizeMB", + type: { + name: "Number" + } + }, + databaseFiles: { + readOnly: true, + serializedName: "databaseFiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseFileInfo" + } + } + } + }, + compatibilityLevel: { + readOnly: true, + serializedName: "compatibilityLevel", + type: { + name: "String" + } + }, + databaseState: { + readOnly: true, + serializedName: "databaseState", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectToSourceSqlServerTaskOutputTaskLevel: msRest.CompositeMapper = { + serializedName: "TaskLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectToSourceSqlServerTaskOutput.type.polymorphicDiscriminator, + uberParent: "ConnectToSourceSqlServerTaskOutput", + className: "ConnectToSourceSqlServerTaskOutputTaskLevel", + modelProperties: { + ...ConnectToSourceSqlServerTaskOutput.type.modelProperties, + databases: { + readOnly: true, + serializedName: "databases", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + logins: { + readOnly: true, + serializedName: "logins", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + agentJobs: { + readOnly: true, + serializedName: "agentJobs", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + databaseTdeCertificateMapping: { + readOnly: true, + serializedName: "databaseTdeCertificateMapping", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + sourceServerVersion: { + readOnly: true, + serializedName: "sourceServerVersion", + type: { + name: "String" + } + }, + sourceServerBrandVersion: { + readOnly: true, + serializedName: "sourceServerBrandVersion", + type: { + name: "String" + } + }, + validationErrors: { + readOnly: true, + serializedName: "validationErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const ConnectToSourceSqlServerTaskInput: msRest.CompositeMapper = { + serializedName: "ConnectToSourceSqlServerTaskInput", + type: { + name: "Composite", + className: "ConnectToSourceSqlServerTaskInput", + modelProperties: { + sourceConnectionInfo: { + required: true, + serializedName: "sourceConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + }, + checkPermissionsGroup: { + serializedName: "checkPermissionsGroup", + type: { + name: "String" + } + }, + collectLogins: { + serializedName: "collectLogins", + defaultValue: false, + type: { + name: "Boolean" + } + }, + collectAgentJobs: { + serializedName: "collectAgentJobs", + defaultValue: false, + type: { + name: "Boolean" + } + }, + collectTdeCertificateInfo: { + serializedName: "collectTdeCertificateInfo", + defaultValue: false, + type: { + name: "Boolean" + } + } + } + } +}; + +export const ConnectToSourceSqlServerSyncTaskProperties: msRest.CompositeMapper = { + serializedName: "ConnectToSource.SqlServer.Sync", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "ConnectToSourceSqlServerSyncTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "ConnectToSourceSqlServerTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "ConnectToSourceSqlServerTaskOutput", + className: "ConnectToSourceSqlServerTaskOutput" + } + } + } + } + } + } +}; + +export const ConnectToSourceSqlServerTaskProperties: msRest.CompositeMapper = { + serializedName: "ConnectToSource.SqlServer", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "ConnectToSourceSqlServerTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "ConnectToSourceSqlServerTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "ConnectToSourceSqlServerTaskOutput", + className: "ConnectToSourceSqlServerTaskOutput" + } + } + } + } + } + } +}; + +export const ProjectTask: msRest.CompositeMapper = { + serializedName: "ProjectTask", + type: { + name: "Composite", + className: "ProjectTask", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "taskType", + clientName: "taskType" + }, + uberParent: "ProjectTaskProperties", + className: "ProjectTaskProperties" + } + } + } + } +}; + +export const ServiceSku: msRest.CompositeMapper = { + serializedName: "ServiceSku", + type: { + name: "Composite", + className: "ServiceSku", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "String" + } + }, + family: { + serializedName: "family", + type: { + name: "String" + } + }, + size: { + serializedName: "size", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } + } + } + } +}; + +export const DataMigrationServiceProperties: msRest.CompositeMapper = { + serializedName: "DataMigrationServiceProperties", + type: { + name: "Composite", + className: "DataMigrationServiceProperties", + modelProperties: { + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + }, + publicKey: { + serializedName: "publicKey", + type: { + name: "String" + } + }, + virtualSubnetId: { + required: true, + serializedName: "virtualSubnetId", + type: { + name: "String" + } + } + } + } +}; + +export const DataMigrationService: msRest.CompositeMapper = { + serializedName: "DataMigrationService", + type: { + name: "Composite", + className: "DataMigrationService", + modelProperties: { + ...TrackedResource.type.modelProperties, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + publicKey: { + serializedName: "properties.publicKey", + type: { + name: "String" + } + }, + virtualSubnetId: { + required: true, + serializedName: "properties.virtualSubnetId", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ServiceSku" + } + } + } + } +}; + +export const NameAvailabilityRequest: msRest.CompositeMapper = { + serializedName: "NameAvailabilityRequest", + type: { + name: "Composite", + className: "NameAvailabilityRequest", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const DatabaseInfo: msRest.CompositeMapper = { + serializedName: "DatabaseInfo", + type: { + name: "Composite", + className: "DatabaseInfo", + modelProperties: { + sourceDatabaseName: { + required: true, + serializedName: "sourceDatabaseName", + type: { + name: "String" + } + } + } + } +}; + +export const ProjectProperties: msRest.CompositeMapper = { + serializedName: "ProjectProperties", + type: { + name: "Composite", + className: "ProjectProperties", + modelProperties: { + sourcePlatform: { + required: true, + serializedName: "sourcePlatform", + type: { + name: "String" + } + }, + targetPlatform: { + required: true, + serializedName: "targetPlatform", + type: { + name: "String" + } + }, + creationTime: { + readOnly: true, + serializedName: "creationTime", + type: { + name: "DateTime" + } + }, + sourceConnectionInfo: { + serializedName: "sourceConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + uberParent: "ConnectionInfo", + className: "ConnectionInfo" + } + }, + targetConnectionInfo: { + serializedName: "targetConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + uberParent: "ConnectionInfo", + className: "ConnectionInfo" + } + }, + databasesInfo: { + serializedName: "databasesInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseInfo" + } + } + } + }, + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const Project: msRest.CompositeMapper = { + serializedName: "Project", + type: { + name: "Composite", + className: "Project", + modelProperties: { + ...TrackedResource.type.modelProperties, + sourcePlatform: { + required: true, + serializedName: "properties.sourcePlatform", + type: { + name: "String" + } + }, + targetPlatform: { + required: true, + serializedName: "properties.targetPlatform", + type: { + name: "String" + } + }, + creationTime: { + readOnly: true, + serializedName: "properties.creationTime", + type: { + name: "DateTime" + } + }, + sourceConnectionInfo: { + serializedName: "properties.sourceConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + uberParent: "ConnectionInfo", + className: "ConnectionInfo" + } + }, + targetConnectionInfo: { + serializedName: "properties.targetConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + uberParent: "ConnectionInfo", + className: "ConnectionInfo" + } + }, + databasesInfo: { + serializedName: "properties.databasesInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseInfo" + } + } + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const ApiError: msRest.CompositeMapper = { + serializedName: "ApiError", + type: { + name: "Composite", + className: "ApiError", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ODataError" + } + } + } + } +}; + +export const ServiceOperationDisplay: msRest.CompositeMapper = { + serializedName: "ServiceOperation_display", + type: { + name: "Composite", + className: "ServiceOperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceOperation: msRest.CompositeMapper = { + serializedName: "ServiceOperation", + type: { + name: "Composite", + className: "ServiceOperation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "ServiceOperationDisplay" + } + } + } + } +}; + +export const QuotaName: msRest.CompositeMapper = { + serializedName: "Quota_name", + type: { + name: "Composite", + className: "QuotaName", + modelProperties: { + localizedValue: { + serializedName: "localizedValue", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const Quota: msRest.CompositeMapper = { + serializedName: "Quota", + type: { + name: "Composite", + className: "Quota", + modelProperties: { + currentValue: { + serializedName: "currentValue", + type: { + name: "Number" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + limit: { + serializedName: "limit", + type: { + name: "Number" + } + }, + name: { + serializedName: "name", + type: { + name: "Composite", + className: "QuotaName" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + } + } + } +}; + +export const NameAvailabilityResponse: msRest.CompositeMapper = { + serializedName: "NameAvailabilityResponse", + type: { + name: "Composite", + className: "NameAvailabilityResponse", + modelProperties: { + nameAvailable: { + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const AvailableServiceSkuSku: msRest.CompositeMapper = { + serializedName: "AvailableServiceSku_sku", + type: { + name: "Composite", + className: "AvailableServiceSkuSku", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + family: { + serializedName: "family", + type: { + name: "String" + } + }, + size: { + serializedName: "size", + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "String" + } + } + } + } +}; + +export const AvailableServiceSkuCapacity: msRest.CompositeMapper = { + serializedName: "AvailableServiceSku_capacity", + type: { + name: "Composite", + className: "AvailableServiceSkuCapacity", + modelProperties: { + minimum: { + serializedName: "minimum", + type: { + name: "Number" + } + }, + maximum: { + serializedName: "maximum", + type: { + name: "Number" + } + }, + default: { + serializedName: "default", + type: { + name: "Number" + } + }, + scaleType: { + serializedName: "scaleType", + type: { + name: "String" + } + } + } + } +}; + +export const AvailableServiceSku: msRest.CompositeMapper = { + serializedName: "AvailableServiceSku", + type: { + name: "Composite", + className: "AvailableServiceSku", + modelProperties: { + resourceType: { + serializedName: "resourceType", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "AvailableServiceSkuSku" + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Composite", + className: "AvailableServiceSkuCapacity" + } + } + } + } +}; + +export const DataMigrationServiceStatusResponse: msRest.CompositeMapper = { + serializedName: "DataMigrationServiceStatusResponse", + type: { + name: "Composite", + className: "DataMigrationServiceStatusResponse", + modelProperties: { + agentVersion: { + serializedName: "agentVersion", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + vmSize: { + serializedName: "vmSize", + type: { + name: "String" + } + }, + supportedTaskTypes: { + serializedName: "supportedTaskTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ResourceSkuRestrictions: msRest.CompositeMapper = { + serializedName: "ResourceSkuRestrictions", + type: { + name: "Composite", + className: "ResourceSkuRestrictions", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + values: { + readOnly: true, + serializedName: "values", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + reasonCode: { + readOnly: true, + serializedName: "reasonCode", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceSkuCapabilities: msRest.CompositeMapper = { + serializedName: "ResourceSkuCapabilities", + type: { + name: "Composite", + className: "ResourceSkuCapabilities", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + value: { + readOnly: true, + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceSkuCosts: msRest.CompositeMapper = { + serializedName: "ResourceSkuCosts", + type: { + name: "Composite", + className: "ResourceSkuCosts", + modelProperties: { + meterID: { + readOnly: true, + serializedName: "meterID", + type: { + name: "String" + } + }, + quantity: { + readOnly: true, + serializedName: "quantity", + type: { + name: "Number" + } + }, + extendedUnit: { + readOnly: true, + serializedName: "extendedUnit", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceSkuCapacity: msRest.CompositeMapper = { + serializedName: "ResourceSkuCapacity", + type: { + name: "Composite", + className: "ResourceSkuCapacity", + modelProperties: { + minimum: { + readOnly: true, + serializedName: "minimum", + type: { + name: "Number" + } + }, + maximum: { + readOnly: true, + serializedName: "maximum", + type: { + name: "Number" + } + }, + default: { + readOnly: true, + serializedName: "default", + type: { + name: "Number" + } + }, + scaleType: { + readOnly: true, + serializedName: "scaleType", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceSku: msRest.CompositeMapper = { + serializedName: "ResourceSku", + type: { + name: "Composite", + className: "ResourceSku", + modelProperties: { + resourceType: { + readOnly: true, + serializedName: "resourceType", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + tier: { + readOnly: true, + serializedName: "tier", + type: { + name: "String" + } + }, + size: { + readOnly: true, + serializedName: "size", + type: { + name: "String" + } + }, + family: { + readOnly: true, + serializedName: "family", + type: { + name: "String" + } + }, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + capacity: { + readOnly: true, + serializedName: "capacity", + type: { + name: "Composite", + className: "ResourceSkuCapacity" + } + }, + locations: { + readOnly: true, + serializedName: "locations", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + apiVersions: { + readOnly: true, + serializedName: "apiVersions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + costs: { + readOnly: true, + serializedName: "costs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuCosts" + } + } + } + }, + capabilities: { + readOnly: true, + serializedName: "capabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuCapabilities" + } + } + } + }, + restrictions: { + readOnly: true, + serializedName: "restrictions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuRestrictions" + } + } + } + } + } + } +}; + +export const ConnectToSourceMySqlTaskInput: msRest.CompositeMapper = { + serializedName: "ConnectToSourceMySqlTaskInput", + type: { + name: "Composite", + className: "ConnectToSourceMySqlTaskInput", + modelProperties: { + sourceConnectionInfo: { + required: true, + serializedName: "sourceConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "MySqlConnectionInfo" + } + }, + targetPlatform: { + serializedName: "targetPlatform", + type: { + name: "String" + } + }, + checkPermissionsGroup: { + serializedName: "checkPermissionsGroup", + type: { + name: "String" + } + } + } + } +}; + +export const ServerProperties: msRest.CompositeMapper = { + serializedName: "ServerProperties", + type: { + name: "Composite", + className: "ServerProperties", + modelProperties: { + serverPlatform: { + readOnly: true, + serializedName: "serverPlatform", + type: { + name: "String" + } + }, + serverName: { + readOnly: true, + serializedName: "serverName", + type: { + name: "String" + } + }, + serverVersion: { + readOnly: true, + serializedName: "serverVersion", + type: { + name: "String" + } + }, + serverEdition: { + readOnly: true, + serializedName: "serverEdition", + type: { + name: "String" + } + }, + serverOperatingSystemVersion: { + readOnly: true, + serializedName: "serverOperatingSystemVersion", + type: { + name: "String" + } + }, + serverDatabaseCount: { + readOnly: true, + serializedName: "serverDatabaseCount", + type: { + name: "Number" + } + } + } + } +}; + +export const ConnectToSourceNonSqlTaskOutput: msRest.CompositeMapper = { + serializedName: "ConnectToSourceNonSqlTaskOutput", + type: { + name: "Composite", + className: "ConnectToSourceNonSqlTaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + sourceServerBrandVersion: { + readOnly: true, + serializedName: "sourceServerBrandVersion", + type: { + name: "String" + } + }, + serverProperties: { + readOnly: true, + serializedName: "serverProperties", + type: { + name: "Composite", + className: "ServerProperties" + } + }, + databases: { + readOnly: true, + serializedName: "databases", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + validationErrors: { + readOnly: true, + serializedName: "validationErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } + } + } +}; + +export const ConnectToSourceMySqlTaskProperties: msRest.CompositeMapper = { + serializedName: "ConnectToSource.MySql", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "ConnectToSourceMySqlTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "ConnectToSourceMySqlTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectToSourceNonSqlTaskOutput" + } + } + } + } + } + } +}; + +export const SchemaMigrationSetting: msRest.CompositeMapper = { + serializedName: "SchemaMigrationSetting", + type: { + name: "Composite", + className: "SchemaMigrationSetting", + modelProperties: { + schemaOption: { + serializedName: "schemaOption", + type: { + name: "String" + } + }, + fileId: { + serializedName: "fileId", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSchemaSqlServerSqlDbDatabaseInput: msRest.CompositeMapper = { + serializedName: "MigrateSchemaSqlServerSqlDbDatabaseInput", + type: { + name: "Composite", + className: "MigrateSchemaSqlServerSqlDbDatabaseInput", + modelProperties: { + targetDatabaseName: { + serializedName: "targetDatabaseName", + type: { + name: "String" + } + }, + schemaSetting: { + serializedName: "schemaSetting", + type: { + name: "Composite", + className: "SchemaMigrationSetting" + } + } + } + } +}; + +export const MigrateSchemaSqlServerSqlDbTaskInput: msRest.CompositeMapper = { + serializedName: "MigrateSchemaSqlServerSqlDbTaskInput", + type: { + name: "Composite", + className: "MigrateSchemaSqlServerSqlDbTaskInput", + modelProperties: { + ...SqlMigrationTaskInput.type.modelProperties, + selectedDatabases: { + required: true, + serializedName: "selectedDatabases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MigrateSchemaSqlServerSqlDbDatabaseInput" + } + } + } + } + } + } +}; + +export const MigrateSchemaSqlServerSqlDbTaskOutput: msRest.CompositeMapper = { + serializedName: "MigrateSchemaSqlServerSqlDbTaskOutput", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "MigrateSchemaSqlServerSqlDbTaskOutput", + className: "MigrateSchemaSqlServerSqlDbTaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + resultType: { + required: true, + serializedName: "resultType", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSchemaSqlServerSqlDbTaskProperties: msRest.CompositeMapper = { + serializedName: "MigrateSchemaSqlServerSqlDb", + type: { + name: "Composite", + polymorphicDiscriminator: ProjectTaskProperties.type.polymorphicDiscriminator, + uberParent: "ProjectTaskProperties", + className: "MigrateSchemaSqlServerSqlDbTaskProperties", + modelProperties: { + ...ProjectTaskProperties.type.modelProperties, + input: { + serializedName: "input", + type: { + name: "Composite", + className: "MigrateSchemaSqlServerSqlDbTaskInput" + } + }, + output: { + readOnly: true, + serializedName: "output", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "resultType", + clientName: "resultType" + }, + uberParent: "MigrateSchemaSqlServerSqlDbTaskOutput", + className: "MigrateSchemaSqlServerSqlDbTaskOutput" + } + } + } + } + } + } +}; + +export const MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel: msRest.CompositeMapper = { + serializedName: "MigrationLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSchemaSqlServerSqlDbTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSchemaSqlServerSqlDbTaskOutput", + className: "MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel", + modelProperties: { + ...MigrateSchemaSqlServerSqlDbTaskOutput.type.modelProperties, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + sourceServerVersion: { + readOnly: true, + serializedName: "sourceServerVersion", + type: { + name: "String" + } + }, + sourceServerBrandVersion: { + readOnly: true, + serializedName: "sourceServerBrandVersion", + type: { + name: "String" + } + }, + targetServerVersion: { + readOnly: true, + serializedName: "targetServerVersion", + type: { + name: "String" + } + }, + targetServerBrandVersion: { + readOnly: true, + serializedName: "targetServerBrandVersion", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel: msRest.CompositeMapper = { + serializedName: "DatabaseLevelOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSchemaSqlServerSqlDbTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSchemaSqlServerSqlDbTaskOutput", + className: "MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel", + modelProperties: { + ...MigrateSchemaSqlServerSqlDbTaskOutput.type.modelProperties, + databaseName: { + readOnly: true, + serializedName: "databaseName", + type: { + name: "String" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + stage: { + readOnly: true, + serializedName: "stage", + type: { + name: "String" + } + }, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + databaseErrorResultPrefix: { + readOnly: true, + serializedName: "databaseErrorResultPrefix", + type: { + name: "String" + } + }, + schemaErrorResultPrefix: { + readOnly: true, + serializedName: "schemaErrorResultPrefix", + type: { + name: "String" + } + }, + numberOfSuccessfulOperations: { + readOnly: true, + serializedName: "numberOfSuccessfulOperations", + type: { + name: "Number" + } + }, + numberOfFailedOperations: { + readOnly: true, + serializedName: "numberOfFailedOperations", + type: { + name: "Number" + } + }, + fileId: { + readOnly: true, + serializedName: "fileId", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSchemaSqlServerSqlDbTaskOutputError: msRest.CompositeMapper = { + serializedName: "SchemaErrorOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSchemaSqlServerSqlDbTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSchemaSqlServerSqlDbTaskOutput", + className: "MigrateSchemaSqlServerSqlDbTaskOutputError", + modelProperties: { + ...MigrateSchemaSqlServerSqlDbTaskOutput.type.modelProperties, + commandText: { + readOnly: true, + serializedName: "commandText", + type: { + name: "String" + } + }, + errorText: { + readOnly: true, + serializedName: "errorText", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSchemaSqlTaskOutputError: msRest.CompositeMapper = { + serializedName: "ErrorOutput", + type: { + name: "Composite", + polymorphicDiscriminator: MigrateSchemaSqlServerSqlDbTaskOutput.type.polymorphicDiscriminator, + uberParent: "MigrateSchemaSqlServerSqlDbTaskOutput", + className: "MigrateSchemaSqlTaskOutputError", + modelProperties: { + ...MigrateSchemaSqlServerSqlDbTaskOutput.type.modelProperties, + error: { + readOnly: true, + serializedName: "error", + type: { + name: "Composite", + className: "ReportableException" + } + } + } + } +}; + +export const Database: msRest.CompositeMapper = { + serializedName: "Database", + type: { + name: "Composite", + className: "Database", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + compatibilityLevel: { + serializedName: "compatibilityLevel", + type: { + name: "String" + } + }, + collation: { + serializedName: "collation", + type: { + name: "String" + } + }, + serverName: { + serializedName: "serverName", + type: { + name: "String" + } + }, + fqdn: { + serializedName: "fqdn", + type: { + name: "String" + } + }, + installId: { + serializedName: "installId", + type: { + name: "String" + } + }, + serverVersion: { + serializedName: "serverVersion", + type: { + name: "String" + } + }, + serverEdition: { + serializedName: "serverEdition", + type: { + name: "String" + } + }, + serverLevel: { + serializedName: "serverLevel", + type: { + name: "String" + } + }, + serverDefaultDataPath: { + serializedName: "serverDefaultDataPath", + type: { + name: "String" + } + }, + serverDefaultLogPath: { + serializedName: "serverDefaultLogPath", + type: { + name: "String" + } + }, + serverDefaultBackupPath: { + serializedName: "serverDefaultBackupPath", + type: { + name: "String" + } + }, + serverCoreCount: { + serializedName: "serverCoreCount", + type: { + name: "Number" + } + }, + serverVisibleOnlineCoreCount: { + serializedName: "serverVisibleOnlineCoreCount", + type: { + name: "Number" + } + }, + databaseState: { + serializedName: "databaseState", + type: { + name: "String" + } + }, + serverId: { + serializedName: "serverId", + type: { + name: "String" + } + } + } + } +}; + +export const DatabaseObjectName: msRest.CompositeMapper = { + serializedName: "DatabaseObjectName", + type: { + name: "Composite", + className: "DatabaseObjectName", + modelProperties: { + databaseName: { + readOnly: true, + serializedName: "databaseName", + type: { + name: "String" + } + }, + objectName: { + readOnly: true, + serializedName: "objectName", + type: { + name: "String" + } + }, + schemaName: { + readOnly: true, + serializedName: "schemaName", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + } + } + } +}; + +export const MigrationTableMetadata: msRest.CompositeMapper = { + serializedName: "MigrationTableMetadata", + type: { + name: "Composite", + className: "MigrationTableMetadata", + modelProperties: { + sourceTableName: { + readOnly: true, + serializedName: "sourceTableName", + type: { + name: "String" + } + }, + targetTableName: { + readOnly: true, + serializedName: "targetTableName", + type: { + name: "String" + } + } + } + } +}; + +export const DataMigrationProjectMetadata: msRest.CompositeMapper = { + serializedName: "DataMigrationProjectMetadata", + type: { + name: "Composite", + className: "DataMigrationProjectMetadata", + modelProperties: { + sourceServerName: { + readOnly: true, + serializedName: "sourceServerName", + type: { + name: "String" + } + }, + sourceServerPort: { + readOnly: true, + serializedName: "sourceServerPort", + type: { + name: "String" + } + }, + sourceUsername: { + readOnly: true, + serializedName: "sourceUsername", + type: { + name: "String" + } + }, + targetServerName: { + readOnly: true, + serializedName: "targetServerName", + type: { + name: "String" + } + }, + targetUsername: { + readOnly: true, + serializedName: "targetUsername", + type: { + name: "String" + } + }, + targetDbName: { + readOnly: true, + serializedName: "targetDbName", + type: { + name: "String" + } + }, + targetUsingWinAuth: { + readOnly: true, + serializedName: "targetUsingWinAuth", + type: { + name: "Boolean" + } + }, + selectedMigrationTables: { + readOnly: true, + serializedName: "selectedMigrationTables", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MigrationTableMetadata" + } + } + } + } + } + } +}; + +export const GetProjectDetailsNonSqlTaskInput: msRest.CompositeMapper = { + serializedName: "GetProjectDetailsNonSqlTaskInput", + type: { + name: "Composite", + className: "GetProjectDetailsNonSqlTaskInput", + modelProperties: { + projectName: { + required: true, + serializedName: "projectName", + type: { + name: "String" + } + }, + projectLocation: { + required: true, + serializedName: "projectLocation", + type: { + name: "String" + } + } + } + } +}; + +export const NonSqlDataMigrationTable: msRest.CompositeMapper = { + serializedName: "NonSqlDataMigrationTable", + type: { + name: "Composite", + className: "NonSqlDataMigrationTable", + modelProperties: { + sourceName: { + serializedName: "sourceName", + type: { + name: "String" + } + } + } + } +}; + +export const NonSqlMigrationTaskInput: msRest.CompositeMapper = { + serializedName: "NonSqlMigrationTaskInput", + type: { + name: "Composite", + className: "NonSqlMigrationTaskInput", + modelProperties: { + targetConnectionInfo: { + required: true, + serializedName: "targetConnectionInfo", + type: { + name: "Composite", + polymorphicDiscriminator: ConnectionInfo.type.polymorphicDiscriminator, + uberParent: "ConnectionInfo", + className: "SqlConnectionInfo" + } + }, + targetDatabaseName: { + required: true, + serializedName: "targetDatabaseName", + type: { + name: "String" + } + }, + projectName: { + required: true, + serializedName: "projectName", + type: { + name: "String" + } + }, + projectLocation: { + required: true, + serializedName: "projectLocation", + type: { + name: "String" + } + }, + selectedTables: { + required: true, + serializedName: "selectedTables", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NonSqlDataMigrationTable" + } + } + } + } + } + } +}; + +export const DataMigrationError: msRest.CompositeMapper = { + serializedName: "DataMigrationError", + type: { + name: "Composite", + className: "DataMigrationError", + modelProperties: { + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const NonSqlDataMigrationTableResult: msRest.CompositeMapper = { + serializedName: "NonSqlDataMigrationTableResult", + type: { + name: "Composite", + className: "NonSqlDataMigrationTableResult", + modelProperties: { + resultCode: { + readOnly: true, + serializedName: "resultCode", + type: { + name: "String" + } + }, + sourceName: { + readOnly: true, + serializedName: "sourceName", + type: { + name: "String" + } + }, + targetName: { + readOnly: true, + serializedName: "targetName", + type: { + name: "String" + } + }, + sourceRowCount: { + readOnly: true, + serializedName: "sourceRowCount", + type: { + name: "Number" + } + }, + targetRowCount: { + readOnly: true, + serializedName: "targetRowCount", + type: { + name: "Number" + } + }, + elapsedTimeInMiliseconds: { + readOnly: true, + serializedName: "elapsedTimeInMiliseconds", + type: { + name: "Number" + } + }, + errors: { + readOnly: true, + serializedName: "errors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataMigrationError" + } + } + } + } + } + } +}; + +export const NonSqlMigrationTaskOutput: msRest.CompositeMapper = { + serializedName: "NonSqlMigrationTaskOutput", + type: { + name: "Composite", + className: "NonSqlMigrationTaskOutput", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + startedOn: { + readOnly: true, + serializedName: "startedOn", + type: { + name: "DateTime" + } + }, + endedOn: { + readOnly: true, + serializedName: "endedOn", + type: { + name: "DateTime" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + dataMigrationTableResults: { + readOnly: true, + serializedName: "dataMigrationTableResults", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "NonSqlDataMigrationTableResult" + } + } + } + }, + progressMessage: { + readOnly: true, + serializedName: "progressMessage", + type: { + name: "String" + } + }, + sourceServerName: { + readOnly: true, + serializedName: "sourceServerName", + type: { + name: "String" + } + }, + targetServerName: { + readOnly: true, + serializedName: "targetServerName", + type: { + name: "String" + } + } + } + } +}; + +export const DatabaseFileInput: msRest.CompositeMapper = { + serializedName: "DatabaseFileInput", + type: { + name: "Composite", + className: "DatabaseFileInput", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + logicalName: { + serializedName: "logicalName", + type: { + name: "String" + } + }, + physicalFullName: { + serializedName: "physicalFullName", + type: { + name: "String" + } + }, + restoreFullName: { + serializedName: "restoreFullName", + type: { + name: "String" + } + }, + fileType: { + serializedName: "fileType", + type: { + name: "String" + } + } + } + } +}; + +export const MigrateSqlServerSqlServerDatabaseInput: msRest.CompositeMapper = { + serializedName: "MigrateSqlServerSqlServerDatabaseInput", + type: { + name: "Composite", + className: "MigrateSqlServerSqlServerDatabaseInput", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + restoreDatabaseName: { + serializedName: "restoreDatabaseName", + type: { + name: "String" + } + }, + backupAndRestoreFolder: { + serializedName: "backupAndRestoreFolder", + type: { + name: "String" + } + }, + databaseFiles: { + serializedName: "databaseFiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseFileInput" + } + } + } + } + } + } +}; + +export const ResourceSkusResult: msRest.CompositeMapper = { + serializedName: "ResourceSkusResult", + type: { + name: "Composite", + className: "ResourceSkusResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSku" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceSkuList: msRest.CompositeMapper = { + serializedName: "ServiceSkuList", + type: { + name: "Composite", + className: "ServiceSkuList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailableServiceSku" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const DataMigrationServiceList: msRest.CompositeMapper = { + serializedName: "DataMigrationServiceList", + type: { + name: "Composite", + className: "DataMigrationServiceList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataMigrationService" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const TaskList: msRest.CompositeMapper = { + serializedName: "TaskList", + type: { + name: "Composite", + className: "TaskList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProjectTask" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ProjectList: msRest.CompositeMapper = { + serializedName: "ProjectList", + type: { + name: "Composite", + className: "ProjectList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Project" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const QuotaList: msRest.CompositeMapper = { + serializedName: "QuotaList", + type: { + name: "Composite", + className: "QuotaList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Quota" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceOperationList: msRest.CompositeMapper = { + serializedName: "ServiceOperationList", + type: { + name: "Composite", + className: "ServiceOperationList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceOperation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const discriminators = { + 'CommandProperties.Migrate.Sync.Complete.Database' : MigrateSyncCompleteCommandProperties, + 'Unknown' : CommandProperties, + 'ConnectionInfo.PostgreSqlConnectionInfo' : PostgreSqlConnectionInfo, + 'ConnectionInfo.MySqlConnectionInfo' : MySqlConnectionInfo, + 'Unknown' : ConnectionInfo, + 'ConnectionInfo.SqlConnectionInfo' : SqlConnectionInfo, + 'ProjectTaskProperties.GetTDECertificates.Sql' : GetTdeCertificatesSqlTaskProperties, + 'ProjectTaskProperties.ValidateMigrationInput.SqlServer.AzureSqlDbMI' : ValidateMigrationInputSqlServerSqlMITaskProperties, + 'ProjectTaskProperties.ValidateMigrationInput.SqlServer.SqlDb.Sync' : ValidateMigrationInputSqlServerSqlDbSyncTaskProperties, + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.DatabaseLevelErrorOutput' : MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.ErrorOutput' : MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError, + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.TableLevelOutput' : MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel, + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.DatabaseLevelOutput' : MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel, + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.MigrationLevelOutput' : MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel, + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput' : MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput, + 'ProjectTaskProperties.Migrate.PostgreSql.AzureDbForPostgreSql.Sync' : MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, + 'MigrateMySqlAzureDbForMySqlSyncTaskOutput.DatabaseLevelErrorOutput' : MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError, + 'MigrateMySqlAzureDbForMySqlSyncTaskOutput.ErrorOutput' : MigrateMySqlAzureDbForMySqlSyncTaskOutputError, + 'MigrateMySqlAzureDbForMySqlSyncTaskOutput.TableLevelOutput' : MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel, + 'MigrateMySqlAzureDbForMySqlSyncTaskOutput.DatabaseLevelOutput' : MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel, + 'MigrateMySqlAzureDbForMySqlSyncTaskOutput.MigrationLevelOutput' : MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel, + 'MigrateMySqlAzureDbForMySqlSyncTaskOutput' : MigrateMySqlAzureDbForMySqlSyncTaskOutput, + 'ProjectTaskProperties.Migrate.MySql.AzureDbForMySql.Sync' : MigrateMySqlAzureDbForMySqlSyncTaskProperties, + 'MigrateSqlServerSqlDbSyncTaskOutput.DatabaseLevelErrorOutput' : MigrateSqlServerSqlDbSyncTaskOutputDatabaseError, + 'MigrateSqlServerSqlDbSyncTaskOutput.ErrorOutput' : MigrateSqlServerSqlDbSyncTaskOutputError, + 'MigrateSqlServerSqlDbSyncTaskOutput.TableLevelOutput' : MigrateSqlServerSqlDbSyncTaskOutputTableLevel, + 'MigrateSqlServerSqlDbSyncTaskOutput.DatabaseLevelOutput' : MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel, + 'MigrateSqlServerSqlDbSyncTaskOutput.MigrationLevelOutput' : MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel, + 'MigrateSqlServerSqlDbSyncTaskOutput' : MigrateSqlServerSqlDbSyncTaskOutput, + 'ProjectTaskProperties.Migrate.SqlServer.AzureSqlDb.Sync' : MigrateSqlServerSqlDbSyncTaskProperties, + 'MigrateSqlServerSqlDbTaskOutput.ErrorOutput' : MigrateSqlServerSqlDbTaskOutputError, + 'MigrateSqlServerSqlDbTaskOutput.TableLevelOutput' : MigrateSqlServerSqlDbTaskOutputTableLevel, + 'MigrateSqlServerSqlDbTaskOutput.DatabaseLevelOutput' : MigrateSqlServerSqlDbTaskOutputDatabaseLevel, + 'MigrateSqlServerSqlDbTaskOutput.MigrationLevelOutput' : MigrateSqlServerSqlDbTaskOutputMigrationLevel, + 'MigrateSqlServerSqlDbTaskOutput' : MigrateSqlServerSqlDbTaskOutput, + 'ProjectTaskProperties.Migrate.SqlServer.SqlDb' : MigrateSqlServerSqlDbTaskProperties, + 'MigrateSqlServerSqlMITaskOutput.ErrorOutput' : MigrateSqlServerSqlMITaskOutputError, + 'MigrateSqlServerSqlMITaskOutput.LoginLevelOutput' : MigrateSqlServerSqlMITaskOutputLoginLevel, + 'MigrateSqlServerSqlMITaskOutput.AgentJobLevelOutput' : MigrateSqlServerSqlMITaskOutputAgentJobLevel, + 'MigrateSqlServerSqlMITaskOutput.DatabaseLevelOutput' : MigrateSqlServerSqlMITaskOutputDatabaseLevel, + 'MigrateSqlServerSqlMITaskOutput.MigrationLevelOutput' : MigrateSqlServerSqlMITaskOutputMigrationLevel, + 'MigrateSqlServerSqlMITaskOutput' : MigrateSqlServerSqlMITaskOutput, + 'ProjectTaskProperties.Migrate.SqlServer.AzureSqlDbMI' : MigrateSqlServerSqlMITaskProperties, + 'ProjectTaskProperties.ConnectToTarget.AzureDbForMySql' : ConnectToTargetAzureDbForMySqlTaskProperties, + 'ProjectTaskProperties.ConnectToTarget.AzureSqlDbMI' : ConnectToTargetSqlMITaskProperties, + 'ProjectTaskProperties.GetUserTables.AzureSqlDb.Sync' : GetUserTablesSqlSyncTaskProperties, + 'ProjectTaskProperties.GetUserTables.Sql' : GetUserTablesSqlTaskProperties, + 'ProjectTaskProperties.ConnectToTarget.SqlDb.Sync' : ConnectToTargetSqlSqlDbSyncTaskProperties, + 'ProjectTaskProperties.ConnectToTarget.SqlDb' : ConnectToTargetSqlDbTaskProperties, + 'ConnectToSourceSqlServerTaskOutput.AgentJobLevelOutput' : ConnectToSourceSqlServerTaskOutputAgentJobLevel, + 'ConnectToSourceSqlServerTaskOutput.LoginLevelOutput' : ConnectToSourceSqlServerTaskOutputLoginLevel, + 'ConnectToSourceSqlServerTaskOutput.DatabaseLevelOutput' : ConnectToSourceSqlServerTaskOutputDatabaseLevel, + 'ConnectToSourceSqlServerTaskOutput.TaskLevelOutput' : ConnectToSourceSqlServerTaskOutputTaskLevel, + 'ConnectToSourceSqlServerTaskOutput' : ConnectToSourceSqlServerTaskOutput, + 'ProjectTaskProperties.ConnectToSource.SqlServer.Sync' : ConnectToSourceSqlServerSyncTaskProperties, + 'ProjectTaskProperties.ConnectToSource.SqlServer' : ConnectToSourceSqlServerTaskProperties, + 'Unknown' : ProjectTaskProperties, + 'ProjectTaskProperties.ConnectToSource.MySql' : ConnectToSourceMySqlTaskProperties, + 'MigrateSchemaSqlServerSqlDbTaskOutput' : MigrateSchemaSqlServerSqlDbTaskOutput, + 'ProjectTaskProperties.MigrateSchemaSqlServerSqlDb' : MigrateSchemaSqlServerSqlDbTaskProperties, + 'MigrateSchemaSqlServerSqlDbTaskOutput.MigrationLevelOutput' : MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel, + 'MigrateSchemaSqlServerSqlDbTaskOutput.DatabaseLevelOutput' : MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel, + 'MigrateSchemaSqlServerSqlDbTaskOutput.SchemaErrorOutput' : MigrateSchemaSqlServerSqlDbTaskOutputError, + 'MigrateSchemaSqlServerSqlDbTaskOutput.ErrorOutput' : MigrateSchemaSqlTaskOutputError +}; diff --git a/packages/@azure/arm-datamigration/lib/models/operationsMappers.ts b/packages/@azure/arm-datamigration/lib/models/operationsMappers.ts new file mode 100644 index 000000000000..77a757973421 --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/models/operationsMappers.ts @@ -0,0 +1,19 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + ServiceOperationList, + ServiceOperation, + ServiceOperationDisplay, + ApiError, + ODataError +} from "../models/mappers"; + diff --git a/packages/@azure/arm-datamigration/lib/models/parameters.ts b/packages/@azure/arm-datamigration/lib/models/parameters.ts new file mode 100644 index 000000000000..ca0164330b45 --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/models/parameters.ts @@ -0,0 +1,141 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2018-07-15-preview', + type: { + name: "String" + } + } +}; +export const deleteRunningTasks: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "deleteRunningTasks" + ], + mapper: { + serializedName: "deleteRunningTasks", + type: { + name: "Boolean" + } + } +}; +export const expand: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "expand" + ], + mapper: { + serializedName: "$expand", + type: { + name: "String" + } + } +}; +export const groupName: msRest.OperationURLParameter = { + parameterPath: "groupName", + mapper: { + required: true, + serializedName: "groupName", + type: { + name: "String" + } + } +}; +export const location: msRest.OperationURLParameter = { + parameterPath: "location", + mapper: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const projectName: msRest.OperationURLParameter = { + parameterPath: "projectName", + mapper: { + required: true, + serializedName: "projectName", + type: { + name: "String" + } + } +}; +export const serviceName: msRest.OperationURLParameter = { + parameterPath: "serviceName", + mapper: { + required: true, + serializedName: "serviceName", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; +export const taskName: msRest.OperationURLParameter = { + parameterPath: "taskName", + mapper: { + required: true, + serializedName: "taskName", + type: { + name: "String" + } + } +}; +export const taskType: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "taskType" + ], + mapper: { + serializedName: "taskType", + type: { + name: "String" + } + } +}; diff --git a/packages/@azure/arm-datamigration/lib/models/projectsMappers.ts b/packages/@azure/arm-datamigration/lib/models/projectsMappers.ts new file mode 100644 index 000000000000..72d53a8ebf2d --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/models/projectsMappers.ts @@ -0,0 +1,142 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + ProjectList, + Project, + TrackedResource, + Resource, + BaseResource, + ConnectionInfo, + DatabaseInfo, + ApiError, + ODataError, + PostgreSqlConnectionInfo, + MySqlConnectionInfo, + SqlConnectionInfo, + ProjectTask, + ProjectTaskProperties, + CommandProperties, + DataMigrationService, + ServiceSku, + ConnectToSourceMySqlTaskProperties, + ConnectToSourceMySqlTaskInput, + ConnectToSourceNonSqlTaskOutput, + ServerProperties, + ReportableException, + MigrateSchemaSqlServerSqlDbTaskProperties, + MigrateSchemaSqlServerSqlDbTaskInput, + SqlMigrationTaskInput, + MigrateSchemaSqlServerSqlDbDatabaseInput, + SchemaMigrationSetting, + MigrateSchemaSqlServerSqlDbTaskOutput, + MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel, + MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel, + MigrateSchemaSqlServerSqlDbTaskOutputError, + MigrateSchemaSqlTaskOutputError, + MigrateSyncCompleteCommandProperties, + MigrateSyncCompleteCommandInput, + MigrateSyncCompleteCommandOutput, + GetTdeCertificatesSqlTaskProperties, + GetTdeCertificatesSqlTaskInput, + FileShare, + SelectedCertificateInput, + GetTdeCertificatesSqlTaskOutput, + ValidateMigrationInputSqlServerSqlMITaskProperties, + ValidateMigrationInputSqlServerSqlMITaskInput, + MigrateSqlServerSqlMIDatabaseInput, + BlobShare, + ValidateMigrationInputSqlServerSqlMITaskOutput, + DatabaseBackupInfo, + ValidateMigrationInputSqlServerSqlDbSyncTaskProperties, + ValidateSyncMigrationInputSqlServerTaskInput, + MigrateSqlServerSqlDbSyncDatabaseInput, + ValidateSyncMigrationInputSqlServerTaskOutput, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput, + MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput, + MigrateMySqlAzureDbForMySqlSyncTaskProperties, + MigrateMySqlAzureDbForMySqlSyncTaskInput, + MigrateMySqlAzureDbForMySqlSyncDatabaseInput, + MigrateMySqlAzureDbForMySqlSyncTaskOutput, + MigrateSqlServerSqlDbSyncTaskInput, + MigrationValidationOptions, + MigrateSqlServerSqlDbSyncTaskProperties, + MigrateSqlServerSqlDbSyncTaskOutput, + MigrateSqlServerSqlDbTaskInput, + MigrateSqlServerSqlDbDatabaseInput, + MigrateSqlServerSqlDbTaskProperties, + MigrateSqlServerSqlDbTaskOutput, + MigrateSqlServerSqlMITaskInput, + MigrateSqlServerSqlMITaskProperties, + MigrateSqlServerSqlMITaskOutput, + ConnectToTargetAzureDbForMySqlTaskProperties, + ConnectToTargetAzureDbForMySqlTaskInput, + ConnectToTargetAzureDbForMySqlTaskOutput, + ConnectToTargetSqlMITaskProperties, + ConnectToTargetSqlMITaskInput, + ConnectToTargetSqlMITaskOutput, + GetUserTablesSqlSyncTaskProperties, + GetUserTablesSqlSyncTaskInput, + GetUserTablesSqlSyncTaskOutput, + DatabaseTable, + GetUserTablesSqlTaskProperties, + GetUserTablesSqlTaskInput, + GetUserTablesSqlTaskOutput, + ConnectToTargetSqlSqlDbSyncTaskProperties, + ConnectToTargetSqlSqlDbSyncTaskInput, + ConnectToTargetSqlDbTaskOutput, + ConnectToTargetSqlDbTaskProperties, + ConnectToTargetSqlDbTaskInput, + ConnectToSourceSqlServerSyncTaskProperties, + ConnectToSourceSqlServerTaskInput, + ConnectToSourceSqlServerTaskOutput, + ConnectToSourceSqlServerTaskProperties, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, + SyncMigrationDatabaseErrorEvent, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError, + MigrateMySqlAzureDbForMySqlSyncTaskOutputError, + MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel, + MigrateSqlServerSqlDbSyncTaskOutputDatabaseError, + MigrateSqlServerSqlDbSyncTaskOutputError, + MigrateSqlServerSqlDbSyncTaskOutputTableLevel, + MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel, + MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel, + MigrateSqlServerSqlDbTaskOutputError, + MigrateSqlServerSqlDbTaskOutputTableLevel, + MigrateSqlServerSqlDbTaskOutputDatabaseLevel, + DataItemMigrationSummaryResult, + DatabaseSummaryResult, + MigrateSqlServerSqlDbTaskOutputMigrationLevel, + MigrationValidationResult, + MigrationValidationDatabaseSummaryResult, + MigrationReportResult, + MigrateSqlServerSqlMITaskOutputError, + MigrateSqlServerSqlMITaskOutputLoginLevel, + MigrateSqlServerSqlMITaskOutputAgentJobLevel, + MigrateSqlServerSqlMITaskOutputDatabaseLevel, + MigrateSqlServerSqlMITaskOutputMigrationLevel, + StartMigrationScenarioServerRoleResult, + ConnectToSourceSqlServerTaskOutputAgentJobLevel, + MigrationEligibilityInfo, + ConnectToSourceSqlServerTaskOutputLoginLevel, + ConnectToSourceSqlServerTaskOutputDatabaseLevel, + DatabaseFileInfo, + ConnectToSourceSqlServerTaskOutputTaskLevel +} from "../models/mappers"; + diff --git a/packages/@azure/arm-datamigration/lib/models/resourceSkusMappers.ts b/packages/@azure/arm-datamigration/lib/models/resourceSkusMappers.ts new file mode 100644 index 000000000000..f31bfb444706 --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/models/resourceSkusMappers.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + ResourceSkusResult, + ResourceSku, + ResourceSkuCapacity, + ResourceSkuCosts, + ResourceSkuCapabilities, + ResourceSkuRestrictions, + ApiError, + ODataError +} from "../models/mappers"; + diff --git a/packages/@azure/arm-datamigration/lib/models/servicesMappers.ts b/packages/@azure/arm-datamigration/lib/models/servicesMappers.ts new file mode 100644 index 000000000000..63adad2a88c3 --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/models/servicesMappers.ts @@ -0,0 +1,149 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + DataMigrationService, + TrackedResource, + Resource, + BaseResource, + ServiceSku, + ApiError, + ODataError, + DataMigrationServiceStatusResponse, + ServiceSkuList, + AvailableServiceSku, + AvailableServiceSkuSku, + AvailableServiceSkuCapacity, + NameAvailabilityRequest, + NameAvailabilityResponse, + DataMigrationServiceList, + ProjectTask, + ProjectTaskProperties, + CommandProperties, + Project, + ConnectionInfo, + DatabaseInfo, + ConnectToSourceMySqlTaskProperties, + ConnectToSourceMySqlTaskInput, + MySqlConnectionInfo, + ConnectToSourceNonSqlTaskOutput, + ServerProperties, + ReportableException, + MigrateSchemaSqlServerSqlDbTaskProperties, + MigrateSchemaSqlServerSqlDbTaskInput, + SqlMigrationTaskInput, + SqlConnectionInfo, + MigrateSchemaSqlServerSqlDbDatabaseInput, + SchemaMigrationSetting, + MigrateSchemaSqlServerSqlDbTaskOutput, + MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel, + MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel, + MigrateSchemaSqlServerSqlDbTaskOutputError, + MigrateSchemaSqlTaskOutputError, + MigrateSyncCompleteCommandProperties, + MigrateSyncCompleteCommandInput, + MigrateSyncCompleteCommandOutput, + PostgreSqlConnectionInfo, + GetTdeCertificatesSqlTaskProperties, + GetTdeCertificatesSqlTaskInput, + FileShare, + SelectedCertificateInput, + GetTdeCertificatesSqlTaskOutput, + ValidateMigrationInputSqlServerSqlMITaskProperties, + ValidateMigrationInputSqlServerSqlMITaskInput, + MigrateSqlServerSqlMIDatabaseInput, + BlobShare, + ValidateMigrationInputSqlServerSqlMITaskOutput, + DatabaseBackupInfo, + ValidateMigrationInputSqlServerSqlDbSyncTaskProperties, + ValidateSyncMigrationInputSqlServerTaskInput, + MigrateSqlServerSqlDbSyncDatabaseInput, + ValidateSyncMigrationInputSqlServerTaskOutput, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput, + MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput, + MigrateMySqlAzureDbForMySqlSyncTaskProperties, + MigrateMySqlAzureDbForMySqlSyncTaskInput, + MigrateMySqlAzureDbForMySqlSyncDatabaseInput, + MigrateMySqlAzureDbForMySqlSyncTaskOutput, + MigrateSqlServerSqlDbSyncTaskInput, + MigrationValidationOptions, + MigrateSqlServerSqlDbSyncTaskProperties, + MigrateSqlServerSqlDbSyncTaskOutput, + MigrateSqlServerSqlDbTaskInput, + MigrateSqlServerSqlDbDatabaseInput, + MigrateSqlServerSqlDbTaskProperties, + MigrateSqlServerSqlDbTaskOutput, + MigrateSqlServerSqlMITaskInput, + MigrateSqlServerSqlMITaskProperties, + MigrateSqlServerSqlMITaskOutput, + ConnectToTargetAzureDbForMySqlTaskProperties, + ConnectToTargetAzureDbForMySqlTaskInput, + ConnectToTargetAzureDbForMySqlTaskOutput, + ConnectToTargetSqlMITaskProperties, + ConnectToTargetSqlMITaskInput, + ConnectToTargetSqlMITaskOutput, + GetUserTablesSqlSyncTaskProperties, + GetUserTablesSqlSyncTaskInput, + GetUserTablesSqlSyncTaskOutput, + DatabaseTable, + GetUserTablesSqlTaskProperties, + GetUserTablesSqlTaskInput, + GetUserTablesSqlTaskOutput, + ConnectToTargetSqlSqlDbSyncTaskProperties, + ConnectToTargetSqlSqlDbSyncTaskInput, + ConnectToTargetSqlDbTaskOutput, + ConnectToTargetSqlDbTaskProperties, + ConnectToTargetSqlDbTaskInput, + ConnectToSourceSqlServerSyncTaskProperties, + ConnectToSourceSqlServerTaskInput, + ConnectToSourceSqlServerTaskOutput, + ConnectToSourceSqlServerTaskProperties, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, + SyncMigrationDatabaseErrorEvent, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError, + MigrateMySqlAzureDbForMySqlSyncTaskOutputError, + MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel, + MigrateSqlServerSqlDbSyncTaskOutputDatabaseError, + MigrateSqlServerSqlDbSyncTaskOutputError, + MigrateSqlServerSqlDbSyncTaskOutputTableLevel, + MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel, + MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel, + MigrateSqlServerSqlDbTaskOutputError, + MigrateSqlServerSqlDbTaskOutputTableLevel, + MigrateSqlServerSqlDbTaskOutputDatabaseLevel, + DataItemMigrationSummaryResult, + DatabaseSummaryResult, + MigrateSqlServerSqlDbTaskOutputMigrationLevel, + MigrationValidationResult, + MigrationValidationDatabaseSummaryResult, + MigrationReportResult, + MigrateSqlServerSqlMITaskOutputError, + MigrateSqlServerSqlMITaskOutputLoginLevel, + MigrateSqlServerSqlMITaskOutputAgentJobLevel, + MigrateSqlServerSqlMITaskOutputDatabaseLevel, + MigrateSqlServerSqlMITaskOutputMigrationLevel, + StartMigrationScenarioServerRoleResult, + ConnectToSourceSqlServerTaskOutputAgentJobLevel, + MigrationEligibilityInfo, + ConnectToSourceSqlServerTaskOutputLoginLevel, + ConnectToSourceSqlServerTaskOutputDatabaseLevel, + DatabaseFileInfo, + ConnectToSourceSqlServerTaskOutputTaskLevel +} from "../models/mappers"; + diff --git a/packages/@azure/arm-datamigration/lib/models/tasksMappers.ts b/packages/@azure/arm-datamigration/lib/models/tasksMappers.ts new file mode 100644 index 000000000000..937e223708cc --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/models/tasksMappers.ts @@ -0,0 +1,142 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + TaskList, + ProjectTask, + Resource, + BaseResource, + ProjectTaskProperties, + ODataError, + CommandProperties, + ApiError, + MigrateSyncCompleteCommandProperties, + MigrateSyncCompleteCommandInput, + MigrateSyncCompleteCommandOutput, + ReportableException, + TrackedResource, + GetTdeCertificatesSqlTaskProperties, + GetTdeCertificatesSqlTaskInput, + SqlConnectionInfo, + ConnectionInfo, + FileShare, + SelectedCertificateInput, + GetTdeCertificatesSqlTaskOutput, + ValidateMigrationInputSqlServerSqlMITaskProperties, + ValidateMigrationInputSqlServerSqlMITaskInput, + MigrateSqlServerSqlMIDatabaseInput, + BlobShare, + ValidateMigrationInputSqlServerSqlMITaskOutput, + DatabaseBackupInfo, + ValidateMigrationInputSqlServerSqlDbSyncTaskProperties, + ValidateSyncMigrationInputSqlServerTaskInput, + MigrateSqlServerSqlDbSyncDatabaseInput, + ValidateSyncMigrationInputSqlServerTaskOutput, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput, + MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput, + PostgreSqlConnectionInfo, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput, + MigrateMySqlAzureDbForMySqlSyncTaskProperties, + MigrateMySqlAzureDbForMySqlSyncTaskInput, + MySqlConnectionInfo, + MigrateMySqlAzureDbForMySqlSyncDatabaseInput, + MigrateMySqlAzureDbForMySqlSyncTaskOutput, + MigrateSqlServerSqlDbSyncTaskProperties, + MigrateSqlServerSqlDbSyncTaskInput, + SqlMigrationTaskInput, + MigrationValidationOptions, + MigrateSqlServerSqlDbSyncTaskOutput, + MigrateSqlServerSqlDbTaskInput, + MigrateSqlServerSqlDbDatabaseInput, + MigrateSqlServerSqlDbTaskProperties, + MigrateSqlServerSqlDbTaskOutput, + MigrateSqlServerSqlMITaskInput, + MigrateSqlServerSqlMITaskProperties, + MigrateSqlServerSqlMITaskOutput, + ConnectToTargetAzureDbForMySqlTaskProperties, + ConnectToTargetAzureDbForMySqlTaskInput, + ConnectToTargetAzureDbForMySqlTaskOutput, + ConnectToTargetSqlMITaskProperties, + ConnectToTargetSqlMITaskInput, + ConnectToTargetSqlMITaskOutput, + GetUserTablesSqlSyncTaskProperties, + GetUserTablesSqlSyncTaskInput, + GetUserTablesSqlSyncTaskOutput, + DatabaseTable, + GetUserTablesSqlTaskProperties, + GetUserTablesSqlTaskInput, + GetUserTablesSqlTaskOutput, + ConnectToTargetSqlSqlDbSyncTaskProperties, + ConnectToTargetSqlSqlDbSyncTaskInput, + ConnectToTargetSqlDbTaskOutput, + ConnectToTargetSqlDbTaskProperties, + ConnectToTargetSqlDbTaskInput, + ConnectToSourceSqlServerSyncTaskProperties, + ConnectToSourceSqlServerTaskInput, + ConnectToSourceSqlServerTaskOutput, + ConnectToSourceSqlServerTaskProperties, + DataMigrationService, + ServiceSku, + Project, + DatabaseInfo, + ConnectToSourceMySqlTaskProperties, + ConnectToSourceMySqlTaskInput, + ConnectToSourceNonSqlTaskOutput, + ServerProperties, + MigrateSchemaSqlServerSqlDbTaskInput, + MigrateSchemaSqlServerSqlDbDatabaseInput, + SchemaMigrationSetting, + MigrateSchemaSqlServerSqlDbTaskProperties, + MigrateSchemaSqlServerSqlDbTaskOutput, + MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel, + MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel, + MigrateSchemaSqlServerSqlDbTaskOutputError, + MigrateSchemaSqlTaskOutputError, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, + SyncMigrationDatabaseErrorEvent, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError, + MigrateMySqlAzureDbForMySqlSyncTaskOutputError, + MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel, + MigrateSqlServerSqlDbSyncTaskOutputDatabaseError, + MigrateSqlServerSqlDbSyncTaskOutputError, + MigrateSqlServerSqlDbSyncTaskOutputTableLevel, + MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel, + MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel, + MigrateSqlServerSqlDbTaskOutputError, + MigrateSqlServerSqlDbTaskOutputTableLevel, + MigrateSqlServerSqlDbTaskOutputDatabaseLevel, + DataItemMigrationSummaryResult, + DatabaseSummaryResult, + MigrateSqlServerSqlDbTaskOutputMigrationLevel, + MigrationValidationResult, + MigrationValidationDatabaseSummaryResult, + MigrationReportResult, + MigrateSqlServerSqlMITaskOutputError, + MigrateSqlServerSqlMITaskOutputLoginLevel, + MigrateSqlServerSqlMITaskOutputAgentJobLevel, + MigrateSqlServerSqlMITaskOutputDatabaseLevel, + MigrateSqlServerSqlMITaskOutputMigrationLevel, + StartMigrationScenarioServerRoleResult, + ConnectToSourceSqlServerTaskOutputAgentJobLevel, + MigrationEligibilityInfo, + ConnectToSourceSqlServerTaskOutputLoginLevel, + ConnectToSourceSqlServerTaskOutputDatabaseLevel, + DatabaseFileInfo, + ConnectToSourceSqlServerTaskOutputTaskLevel +} from "../models/mappers"; + diff --git a/packages/@azure/arm-datamigration/lib/models/usagesMappers.ts b/packages/@azure/arm-datamigration/lib/models/usagesMappers.ts new file mode 100644 index 000000000000..a7c86a608c0c --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/models/usagesMappers.ts @@ -0,0 +1,19 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + QuotaList, + Quota, + QuotaName, + ApiError, + ODataError +} from "../models/mappers"; + diff --git a/packages/@azure/arm-datamigration/lib/operations/index.ts b/packages/@azure/arm-datamigration/lib/operations/index.ts new file mode 100644 index 000000000000..24c14d019a16 --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/operations/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export * from "./resourceSkus"; +export * from "./services"; +export * from "./tasks"; +export * from "./projects"; +export * from "./usages"; +export * from "./operations"; diff --git a/packages/@azure/arm-datamigration/lib/operations/operations.ts b/packages/@azure/arm-datamigration/lib/operations/operations.ts new file mode 100644 index 000000000000..4ea11a119716 --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/operations/operations.ts @@ -0,0 +1,125 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { DataMigrationServiceClientContext } from "../dataMigrationServiceClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: DataMigrationServiceClientContext; + + /** + * Create a Operations. + * @param {DataMigrationServiceClientContext} client Reference to the service client. + */ + constructor(client: DataMigrationServiceClientContext) { + this.client = client; + } + + /** + * Lists all available actions exposed by the Database Migration Service resource provider. + * @summary Get available resource provider actions (operations) + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all available actions exposed by the Database Migration Service resource provider. + * @summary Get available resource provider actions (operations) + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.DataMigration/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServiceOperationList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServiceOperationList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/packages/@azure/arm-datamigration/lib/operations/projects.ts b/packages/@azure/arm-datamigration/lib/operations/projects.ts new file mode 100644 index 000000000000..f2c8dd87f14d --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/operations/projects.ts @@ -0,0 +1,421 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/projectsMappers"; +import * as Parameters from "../models/parameters"; +import { DataMigrationServiceClientContext } from "../dataMigrationServiceClientContext"; + +/** Class representing a Projects. */ +export class Projects { + private readonly client: DataMigrationServiceClientContext; + + /** + * Create a Projects. + * @param {DataMigrationServiceClientContext} client Reference to the service client. + */ + constructor(client: DataMigrationServiceClientContext) { + this.client = client; + } + + /** + * The project resource is a nested resource representing a stored migration project. This method + * returns a list of projects owned by a service resource. + * @summary Get projects in a service + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param [options] The optional parameters + * @returns Promise + */ + list(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param callback The callback + */ + list(groupName: string, serviceName: string, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param options The optional parameters + * @param callback The callback + */ + list(groupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + serviceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * The project resource is a nested resource representing a stored migration project. The PUT + * method creates a new project or updates an existing one. + * @summary Create or update project + * @param parameters Information about the project + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param parameters Information about the project + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param callback The callback + */ + createOrUpdate(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, callback: msRest.ServiceCallback): void; + /** + * @param parameters Information about the project + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + parameters, + groupName, + serviceName, + projectName, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * The project resource is a nested resource representing a stored migration project. The GET + * method retrieves information about a project. + * @summary Get project information + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param [options] The optional parameters + * @returns Promise + */ + get(groupName: string, serviceName: string, projectName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param callback The callback + */ + get(groupName: string, serviceName: string, projectName: string, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param options The optional parameters + * @param callback The callback + */ + get(groupName: string, serviceName: string, projectName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(groupName: string, serviceName: string, projectName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + serviceName, + projectName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * The project resource is a nested resource representing a stored migration project. The DELETE + * method deletes a project. + * @summary Delete project + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(groupName: string, serviceName: string, projectName: string, options?: Models.ProjectsDeleteMethodOptionalParams): Promise; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param callback The callback + */ + deleteMethod(groupName: string, serviceName: string, projectName: string, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(groupName: string, serviceName: string, projectName: string, options: Models.ProjectsDeleteMethodOptionalParams, callback: msRest.ServiceCallback): void; + deleteMethod(groupName: string, serviceName: string, projectName: string, options?: Models.ProjectsDeleteMethodOptionalParams, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + serviceName, + projectName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * The project resource is a nested resource representing a stored migration project. The PATCH + * method updates an existing project. + * @summary Update project + * @param parameters Information about the project + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param [options] The optional parameters + * @returns Promise + */ + update(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param parameters Information about the project + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param callback The callback + */ + update(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, callback: msRest.ServiceCallback): void; + /** + * @param parameters Information about the project + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param options The optional parameters + * @param callback The callback + */ + update(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(parameters: Models.Project, groupName: string, serviceName: string, projectName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + parameters, + groupName, + serviceName, + projectName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * The project resource is a nested resource representing a stored migration project. This method + * returns a list of projects owned by a service resource. + * @summary Get projects in a service + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProjectList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName, + Parameters.projectName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Project, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Project + }, + 201: { + bodyMapper: Mappers.Project + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName, + Parameters.projectName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Project + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName, + Parameters.projectName + ], + queryParameters: [ + Parameters.deleteRunningTasks, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName, + Parameters.projectName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Project, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Project + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProjectList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/packages/@azure/arm-datamigration/lib/operations/resourceSkus.ts b/packages/@azure/arm-datamigration/lib/operations/resourceSkus.ts new file mode 100644 index 000000000000..c9acfb62b336 --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/operations/resourceSkus.ts @@ -0,0 +1,128 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/resourceSkusMappers"; +import * as Parameters from "../models/parameters"; +import { DataMigrationServiceClientContext } from "../dataMigrationServiceClientContext"; + +/** Class representing a ResourceSkus. */ +export class ResourceSkus { + private readonly client: DataMigrationServiceClientContext; + + /** + * Create a ResourceSkus. + * @param {DataMigrationServiceClientContext} client Reference to the service client. + */ + constructor(client: DataMigrationServiceClientContext) { + this.client = client; + } + + /** + * The skus action returns the list of SKUs that DMS supports. + * @summary Get supported SKUs + * @param [options] The optional parameters + * @returns Promise + */ + listSkus(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listSkus(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listSkus(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSkus(options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listSkusOperationSpec, + callback) as Promise; + } + + /** + * The skus action returns the list of SKUs that DMS supports. + * @summary Get supported SKUs + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listSkusNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listSkusNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listSkusNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listSkusOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/skus", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ResourceSkusResult + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listSkusNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ResourceSkusResult + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/packages/@azure/arm-datamigration/lib/operations/services.ts b/packages/@azure/arm-datamigration/lib/operations/services.ts new file mode 100644 index 000000000000..3faa0ab51e8e --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/operations/services.ts @@ -0,0 +1,935 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/servicesMappers"; +import * as Parameters from "../models/parameters"; +import { DataMigrationServiceClientContext } from "../dataMigrationServiceClientContext"; + +/** Class representing a Services. */ +export class Services { + private readonly client: DataMigrationServiceClientContext; + + /** + * Create a Services. + * @param {DataMigrationServiceClientContext} client Reference to the service client. + */ + constructor(client: DataMigrationServiceClientContext) { + this.client = client; + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * The PUT method creates a new service or updates an existing one. When a service is updated, + * existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, + * "vm", which refers to a VM-based service, although other kinds may be added in the future. This + * method can change the kind, SKU, and network of the service, but if tasks are currently running + * (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider + * will reply when successful with 200 OK or 201 Created. Long-running operations use the + * provisioningState property. + * @summary Create or update DMS Instance + * @param parameters Information about the service + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(parameters: Models.DataMigrationService, groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(parameters,groupName,serviceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * The GET method retrieves information about a service instance. + * @summary Get DMS Service Instance + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param [options] The optional parameters + * @returns Promise + */ + get(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param callback The callback + */ + get(groupName: string, serviceName: string, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param options The optional parameters + * @param callback The callback + */ + get(groupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + serviceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * The DELETE method deletes a service. Any running tasks will be canceled. + * @summary Delete DMS Service Instance + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(groupName: string, serviceName: string, options?: Models.ServicesDeleteMethodOptionalParams): Promise { + return this.beginDeleteMethod(groupName,serviceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * The PATCH method updates an existing service. This method can change the kind, SKU, and network + * of the service, but if tasks are currently running (i.e. the service is busy), this will fail + * with 400 Bad Request ("ServiceIsBusy"). + * @summary Create or update DMS Service Instance + * @param parameters Information about the service + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param [options] The optional parameters + * @returns Promise + */ + update(parameters: Models.DataMigrationService, groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(parameters,groupName,serviceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * This action performs a health check and returns the status of the service and virtual machine + * size. + * @summary Check service health status + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param [options] The optional parameters + * @returns Promise + */ + checkStatus(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param callback The callback + */ + checkStatus(groupName: string, serviceName: string, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param options The optional parameters + * @param callback The callback + */ + checkStatus(groupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkStatus(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + serviceName, + options + }, + checkStatusOperationSpec, + callback) as Promise; + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * This action starts the service and the service can be used for data migration. + * @summary Start service + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param [options] The optional parameters + * @returns Promise + */ + start(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStart(groupName,serviceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * This action stops the service and the service cannot be used for data migration. The service + * owner won't be billed when the service is stopped. + * @summary Stop service + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param [options] The optional parameters + * @returns Promise + */ + stop(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStop(groupName,serviceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * The skus action returns the list of SKUs that a service resource can be updated to. + * @summary Get compatible SKUs + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param [options] The optional parameters + * @returns Promise + */ + listSkus(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param callback The callback + */ + listSkus(groupName: string, serviceName: string, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param options The optional parameters + * @param callback The callback + */ + listSkus(groupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSkus(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + serviceName, + options + }, + listSkusOperationSpec, + callback) as Promise; + } + + /** + * This method checks whether a proposed nested resource name is valid and available. + * @summary Check nested resource name validity and availability + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @param [options] The optional parameters + * @returns Promise + */ + checkChildrenNameAvailability(groupName: string, serviceName: string, parameters: Models.NameAvailabilityRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @param callback The callback + */ + checkChildrenNameAvailability(groupName: string, serviceName: string, parameters: Models.NameAvailabilityRequest, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @param options The optional parameters + * @param callback The callback + */ + checkChildrenNameAvailability(groupName: string, serviceName: string, parameters: Models.NameAvailabilityRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkChildrenNameAvailability(groupName: string, serviceName: string, parameters: Models.NameAvailabilityRequest, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + serviceName, + parameters, + options + }, + checkChildrenNameAvailabilityOperationSpec, + callback) as Promise; + } + + /** + * The Services resource is the top-level resource that represents the Database Migration Service. + * This method returns a list of service resources in a resource group. + * @summary Get services in resource group + * @param groupName Name of the resource group + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(groupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupName Name of the resource group + * @param callback The callback + */ + listByResourceGroup(groupName: string, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of the resource group + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(groupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(groupName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * This method returns a list of service resources in a subscription. + * @summary Get services in subscription + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * This method checks whether a proposed top-level resource name is valid and available. + * @summary Check name validity and availability + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @param [options] The optional parameters + * @returns Promise + */ + checkNameAvailability(location: string, parameters: Models.NameAvailabilityRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @param callback The callback + */ + checkNameAvailability(location: string, parameters: Models.NameAvailabilityRequest, callback: msRest.ServiceCallback): void; + /** + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @param options The optional parameters + * @param callback The callback + */ + checkNameAvailability(location: string, parameters: Models.NameAvailabilityRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkNameAvailability(location: string, parameters: Models.NameAvailabilityRequest, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + parameters, + options + }, + checkNameAvailabilityOperationSpec, + callback) as Promise; + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * The PUT method creates a new service or updates an existing one. When a service is updated, + * existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, + * "vm", which refers to a VM-based service, although other kinds may be added in the future. This + * method can change the kind, SKU, and network of the service, but if tasks are currently running + * (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider + * will reply when successful with 200 OK or 201 Created. Long-running operations use the + * provisioningState property. + * @summary Create or update DMS Instance + * @param parameters Information about the service + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(parameters: Models.DataMigrationService, groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + parameters, + groupName, + serviceName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * The DELETE method deletes a service. Any running tasks will be canceled. + * @summary Delete DMS Service Instance + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(groupName: string, serviceName: string, options?: Models.ServicesBeginDeleteMethodOptionalParams): Promise { + return this.client.sendLRORequest( + { + groupName, + serviceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * The PATCH method updates an existing service. This method can change the kind, SKU, and network + * of the service, but if tasks are currently running (i.e. the service is busy), this will fail + * with 400 Bad Request ("ServiceIsBusy"). + * @summary Create or update DMS Service Instance + * @param parameters Information about the service + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(parameters: Models.DataMigrationService, groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + parameters, + groupName, + serviceName, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * This action starts the service and the service can be used for data migration. + * @summary Start service + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param [options] The optional parameters + * @returns Promise + */ + beginStart(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + groupName, + serviceName, + options + }, + beginStartOperationSpec, + options); + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * This action stops the service and the service cannot be used for data migration. The service + * owner won't be billed when the service is stopped. + * @summary Stop service + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param [options] The optional parameters + * @returns Promise + */ + beginStop(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + groupName, + serviceName, + options + }, + beginStopOperationSpec, + options); + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * The skus action returns the list of SKUs that a service resource can be updated to. + * @summary Get compatible SKUs + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listSkusNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listSkusNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listSkusNextOperationSpec, + callback) as Promise; + } + + /** + * The Services resource is the top-level resource that represents the Database Migration Service. + * This method returns a list of service resources in a resource group. + * @summary Get services in resource group + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * This method returns a list of service resources in a subscription. + * @summary Get services in subscription + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataMigrationService + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const checkStatusOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkStatus", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataMigrationServiceStatusResponse + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listSkusOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/skus", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServiceSkuList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const checkChildrenNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkNameAvailability", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.NameAvailabilityRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.NameAvailabilityResponse + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataMigrationServiceList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/services", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataMigrationServiceList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/checkNameAvailability", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.NameAvailabilityRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.NameAvailabilityResponse + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DataMigrationService, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataMigrationService + }, + 201: { + bodyMapper: Mappers.DataMigrationService + }, + 202: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.deleteRunningTasks, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DataMigrationService, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataMigrationService + }, + 202: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginStartOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginStopOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listSkusNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServiceSkuList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataMigrationServiceList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataMigrationServiceList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/packages/@azure/arm-datamigration/lib/operations/tasks.ts b/packages/@azure/arm-datamigration/lib/operations/tasks.ts new file mode 100644 index 000000000000..5ae49940480b --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/operations/tasks.ts @@ -0,0 +1,601 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/tasksMappers"; +import * as Parameters from "../models/parameters"; +import { DataMigrationServiceClientContext } from "../dataMigrationServiceClientContext"; + +/** Class representing a Tasks. */ +export class Tasks { + private readonly client: DataMigrationServiceClientContext; + + /** + * Create a Tasks. + * @param {DataMigrationServiceClientContext} client Reference to the service client. + */ + constructor(client: DataMigrationServiceClientContext) { + this.client = client; + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * This method returns a list of tasks owned by a service resource. Some tasks may have a status of + * Unknown, which indicates that an error occurred while querying the status of that task. + * @summary Get tasks in a service + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param [options] The optional parameters + * @returns Promise + */ + list(groupName: string, serviceName: string, projectName: string, options?: Models.TasksListOptionalParams): Promise; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param callback The callback + */ + list(groupName: string, serviceName: string, projectName: string, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param options The optional parameters + * @param callback The callback + */ + list(groupName: string, serviceName: string, projectName: string, options: Models.TasksListOptionalParams, callback: msRest.ServiceCallback): void; + list(groupName: string, serviceName: string, projectName: string, options?: Models.TasksListOptionalParams, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + serviceName, + projectName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS + * instance. The PUT method creates a new task or updates an existing one, although since tasks + * have no mutable custom properties, there is little reason to update an exising one. + * @summary Create or update task + * @param parameters Information about the task + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param parameters Information about the task + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param callback The callback + */ + createOrUpdate(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, callback: msRest.ServiceCallback): void; + /** + * @param parameters Information about the task + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + parameters, + groupName, + serviceName, + projectName, + taskName, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS + * instance. The GET method retrieves information about a task. + * @summary Get task information + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param [options] The optional parameters + * @returns Promise + */ + get(groupName: string, serviceName: string, projectName: string, taskName: string, options?: Models.TasksGetOptionalParams): Promise; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param callback The callback + */ + get(groupName: string, serviceName: string, projectName: string, taskName: string, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param options The optional parameters + * @param callback The callback + */ + get(groupName: string, serviceName: string, projectName: string, taskName: string, options: Models.TasksGetOptionalParams, callback: msRest.ServiceCallback): void; + get(groupName: string, serviceName: string, projectName: string, taskName: string, options?: Models.TasksGetOptionalParams, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + serviceName, + projectName, + taskName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS + * instance. The DELETE method deletes a task, canceling it first if it's running. + * @summary Delete task + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(groupName: string, serviceName: string, projectName: string, taskName: string, options?: Models.TasksDeleteMethodOptionalParams): Promise; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param callback The callback + */ + deleteMethod(groupName: string, serviceName: string, projectName: string, taskName: string, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(groupName: string, serviceName: string, projectName: string, taskName: string, options: Models.TasksDeleteMethodOptionalParams, callback: msRest.ServiceCallback): void; + deleteMethod(groupName: string, serviceName: string, projectName: string, taskName: string, options?: Models.TasksDeleteMethodOptionalParams, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + serviceName, + projectName, + taskName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS + * instance. The PATCH method updates an existing task, but since tasks have no mutable custom + * properties, there is little reason to do so. + * @summary Create or update task + * @param parameters Information about the task + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param [options] The optional parameters + * @returns Promise + */ + update(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param parameters Information about the task + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param callback The callback + */ + update(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, callback: msRest.ServiceCallback): void; + /** + * @param parameters Information about the task + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param options The optional parameters + * @param callback The callback + */ + update(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(parameters: Models.ProjectTask, groupName: string, serviceName: string, projectName: string, taskName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + parameters, + groupName, + serviceName, + projectName, + taskName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS + * instance. This method cancels a task if it's currently queued or running. + * @summary Cancel a task + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param [options] The optional parameters + * @returns Promise + */ + cancel(groupName: string, serviceName: string, projectName: string, taskName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param callback The callback + */ + cancel(groupName: string, serviceName: string, projectName: string, taskName: string, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param options The optional parameters + * @param callback The callback + */ + cancel(groupName: string, serviceName: string, projectName: string, taskName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + cancel(groupName: string, serviceName: string, projectName: string, taskName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + serviceName, + projectName, + taskName, + options + }, + cancelOperationSpec, + callback) as Promise; + } + + /** + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS + * instance. This method executes a command on a running task. + * @summary Execute a command on a task + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters Command to execute + * @param [options] The optional parameters + * @returns Promise + */ + command(groupName: string, serviceName: string, projectName: string, taskName: string, parameters: Models.CommandPropertiesUnion, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters Command to execute + * @param callback The callback + */ + command(groupName: string, serviceName: string, projectName: string, taskName: string, parameters: Models.CommandPropertiesUnion, callback: msRest.ServiceCallback): void; + /** + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters Command to execute + * @param options The optional parameters + * @param callback The callback + */ + command(groupName: string, serviceName: string, projectName: string, taskName: string, parameters: Models.CommandPropertiesUnion, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + command(groupName: string, serviceName: string, projectName: string, taskName: string, parameters: Models.CommandPropertiesUnion, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupName, + serviceName, + projectName, + taskName, + parameters, + options + }, + commandOperationSpec, + callback) as Promise; + } + + /** + * The services resource is the top-level resource that represents the Database Migration Service. + * This method returns a list of tasks owned by a service resource. Some tasks may have a status of + * Unknown, which indicates that an error occurred while querying the status of that task. + * @summary Get tasks in a service + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName, + Parameters.projectName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.taskType + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TaskList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName, + Parameters.projectName, + Parameters.taskName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ProjectTask, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ProjectTask + }, + 201: { + bodyMapper: Mappers.ProjectTask + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName, + Parameters.projectName, + Parameters.taskName + ], + queryParameters: [ + Parameters.expand, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProjectTask + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName, + Parameters.projectName, + Parameters.taskName + ], + queryParameters: [ + Parameters.deleteRunningTasks, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName, + Parameters.projectName, + Parameters.taskName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ProjectTask, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ProjectTask + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const cancelOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/cancel", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName, + Parameters.projectName, + Parameters.taskName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProjectTask + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const commandOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/command", + urlParameters: [ + Parameters.subscriptionId, + Parameters.groupName, + Parameters.serviceName, + Parameters.projectName, + Parameters.taskName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CommandProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CommandProperties + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TaskList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/packages/@azure/arm-datamigration/lib/operations/usages.ts b/packages/@azure/arm-datamigration/lib/operations/usages.ts new file mode 100644 index 000000000000..e7c873c543f4 --- /dev/null +++ b/packages/@azure/arm-datamigration/lib/operations/usages.ts @@ -0,0 +1,135 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/usagesMappers"; +import * as Parameters from "../models/parameters"; +import { DataMigrationServiceClientContext } from "../dataMigrationServiceClientContext"; + +/** Class representing a Usages. */ +export class Usages { + private readonly client: DataMigrationServiceClientContext; + + /** + * Create a Usages. + * @param {DataMigrationServiceClientContext} client Reference to the service client. + */ + constructor(client: DataMigrationServiceClientContext) { + this.client = client; + } + + /** + * This method returns region-specific quotas and resource usage information for the Database + * Migration Service. + * @summary Get resource quotas and usage information + * @param location The Azure region of the operation + * @param [options] The optional parameters + * @returns Promise + */ + list(location: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location The Azure region of the operation + * @param callback The callback + */ + list(location: string, callback: msRest.ServiceCallback): void; + /** + * @param location The Azure region of the operation + * @param options The optional parameters + * @param callback The callback + */ + list(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(location: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * This method returns region-specific quotas and resource usage information for the Database + * Migration Service. + * @summary Get resource quotas and usage information + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/usages", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.QuotaList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.QuotaList + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/packages/@azure/arm-datamigration/package.json b/packages/@azure/arm-datamigration/package.json new file mode 100644 index 000000000000..6ca9b228c213 --- /dev/null +++ b/packages/@azure/arm-datamigration/package.json @@ -0,0 +1,42 @@ +{ + "name": "@azure/arm-datamigration", + "author": "Microsoft Corporation", + "description": "DataMigrationServiceClient Library with typescript type definitions for node.js and browser.", + "version": "1.0.0-preview", + "dependencies": { + "ms-rest-azure-js": "^1.0.166", + "ms-rest-js": "^1.0.439", + "tslib": "^1.9.3" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/arm-datamigration.js", + "module": "./esm/dataMigrationServiceClient.js", + "types": "./esm/dataMigrationServiceClient.d.ts", + "devDependencies": { + "typescript": "^3.1.1", + "rollup": "^0.66.2", + "rollup-plugin-node-resolve": "^3.4.0", + "uglify-js": "^3.4.9" + }, + "homepage": "https://github.com/azure/azure-sdk-for-js", + "repository": { + "type": "git", + "url": "https://github.com/azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/azure/azure-sdk-for-js/issues" + }, + "scripts": { + "build": "tsc && rollup -c rollup.config.js && npm run minify", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-datamigration.js.map'\" -o ./dist/arm-datamigration.min.js ./dist/arm-datamigration.js", + "prepare": "npm run build" + }, + "sideEffects": false +} diff --git a/packages/@azure/arm-datamigration/rollup.config.js b/packages/@azure/arm-datamigration/rollup.config.js new file mode 100644 index 000000000000..19b928fe7c40 --- /dev/null +++ b/packages/@azure/arm-datamigration/rollup.config.js @@ -0,0 +1,31 @@ +import nodeResolve from "rollup-plugin-node-resolve"; +/** + * @type {import('rollup').RollupFileOptions} + */ +const config = { + input: './esm/dataMigrationServiceClient.js', + external: ["ms-rest-js", "ms-rest-azure-js"], + output: { + file: "./dist/arm-datamigration.js", + format: "umd", + name: "Azure.ArmDatamigration", + sourcemap: true, + globals: { + "ms-rest-js": "msRest", + "ms-rest-azure-js": "msRestAzure" + }, + banner: `/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */` + }, + plugins: [ + nodeResolve({ module: true }) + ] +}; +export default config; diff --git a/packages/@azure/arm-datamigration/tsconfig.json b/packages/@azure/arm-datamigration/tsconfig.json new file mode 100644 index 000000000000..f32d1664f320 --- /dev/null +++ b/packages/@azure/arm-datamigration/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es5", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6"], + "declaration": true, + "outDir": "./esm", + "importHelpers": true + }, + "include": ["./lib/**/*"], + "exclude": ["node_modules"] +}