diff --git a/VERSION b/VERSION index 73f2dafd..0ee5fb6b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.14-release +1.2.15-release diff --git a/examples/generic/pom.xml b/examples/generic/pom.xml index 965555c1..26fbf33e 100644 --- a/examples/generic/pom.xml +++ b/examples/generic/pom.xml @@ -7,7 +7,7 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 @@ -18,7 +18,7 @@ cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/examples/uhost/pom.xml b/examples/uhost/pom.xml index 40107939..80deb699 100644 --- a/examples/uhost/pom.xml +++ b/examples/uhost/pom.xml @@ -7,7 +7,7 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 @@ -18,7 +18,7 @@ cn.ucloud ucloud-sdk-java-uhost - 1.2.14-release + 1.2.15-release diff --git a/pom.xml b/pom.xml index a6a1989e..c3bce796 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ cn.ucloud ucloud-sdk-java pom - 1.2.14-release + 1.2.15-release ucloud-sdk-java-common ucloud-sdk-java-cube @@ -37,6 +37,7 @@ ucloud-sdk-java-uphone ucloud-sdk-java-uslk ucloud-sdk-java-usms + ucloud-sdk-java-usnap ucloud-sdk-java-uvms ucloud-sdk-java-vpc diff --git a/ucloud-sdk-java-common/pom.xml b/ucloud-sdk-java-common/pom.xml index c42f0da9..4fea366a 100644 --- a/ucloud-sdk-java-common/pom.xml +++ b/ucloud-sdk-java-common/pom.xml @@ -7,12 +7,12 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-cube/pom.xml b/ucloud-sdk-java-cube/pom.xml index 4c392a57..6857afde 100644 --- a/ucloud-sdk-java-cube/pom.xml +++ b/ucloud-sdk-java-cube/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-cube - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-ipsecvpn/pom.xml b/ucloud-sdk-java-ipsecvpn/pom.xml index fe70b0d6..a2abbe7b 100644 --- a/ucloud-sdk-java-ipsecvpn/pom.xml +++ b/ucloud-sdk-java-ipsecvpn/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-ipsecvpn - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-pathx/pom.xml b/ucloud-sdk-java-pathx/pom.xml index 22b5c573..c8103744 100644 --- a/ucloud-sdk-java-pathx/pom.xml +++ b/ucloud-sdk-java-pathx/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-pathx - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-sts/pom.xml b/ucloud-sdk-java-sts/pom.xml index c0438fef..b0426fdb 100644 --- a/ucloud-sdk-java-sts/pom.xml +++ b/ucloud-sdk-java-sts/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-sts - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-uaccount/pom.xml b/ucloud-sdk-java-uaccount/pom.xml index 4c2e8a51..124bae5d 100644 --- a/ucloud-sdk-java-uaccount/pom.xml +++ b/ucloud-sdk-java-uaccount/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-uaccount - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-ubill/pom.xml b/ucloud-sdk-java-ubill/pom.xml index 593137fb..17362612 100644 --- a/ucloud-sdk-java-ubill/pom.xml +++ b/ucloud-sdk-java-ubill/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-ubill - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-ucdn/pom.xml b/ucloud-sdk-java-ucdn/pom.xml index 85b8f7ed..f2ae49e0 100644 --- a/ucloud-sdk-java-ucdn/pom.xml +++ b/ucloud-sdk-java-ucdn/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-ucdn - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-ucompshare/pom.xml b/ucloud-sdk-java-ucompshare/pom.xml index aea1902f..62e27e92 100644 --- a/ucloud-sdk-java-ucompshare/pom.xml +++ b/ucloud-sdk-java-ucompshare/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-ucompshare - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-udb/pom.xml b/ucloud-sdk-java-udb/pom.xml index abe7d90f..15542f2f 100644 --- a/ucloud-sdk-java-udb/pom.xml +++ b/ucloud-sdk-java-udb/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-udb - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-udb/src/main/java/cn/ucloud/udb/models/StopUDBInstanceRequest.java b/ucloud-sdk-java-udb/src/main/java/cn/ucloud/udb/models/StopUDBInstanceRequest.java index 37b756b6..0ffc94ec 100644 --- a/ucloud-sdk-java-udb/src/main/java/cn/ucloud/udb/models/StopUDBInstanceRequest.java +++ b/ucloud-sdk-java-udb/src/main/java/cn/ucloud/udb/models/StopUDBInstanceRequest.java @@ -20,16 +20,19 @@ public class StopUDBInstanceRequest extends Request { - /** 地域。 参见 [地域和可用区列表](../summary/regionlist.html) */ + /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ @NotEmpty @UCloudParam("Region") private String region; - /** 可用区。参见 [可用区列表](../summary/regionlist.html) */ + /** 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ @UCloudParam("Zone") private String zone; - /** 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) */ + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ @UCloudParam("ProjectId") private String projectId; diff --git a/ucloud-sdk-java-udbproxy/pom.xml b/ucloud-sdk-java-udbproxy/pom.xml index 05dc3521..6dc6ce4c 100644 --- a/ucloud-sdk-java-udbproxy/pom.xml +++ b/ucloud-sdk-java-udbproxy/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-udbproxy - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-udi/pom.xml b/ucloud-sdk-java-udi/pom.xml index 230cf787..109baa78 100644 --- a/ucloud-sdk-java-udi/pom.xml +++ b/ucloud-sdk-java-udi/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-udi - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-udisk/pom.xml b/ucloud-sdk-java-udisk/pom.xml index fc912990..84e78057 100644 --- a/ucloud-sdk-java-udisk/pom.xml +++ b/ucloud-sdk-java-udisk/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-udisk - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-udpn/pom.xml b/ucloud-sdk-java-udpn/pom.xml index 7fdc090f..691e5d70 100644 --- a/ucloud-sdk-java-udpn/pom.xml +++ b/ucloud-sdk-java-udpn/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-udpn - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-uec/pom.xml b/ucloud-sdk-java-uec/pom.xml index d52cc3f8..05cee158 100644 --- a/ucloud-sdk-java-uec/pom.xml +++ b/ucloud-sdk-java-uec/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-uec - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-ufile/pom.xml b/ucloud-sdk-java-ufile/pom.xml index edb1accd..84acd84c 100644 --- a/ucloud-sdk-java-ufile/pom.xml +++ b/ucloud-sdk-java-ufile/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-ufile - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-ufs/pom.xml b/ucloud-sdk-java-ufs/pom.xml index 8b811068..bcf1f544 100644 --- a/ucloud-sdk-java-ufs/pom.xml +++ b/ucloud-sdk-java-ufs/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-ufs - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-uhost/pom.xml b/ucloud-sdk-java-uhost/pom.xml index fa9f4552..f095ef8b 100644 --- a/ucloud-sdk-java-uhost/pom.xml +++ b/ucloud-sdk-java-uhost/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-uhost - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-uk8s/pom.xml b/ucloud-sdk-java-uk8s/pom.xml index 4e96289f..73169377 100644 --- a/ucloud-sdk-java-uk8s/pom.xml +++ b/ucloud-sdk-java-uk8s/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-uk8s - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-ulb/pom.xml b/ucloud-sdk-java-ulb/pom.xml index 94fd7c65..6a619778 100644 --- a/ucloud-sdk-java-ulb/pom.xml +++ b/ucloud-sdk-java-ulb/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-ulb - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-umem/pom.xml b/ucloud-sdk-java-umem/pom.xml index 8df2d43e..8c0da835 100644 --- a/ucloud-sdk-java-umem/pom.xml +++ b/ucloud-sdk-java-umem/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-umem - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-umongodb/pom.xml b/ucloud-sdk-java-umongodb/pom.xml index b9b23ead..eb1cb800 100644 --- a/ucloud-sdk-java-umongodb/pom.xml +++ b/ucloud-sdk-java-umongodb/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-umongodb - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-unet/pom.xml b/ucloud-sdk-java-unet/pom.xml index 3ef165c9..5c4a0ece 100644 --- a/ucloud-sdk-java-unet/pom.xml +++ b/ucloud-sdk-java-unet/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-unet - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-unet/src/main/java/cn/ucloud/unet/models/DescribeFirewallRequest.java b/ucloud-sdk-java-unet/src/main/java/cn/ucloud/unet/models/DescribeFirewallRequest.java index 67071685..ce7ffc46 100644 --- a/ucloud-sdk-java-unet/src/main/java/cn/ucloud/unet/models/DescribeFirewallRequest.java +++ b/ucloud-sdk-java-unet/src/main/java/cn/ucloud/unet/models/DescribeFirewallRequest.java @@ -34,13 +34,14 @@ public class DescribeFirewallRequest extends Request { private String fwId; /** - * 绑定防火墙组的资源类型,默认为全部资源类型。枚举值为:"unatgw",NAT网关; "uhost",云主机;“uni”,虚拟网卡; "upm",物理云主机; - * "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计. + * 绑定防火墙的资源类型,仅获取资源对应防火墙信息时需要。枚举值为:"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; + * "hadoophost",hadoop节点; "fortresshost",堡垒机; + * "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计;”uni“,虚拟网卡;“cube”,Cube容器实例;“ulb”,负载均衡实例。 */ @UCloudParam("ResourceType") private String resourceType; - /** 绑定防火墙组的资源ID */ + /** 绑定防火墙组的资源ID。 */ @UCloudParam("ResourceId") private String resourceId; diff --git a/ucloud-sdk-java-unet/src/main/java/cn/ucloud/unet/models/GrantFirewallRequest.java b/ucloud-sdk-java-unet/src/main/java/cn/ucloud/unet/models/GrantFirewallRequest.java index c48cb31d..58dd9dfd 100644 --- a/ucloud-sdk-java-unet/src/main/java/cn/ucloud/unet/models/GrantFirewallRequest.java +++ b/ucloud-sdk-java-unet/src/main/java/cn/ucloud/unet/models/GrantFirewallRequest.java @@ -38,9 +38,9 @@ public class GrantFirewallRequest extends Request { private String fwId; /** - * 绑定防火墙组的资源类型,默认为全部资源类型。枚举值为:"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; + * 绑定防火墙的资源类型,枚举值为:"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; * "fortresshost",堡垒机; - * "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计,”uni“,虚拟网卡,“cube”,Cube容器实例。 + * "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计;”uni“,虚拟网卡;“cube”,Cube容器实例;“ulb”,负载均衡实例。 */ @NotEmpty @UCloudParam("ResourceType") diff --git a/ucloud-sdk-java-upgsql/pom.xml b/ucloud-sdk-java-upgsql/pom.xml index 792397b1..43c2fe60 100644 --- a/ucloud-sdk-java-upgsql/pom.xml +++ b/ucloud-sdk-java-upgsql/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-upgsql - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-uphone/pom.xml b/ucloud-sdk-java-uphone/pom.xml index 0872ec75..6d9aa0ce 100644 --- a/ucloud-sdk-java-uphone/pom.xml +++ b/ucloud-sdk-java-uphone/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-uphone - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-uphost/pom.xml b/ucloud-sdk-java-uphost/pom.xml index ead95c47..614244c0 100644 --- a/ucloud-sdk-java-uphost/pom.xml +++ b/ucloud-sdk-java-uphost/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-uphost - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-uslk/pom.xml b/ucloud-sdk-java-uslk/pom.xml index ce706c78..e3a8f60e 100644 --- a/ucloud-sdk-java-uslk/pom.xml +++ b/ucloud-sdk-java-uslk/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-uslk - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-usms/pom.xml b/ucloud-sdk-java-usms/pom.xml index 7fba5a31..9073218c 100644 --- a/ucloud-sdk-java-usms/pom.xml +++ b/ucloud-sdk-java-usms/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-usms - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-usnap/pom.xml b/ucloud-sdk-java-usnap/pom.xml new file mode 100644 index 00000000..14cfbafb --- /dev/null +++ b/ucloud-sdk-java-usnap/pom.xml @@ -0,0 +1,48 @@ + + + + ucloud-sdk-java + cn.ucloud + 1.2.15-release + + + 4.0.0 + ucloud-sdk-java-usnap + 1.2.15-release + + + + cn.ucloud + ucloud-sdk-java-common + 1.2.15-release + + + + com.google.code.gson + gson + + + + commons-codec + commons-codec + + + org.apache.commons + commons-lang3 + + + + junit + junit + test + + + + org.slf4j + slf4j-simple + provided + + + \ No newline at end of file diff --git a/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/client/USnapClient.java b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/client/USnapClient.java new file mode 100644 index 00000000..7e05629b --- /dev/null +++ b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/client/USnapClient.java @@ -0,0 +1,101 @@ +/** + * 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.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 dataSet; + + /** 快照服务DataSet总数 */ + @SerializedName("TotalCount") + private Integer totalCount; + + public List getDataSet() { + return dataSet; + } + + public void setDataSet(List dataSet) { + this.dataSet = dataSet; + } + + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + public static class SnapshotServiceDataSet extends Response { + + /** 可用区信息 */ + @SerializedName("Zone") + private String zone; + + /** 创建时间 */ + @SerializedName("CreateTime") + private Integer createTime; + + /** 磁盘Id */ + @SerializedName("VDiskId") + private String vDiskId; + + /** 状态:Available(可用),InAvailable(不可用),Expired(欠费) */ + @SerializedName("Status") + private String status; + + /** "UDiskData" 云盘数据盘; ”UDiskBoot“ 云盘系统盘 */ + @SerializedName("VDiskType") + private String vDiskType; + + /** 磁盘是否可用,1表示可用,0表示不可用 */ + @SerializedName("VDiskStatus") + private Integer vDiskStatus; + + /** 磁盘大小 (G) */ + @SerializedName("VDiskSize") + private Integer vDiskSize; + + /** 服务ID */ + @SerializedName("ServiceId") + private String serviceId; + + /** 磁盘名 */ + @SerializedName("VDiskName") + private String vDiskName; + + /** 过期时间 */ + @SerializedName("ExpiredTime") + private Integer expiredTime; + + /** 计费类型 */ + @SerializedName("ChargeType") + private String chargeType; + + /** 计费是否过期 */ + @SerializedName("IsExpire") + private String isExpire; + + /** 是否自动续费 */ + @SerializedName("AutoRenew") + private String autoRenew; + + /** 业务组 */ + @SerializedName("Tag") + private String tag; + + public String getZone() { + return zone; + } + + public void setZone(String zone) { + this.zone = zone; + } + + public Integer getCreateTime() { + return createTime; + } + + public void setCreateTime(Integer createTime) { + this.createTime = createTime; + } + + public String getVDiskId() { + return vDiskId; + } + + public void setVDiskId(String vDiskId) { + this.vDiskId = vDiskId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getVDiskType() { + return vDiskType; + } + + public void setVDiskType(String vDiskType) { + this.vDiskType = vDiskType; + } + + public Integer getVDiskStatus() { + return vDiskStatus; + } + + public void setVDiskStatus(Integer vDiskStatus) { + this.vDiskStatus = vDiskStatus; + } + + public Integer getVDiskSize() { + return vDiskSize; + } + + public void setVDiskSize(Integer vDiskSize) { + this.vDiskSize = vDiskSize; + } + + public String getServiceId() { + return serviceId; + } + + public void setServiceId(String serviceId) { + this.serviceId = serviceId; + } + + public String getVDiskName() { + return vDiskName; + } + + public void setVDiskName(String vDiskName) { + this.vDiskName = vDiskName; + } + + public Integer getExpiredTime() { + return expiredTime; + } + + public void setExpiredTime(Integer expiredTime) { + this.expiredTime = expiredTime; + } + + public String getChargeType() { + return chargeType; + } + + public void setChargeType(String chargeType) { + this.chargeType = chargeType; + } + + public String getIsExpire() { + return isExpire; + } + + public void setIsExpire(String isExpire) { + this.isExpire = isExpire; + } + + public String getAutoRenew() { + return autoRenew; + } + + public void setAutoRenew(String autoRenew) { + this.autoRenew = autoRenew; + } + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + } +} diff --git a/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServiceUpgradePriceRequest.java b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServiceUpgradePriceRequest.java new file mode 100644 index 00000000..5bb8b1dd --- /dev/null +++ b/ucloud-sdk-java-usnap/src/main/java/cn/ucloud/usnap/models/DescribeSnapshotServiceUpgradePriceRequest.java @@ -0,0 +1,101 @@ +/** + * 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 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 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-uvms - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release diff --git a/ucloud-sdk-java-vpc/pom.xml b/ucloud-sdk-java-vpc/pom.xml index a5603981..1f6a2065 100644 --- a/ucloud-sdk-java-vpc/pom.xml +++ b/ucloud-sdk-java-vpc/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.14-release + 1.2.15-release 4.0.0 ucloud-sdk-java-vpc - 1.2.14-release + 1.2.15-release cn.ucloud ucloud-sdk-java-common - 1.2.14-release + 1.2.15-release