com.i2soft.timing.v20240819.TimingBackup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of i2up-java-sdk Show documentation
Show all versions of i2up-java-sdk Show documentation
Information2 United Data Management Platform SDK for Java
The newest version!
package com.i2soft.timing.v20240819;
import com.i2soft.http.I2Req;
import com.i2soft.http.I2Rs;
import com.i2soft.http.I2softException;
import com.i2soft.http.Response;
import com.i2soft.common.Auth;
import com.i2soft.util.StringMap;
import java.util.Map;
public final class TimingBackup {
/**
* Auth 对象
*/
private final Auth auth;
/**
* 构建一个新对象
*
* @param auth Auth对象
*/
public TimingBackup(Auth auth) {
this.auth = auth;
}
/**
* 1-1 备份 准备-4 备份 获取MsSql数据源
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map describeTimingBackupMssqlSource(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/mssql_source", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 1-1 备份 准备-1 备份/恢复 认证Oracle信息(目前未使用)
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map verifyTimingBackupOracleInfo(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/verify_oracle_info", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToMap();
}
/**
* 1-1 备份 准备-2 备份/恢复 获取Oracle表空间(目前未使用)
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map describeTimingBackupOracleContent(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/oracle_content", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToMap();
}
/**
* 1-1 备份 准备-3 备份 获取Oracle脚本路径
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map descibeTimingBackupOracleSriptPath(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/oracle_script_path", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 1-1 备份 准备-5 备份 获取MsSql数据库列表
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTimingBackupMssqlDbList(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/mssql_db_list", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToMap();
}
/**
* 备份 准备 验证oracle登录认证
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs verifyTimingBackupOracleLogin(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/oracle_login", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 1-2 备份 新建/编辑-1 备份 新建
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map createTimingBackup(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToMap();
}
/**
* 1-2 备份 新建/编辑-2 备份 获取单个
*
* @param uuid: uuid
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map describeTimingBackup(String uuid) throws I2softException {
String url = String.format("%s/timing/backup/%s", auth.cc_url, uuid);
Response r = auth.client.get(url, new StringMap());
return r.jsonToMap();
}
/**
* 1-2 备份 新建/编辑-3 备份 修改
*
* @param uuid: uuid
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map modifyTimingBackup(String uuid, StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/%s", auth.cc_url, uuid);
Response r = auth.client.put(url, args);
return r.jsonToMap();
}
/**
* 1-3 备份 列表-1 备份 获取列表
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTimingBackup(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 1-3 备份 列表-2 备份 状态
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTimingBackupStatus(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/status", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 1-3 备份 列表-3 备份 删除
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map deleteTimingBackup(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup", auth.cc_url);
Response r = auth.client.delete(url, args);
return r.jsonToMap();
}
/**
* 1-3 备份 列表-4 备份 操作
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map startTimingBackup(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/operate", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToMap();
}
/**
* 1-3 备份 列表-4 备份 操作
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map stopTimingBackup(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/operate", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToMap();
}
/**
* 1-3 备份 列表-4 备份 操作
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map startImmediateTimingBackup(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/operate", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToMap();
}
/**
* 备份 列表 - 查看更多
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map showTimingBackupDetailInfo(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/detail", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 1-4 备份 获取达梦数据库信息
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map descibeDmDbInfo(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/dm_db_info", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 1-5 备份 获取GaussDB库/表
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listGaussDBDatabaseTables(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/list_gaussdb_database_tables", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 备份 - 获取备份点信息
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTimingBackupPoint(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/bkup_point_list", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 备份 - 删除备份时间点
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs deleteTimingBackupPoint(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/bkup_point", auth.cc_url);
Response r = auth.client.delete(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 手动归档 - 获取备份时间点
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listBakVer(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/bak_ver_list", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 手动归档
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs bakDataArchive(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/bak_data_archive", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* GoldenDB 查询实例信息
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map describeGoldebDBInfo(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/goldendb_info", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* GoldenDB 校验实例
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs verifyGoldebDB(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/goldendb_verify", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 获取自定义数据类型
*
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listCustomTypes() throws I2softException {
String url = String.format("%s/timing/backup/custom_type", auth.cc_url);
Response r = auth.client.get(url, new StringMap());
return r.jsonToMap();
}
/**
* 3-1 作业任务 列表
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTimingWork(StringMap args) throws I2softException {
String url = String.format("%s/timing/work", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 3-2 作业任务 删除
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map deleteTimingWork(StringMap args) throws I2softException {
String url = String.format("%s/timing/work", auth.cc_url);
Response r = auth.client.delete(url, args);
return r.jsonToMap();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy