Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR datamigration/resource-manager] Explicitly add MongoDbTasks.json to 2018-07-15 #358

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/@azure/arm-datamigration/lib/models/filesMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ export {
MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel,
MigrateSchemaSqlServerSqlDbTaskOutputError,
MigrateSchemaSqlTaskOutputError,
MongoDbCancelCommand,
MongoDbCommandInput,
MongoDbFinishCommandInput,
MongoDbFinishCommand,
MongoDbRestartCommand,
MigrateSyncCompleteCommandProperties,
MigrateSyncCompleteCommandInput,
MigrateSyncCompleteCommandOutput,
Expand Down
128 changes: 127 additions & 1 deletion packages/@azure/arm-datamigration/lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export interface MigrateSyncCompleteCommandInput {
/**
* Contains the possible cases for CommandProperties.
*/
export type CommandPropertiesUnion = CommandProperties | MigrateSyncCompleteCommandProperties;
export type CommandPropertiesUnion = CommandProperties | MigrateSyncCompleteCommandProperties | MongoDbCancelCommand | MongoDbFinishCommand | MongoDbRestartCommand;

/**
* @interface
Expand Down Expand Up @@ -6521,6 +6521,132 @@ export interface MigrateSchemaSqlTaskOutputError {
readonly error?: ReportableException;
}

/**
* @interface
* An interface representing MongoDbCommandInput.
* Describes the input to the 'cancel' and 'restart' MongoDB migration commands
*
*/
export interface MongoDbCommandInput {
/**
* @member {string} [objectName] The qualified name of a database or
* collection to act upon, or null to act upon the entire migration
*/
objectName?: string;
}

/**
* @interface
* An interface representing MongoDbCancelCommand.
* Properties for the command that cancels a migration in whole or in part
*
*/
export interface MongoDbCancelCommand {
/**
* @member {string} commandType Polymorphic Discriminator
*/
commandType: "cancel";
/**
* @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 {MongoDbCommandInput} [input] Command input
*/
input?: MongoDbCommandInput;
}

/**
* @interface
* An interface representing MongoDbFinishCommandInput.
* Describes the input to the 'finish' MongoDB migration command
*
* @extends MongoDbCommandInput
*/
export interface MongoDbFinishCommandInput extends MongoDbCommandInput {
/**
* @member {boolean} immediate If true, replication for the affected objects
* will be stopped immediately. If false, the migrator will finish replaying
* queued events before finishing the replication.
*/
immediate: boolean;
}

/**
* @interface
* An interface representing MongoDbFinishCommand.
* Properties for the command that finishes a migration in whole or in part
*
*/
export interface MongoDbFinishCommand {
/**
* @member {string} commandType Polymorphic Discriminator
*/
commandType: "finish";
/**
* @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 {MongoDbFinishCommandInput} [input] Command input
*/
input?: MongoDbFinishCommandInput;
}

/**
* @interface
* An interface representing MongoDbRestartCommand.
* Properties for the command that restarts a migration in whole or in part
*
*/
export interface MongoDbRestartCommand {
/**
* @member {string} commandType Polymorphic Discriminator
*/
commandType: "restart";
/**
* @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 {MongoDbCommandInput} [input] Command input
*/
input?: MongoDbCommandInput;
}

/**
* @interface
* An interface representing Database.
Expand Down
99 changes: 98 additions & 1 deletion packages/@azure/arm-datamigration/lib/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7539,6 +7539,100 @@ export const MigrateSchemaSqlTaskOutputError: msRest.CompositeMapper = {
}
};

export const MongoDbCommandInput: msRest.CompositeMapper = {
serializedName: "MongoDbCommandInput",
type: {
name: "Composite",
className: "MongoDbCommandInput",
modelProperties: {
objectName: {
serializedName: "objectName",
type: {
name: "String"
}
}
}
}
};

export const MongoDbCancelCommand: msRest.CompositeMapper = {
serializedName: "cancel",
type: {
name: "Composite",
polymorphicDiscriminator: CommandProperties.type.polymorphicDiscriminator,
uberParent: "CommandProperties",
className: "MongoDbCancelCommand",
modelProperties: {
...CommandProperties.type.modelProperties,
input: {
serializedName: "input",
type: {
name: "Composite",
className: "MongoDbCommandInput"
}
}
}
}
};

export const MongoDbFinishCommandInput: msRest.CompositeMapper = {
serializedName: "MongoDbFinishCommandInput",
type: {
name: "Composite",
className: "MongoDbFinishCommandInput",
modelProperties: {
...MongoDbCommandInput.type.modelProperties,
immediate: {
required: true,
serializedName: "immediate",
type: {
name: "Boolean"
}
}
}
}
};

export const MongoDbFinishCommand: msRest.CompositeMapper = {
serializedName: "finish",
type: {
name: "Composite",
polymorphicDiscriminator: CommandProperties.type.polymorphicDiscriminator,
uberParent: "CommandProperties",
className: "MongoDbFinishCommand",
modelProperties: {
...CommandProperties.type.modelProperties,
input: {
serializedName: "input",
type: {
name: "Composite",
className: "MongoDbFinishCommandInput"
}
}
}
}
};

export const MongoDbRestartCommand: msRest.CompositeMapper = {
serializedName: "restart",
type: {
name: "Composite",
polymorphicDiscriminator: CommandProperties.type.polymorphicDiscriminator,
uberParent: "CommandProperties",
className: "MongoDbRestartCommand",
modelProperties: {
...CommandProperties.type.modelProperties,
input: {
serializedName: "input",
type: {
name: "Composite",
className: "MongoDbCommandInput"
}
}
}
}
};

export const Database: msRest.CompositeMapper = {
serializedName: "Database",
type: {
Expand Down Expand Up @@ -8411,5 +8505,8 @@ export const discriminators = {
'MigrateSchemaSqlServerSqlDbTaskOutput.MigrationLevelOutput' : MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel,
'MigrateSchemaSqlServerSqlDbTaskOutput.DatabaseLevelOutput' : MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel,
'MigrateSchemaSqlServerSqlDbTaskOutput.SchemaErrorOutput' : MigrateSchemaSqlServerSqlDbTaskOutputError,
'MigrateSchemaSqlServerSqlDbTaskOutput.ErrorOutput' : MigrateSchemaSqlTaskOutputError
'MigrateSchemaSqlServerSqlDbTaskOutput.ErrorOutput' : MigrateSchemaSqlTaskOutputError,
'CommandProperties.cancel' : MongoDbCancelCommand,
'CommandProperties.finish' : MongoDbFinishCommand,
'CommandProperties.restart' : MongoDbRestartCommand
};
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ export {
MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel,
MigrateSchemaSqlServerSqlDbTaskOutputError,
MigrateSchemaSqlTaskOutputError,
MongoDbCancelCommand,
MongoDbCommandInput,
MongoDbFinishCommandInput,
MongoDbFinishCommand,
MongoDbRestartCommand,
MigrateSyncCompleteCommandProperties,
MigrateSyncCompleteCommandInput,
MigrateSyncCompleteCommandOutput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ export {
MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel,
MigrateSchemaSqlServerSqlDbTaskOutputError,
MigrateSchemaSqlTaskOutputError,
MongoDbCancelCommand,
MongoDbCommandInput,
MongoDbFinishCommandInput,
MongoDbFinishCommand,
MongoDbRestartCommand,
MigrateSyncCompleteCommandProperties,
MigrateSyncCompleteCommandInput,
MigrateSyncCompleteCommandOutput,
Expand Down
5 changes: 5 additions & 0 deletions packages/@azure/arm-datamigration/lib/models/tasksMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ export {
MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel,
MigrateSchemaSqlServerSqlDbTaskOutputError,
MigrateSchemaSqlTaskOutputError,
MongoDbCancelCommand,
MongoDbCommandInput,
MongoDbFinishCommandInput,
MongoDbFinishCommand,
MongoDbRestartCommand,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError,
SyncMigrationDatabaseErrorEvent,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError,
Expand Down