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 sdk/datamigration/mgmt-v2017_11_15_preview] Add PGSQL to AzurePGSQL swagger changes #668

Closed
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
4 changes: 3 additions & 1 deletion sdk/datamigration/mgmt-v2017_11_15_preview/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.2.0</version>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-datamigration</artifactId>
Expand Down Expand Up @@ -71,6 +71,8 @@
<artifactId>azure-arm-client-runtime</artifactId>
<type>test-jar</type>
<scope>test</scope>
<!--Below version for test jar needs to be removed, this will be done as part of v1-runtime 1.6.7-->
<version>1.6.5</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Output for the task that validates connection to SQL Server and also
* validates source server requirements.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = ConnectToSourceSqlServerTaskOutput.class)
@JsonTypeName("ConnectToSourceSqlServerTaskOutput")
@JsonSubTypes({
@JsonSubTypes.Type(name = "DatabaseLevelOutput", value = ConnectToSourceSqlServerTaskOutputDatabaseLevel.class),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Database level output for the task that validates connection to SQL Server
* and also validates source server requirements.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = ConnectToSourceSqlServerTaskOutputDatabaseLevel.class)
@JsonTypeName("DatabaseLevelOutput")
public class ConnectToSourceSqlServerTaskOutputDatabaseLevel extends ConnectToSourceSqlServerTaskOutput {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Task level output for the task that validates connection to SQL Server and
* also validates source server requirements.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = ConnectToSourceSqlServerTaskOutputTaskLevel.class)
@JsonTypeName("TaskLevelOutput")
public class ConnectToSourceSqlServerTaskOutputTaskLevel extends ConnectToSourceSqlServerTaskOutput {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Properties for the task that validates connection to SQL Server and also
* validates source server requirements.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToSourceSqlServerTaskProperties.class)
@JsonTypeName("ConnectToSource.SqlServer")
public class ConnectToSourceSqlServerTaskProperties extends ProjectTaskProperties {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Properties for the task that validates connection to SQL DB and target
* server requirements.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetSqlDbTaskProperties.class)
@JsonTypeName("ConnectToTarget.SqlDb")
public class ConnectToTargetSqlDbTaskProperties extends ProjectTaskProperties {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@
/**
* Defines the connection properties of a server.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("Unknown")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = ConnectionInfo.class)
@JsonTypeName("ConnectionInfo")
@JsonSubTypes({
@JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class),
@JsonSubTypes.Type(name = "Migrate.SqlServer.SqlDb", value = MigrateSqlServerSqlDbTaskProperties.class),
@JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class),
@JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.class),
@JsonSubTypes.Type(name = "ConnectToSource.SqlServer", value = ConnectToSourceSqlServerTaskProperties.class)
@JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class)
})
public class ConnectionInfo {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Properties for the task that collects user tables for the given list of
* databases.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = GetUserTablesSqlTaskProperties.class)
@JsonTypeName("GetUserTables.Sql")
public class GetUserTablesSqlTaskProperties extends ProjectTaskProperties {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Output for the task that migrates on-prem SQL Server databases to Azure SQL
* Database.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutput.class)
@JsonTypeName("MigrateSqlServerSqlDbTaskOutput")
@JsonSubTypes({
@JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlDbTaskOutputError.class),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* Database level result for Sql Server to Azure Sql DB migration.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutputDatabaseLevel.class)
@JsonTypeName("DatabaseLevelOutput")
public class MigrateSqlServerSqlDbTaskOutputDatabaseLevel extends MigrateSqlServerSqlDbTaskOutput {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* Task errors for Sql Server to Azure Sql DB migration.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutputError.class)
@JsonTypeName("ErrorOutput")
public class MigrateSqlServerSqlDbTaskOutputError extends MigrateSqlServerSqlDbTaskOutput {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* Migration level result for Sql server to Azure Sql DB migration.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutputMigrationLevel.class)
@JsonTypeName("MigrationLevelOutput")
public class MigrateSqlServerSqlDbTaskOutputMigrationLevel extends MigrateSqlServerSqlDbTaskOutput {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Table level result for Sql Server to Azure Sql DB migration.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutputTableLevel.class)
@JsonTypeName("TableLevelOutput")
public class MigrateSqlServerSqlDbTaskOutputTableLevel extends MigrateSqlServerSqlDbTaskOutput {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Properties for the task that migrates on-prem SQL Server databases to Azure
* SQL Database.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateSqlServerSqlDbTaskProperties.class)
@JsonTypeName("Migrate.SqlServer.SqlDb")
public class MigrateSqlServerSqlDbTaskProperties extends ProjectTaskProperties {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
* Base class for all types of DMS task properties. If task is not supported by
* current client, this object is returned.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType")
@JsonTypeName("Unknown")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ProjectTaskProperties.class)
@JsonTypeName("ProjectTaskProperties")
@JsonSubTypes({
@JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class),
@JsonSubTypes.Type(name = "Migrate.SqlServer.SqlDb", value = MigrateSqlServerSqlDbTaskProperties.class),
@JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class),
@JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.class),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* Information for connecting to SQL database server.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = SqlConnectionInfo.class)
@JsonTypeName("SqlConnectionInfo")
public class SqlConnectionInfo extends ConnectionInfo {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,14 @@ public Project call(ProjectInner inner) {
public Observable<Project> getAsync(String groupName, String serviceName, String projectName) {
ProjectsInner client = this.inner();
return client.getAsync(groupName, serviceName, projectName)
.map(new Func1<ProjectInner, Project>() {
.flatMap(new Func1<ProjectInner, Observable<Project>>() {
@Override
public Project call(ProjectInner inner) {
return wrapModel(inner);
public Observable<Project> call(ProjectInner inner) {
if (inner == null) {
return Observable.empty();
} else {
return Observable.just((Project)wrapModel(inner));
}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,14 @@ public ProjectTask call(ProjectTaskInner inner) {
public Observable<ProjectTask> getAsync(String groupName, String serviceName, String projectName, String taskName) {
TasksInner client = this.inner();
return client.getAsync(groupName, serviceName, projectName, taskName)
.map(new Func1<ProjectTaskInner, ProjectTask>() {
.flatMap(new Func1<ProjectTaskInner, Observable<ProjectTask>>() {
@Override
public ProjectTask call(ProjectTaskInner inner) {
return wrapModel(inner);
public Observable<ProjectTask> call(ProjectTaskInner inner) {
if (inner == null) {
return Observable.empty();
} else {
return Observable.just((ProjectTask)wrapModel(inner));
}
}
});
}
Expand Down