com.aliyun.sdk.service.dts20200101.models.ConfigureMigrationJobRequest Maven / Gradle / Ivy
Show all versions of alibabacloud-dts20200101 Show documentation
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.dts20200101.models;
import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;
/**
* {@link ConfigureMigrationJobRequest} extends {@link RequestModel}
*
* ConfigureMigrationJobRequest
*/
public class ConfigureMigrationJobRequest extends Request {
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DestinationEndpoint")
private DestinationEndpoint destinationEndpoint;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("MigrationMode")
private MigrationMode migrationMode;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("SourceEndpoint")
private SourceEndpoint sourceEndpoint;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("AccountId")
private String accountId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("Checkpoint")
private String checkpoint;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("MigrationJobId")
@com.aliyun.core.annotation.Validation(required = true)
private String migrationJobId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("MigrationJobName")
@com.aliyun.core.annotation.Validation(required = true)
private String migrationJobName;
@com.aliyun.core.annotation.Body
@com.aliyun.core.annotation.NameInMap("MigrationObject")
@com.aliyun.core.annotation.Validation(required = true)
private String migrationObject;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("MigrationReserved")
private String migrationReserved;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("OwnerId")
private String ownerId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("RegionId")
private String regionId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ResourceGroupId")
private String resourceGroupId;
private ConfigureMigrationJobRequest(Builder builder) {
super(builder);
this.destinationEndpoint = builder.destinationEndpoint;
this.migrationMode = builder.migrationMode;
this.sourceEndpoint = builder.sourceEndpoint;
this.accountId = builder.accountId;
this.checkpoint = builder.checkpoint;
this.migrationJobId = builder.migrationJobId;
this.migrationJobName = builder.migrationJobName;
this.migrationObject = builder.migrationObject;
this.migrationReserved = builder.migrationReserved;
this.ownerId = builder.ownerId;
this.regionId = builder.regionId;
this.resourceGroupId = builder.resourceGroupId;
}
public static Builder builder() {
return new Builder();
}
public static ConfigureMigrationJobRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return destinationEndpoint
*/
public DestinationEndpoint getDestinationEndpoint() {
return this.destinationEndpoint;
}
/**
* @return migrationMode
*/
public MigrationMode getMigrationMode() {
return this.migrationMode;
}
/**
* @return sourceEndpoint
*/
public SourceEndpoint getSourceEndpoint() {
return this.sourceEndpoint;
}
/**
* @return accountId
*/
public String getAccountId() {
return this.accountId;
}
/**
* @return checkpoint
*/
public String getCheckpoint() {
return this.checkpoint;
}
/**
* @return migrationJobId
*/
public String getMigrationJobId() {
return this.migrationJobId;
}
/**
* @return migrationJobName
*/
public String getMigrationJobName() {
return this.migrationJobName;
}
/**
* @return migrationObject
*/
public String getMigrationObject() {
return this.migrationObject;
}
/**
* @return migrationReserved
*/
public String getMigrationReserved() {
return this.migrationReserved;
}
/**
* @return ownerId
*/
public String getOwnerId() {
return this.ownerId;
}
/**
* @return regionId
*/
public String getRegionId() {
return this.regionId;
}
/**
* @return resourceGroupId
*/
public String getResourceGroupId() {
return this.resourceGroupId;
}
public static final class Builder extends Request.Builder {
private DestinationEndpoint destinationEndpoint;
private MigrationMode migrationMode;
private SourceEndpoint sourceEndpoint;
private String accountId;
private String checkpoint;
private String migrationJobId;
private String migrationJobName;
private String migrationObject;
private String migrationReserved;
private String ownerId;
private String regionId;
private String resourceGroupId;
private Builder() {
super();
}
private Builder(ConfigureMigrationJobRequest request) {
super(request);
this.destinationEndpoint = request.destinationEndpoint;
this.migrationMode = request.migrationMode;
this.sourceEndpoint = request.sourceEndpoint;
this.accountId = request.accountId;
this.checkpoint = request.checkpoint;
this.migrationJobId = request.migrationJobId;
this.migrationJobName = request.migrationJobName;
this.migrationObject = request.migrationObject;
this.migrationReserved = request.migrationReserved;
this.ownerId = request.ownerId;
this.regionId = request.regionId;
this.resourceGroupId = request.resourceGroupId;
}
/**
* DestinationEndpoint.
*/
public Builder destinationEndpoint(DestinationEndpoint destinationEndpoint) {
this.putQueryParameter("DestinationEndpoint", destinationEndpoint);
this.destinationEndpoint = destinationEndpoint;
return this;
}
/**
* MigrationMode.
*/
public Builder migrationMode(MigrationMode migrationMode) {
this.putQueryParameter("MigrationMode", migrationMode);
this.migrationMode = migrationMode;
return this;
}
/**
* SourceEndpoint.
*/
public Builder sourceEndpoint(SourceEndpoint sourceEndpoint) {
this.putQueryParameter("SourceEndpoint", sourceEndpoint);
this.sourceEndpoint = sourceEndpoint;
return this;
}
/**
* The ID of the Alibaba Cloud account. You do not need to specify this parameter because this parameter will be removed in the future.
*/
public Builder accountId(String accountId) {
this.putQueryParameter("AccountId", accountId);
this.accountId = accountId;
return this;
}
/**
* The start offset of incremental data migration. The value is a UNIX timestamp. Unit: seconds.
*/
public Builder checkpoint(String checkpoint) {
this.putQueryParameter("Checkpoint", checkpoint);
this.checkpoint = checkpoint;
return this;
}
/**
* The ID of the data migration instance. You can call the **DescribeMigrationJobs** operation to query the instance ID.
*/
public Builder migrationJobId(String migrationJobId) {
this.putQueryParameter("MigrationJobId", migrationJobId);
this.migrationJobId = migrationJobId;
return this;
}
/**
* The name of the data migration task. The name can be up to 32 characters in length. We recommend that you specify an informative name to identify the task. You do not need to use a unique task name.
*/
public Builder migrationJobName(String migrationJobName) {
this.putQueryParameter("MigrationJobName", migrationJobName);
this.migrationJobName = migrationJobName;
return this;
}
/**
* The objects that you want to migrate. The value is a JSON string and can contain regular expressions.
*
*
* For more information, see [MigrationObject](~~141227~~).
*/
public Builder migrationObject(String migrationObject) {
this.putBodyParameter("MigrationObject", migrationObject);
this.migrationObject = migrationObject;
return this;
}
/**
* The reserved parameter of DTS. The value is a JSON string. You can specify this parameter to meet special requirements, for example, whether to automatically start a precheck. For more information, see [MigrationReserved](~~176470~~).
*/
public Builder migrationReserved(String migrationReserved) {
this.putQueryParameter("MigrationReserved", migrationReserved);
this.migrationReserved = migrationReserved;
return this;
}
/**
* OwnerId.
*/
public Builder ownerId(String ownerId) {
this.putQueryParameter("OwnerId", ownerId);
this.ownerId = ownerId;
return this;
}
/**
* The ID of the region where the data migration instance resides. For more information, see [List of supported regions](~~141033~~).
*
*
* > The region ID of the data migration instance is the same as that of the destination database.
*/
public Builder regionId(String regionId) {
this.putQueryParameter("RegionId", regionId);
this.regionId = regionId;
return this;
}
/**
* ResourceGroupId.
*/
public Builder resourceGroupId(String resourceGroupId) {
this.putQueryParameter("ResourceGroupId", resourceGroupId);
this.resourceGroupId = resourceGroupId;
return this;
}
@Override
public ConfigureMigrationJobRequest build() {
return new ConfigureMigrationJobRequest(this);
}
}
public static class DestinationEndpoint extends TeaModel {
@com.aliyun.core.annotation.NameInMap("DataBaseName")
private String dataBaseName;
@com.aliyun.core.annotation.NameInMap("EngineName")
private String engineName;
@com.aliyun.core.annotation.NameInMap("IP")
private String ip;
@com.aliyun.core.annotation.NameInMap("InstanceID")
private String instanceID;
@com.aliyun.core.annotation.NameInMap("InstanceType")
@com.aliyun.core.annotation.Validation(required = true)
private String instanceType;
@com.aliyun.core.annotation.NameInMap("OracleSID")
private String oracleSID;
@com.aliyun.core.annotation.NameInMap("Password")
private String password;
@com.aliyun.core.annotation.NameInMap("Port")
private String port;
@com.aliyun.core.annotation.NameInMap("Region")
private String region;
@com.aliyun.core.annotation.NameInMap("UserName")
private String userName;
private DestinationEndpoint(Builder builder) {
this.dataBaseName = builder.dataBaseName;
this.engineName = builder.engineName;
this.ip = builder.ip;
this.instanceID = builder.instanceID;
this.instanceType = builder.instanceType;
this.oracleSID = builder.oracleSID;
this.password = builder.password;
this.port = builder.port;
this.region = builder.region;
this.userName = builder.userName;
}
public static Builder builder() {
return new Builder();
}
public static DestinationEndpoint create() {
return builder().build();
}
/**
* @return dataBaseName
*/
public String getDataBaseName() {
return this.dataBaseName;
}
/**
* @return engineName
*/
public String getEngineName() {
return this.engineName;
}
/**
* @return ip
*/
public String getIp() {
return this.ip;
}
/**
* @return instanceID
*/
public String getInstanceID() {
return this.instanceID;
}
/**
* @return instanceType
*/
public String getInstanceType() {
return this.instanceType;
}
/**
* @return oracleSID
*/
public String getOracleSID() {
return this.oracleSID;
}
/**
* @return password
*/
public String getPassword() {
return this.password;
}
/**
* @return port
*/
public String getPort() {
return this.port;
}
/**
* @return region
*/
public String getRegion() {
return this.region;
}
/**
* @return userName
*/
public String getUserName() {
return this.userName;
}
public static final class Builder {
private String dataBaseName;
private String engineName;
private String ip;
private String instanceID;
private String instanceType;
private String oracleSID;
private String password;
private String port;
private String region;
private String userName;
/**
* The name of the destination database or the authentication database.
*
*
* >
* * You must specify the database name only if the **DestinationEndpoint.EngineName** parameter is set to **PostgreSQL**, **DRDS**, or **MongoDB**.
* * If the **DestinationEndpoint.EngineName** parameter is set to **PostgreSQL** or **DRDS**, specify the name of the destination database. If the DestinationEndpoint.EngineName parameter is set to **MongoDB**, specify the name of the authentication database.
*/
public Builder dataBaseName(String dataBaseName) {
this.dataBaseName = dataBaseName;
return this;
}
/**
* The engine type of the destination database. Valid values: **MySQL**, **DRDS**, **SQLServer**, **PostgreSQL**, **PPAS**, **MongoDB**, **Redis**, **POLARDB**, and **polardb_pg**.
*
*
* > You must specify the engine type only if the **DestinationEndpoint.InstanceType** parameter is set to **RDS**, **POLARDB**, **ECS**, **LocalInstance**, or **Express**.
*/
public Builder engineName(String engineName) {
this.engineName = engineName;
return this;
}
/**
* The endpoint of the destination database.
*
*
* > You must specify the endpoint only if the **DestinationEndpoint.InstanceType** parameter is set to **LocalInstance** or **Express**.
*/
public Builder ip(String ip) {
this.ip = ip;
return this;
}
/**
* The ID of the instance that hosts the destination database.
*
*
* > You must specify the instance ID only if the **DestinationEndpoint.InstanceType** parameter is set to **RDS**, **ECS**, **MongoDB**, **Redis**, **DRDS**, **PetaData**, **OceanBase**, **POLARDB**, **PolarDB_o**, **AnalyticDB**, or **Greenplum**. For example, if the DestinationEndpoint.InstanceType parameter is set to **ECS**, you must specify the ID of the ECS instance.
*/
public Builder instanceID(String instanceID) {
this.instanceID = instanceID;
return this;
}
/**
* The instance type of the destination database. Valid values:
*
*
* * **ECS**: self-managed database that is hosted on Elastic Compute Service (ECS)
* * **LocalInstance**: self-managed database with a public IP address
* * **RDS**: ApsaraDB RDS instance
* * **DRDS**: PolarDB-X instance
* * **MongoDB**: ApsaraDB for MongoDB instance
* * **Redis**: ApsaraDB for Redis instance
* * **PetaData**: HybridDB for MySQL instance
* * **POLARDB**: PolarDB for MySQL cluster or PolarDB for PostgreSQL cluster
* * **PolarDB_o**: PolarDB O Edition cluster
* * **AnalyticDB**: AnalyticDB for MySQL cluster V3.0 or V2.0
* * **Greenplum**: AnalyticDB for PostgreSQL instance
*/
public Builder instanceType(String instanceType) {
this.instanceType = instanceType;
return this;
}
/**
* The SID of the Oracle database.
*
*
* > You must specify this parameter only if the **DestinationEndpoint.EngineName** parameter is set to **Oracle** and the **Oracle** database is deployed in a non-RAC architecture.
*/
public Builder oracleSID(String oracleSID) {
this.oracleSID = oracleSID;
return this;
}
/**
* The password of the destination database account.
*/
public Builder password(String password) {
this.password = password;
return this;
}
/**
* The service port number of the destination database.
*
*
* > You must specify the service port number only if the **DestinationEndpoint.InstanceType** parameter is set to **ECS**, **LocalInstance**, or **Express**.
*/
public Builder port(String port) {
this.port = port;
return this;
}
/**
* The region ID of the destination database.
*
*
* > If the **DestinationEndpoint.InstanceType** parameter is set to **LocalInstance**, you can enter **cn-hangzhou** or the ID of the region closest to the self-managed database. For more information, see [List of supported regions](~~141033~~).
*/
public Builder region(String region) {
this.region = region;
return this;
}
/**
* The database account of the destination database.
*
*
* > The permissions that are required for database accounts vary with the migration scenario. For more information, see [Overview of data migration scenarios](~~26618~~).
*/
public Builder userName(String userName) {
this.userName = userName;
return this;
}
public DestinationEndpoint build() {
return new DestinationEndpoint(this);
}
}
}
public static class MigrationMode extends TeaModel {
@com.aliyun.core.annotation.NameInMap("DataIntialization")
@com.aliyun.core.annotation.Validation(required = true)
private Boolean dataIntialization;
@com.aliyun.core.annotation.NameInMap("DataSynchronization")
@com.aliyun.core.annotation.Validation(required = true)
private Boolean dataSynchronization;
@com.aliyun.core.annotation.NameInMap("StructureIntialization")
@com.aliyun.core.annotation.Validation(required = true)
private Boolean structureIntialization;
private MigrationMode(Builder builder) {
this.dataIntialization = builder.dataIntialization;
this.dataSynchronization = builder.dataSynchronization;
this.structureIntialization = builder.structureIntialization;
}
public static Builder builder() {
return new Builder();
}
public static MigrationMode create() {
return builder().build();
}
/**
* @return dataIntialization
*/
public Boolean getDataIntialization() {
return this.dataIntialization;
}
/**
* @return dataSynchronization
*/
public Boolean getDataSynchronization() {
return this.dataSynchronization;
}
/**
* @return structureIntialization
*/
public Boolean getStructureIntialization() {
return this.structureIntialization;
}
public static final class Builder {
private Boolean dataIntialization;
private Boolean dataSynchronization;
private Boolean structureIntialization;
/**
* Specifies whether to perform full data migration. Valid values:
*
*
* * **true**: yes
* * **false**: no
*
* > For more information about databases that support full data migration, see [Supported databases and migration types](~~26618~~).
*/
public Builder dataIntialization(Boolean dataIntialization) {
this.dataIntialization = dataIntialization;
return this;
}
/**
* Specifies whether to perform incremental data migration. Valid values:
*
*
* * **true**: yes
* * **false**: no
*
* > For more information about databases that support incremental data migration, see [Supported databases and migration types](~~26618~~).
*/
public Builder dataSynchronization(Boolean dataSynchronization) {
this.dataSynchronization = dataSynchronization;
return this;
}
/**
* Specifies whether to perform schema migration. Valid values:
*
*
* * **true**: yes
* * **false**: no
*
* > For more information about databases that support schema migration, see [Supported databases and migration types](~~26618~~).
*/
public Builder structureIntialization(Boolean structureIntialization) {
this.structureIntialization = structureIntialization;
return this;
}
public MigrationMode build() {
return new MigrationMode(this);
}
}
}
public static class SourceEndpoint extends TeaModel {
@com.aliyun.core.annotation.NameInMap("DatabaseName")
private String databaseName;
@com.aliyun.core.annotation.NameInMap("EngineName")
private String engineName;
@com.aliyun.core.annotation.NameInMap("IP")
private String ip;
@com.aliyun.core.annotation.NameInMap("InstanceID")
private String instanceID;
@com.aliyun.core.annotation.NameInMap("InstanceType")
@com.aliyun.core.annotation.Validation(required = true)
private String instanceType;
@com.aliyun.core.annotation.NameInMap("OracleSID")
private String oracleSID;
@com.aliyun.core.annotation.NameInMap("OwnerID")
private String ownerID;
@com.aliyun.core.annotation.NameInMap("Password")
private String password;
@com.aliyun.core.annotation.NameInMap("Port")
private String port;
@com.aliyun.core.annotation.NameInMap("Region")
private String region;
@com.aliyun.core.annotation.NameInMap("Role")
private String role;
@com.aliyun.core.annotation.NameInMap("UserName")
private String userName;
private SourceEndpoint(Builder builder) {
this.databaseName = builder.databaseName;
this.engineName = builder.engineName;
this.ip = builder.ip;
this.instanceID = builder.instanceID;
this.instanceType = builder.instanceType;
this.oracleSID = builder.oracleSID;
this.ownerID = builder.ownerID;
this.password = builder.password;
this.port = builder.port;
this.region = builder.region;
this.role = builder.role;
this.userName = builder.userName;
}
public static Builder builder() {
return new Builder();
}
public static SourceEndpoint create() {
return builder().build();
}
/**
* @return databaseName
*/
public String getDatabaseName() {
return this.databaseName;
}
/**
* @return engineName
*/
public String getEngineName() {
return this.engineName;
}
/**
* @return ip
*/
public String getIp() {
return this.ip;
}
/**
* @return instanceID
*/
public String getInstanceID() {
return this.instanceID;
}
/**
* @return instanceType
*/
public String getInstanceType() {
return this.instanceType;
}
/**
* @return oracleSID
*/
public String getOracleSID() {
return this.oracleSID;
}
/**
* @return ownerID
*/
public String getOwnerID() {
return this.ownerID;
}
/**
* @return password
*/
public String getPassword() {
return this.password;
}
/**
* @return port
*/
public String getPort() {
return this.port;
}
/**
* @return region
*/
public String getRegion() {
return this.region;
}
/**
* @return role
*/
public String getRole() {
return this.role;
}
/**
* @return userName
*/
public String getUserName() {
return this.userName;
}
public static final class Builder {
private String databaseName;
private String engineName;
private String ip;
private String instanceID;
private String instanceType;
private String oracleSID;
private String ownerID;
private String password;
private String port;
private String region;
private String role;
private String userName;
/**
* The name of the source database or the authentication database.
*
*
* >
* * You must specify the database name only if the **SourceEndpoint.EngineName** parameter is set to **PostgreSQL** or **MongoDB**.
* * If the **SourceEndpoint.EngineName** parameter is set to **PostgreSQL**, specify the name of the source database. If the SourceEndpoint.EngineName parameter is set to **MongoDB**, specify the name of the authentication database.
*/
public Builder databaseName(String databaseName) {
this.databaseName = databaseName;
return this;
}
/**
* The engine type of the source database. Valid values: **MySQL**, **TiDB**, **SQLServer**, **PostgreSQL**, **Oracle**, **MongoDB**, **Redis**, **POLARDB**, and **polardb_pg**.
*
*
* > You must specify the engine type only if the **DestinationEndpoint.InstanceType** parameter is set to **RDS**, **POLARDB**, **ECS**, **LocalInstance**, or **Express**.
*/
public Builder engineName(String engineName) {
this.engineName = engineName;
return this;
}
/**
* The endpoint of the source database.
*
*
* > You must specify the endpoint only if the **SourceEndpoint.InstanceType** parameter is set to **LocalInstance** or **Express**.
*/
public Builder ip(String ip) {
this.ip = ip;
return this;
}
/**
* The ID of the instance that hosts the source database.
*
*
* >
* * You must specify the instance ID only if the **SourceEndpoint.InstanceType** parameter is set to **RDS**, **ECS**, **Express**, **MongoDB**, **POLARDB**, or **PolarDB_o**. For example, if the SourceEndpoint.InstanceType parameter is set to **ECS**, you must specify the ID of the ECS instance.
* * If the **SourceEndpoint.InstanceType** parameter is set to **Express**, you must specify the ID of the virtual private cloud (VPC).
*/
public Builder instanceID(String instanceID) {
this.instanceID = instanceID;
return this;
}
/**
* The instance type of the source database. Valid values:
*
*
* * **RDS**: ApsaraDB RDS instance
* * **ECS**: self-managed database that is hosted on ECS
* * **LocalInstance**: self-managed database with a public IP address
* * **Express**: self-managed database that is connected over Express Connect, VPN Gateway, or Smart Access Gateway
* * **dg**: self-managed database that is connected over Database Gateway
* * **cen**: self-managed database that is connected over Cloud Enterprise Network (CEN)
* * **MongoDB**: ApsaraDB for MongoDB instance
* * **POLARDB**: PolarDB for MySQL cluster or PolarDB for PostgreSQL cluster
* * **PolarDB_o**: PolarDB O Edition cluster
*/
public Builder instanceType(String instanceType) {
this.instanceType = instanceType;
return this;
}
/**
* The system ID (SID) of the Oracle database.
*
*
* > You must specify this parameter only if the **SourceEndpoint.EngineName** parameter is set to **Oracle** and the **Oracle** database is deployed in a non-RAC architecture.
*/
public Builder oracleSID(String oracleSID) {
this.oracleSID = oracleSID;
return this;
}
/**
* The ID of the Alibaba Cloud account to which the source instance belongs.
*
*
* > You must specify this parameter only when you configure data migration across different Alibaba Cloud accounts.
*/
public Builder ownerID(String ownerID) {
this.ownerID = ownerID;
return this;
}
/**
* The password of the source database account.
*/
public Builder password(String password) {
this.password = password;
return this;
}
/**
* The service port number of the source database.
*
*
* > You must specify the service port number only if the **SourceEndpoint.InstanceType** parameter is set to **ECS**, **LocalInstance**, or **Express**.
*/
public Builder port(String port) {
this.port = port;
return this;
}
/**
* The region ID of the source database.
*
*
* > If the **SourceEndpoint.InstanceType** parameter is set to **LocalInstance**, you can enter **cn-hangzhou** or the ID of the region closest to the self-managed database. For more information, see [List of supported regions](~~141033~~).
*/
public Builder region(String region) {
this.region = region;
return this;
}
/**
* The authorized RAM role of the source instance. You must specify the RAM role only if the source instance and the destination instance belong to different Alibaba Cloud accounts. You can use the RAM role to allow the Alibaba Cloud account that owns the destination instance to access the source instance.
*
*
* > For information about the permissions and authorization methods of the RAM role, see [Configure RAM authorization for cross-account data migration and synchronization](~~48468~~).
*/
public Builder role(String role) {
this.role = role;
return this;
}
/**
* The database account of the source database.
*
*
* > The permissions that are required for database accounts vary with the migration scenario. For more information, see [Overview of data migration scenarios](~~26618~~).
*/
public Builder userName(String userName) {
this.userName = userName;
return this;
}
public SourceEndpoint build() {
return new SourceEndpoint(this);
}
}
}
}