Skip to content

Commit

Permalink
[AutoPR] datamigration/resource-manager (#387)
Browse files Browse the repository at this point in the history
* Generated from 15db3a1eb5955b63b419027978ceb13d1b8a421d (#198)

Add missing files upload option for Schema migration scenario.
Add support for MongoDb migration acenario.

* Regenerated "@azure/arm-datamigration" SDK.

* Reset version to 1.0.0

* Regenerated "@azure/arm-datamigration" SDK.

* Generated from 66f3328f6752c8b8f2ec6f2d35eed1f93625a655 (#342)

Update MongoDbTasks.json

* Regenerated "@azure/arm-datamigration" SDK.

* Generated from c2b76af4ead5dd8be9ffdc07366e9701b1317f0b (#358)

Update readme.md

* Remove .npmignores
  • Loading branch information
AutorestCI authored and kpajdzik committed Nov 2, 2018
1 parent 2086e65 commit 44f5a22
Show file tree
Hide file tree
Showing 8 changed files with 252 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ export class DataMigrationServiceClientContext extends msRestAzure.AzureServiceC
if (!options) {
options = {};
}
if(!options.userAgent) {
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}

super(credentials, options);

this.acceptLanguage = 'en-US';
Expand All @@ -45,7 +50,6 @@ export class DataMigrationServiceClientContext extends msRestAzure.AzureServiceC
this.credentials = credentials;
this.subscriptionId = subscriptionId;

this.addUserAgentInfo(`${packageName}/${packageVersion}`);
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
Expand Down
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
4 changes: 2 additions & 2 deletions packages/@azure/arm-datamigration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "DataMigrationServiceClient Library with typescript type definitions for node.js and browser.",
"version": "1.0.0-preview",
"dependencies": {
"ms-rest-azure-js": "^1.0.176",
"ms-rest-js": "^1.0.455",
"ms-rest-azure-js": "^1.0.181",
"ms-rest-js": "^1.0.457",
"tslib": "^1.9.3"
},
"keywords": [
Expand Down

0 comments on commit 44f5a22

Please sign in to comment.