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.usnap.client; + +import cn.ucloud.common.client.DefaultClient; +import cn.ucloud.common.config.Config; +import cn.ucloud.common.credential.Credential; +import cn.ucloud.common.exception.UCloudException; +import cn.ucloud.usnap.models.CreateSnapshotServiceRequest; +import cn.ucloud.usnap.models.CreateSnapshotServiceResponse; +import cn.ucloud.usnap.models.DeleteSnapshotServiceRequest; +import cn.ucloud.usnap.models.DeleteSnapshotServiceResponse; +import cn.ucloud.usnap.models.DescribeSnapshotServicePriceRequest; +import cn.ucloud.usnap.models.DescribeSnapshotServicePriceResponse; +import cn.ucloud.usnap.models.DescribeSnapshotServiceRequest; +import cn.ucloud.usnap.models.DescribeSnapshotServiceResponse; +import cn.ucloud.usnap.models.DescribeSnapshotServiceUpgradePriceRequest; +import cn.ucloud.usnap.models.DescribeSnapshotServiceUpgradePriceResponse; + +/** This client is used to call actions of **USnap** service */ +public class USnapClient extends DefaultClient implements USnapClientInterface { + public USnapClient(Config config, Credential credential) { + super(config, credential); + } + + /** + * CreateSnapshotService - 创建磁盘快照服务 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateSnapshotServiceResponse createSnapshotService(CreateSnapshotServiceRequest request) + throws UCloudException { + request.setAction("CreateSnapshotService"); + return (CreateSnapshotServiceResponse) + this.invoke(request, CreateSnapshotServiceResponse.class); + } + + /** + * DeleteSnapshotService - 删除磁盘快照服务 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DeleteSnapshotServiceResponse deleteSnapshotService(DeleteSnapshotServiceRequest request) + throws UCloudException { + request.setAction("DeleteSnapshotService"); + return (DeleteSnapshotServiceResponse) + this.invoke(request, DeleteSnapshotServiceResponse.class); + } + + /** + * DescribeSnapshotService - 获取磁盘快照服务列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeSnapshotServiceResponse describeSnapshotService( + DescribeSnapshotServiceRequest request) throws UCloudException { + request.setAction("DescribeSnapshotService"); + return (DescribeSnapshotServiceResponse) + this.invoke(request, DescribeSnapshotServiceResponse.class); + } + + /** + * DescribeSnapshotServicePrice - 获取磁盘快照服务价格 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeSnapshotServicePriceResponse describeSnapshotServicePrice( + DescribeSnapshotServicePriceRequest request) throws UCloudException { + request.setAction("DescribeSnapshotServicePrice"); + return (DescribeSnapshotServicePriceResponse) + this.invoke(request, DescribeSnapshotServicePriceResponse.class); + } + + /** + * DescribeSnapshotServiceUpgradePrice - 获取快照服务升降级价格 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeSnapshotServiceUpgradePriceResponse describeSnapshotServiceUpgradePrice( + DescribeSnapshotServiceUpgradePriceRequest request) throws UCloudException { + request.setAction("DescribeSnapshotServiceUpgradePrice"); + return (DescribeSnapshotServiceUpgradePriceResponse) + this.invoke(request, DescribeSnapshotServiceUpgradePriceResponse.class); + } +} diff --git a/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/client/USnapClientInterface.java b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/client/USnapClientInterface.java new file mode 100644 index 00000000..17458daa --- /dev/null +++ b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/client/USnapClientInterface.java @@ -0,0 +1,76 @@ +/** + * 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.usnap.client; + +import cn.ucloud.common.client.Client; +import cn.ucloud.common.exception.UCloudException; +import cn.ucloud.usnap.models.CreateSnapshotServiceRequest; +import cn.ucloud.usnap.models.CreateSnapshotServiceResponse; +import cn.ucloud.usnap.models.DeleteSnapshotServiceRequest; +import cn.ucloud.usnap.models.DeleteSnapshotServiceResponse; +import cn.ucloud.usnap.models.DescribeSnapshotServicePriceRequest; +import cn.ucloud.usnap.models.DescribeSnapshotServicePriceResponse; +import cn.ucloud.usnap.models.DescribeSnapshotServiceRequest; +import cn.ucloud.usnap.models.DescribeSnapshotServiceResponse; +import cn.ucloud.usnap.models.DescribeSnapshotServiceUpgradePriceRequest; +import cn.ucloud.usnap.models.DescribeSnapshotServiceUpgradePriceResponse; + +/** This client is used to call actions of **USnap** service */ +public interface USnapClientInterface extends Client { + + /** + * CreateSnapshotService - 创建磁盘快照服务 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateSnapshotServiceResponse createSnapshotService(CreateSnapshotServiceRequest request) + throws UCloudException; + + /** + * DeleteSnapshotService - 删除磁盘快照服务 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DeleteSnapshotServiceResponse deleteSnapshotService(DeleteSnapshotServiceRequest request) + throws UCloudException; + + /** + * DescribeSnapshotService - 获取磁盘快照服务列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeSnapshotServiceResponse describeSnapshotService( + DescribeSnapshotServiceRequest request) throws UCloudException; + + /** + * DescribeSnapshotServicePrice - 获取磁盘快照服务价格 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeSnapshotServicePriceResponse describeSnapshotServicePrice( + DescribeSnapshotServicePriceRequest request) throws UCloudException; + + /** + * DescribeSnapshotServiceUpgradePrice - 获取快照服务升降级价格 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeSnapshotServiceUpgradePriceResponse describeSnapshotServiceUpgradePrice( + DescribeSnapshotServiceUpgradePriceRequest request) throws UCloudException; +} diff --git a/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/CreateSnapshotServiceRequest.java b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/CreateSnapshotServiceRequest.java new file mode 100644 index 00000000..6bb05f7b --- /dev/null +++ b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/CreateSnapshotServiceRequest.java @@ -0,0 +1,172 @@ +/** + * 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.usnap.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class CreateSnapshotServiceRequest 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; + + /** 磁盘ID */ + @NotEmpty + @UCloudParam("VDiskId") + private String vDiskId; + + /** Year , Month, Dynamic 默认: Month */ + @UCloudParam("ChargeType") + private String chargeType; + + /** 购买时长 默认: 1 */ + @UCloudParam("Quantity") + private Integer quantity; + + /** 业务组 默认:Default */ + @UCloudParam("Tag") + private String tag; + + /** 默认采用基础版套餐开通,“Base”:基础版,“ Ultimate”:旗舰版,“ Custom”:自定义备份链 */ + @UCloudParam("BackupMode") + private String backupMode; + + /** BackupMode为Custom时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48 */ + @UCloudParam("Journal") + private Integer journal; + + /** BackupMode为Custom时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96 */ + @UCloudParam("Hour") + private Integer hour; + + /** BackupMode为Custom时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30 */ + @UCloudParam("Day") + private Integer day; + + /** 代金券ID */ + @UCloudParam("CouponId") + private String couponId; + + 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 getVDiskId() { + return vDiskId; + } + + public void setVDiskId(String vDiskId) { + this.vDiskId = vDiskId; + } + + public String getChargeType() { + return chargeType; + } + + public void setChargeType(String chargeType) { + this.chargeType = chargeType; + } + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public String getBackupMode() { + return backupMode; + } + + public void setBackupMode(String backupMode) { + this.backupMode = backupMode; + } + + public Integer getJournal() { + return journal; + } + + public void setJournal(Integer journal) { + this.journal = journal; + } + + public Integer getHour() { + return hour; + } + + public void setHour(Integer hour) { + this.hour = hour; + } + + public Integer getDay() { + return day; + } + + public void setDay(Integer day) { + this.day = day; + } + + public String getCouponId() { + return couponId; + } + + public void setCouponId(String couponId) { + this.couponId = couponId; + } +} diff --git a/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/CreateSnapshotServiceResponse.java b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/CreateSnapshotServiceResponse.java new file mode 100644 index 00000000..745630e4 --- /dev/null +++ b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/CreateSnapshotServiceResponse.java @@ -0,0 +1,46 @@ +/** + * 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.usnap.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class CreateSnapshotServiceResponse extends Response { + + /** 快照服务ID */ + @SerializedName("SnapshotServiceId") + private String snapshotServiceId; + + /** 快照服务状态,状态:Available(可用),InAvailable(不可用),Expired(欠费) */ + @SerializedName("Status") + private String status; + + public String getSnapshotServiceId() { + return snapshotServiceId; + } + + public void setSnapshotServiceId(String snapshotServiceId) { + this.snapshotServiceId = snapshotServiceId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } +} diff --git a/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DeleteSnapshotServiceRequest.java b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DeleteSnapshotServiceRequest.java new file mode 100644 index 00000000..602a20fe --- /dev/null +++ b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DeleteSnapshotServiceRequest.java @@ -0,0 +1,76 @@ +/** + * 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.usnap.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DeleteSnapshotServiceRequest 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; + + /** 磁盘ID */ + @NotEmpty + @UCloudParam("VDiskId") + private String vDiskId; + + 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 getVDiskId() { + return vDiskId; + } + + public void setVDiskId(String vDiskId) { + this.vDiskId = vDiskId; + } +} diff --git a/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DeleteSnapshotServiceResponse.java b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DeleteSnapshotServiceResponse.java new file mode 100644 index 00000000..4bc5349a --- /dev/null +++ b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DeleteSnapshotServiceResponse.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.usnap.models; + + + +import cn.ucloud.common.response.Response; + +public class DeleteSnapshotServiceResponse extends Response {} diff --git a/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServicePriceRequest.java b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServicePriceRequest.java new file mode 100644 index 00000000..ec603fbd --- /dev/null +++ b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServicePriceRequest.java @@ -0,0 +1,148 @@ +/** + * 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.usnap.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DescribeSnapshotServicePriceRequest 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("Size") + private Integer size; + + /** Year , Month, Dynamic 默认: Month */ + @UCloudParam("ChargeType") + private String chargeType; + + /** 购买服务时长,默认值是1 */ + @UCloudParam("Quantity") + private Integer quantity; + + /** 默认采用基础版套餐开通,“Base”:基础版,“ Ultimate”:旗舰版,“ Custom”:自定义备份链 */ + @UCloudParam("BackupMode") + private String backupMode; + + /** BackupMode为Custom时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48 */ + @UCloudParam("Journal") + private Integer journal; + + /** BackupMode为Custom时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96 */ + @UCloudParam("Hour") + private Integer hour; + + /** BackupMode为Custom时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30 */ + @UCloudParam("Day") + private Integer day; + + 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 getSize() { + return size; + } + + public void setSize(Integer size) { + this.size = size; + } + + public String getChargeType() { + return chargeType; + } + + public void setChargeType(String chargeType) { + this.chargeType = chargeType; + } + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public String getBackupMode() { + return backupMode; + } + + public void setBackupMode(String backupMode) { + this.backupMode = backupMode; + } + + public Integer getJournal() { + return journal; + } + + public void setJournal(Integer journal) { + this.journal = journal; + } + + public Integer getHour() { + return hour; + } + + public void setHour(Integer hour) { + this.hour = hour; + } + + public Integer getDay() { + return day; + } + + public void setDay(Integer day) { + this.day = day; + } +} diff --git a/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServicePriceResponse.java b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServicePriceResponse.java new file mode 100644 index 00000000..d0044eca --- /dev/null +++ b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServicePriceResponse.java @@ -0,0 +1,85 @@ +/** + * 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.usnap.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class DescribeSnapshotServicePriceResponse extends Response { + + /** 价格参数列表,具体说明见SnapshotServicePriceDataSet */ + @SerializedName("DataSet") + private SnapshotServicePriceDataSet dataSet; + + public SnapshotServicePriceDataSet getDataSet() { + return dataSet; + } + + public void setDataSet(SnapshotServicePriceDataSet dataSet) { + this.dataSet = dataSet; + } + + public static class SnapshotServicePriceDataSet extends Response { + + /** Year, Month, Dynamic */ + @SerializedName("ChargeType") + private String chargeType; + + /** 实际价格 (单位: 分) */ + @SerializedName("Price") + private Integer price; + + /** 用户折后价(对应计费CustomPrice) */ + @SerializedName("OriginalPrice") + private Integer originalPrice; + + /** 原价(对应计费OriginalPrice) */ + @SerializedName("ListPrice") + private Integer listPrice; + + public String getChargeType() { + return chargeType; + } + + public void setChargeType(String chargeType) { + this.chargeType = chargeType; + } + + public Integer getPrice() { + return price; + } + + public void setPrice(Integer price) { + this.price = price; + } + + public Integer getOriginalPrice() { + return originalPrice; + } + + public void setOriginalPrice(Integer originalPrice) { + this.originalPrice = originalPrice; + } + + public Integer getListPrice() { + return listPrice; + } + + public void setListPrice(Integer listPrice) { + this.listPrice = listPrice; + } + } +} diff --git a/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServiceRequest.java b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServiceRequest.java new file mode 100644 index 00000000..c1db6515 --- /dev/null +++ b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServiceRequest.java @@ -0,0 +1,123 @@ +/** + * 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.usnap.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DescribeSnapshotServiceRequest 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; + + /** 数据偏移量, 默认为0 */ + @UCloudParam("Offset") + private Integer offset; + + /** 返回数据长度, 默认为20 */ + @UCloudParam("Limit") + private Integer limit; + + /** 快照服务ID(传入则获取当前快照服务ID, 不传则获取当前可用区快照服务列表) */ + @UCloudParam("SnapshotServiceId") + private String snapshotServiceId; + + /** 磁盘ID (传入则获取当前盘快照服务, 不传则获取当前可用区快照服务列表) */ + @UCloudParam("VDiskId") + private String vDiskId; + + /** 快照ID (传入则获取当前快照对应盘的快照服务, 不传则获取当前可用区快照服务列表,磁盘ID和快照ID同时传入以磁盘ID为准) */ + @UCloudParam("SnapshotId") + private String snapshotId; + + 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 getOffset() { + return offset; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public String getSnapshotServiceId() { + return snapshotServiceId; + } + + public void setSnapshotServiceId(String snapshotServiceId) { + this.snapshotServiceId = snapshotServiceId; + } + + public String getVDiskId() { + return vDiskId; + } + + public void setVDiskId(String vDiskId) { + this.vDiskId = vDiskId; + } + + public String getSnapshotId() { + return snapshotId; + } + + public void setSnapshotId(String snapshotId) { + this.snapshotId = snapshotId; + } +} diff --git a/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServiceResponse.java b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServiceResponse.java new file mode 100644 index 00000000..bb5716cb --- /dev/null +++ b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServiceResponse.java @@ -0,0 +1,218 @@ +/** + * 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.usnap.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class DescribeSnapshotServiceResponse extends Response {
+
+ /** 快照服务列表 */
+ @SerializedName("DataSet")
+ private List 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.usnap.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class DescribeSnapshotServiceUpgradePriceRequest 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;
+
+ /** 磁盘ID */
+ @NotEmpty
+ @UCloudParam("VDiskId")
+ private String vDiskId;
+
+ /** 磁盘大小 */
+ @NotEmpty
+ @UCloudParam("Size")
+ private Integer size;
+
+ /** 升降级快照服务, 升级"Yes",降级"No", 默认为No */
+ @UCloudParam("SnapshotsvcMode")
+ private String snapshotsvcMode;
+
+ 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 getVDiskId() {
+ return vDiskId;
+ }
+
+ public void setVDiskId(String vDiskId) {
+ this.vDiskId = vDiskId;
+ }
+
+ public Integer getSize() {
+ return size;
+ }
+
+ public void setSize(Integer size) {
+ this.size = size;
+ }
+
+ public String getSnapshotsvcMode() {
+ return snapshotsvcMode;
+ }
+
+ public void setSnapshotsvcMode(String snapshotsvcMode) {
+ this.snapshotsvcMode = snapshotsvcMode;
+ }
+}
diff --git a/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServiceUpgradePriceResponse.java b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServiceUpgradePriceResponse.java
new file mode 100644
index 00000000..eb93ab8f
--- /dev/null
+++ b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServiceUpgradePriceResponse.java
@@ -0,0 +1,46 @@
+/**
+ * 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.usnap.models;
+
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+public class DescribeSnapshotServiceUpgradePriceResponse extends Response {
+
+ /** 价格 */
+ @SerializedName("Price")
+ private Integer price;
+
+ /** 折扣后价格 */
+ @SerializedName("OriginalPrice")
+ private Integer originalPrice;
+
+ public Integer getPrice() {
+ return price;
+ }
+
+ public void setPrice(Integer price) {
+ this.price = price;
+ }
+
+ public Integer getOriginalPrice() {
+ return originalPrice;
+ }
+
+ public void setOriginalPrice(Integer originalPrice) {
+ this.originalPrice = originalPrice;
+ }
+}
diff --git a/ucloud-sdk-java-uvms/pom.xml b/ucloud-sdk-java-uvms/pom.xml
index d05f0261..0e253f46 100644
--- a/ucloud-sdk-java-uvms/pom.xml
+++ b/ucloud-sdk-java-uvms/pom.xml
@@ -5,18 +5,18 @@