Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of the License at + * + *
http://www.apache.org/licenses/LICENSE-2.0 + * + *
Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.ucloud.upgsql.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class BackupUPgSQLLogRequest extends Request { + + /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Zone") + private String zone; + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @UCloudParam("ProjectId") + private String projectId; + + /** 备份导出文件名称 */ + @NotEmpty + @UCloudParam("BackupName") + private String backupName; + + /** 备份查询结果文件名称 */ + @NotEmpty + @UCloudParam("BackupFile") + private String backupFile; + + /** 资源ID */ + @NotEmpty + @UCloudParam("InstanceID") + private String instanceID; + + /** 日志类型:slow(慢日志),error(错误日志) */ + @UCloudParam("LogType") + private String logType; + + /** 日志开始时间 */ + @UCloudParam("BeginTime") + private Integer beginTime; + + /** 日志结束时间 */ + @UCloudParam("EndTime") + private Integer endTime; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getZone() { + return zone; + } + + public void setZone(String zone) { + this.zone = zone; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getBackupName() { + return backupName; + } + + public void setBackupName(String backupName) { + this.backupName = backupName; + } + + public String getBackupFile() { + return backupFile; + } + + public void setBackupFile(String backupFile) { + this.backupFile = backupFile; + } + + public String getInstanceID() { + return instanceID; + } + + public void setInstanceID(String instanceID) { + this.instanceID = instanceID; + } + + public String getLogType() { + return logType; + } + + public void setLogType(String logType) { + this.logType = logType; + } + + public Integer getBeginTime() { + return beginTime; + } + + public void setBeginTime(Integer beginTime) { + this.beginTime = beginTime; + } + + public Integer getEndTime() { + return endTime; + } + + public void setEndTime(Integer endTime) { + this.endTime = endTime; + } +} diff --git a/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/BackupUPgSQLLogResponse.java b/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/BackupUPgSQLLogResponse.java new file mode 100644 index 00000000..af853359 --- /dev/null +++ b/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/BackupUPgSQLLogResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of the License at + * + *
http://www.apache.org/licenses/LICENSE-2.0 + * + *
Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.ucloud.upgsql.models; + + + +import cn.ucloud.common.response.Response; + +public class BackupUPgSQLLogResponse extends Response {} diff --git a/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/GetUPgSQLInstanceLogRequest.java b/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/GetUPgSQLInstanceLogRequest.java new file mode 100644 index 00000000..a8241984 --- /dev/null +++ b/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/GetUPgSQLInstanceLogRequest.java @@ -0,0 +1,141 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of the License at + * + *
http://www.apache.org/licenses/LICENSE-2.0 + * + *
Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.ucloud.upgsql.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class GetUPgSQLInstanceLogRequest extends Request { + + /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @UCloudParam("ProjectId") + private String projectId; + + /** 可用区 */ + @NotEmpty + @UCloudParam("ZoneID") + private Integer zoneID; + + /** 实例ClusterID */ + @NotEmpty + @UCloudParam("DBId") + private String dbId; + + /** 日志类型 */ + @NotEmpty + @UCloudParam("LogType") + private String logType; + + /** */ + @NotEmpty + @UCloudParam("CompanyID") + private Integer companyID; + + /** */ + @NotEmpty + @UCloudParam("AccountID") + private Integer accountID; + + /** 起始时间,需使用时间戳 */ + @NotEmpty + @UCloudParam("BeginTime") + private Integer beginTime; + + /** 结束时间,需使用时间戳,结束时间需大于起始时间 */ + @NotEmpty + @UCloudParam("EndTime") + private Integer endTime; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public Integer getZoneID() { + return zoneID; + } + + public void setZoneID(Integer zoneID) { + this.zoneID = zoneID; + } + + public String getDBId() { + return dbId; + } + + public void setDBId(String dbId) { + this.dbId = dbId; + } + + public String getLogType() { + return logType; + } + + public void setLogType(String logType) { + this.logType = logType; + } + + public Integer getCompanyID() { + return companyID; + } + + public void setCompanyID(Integer companyID) { + this.companyID = companyID; + } + + public Integer getAccountID() { + return accountID; + } + + public void setAccountID(Integer accountID) { + this.accountID = accountID; + } + + public Integer getBeginTime() { + return beginTime; + } + + public void setBeginTime(Integer beginTime) { + this.beginTime = beginTime; + } + + public Integer getEndTime() { + return endTime; + } + + public void setEndTime(Integer endTime) { + this.endTime = endTime; + } +} diff --git a/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/GetUPgSQLInstanceLogResponse.java b/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/GetUPgSQLInstanceLogResponse.java new file mode 100644 index 00000000..27427f79 --- /dev/null +++ b/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/GetUPgSQLInstanceLogResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of the License at + * + *
http://www.apache.org/licenses/LICENSE-2.0 + * + *
Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.ucloud.upgsql.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class GetUPgSQLInstanceLogResponse extends Response { + + /** 返回的日志信息 */ + @SerializedName("Log") + private String log; + + public String getLog() { + return log; + } + + public void setLog(String log) { + this.log = log; + } +} diff --git a/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/ListUPgSQLLogRequest.java b/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/ListUPgSQLLogRequest.java new file mode 100644 index 00000000..07a3cf71 --- /dev/null +++ b/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/ListUPgSQLLogRequest.java @@ -0,0 +1,102 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of the License at + * + *
http://www.apache.org/licenses/LICENSE-2.0 + * + *
Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.ucloud.upgsql.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class ListUPgSQLLogRequest extends Request { + + /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Zone") + private String zone; + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @UCloudParam("ProjectId") + private String projectId; + + /** 查询的日志开始的时间戳 */ + @NotEmpty + @UCloudParam("BeginTime") + private Integer beginTime; + + /** 查询日志的结束时间戳 */ + @NotEmpty + @UCloudParam("EndTime") + private Integer endTime; + + /** 资源ID */ + @NotEmpty + @UCloudParam("InstanceID") + private String instanceID; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getZone() { + return zone; + } + + public void setZone(String zone) { + this.zone = zone; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public Integer getBeginTime() { + return beginTime; + } + + public void setBeginTime(Integer beginTime) { + this.beginTime = beginTime; + } + + public Integer getEndTime() { + return endTime; + } + + public void setEndTime(Integer endTime) { + this.endTime = endTime; + } + + public String getInstanceID() { + return instanceID; + } + + public void setInstanceID(String instanceID) { + this.instanceID = instanceID; + } +} diff --git a/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/ListUPgSQLLogResponse.java b/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/ListUPgSQLLogResponse.java new file mode 100644 index 00000000..0e58db50 --- /dev/null +++ b/ucloud-sdk-java-upgsql/src/main/java/cn/ucloud/upgsql/models/ListUPgSQLLogResponse.java @@ -0,0 +1,86 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of the License at + * + *
http://www.apache.org/licenses/LICENSE-2.0 + * + *
Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package cn.ucloud.upgsql.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class ListUPgSQLLogResponse extends Response {
+
+ /** 数据库日志信息列表 */
+ @SerializedName("DataSet")
+ private List