All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.i2soft.timing.v20230227.TimingBackup Maven / Gradle / Ivy

The newest version!
package com.i2soft.timing.v20230227;

import com.i2soft.common.Auth;
import com.i2soft.http.I2Rs;
import com.i2soft.http.I2softException;
import com.i2soft.http.Response;
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();
    }

    /**
     * 备份 列表 - 查看更多
     *
     * @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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy