From 7a572d350a6def489be9fd3f15c0339709e021d9 Mon Sep 17 00:00:00 2001 From: ucloud-bot Date: Wed, 27 Dec 2023 08:38:41 +0000 Subject: [PATCH] sdk: rolling update for 1.2.20-release --- VERSION | 2 +- examples/generic/pom.xml | 4 +- examples/uhost/pom.xml | 4 +- pom.xml | 3 +- ucloud-sdk-java-common/pom.xml | 4 +- ucloud-sdk-java-cube/pom.xml | 6 +- ucloud-sdk-java-ipsecvpn/pom.xml | 6 +- ucloud-sdk-java-pathx/pom.xml | 6 +- ucloud-sdk-java-sts/pom.xml | 6 +- ucloud-sdk-java-uaccount/pom.xml | 6 +- ucloud-sdk-java-ubill/pom.xml | 6 +- ucloud-sdk-java-ucdn/pom.xml | 6 +- ucloud-sdk-java-ucompshare/pom.xml | 6 +- .../ReinstallULHostInstanceRequest.java | 2 +- ucloud-sdk-java-udb/pom.xml | 6 +- .../models/DescribeUDBInstanceResponse.java | 50 +- ucloud-sdk-java-udbproxy/pom.xml | 6 +- ucloud-sdk-java-udi/pom.xml | 6 +- ucloud-sdk-java-udisk/pom.xml | 6 +- ucloud-sdk-java-udpn/pom.xml | 6 +- ucloud-sdk-java-uec/pom.xml | 6 +- ucloud-sdk-java-uewaf/pom.xml | 6 +- ucloud-sdk-java-ufile/pom.xml | 6 +- .../models/CreateUFileLifeCycleRequest.java | 12 + .../models/GetUFileDailyReportResponse.java | 74 +- .../models/UpdateUFileLifeCycleRequest.java | 12 + ucloud-sdk-java-ufs/pom.xml | 6 +- ucloud-sdk-java-uhost/pom.xml | 6 +- ucloud-sdk-java-uk8s/pom.xml | 6 +- ucloud-sdk-java-ulb/pom.xml | 6 +- .../java/cn/ucloud/ulb/client/ULBClient.java | 56 + .../ucloud/ulb/client/ULBClientInterface.java | 42 + .../ucloud/ulb/models/CreateRuleRequest.java | 266 ++++ .../ucloud/ulb/models/CreateRuleResponse.java | 34 + .../ulb/models/DescribeListenersRequest.java | 99 ++ .../ulb/models/DescribeListenersResponse.java | 750 +++++++++++ .../models/DescribeLoadBalancersRequest.java | 136 ++ .../models/DescribeLoadBalancersResponse.java | 1125 +++++++++++++++++ .../ulb/models/DescribeRulesRequest.java | 89 ++ .../ulb/models/DescribeRulesResponse.java | 248 ++++ ucloud-sdk-java-umem/pom.xml | 6 +- ucloud-sdk-java-umongodb/pom.xml | 6 +- ucloud-sdk-java-unet/pom.xml | 6 +- ucloud-sdk-java-upgsql/pom.xml | 6 +- ucloud-sdk-java-uphone/pom.xml | 6 +- ucloud-sdk-java-uphost/pom.xml | 6 +- ucloud-sdk-java-uslk/pom.xml | 6 +- ucloud-sdk-java-usms/pom.xml | 6 +- .../cn/ucloud/usms/client/USMSClient.java | 13 + .../usms/client/USMSClientInterface.java | 10 + .../usms/models/AddBackfillRequest.java | 124 ++ .../usms/models/AddBackfillResponse.java | 20 + ucloud-sdk-java-usnap/pom.xml | 6 +- ucloud-sdk-java-uvms/pom.xml | 6 +- ucloud-sdk-java-vpc/pom.xml | 6 +- 55 files changed, 3243 insertions(+), 122 deletions(-) create mode 100644 ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/CreateRuleRequest.java create mode 100644 ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/CreateRuleResponse.java create mode 100644 ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeListenersRequest.java create mode 100644 ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeListenersResponse.java create mode 100644 ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeLoadBalancersRequest.java create mode 100644 ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeLoadBalancersResponse.java create mode 100644 ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeRulesRequest.java create mode 100644 ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeRulesResponse.java create mode 100644 ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/models/AddBackfillRequest.java create mode 100644 ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/models/AddBackfillResponse.java diff --git a/VERSION b/VERSION index 736eaca4..a4d3acbc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.19-release +1.2.20-release diff --git a/examples/generic/pom.xml b/examples/generic/pom.xml index a13ef106..dfe6e16a 100644 --- a/examples/generic/pom.xml +++ b/examples/generic/pom.xml @@ -7,7 +7,7 @@ ucloud-sdk-java cn.ucloud - 1.2.19-release + 1.2.20-release 4.0.0 @@ -18,7 +18,7 @@ cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/examples/uhost/pom.xml b/examples/uhost/pom.xml index 4683352e..26508d18 100644 --- a/examples/uhost/pom.xml +++ b/examples/uhost/pom.xml @@ -7,7 +7,7 @@ ucloud-sdk-java cn.ucloud - 1.2.19-release + 1.2.20-release 4.0.0 @@ -18,7 +18,7 @@ cn.ucloud ucloud-sdk-java-uhost - 1.2.19-release + 1.2.20-release diff --git a/pom.xml b/pom.xml index 929c7d15..287a263e 100644 --- a/pom.xml +++ b/pom.xml @@ -7,13 +7,14 @@ cn.ucloud ucloud-sdk-java pom - 1.2.19-release + 1.2.20-release ucloud-sdk-java-common ucloud-sdk-java-cube ucloud-sdk-java-ipsecvpn ucloud-sdk-java-pathx ucloud-sdk-java-sts + ucloud-sdk-java-uai_modelverse ucloud-sdk-java-uaccount ucloud-sdk-java-ubill ucloud-sdk-java-ucdn diff --git a/ucloud-sdk-java-common/pom.xml b/ucloud-sdk-java-common/pom.xml index eaea7e85..87b53e13 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-cube/pom.xml b/ucloud-sdk-java-cube/pom.xml index 3c71b921..9ec5bc84 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-cube - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-ipsecvpn/pom.xml b/ucloud-sdk-java-ipsecvpn/pom.xml index 63ad7c69..ef370df9 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-ipsecvpn - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-pathx/pom.xml b/ucloud-sdk-java-pathx/pom.xml index cfd00929..d2be7627 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-pathx - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-sts/pom.xml b/ucloud-sdk-java-sts/pom.xml index a3e3626a..57e4e3b9 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-sts - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-uaccount/pom.xml b/ucloud-sdk-java-uaccount/pom.xml index 30483e9a..5e3c7e24 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-uaccount - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-ubill/pom.xml b/ucloud-sdk-java-ubill/pom.xml index d5549e43..eeae5cbd 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-ubill - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-ucdn/pom.xml b/ucloud-sdk-java-ucdn/pom.xml index 6508d745..fd037093 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-ucdn - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-ucompshare/pom.xml b/ucloud-sdk-java-ucompshare/pom.xml index dad34141..e94d773a 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-ucompshare - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-ucompshare/src/main/java/cn/ucloud/ucompshare/models/ReinstallULHostInstanceRequest.java b/ucloud-sdk-java-ucompshare/src/main/java/cn/ucloud/ucompshare/models/ReinstallULHostInstanceRequest.java index 243fd17a..eacc9269 100644 --- a/ucloud-sdk-java-ucompshare/src/main/java/cn/ucloud/ucompshare/models/ReinstallULHostInstanceRequest.java +++ b/ucloud-sdk-java-ucompshare/src/main/java/cn/ucloud/ucompshare/models/ReinstallULHostInstanceRequest.java @@ -42,7 +42,7 @@ public class ReinstallULHostInstanceRequest extends Request { @UCloudParam("ULHostId") private String ulHostId; - /** 登陆密码 */ + /** 登陆密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64UGFzc3dvcmQx */ @NotEmpty @UCloudParam("Password") private String password; diff --git a/ucloud-sdk-java-udb/pom.xml b/ucloud-sdk-java-udb/pom.xml index f739b7f9..d793de09 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-udb - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-udb/src/main/java/cn/ucloud/udb/models/DescribeUDBInstanceResponse.java b/ucloud-sdk-java-udb/src/main/java/cn/ucloud/udb/models/DescribeUDBInstanceResponse.java index 8134ed45..e8eb53fe 100644 --- a/ucloud-sdk-java-udb/src/main/java/cn/ucloud/udb/models/DescribeUDBInstanceResponse.java +++ b/ucloud-sdk-java-udb/src/main/java/cn/ucloud/udb/models/DescribeUDBInstanceResponse.java @@ -141,7 +141,7 @@ public static class UDBInstanceSet extends Response { * DB状态标记 * Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover * fail:恢复失败, - * Remakeing:重做中,RemakeFail:重做失败,VersionUpgrading:小版本升级中,VersionUpgradeWaitForSwitch:高可用等待切换,VersionUpgradeFail:小版本升级失败 + * Remakeing:重做中,RemakeFail:重做失败,VersionUpgrading:小版本升级中,VersionUpgradeWaitForSwitch:高可用等待切换,VersionUpgradeFail:小版本升级失败,UpdatingSSL:修改SSL中,UpdateSSLFail:修改SSL失败 */ @SerializedName("State") private String state; @@ -232,6 +232,18 @@ public static class UDBInstanceSet extends Response { @SerializedName("DBSubVersion") private String dbSubVersion; + /** mysql是否开启了SSL;1->未开启 2->开启 */ + @SerializedName("EnableSSL") + private Integer enableSSL; + + /** SSL到期时间 */ + @SerializedName("SSLExpirationTime") + private Integer sslExpirationTime; + + /** 默认的备份方式,nobackup表示不备份, snapshot 表示使用快照备份,logic 表示使用逻辑备份,xtrabackup表示使用物理备份。 */ + @SerializedName("BackupMethod") + private String backupMethod; + public String getZone() { return zone; } @@ -567,6 +579,30 @@ public String getDBSubVersion() { public void setDBSubVersion(String dbSubVersion) { this.dbSubVersion = dbSubVersion; } + + public Integer getEnableSSL() { + return enableSSL; + } + + public void setEnableSSL(Integer enableSSL) { + this.enableSSL = enableSSL; + } + + public Integer getSSLExpirationTime() { + return sslExpirationTime; + } + + public void setSSLExpirationTime(Integer sslExpirationTime) { + this.sslExpirationTime = sslExpirationTime; + } + + public String getBackupMethod() { + return backupMethod; + } + + public void setBackupMethod(String backupMethod) { + this.backupMethod = backupMethod; + } } public static class UDBSlaveInstanceSet extends Response { @@ -732,10 +768,6 @@ public static class UDBSlaveInstanceSet extends Response { @SerializedName("Tag") private String tag; - /** 获取该实例的IPv6地址 */ - @SerializedName("IPv6Address") - private String iPv6Address; - /** 0 区分大小写, 1不区分, 只针对mysql8.0 */ @SerializedName("CaseSensitivityParam") private Integer caseSensitivityParam; @@ -1036,14 +1068,6 @@ public void setTag(String tag) { this.tag = tag; } - public String getIPv6Address() { - return iPv6Address; - } - - public void setIPv6Address(String iPv6Address) { - this.iPv6Address = iPv6Address; - } - public Integer getCaseSensitivityParam() { return caseSensitivityParam; } diff --git a/ucloud-sdk-java-udbproxy/pom.xml b/ucloud-sdk-java-udbproxy/pom.xml index d5273e53..9d59a59c 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-udbproxy - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-udi/pom.xml b/ucloud-sdk-java-udi/pom.xml index 4524be08..a10134db 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-udi - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-udisk/pom.xml b/ucloud-sdk-java-udisk/pom.xml index eb4af231..9719de3a 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-udisk - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-udpn/pom.xml b/ucloud-sdk-java-udpn/pom.xml index e1b387d9..1e70012f 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-udpn - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-uec/pom.xml b/ucloud-sdk-java-uec/pom.xml index 5aaba627..616d00be 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-uec - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-uewaf/pom.xml b/ucloud-sdk-java-uewaf/pom.xml index c4dee010..98070039 100644 --- a/ucloud-sdk-java-uewaf/pom.xml +++ b/ucloud-sdk-java-uewaf/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-uewaf - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-ufile/pom.xml b/ucloud-sdk-java-ufile/pom.xml index db886190..3128c158 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-ufile - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-ufile/src/main/java/cn/ucloud/ufile/models/CreateUFileLifeCycleRequest.java b/ucloud-sdk-java-ufile/src/main/java/cn/ucloud/ufile/models/CreateUFileLifeCycleRequest.java index 0ba6906e..e5e9fb60 100644 --- a/ucloud-sdk-java-ufile/src/main/java/cn/ucloud/ufile/models/CreateUFileLifeCycleRequest.java +++ b/ucloud-sdk-java-ufile/src/main/java/cn/ucloud/ufile/models/CreateUFileLifeCycleRequest.java @@ -63,6 +63,10 @@ public class CreateUFileLifeCycleRequest extends Request { @UCloudParam("IADays") private Integer iaDays; + /** Tag,参数格式"k1=v1&k2=v2",key的最大长度为128, value最大长度为256byte,单个object的tag的最大数量为10 */ + @UCloudParam("Tags") + private String tags; + public String getRegion() { return region; } @@ -134,4 +138,12 @@ public Integer getIADays() { public void setIADays(Integer iaDays) { this.iaDays = iaDays; } + + public String getTags() { + return tags; + } + + public void setTags(String tags) { + this.tags = tags; + } } diff --git a/ucloud-sdk-java-ufile/src/main/java/cn/ucloud/ufile/models/GetUFileDailyReportResponse.java b/ucloud-sdk-java-ufile/src/main/java/cn/ucloud/ufile/models/GetUFileDailyReportResponse.java index 1284af36..b16a2cea 100644 --- a/ucloud-sdk-java-ufile/src/main/java/cn/ucloud/ufile/models/GetUFileDailyReportResponse.java +++ b/ucloud-sdk-java-ufile/src/main/java/cn/ucloud/ufile/models/GetUFileDailyReportResponse.java @@ -35,26 +35,46 @@ public void setDataSet(List dataSet) { public static class UFileDailyReportItem extends Response { - /** 标准存储量;单位GB */ + /** 标准-存储总容量;单位GB */ @SerializedName("Storage") private Double storage; - /** 低频存储量;单位GB */ + /** 低频-存储总容量;单位GB */ @SerializedName("IaStorage") private Double iaStorage; - /** 冷存(归档)存储量;单位GB */ + /** 归档-存储总容量;单位GB */ @SerializedName("AcStorage") private Double acStorage; - /** 低频数据取回量;单位GB */ + /** 低频-数据取回量,即低频文件的数据取回量;单位GB */ @SerializedName("IaGetSize") private Double iaGetSize; - /** 冷存激活量,即归档数据取回量;单位GB */ + /** 归档-标准解冻量,即归档文件的解冻类型为标准(Strandard)的解冻量;单位GB */ @SerializedName("AcRestore") private Double acRestore; + /** 归档-高优先级解冻量,即归档文件的解冻类型为高优先级(Expedited)的解冻量;单位GB */ + @SerializedName("AcExpeditedRetrieval") + private Double acExpeditedRetrieval; + + /** 低频-短期存储量,即补足未满最短存储期限的剩余天数的存储量;单位GB */ + @SerializedName("IaShortStorage") + private Double iaShortStorage; + + /** 归档-短期存储量,即补足未满最短存储期限的剩余天数的存储量;单位GB */ + @SerializedName("AcShortStorage") + private Double acShortStorage; + + /** 基础图片处理量;单位GB */ + @SerializedName("ImageHandleFlow") + private Double imageHandleFlow; + + /** 图片高级压缩次数;单位千次 */ + @SerializedName("ImageCompressCount") + private Double imageCompressCount; + /** 忙时流量;单位GB;海外无此字段 */ @SerializedName("BusyFlow") private Double busyFlow; @@ -71,11 +91,11 @@ public static class UFileDailyReportItem extends Response { @SerializedName("Flow") private Double flow; - /** 配额消费时间,unix时间戳(单位s),精确到日期 */ + /** 配额消费时间,unix时间戳;单位s,精确到日期 */ @SerializedName("Date") private Integer date; - /** API请求次数(万次) */ + /** 请求次数;单位万次 */ @SerializedName("ApiTimes") private Double apiTimes; @@ -119,6 +139,46 @@ public void setAcRestore(Double acRestore) { this.acRestore = acRestore; } + public Double getAcExpeditedRetrieval() { + return acExpeditedRetrieval; + } + + public void setAcExpeditedRetrieval(Double acExpeditedRetrieval) { + this.acExpeditedRetrieval = acExpeditedRetrieval; + } + + public Double getIaShortStorage() { + return iaShortStorage; + } + + public void setIaShortStorage(Double iaShortStorage) { + this.iaShortStorage = iaShortStorage; + } + + public Double getAcShortStorage() { + return acShortStorage; + } + + public void setAcShortStorage(Double acShortStorage) { + this.acShortStorage = acShortStorage; + } + + public Double getImageHandleFlow() { + return imageHandleFlow; + } + + public void setImageHandleFlow(Double imageHandleFlow) { + this.imageHandleFlow = imageHandleFlow; + } + + public Double getImageCompressCount() { + return imageCompressCount; + } + + public void setImageCompressCount(Double imageCompressCount) { + this.imageCompressCount = imageCompressCount; + } + public Double getBusyFlow() { return busyFlow; } diff --git a/ucloud-sdk-java-ufile/src/main/java/cn/ucloud/ufile/models/UpdateUFileLifeCycleRequest.java b/ucloud-sdk-java-ufile/src/main/java/cn/ucloud/ufile/models/UpdateUFileLifeCycleRequest.java index 1ecd1026..f22bbb31 100644 --- a/ucloud-sdk-java-ufile/src/main/java/cn/ucloud/ufile/models/UpdateUFileLifeCycleRequest.java +++ b/ucloud-sdk-java-ufile/src/main/java/cn/ucloud/ufile/models/UpdateUFileLifeCycleRequest.java @@ -68,6 +68,10 @@ public class UpdateUFileLifeCycleRequest extends Request { @UCloudParam("IADays") private Integer iaDays; + /** Tag,参数格式"k1=v1&k2=v2",key的最大长度为128, value最大长度为256byte,单个object的tag的最大数量为10 */ + @UCloudParam("Tags") + private String tags; + public String getRegion() { return region; } @@ -147,4 +151,12 @@ public Integer getIADays() { public void setIADays(Integer iaDays) { this.iaDays = iaDays; } + + public String getTags() { + return tags; + } + + public void setTags(String tags) { + this.tags = tags; + } } diff --git a/ucloud-sdk-java-ufs/pom.xml b/ucloud-sdk-java-ufs/pom.xml index df01520c..2a196755 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-ufs - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-uhost/pom.xml b/ucloud-sdk-java-uhost/pom.xml index 1456a2c6..3eeb0c83 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-uhost - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-uk8s/pom.xml b/ucloud-sdk-java-uk8s/pom.xml index 126b3111..503b95f3 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-uk8s - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-ulb/pom.xml b/ucloud-sdk-java-ulb/pom.xml index 4738ca7a..e08d26de 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-ulb - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/client/ULBClient.java b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/client/ULBClient.java index 4f1eda0d..f8a53659 100644 --- a/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/client/ULBClient.java +++ b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/client/ULBClient.java @@ -29,6 +29,8 @@ import cn.ucloud.ulb.models.CreateLoadBalancerResponse; import cn.ucloud.ulb.models.CreatePolicyRequest; import cn.ucloud.ulb.models.CreatePolicyResponse; +import cn.ucloud.ulb.models.CreateRuleRequest; +import cn.ucloud.ulb.models.CreateRuleResponse; import cn.ucloud.ulb.models.CreateSSLRequest; import cn.ucloud.ulb.models.CreateSSLResponse; import cn.ucloud.ulb.models.CreateSecurityPolicyRequest; @@ -53,6 +55,12 @@ import cn.ucloud.ulb.models.DeleteULBResponse; import cn.ucloud.ulb.models.DeleteVServerRequest; import cn.ucloud.ulb.models.DeleteVServerResponse; +import cn.ucloud.ulb.models.DescribeListenersRequest; +import cn.ucloud.ulb.models.DescribeListenersResponse; +import cn.ucloud.ulb.models.DescribeLoadBalancersRequest; +import cn.ucloud.ulb.models.DescribeLoadBalancersResponse; +import cn.ucloud.ulb.models.DescribeRulesRequest; +import cn.ucloud.ulb.models.DescribeRulesResponse; import cn.ucloud.ulb.models.DescribeSSLRequest; import cn.ucloud.ulb.models.DescribeSSLResponse; import cn.ucloud.ulb.models.DescribeSSLV2Request; @@ -177,6 +185,17 @@ public CreatePolicyResponse createPolicy(CreatePolicyRequest request) throws UCl return (CreatePolicyResponse) this.invoke(request, CreatePolicyResponse.class); } + /** + * CreateRule - 创建应用型负载均衡的转发规则 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateRuleResponse createRule(CreateRuleRequest request) throws UCloudException { + request.setAction("CreateRule"); + return (CreateRuleResponse) this.invoke(request, CreateRuleResponse.class); + } + /** * CreateSSL - 创建SSL证书 * @@ -317,6 +336,43 @@ public DeleteVServerResponse deleteVServer(DeleteVServerRequest request) return (DeleteVServerResponse) this.invoke(request, DeleteVServerResponse.class); } + /** + * DescribeListeners - 描述应用型负载均衡监听器 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeListenersResponse describeListeners(DescribeListenersRequest request) + throws UCloudException { + request.setAction("DescribeListeners"); + return (DescribeListenersResponse) this.invoke(request, DescribeListenersResponse.class); + } + + /** + * DescribeLoadBalancers - 描述应用型负载均衡实例 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeLoadBalancersResponse describeLoadBalancers(DescribeLoadBalancersRequest request) + throws UCloudException { + request.setAction("DescribeLoadBalancers"); + return (DescribeLoadBalancersResponse) + this.invoke(request, DescribeLoadBalancersResponse.class); + } + + /** + * DescribeRules - 描述应用型负载均衡转发规则 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeRulesResponse describeRules(DescribeRulesRequest request) + throws UCloudException { + request.setAction("DescribeRules"); + return (DescribeRulesResponse) this.invoke(request, DescribeRulesResponse.class); + } + /** * DescribeSSL - 获取SSL证书信息 * diff --git a/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/client/ULBClientInterface.java b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/client/ULBClientInterface.java index df0d9410..958d47f3 100644 --- a/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/client/ULBClientInterface.java +++ b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/client/ULBClientInterface.java @@ -27,6 +27,8 @@ import cn.ucloud.ulb.models.CreateLoadBalancerResponse; import cn.ucloud.ulb.models.CreatePolicyRequest; import cn.ucloud.ulb.models.CreatePolicyResponse; +import cn.ucloud.ulb.models.CreateRuleRequest; +import cn.ucloud.ulb.models.CreateRuleResponse; import cn.ucloud.ulb.models.CreateSSLRequest; import cn.ucloud.ulb.models.CreateSSLResponse; import cn.ucloud.ulb.models.CreateSecurityPolicyRequest; @@ -51,6 +53,12 @@ import cn.ucloud.ulb.models.DeleteULBResponse; import cn.ucloud.ulb.models.DeleteVServerRequest; import cn.ucloud.ulb.models.DeleteVServerResponse; +import cn.ucloud.ulb.models.DescribeListenersRequest; +import cn.ucloud.ulb.models.DescribeListenersResponse; +import cn.ucloud.ulb.models.DescribeLoadBalancersRequest; +import cn.ucloud.ulb.models.DescribeLoadBalancersResponse; +import cn.ucloud.ulb.models.DescribeRulesRequest; +import cn.ucloud.ulb.models.DescribeRulesResponse; import cn.ucloud.ulb.models.DescribeSSLRequest; import cn.ucloud.ulb.models.DescribeSSLResponse; import cn.ucloud.ulb.models.DescribeSSLV2Request; @@ -154,6 +162,14 @@ public CreateLoadBalancerResponse createLoadBalancer(CreateLoadBalancerRequest r */ public CreatePolicyResponse createPolicy(CreatePolicyRequest request) throws UCloudException; + /** + * CreateRule - 创建应用型负载均衡的转发规则 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateRuleResponse createRule(CreateRuleRequest request) throws UCloudException; + /** * CreateSSL - 创建SSL证书 * @@ -254,6 +270,32 @@ public DeleteSecurityPolicyResponse deleteSecurityPolicy(DeleteSecurityPolicyReq */ public DeleteVServerResponse deleteVServer(DeleteVServerRequest request) throws UCloudException; + /** + * DescribeListeners - 描述应用型负载均衡监听器 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeListenersResponse describeListeners(DescribeListenersRequest request) + throws UCloudException; + + /** + * DescribeLoadBalancers - 描述应用型负载均衡实例 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeLoadBalancersResponse describeLoadBalancers(DescribeLoadBalancersRequest request) + throws UCloudException; + + /** + * DescribeRules - 描述应用型负载均衡转发规则 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeRulesResponse describeRules(DescribeRulesRequest request) throws UCloudException; + /** * DescribeSSL - 获取SSL证书信息 * diff --git a/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/CreateRuleRequest.java b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/CreateRuleRequest.java new file mode 100644 index 00000000..0aafcbe2 --- /dev/null +++ b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/CreateRuleRequest.java @@ -0,0 +1,266 @@ +/** + * 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.ulb.models; + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +import java.util.List; + +public class CreateRuleRequest 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) + */ + @NotEmpty + @UCloudParam("ProjectId") + private String projectId; + + /** 负载均衡实例的ID */ + @NotEmpty + @UCloudParam("LoadBalancerId") + private String loadBalancerId; + + /** 监听器的ID */ + @NotEmpty + @UCloudParam("ListenerId") + private String listenerId; + + /** */ + @UCloudParam("RuleConditions") + private List ruleConditions; + + /** */ + @UCloudParam("RuleActions") + private List ruleActions; + + /** 当转发的服务节点为空时,规则是否忽略。默认值true */ + @UCloudParam("Pass") + private Boolean pass; + + 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 String getLoadBalancerId() { + return loadBalancerId; + } + + public void setLoadBalancerId(String loadBalancerId) { + this.loadBalancerId = loadBalancerId; + } + + public String getListenerId() { + return listenerId; + } + + public void setListenerId(String listenerId) { + this.listenerId = listenerId; + } + + public List getRuleConditions() { + return ruleConditions; + } + + public void setRuleConditions(List ruleConditions) { + this.ruleConditions = ruleConditions; + } + + public List getRuleActions() { + return ruleActions; + } + + public void setRuleActions(List ruleActions) { + this.ruleActions = ruleActions; + } + + public Boolean getPass() { + return pass; + } + + public void setPass(Boolean pass) { + this.pass = pass; + } + + public static class RuleActions extends Request { + + /** 动作类型。限定枚举值:"Forward";RuleActions暂支持长度为1 */ + @NotEmpty + @UCloudParam("Type") + private String type; + + /** */ + @UCloudParam("ForwardConfig") + private RuleActionsForwardConfig forwardConfig; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public RuleActionsForwardConfig getForwardConfig() { + return forwardConfig; + } + + public void setForwardConfig(RuleActionsForwardConfig forwardConfig) { + this.forwardConfig = forwardConfig; + } + } + + public static class RuleActionsForwardConfig extends Request { + + /** */ + @UCloudParam("Targets") + private List targets; + + public List getTargets() { + return targets; + } + + public void setTargets(List targets) { + this.targets = targets; + } + } + + public static class RuleActionsForwardConfigTargets extends Request { + + /** 转发的后端服务节点的标识ID。限定在监听器的服务节点池里;数组长度可以是0;转发服务节点配置的数组长度不为0时,Id必填 */ + @UCloudParam("Id") + private String id; + + /** 转发的后端服务节点的权重。仅监听器负载均衡算法是加权轮询是有效 */ + @UCloudParam("Weight") + private Integer weight; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Integer getWeight() { + return weight; + } + + public void setWeight(Integer weight) { + this.weight = weight; + } + } + + public static class RuleConditions extends Request { + + /** 匹配条件类型。限定枚举值:"Host"/"Path" */ + @NotEmpty + @UCloudParam("Type") + private String type; + + /** */ + @UCloudParam("HostConfig") + private RuleConditionsHostConfig hostConfig; + + /** */ + @UCloudParam("PathConfig") + private RuleConditionsPathConfig pathConfig; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public RuleConditionsHostConfig getHostConfig() { + return hostConfig; + } + + public void setHostConfig(RuleConditionsHostConfig hostConfig) { + this.hostConfig = hostConfig; + } + + public RuleConditionsPathConfig getPathConfig() { + return pathConfig; + } + + public void setPathConfig(RuleConditionsPathConfig pathConfig) { + this.pathConfig = pathConfig; + } + } + + public static class RuleConditionsHostConfig extends Request { + + /** 匹配方式。限定枚举值:"Regular"/"Wildcard",默认值:"Regular" */ + @UCloudParam("MatchMode") + private String matchMode; + + /** 取值。暂时只支持数组长度为1;取值需符合相关匹配方式的条件;域名匹配时必填 */ + @UCloudParam("Values") + private List values; + + public String getMatchMode() { + return matchMode; + } + + public void setMatchMode(String matchMode) { + this.matchMode = matchMode; + } + + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + } + + public static class RuleConditionsPathConfig extends Request { + + /** 取值。暂时只支持数组长度为1;取值需符合相关条件;路径匹配时必填 */ + @UCloudParam("Values") + private List values; + + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + } +} diff --git a/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/CreateRuleResponse.java b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/CreateRuleResponse.java new file mode 100644 index 00000000..f15cfdf8 --- /dev/null +++ b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/CreateRuleResponse.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.ulb.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class CreateRuleResponse extends Response { + + /** 转发规则的ID */ + @SerializedName("RuleId") + private String ruleId; + + public String getRuleId() { + return ruleId; + } + + public void setRuleId(String ruleId) { + this.ruleId = ruleId; + } +} diff --git a/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeListenersRequest.java b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeListenersRequest.java new file mode 100644 index 00000000..b1a56064 --- /dev/null +++ b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeListenersRequest.java @@ -0,0 +1,99 @@ +/** + * 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.ulb.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DescribeListenersRequest 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) + */ + @NotEmpty + @UCloudParam("ProjectId") + private String projectId; + + /** 应用型负载均衡监听器的ID。若指定ListenerId,则忽略LoadBalancerId。ListenId和LoadBalancerId必选其一 */ + @UCloudParam("ListenerId") + private String listenerId; + + /** 应用型负载均衡实例的ID。未指定ListenId,则描述指定的LoadBalancerId下的所有监听器。 */ + @UCloudParam("LoadBalancerId") + private String loadBalancerId; + + /** 数据偏移量,默认为0 */ + @UCloudParam("Offset") + private Integer offset; + + /** 数据分页值,默认为100 */ + @UCloudParam("Limit") + private Integer limit; + + 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 String getListenerId() { + return listenerId; + } + + public void setListenerId(String listenerId) { + this.listenerId = listenerId; + } + + public String getLoadBalancerId() { + return loadBalancerId; + } + + public void setLoadBalancerId(String loadBalancerId) { + this.loadBalancerId = loadBalancerId; + } + + 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; + } +} diff --git a/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeListenersResponse.java b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeListenersResponse.java new file mode 100644 index 00000000..550fb823 --- /dev/null +++ b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeListenersResponse.java @@ -0,0 +1,750 @@ +/** + * 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.ulb.models; + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +import java.util.List; + +public class DescribeListenersResponse extends Response { + + /** 满足条件的负载均衡监听器总数 */ + @SerializedName("TotalCount") + private Integer totalCount; + + /** 负载均衡监听器信息 */ + @SerializedName("Listeners") + private List listeners; + + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + public List getListeners() { + return listeners; + } + + public void setListeners(List listeners) { + this.listeners = listeners; + } + + public static class Certificate extends Response { + + /** 证书ID */ + @SerializedName("SSLId") + private String sslId; + + /** 是否为默认证书 */ + @SerializedName("IsDefault") + private Boolean isDefault; + + public String getSSLId() { + return sslId; + } + + public void setSSLId(String sslId) { + this.sslId = sslId; + } + + public Boolean getIsDefault() { + return isDefault; + } + + public void setIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + } + } + + public static class ForwardConfigSet extends Response { + + /** 转发的后端服务节点。限定在监听器的服务节点池里;数组长度可以为0。具体结构详见 ForwardTargetSet */ + @SerializedName("Targets") + private List targets; + + public List getTargets() { + return targets; + } + + public void setTargets(List targets) { + this.targets = targets; + } + } + + public static class ForwardTargetSet extends Response { + + /** 服务节点的标识ID */ + @SerializedName("Id") + private String id; + + /** 权重。仅监听器负载均衡算法是加权轮询是有效;取值范围[1-100],默认值为1 */ + @SerializedName("Weight") + private Integer weight; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Integer getWeight() { + return weight; + } + + public void setWeight(Integer weight) { + this.weight = weight; + } + } + + public static class HealthCheckConfigSet extends Response { + + /** 是否开启健康检查功能。暂时不支持关闭。 默认值为:true */ + @SerializedName("Enabled") + private Boolean enabled; + + /** 健康检查方式。应用型限定取值: Port -> 端口检查;HTTP -> HTTP检查; 默认值:Port */ + @SerializedName("Type") + private String type; + + /** (应用型专用)HTTP检查域名。 当Type为HTTP时,此字段有意义,代表HTTP检查域名 */ + @SerializedName("Domain") + private String domain; + + /** (应用型专用)HTTP检查路径。当Type为HTTP时,此字段有意义,代表HTTP检查路径 */ + @SerializedName("Path") + private String path; + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + } + + public static class HostConfigSet extends Response { + + /** 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 */ + @SerializedName("Values") + private List values; + + /** 匹配方式。限定枚举值:Regular-正则,Wildcard-泛域名; 默认值:Regular */ + @SerializedName("MatchMode") + private String matchMode; + + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + + public String getMatchMode() { + return matchMode; + } + + public void setMatchMode(String matchMode) { + this.matchMode = matchMode; + } + } + + public static class Listener extends Response { + + /** 监听器的ID */ + @SerializedName("ListenerId") + private String listenerId; + + /** 监听器的名称 */ + @SerializedName("Name") + private String name; + + /** 监听器的备注信息 */ + @SerializedName("Remark") + private String remark; + + /** 监听器的监听端口 */ + @SerializedName("ListenerPort") + private Integer listenerPort; + + /** 监听协议。应用型限定取值: HTTP、HTTPS */ + @SerializedName("ListenerProtocol") + private String listenerProtocol; + + /** (应用型专用)服务器默认证书ID。仅HTTPS监听支持。具体接口详见 Certificate */ + @SerializedName("Certificates") + private List certificates; + + /** (应用型专用)安全策略组ID。仅HTTPS监听支持绑定;Default -> 原生策略 */ + @SerializedName("SecurityPolicyId") + private String securityPolicyId; + + /** 连接空闲超时时间。单位:秒 */ + @SerializedName("IdleTimeout") + private Integer idleTimeout; + + /** + * 负载均衡算法。应用型限定取值:Roundrobin -> 轮询;Source -> 源地址; WeightRoundrobin -> 加权轮询; Leastconn -> + * 最小连接数;Backup ->主备模式 + */ + @SerializedName("Scheduler") + private String scheduler; + + /** 会话保持相关配置。具体结构详见 StickinessConfigSet */ + @SerializedName("StickinessConfig") + private StickinessConfigSet stickinessConfig; + + /** 健康检查相关配置。具体结构详见 HealthCheckConfigSet */ + @SerializedName("HealthCheckConfig") + private HealthCheckConfigSet healthCheckConfig; + + /** (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩 */ + @SerializedName("CompressionEnabled") + private Boolean compressionEnabled; + + /** (应用型专用)是否开启HTTP/2特性。仅HTTPS监听支持开启 */ + @SerializedName("HTTP2Enabled") + private Boolean http2Enabled; + + /** (应用型专用)是否开启HTTP重定向到HTTPS。仅HTTP监听支持开启 */ + @SerializedName("RedirectEnabled") + private Boolean redirectEnabled; + + /** (应用型专用)重定向端口 */ + @SerializedName("RedirectPort") + private Integer redirectPort; + + /** 添加的服务节点信息。具体结构详见 Target */ + @SerializedName("Targets") + private List targets; + + /** (应用型专用)转发规则信息 */ + @SerializedName("Rules") + private List rules; + + /** listener健康状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康,PartialHealth -> 部分健康,None -> 无节点状态 */ + @SerializedName("State") + private String state; + + public String getListenerId() { + return listenerId; + } + + public void setListenerId(String listenerId) { + this.listenerId = listenerId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Integer getListenerPort() { + return listenerPort; + } + + public void setListenerPort(Integer listenerPort) { + this.listenerPort = listenerPort; + } + + public String getListenerProtocol() { + return listenerProtocol; + } + + public void setListenerProtocol(String listenerProtocol) { + this.listenerProtocol = listenerProtocol; + } + + public List getCertificates() { + return certificates; + } + + public void setCertificates(List certificates) { + this.certificates = certificates; + } + + public String getSecurityPolicyId() { + return securityPolicyId; + } + + public void setSecurityPolicyId(String securityPolicyId) { + this.securityPolicyId = securityPolicyId; + } + + public Integer getIdleTimeout() { + return idleTimeout; + } + + public void setIdleTimeout(Integer idleTimeout) { + this.idleTimeout = idleTimeout; + } + + public String getScheduler() { + return scheduler; + } + + public void setScheduler(String scheduler) { + this.scheduler = scheduler; + } + + public StickinessConfigSet getStickinessConfig() { + return stickinessConfig; + } + + public void setStickinessConfig(StickinessConfigSet stickinessConfig) { + this.stickinessConfig = stickinessConfig; + } + + public HealthCheckConfigSet getHealthCheckConfig() { + return healthCheckConfig; + } + + public void setHealthCheckConfig(HealthCheckConfigSet healthCheckConfig) { + this.healthCheckConfig = healthCheckConfig; + } + + public Boolean getCompressionEnabled() { + return compressionEnabled; + } + + public void setCompressionEnabled(Boolean compressionEnabled) { + this.compressionEnabled = compressionEnabled; + } + + public Boolean getHTTP2Enabled() { + return http2Enabled; + } + + public void setHTTP2Enabled(Boolean http2Enabled) { + this.http2Enabled = http2Enabled; + } + + public Boolean getRedirectEnabled() { + return redirectEnabled; + } + + public void setRedirectEnabled(Boolean redirectEnabled) { + this.redirectEnabled = redirectEnabled; + } + + public Integer getRedirectPort() { + return redirectPort; + } + + public void setRedirectPort(Integer redirectPort) { + this.redirectPort = redirectPort; + } + + public List getTargets() { + return targets; + } + + public void setTargets(List targets) { + this.targets = targets; + } + + public List getRules() { + return rules; + } + + public void setRules(List rules) { + this.rules = rules; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + } + + public static class PathConfigSet extends Response { + + /** 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 */ + @SerializedName("Values") + private List values; + + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + } + + public static class Rule extends Response { + + /** 转发规则的ID */ + @SerializedName("RuleId") + private String ruleId; + + /** 转发规则匹配条件。具体结构详见 RuleCondition */ + @SerializedName("RuleConditions") + private List ruleConditions; + + /** 转发动作。具体规则详见RuleAction */ + @SerializedName("RuleActions") + private List ruleActions; + + /** 是否为默认转发规则 */ + @SerializedName("IsDefault") + private Boolean isDefault; + + /** 当转发的服务节点为空时,规则是否忽略 */ + @SerializedName("Pass") + private Boolean pass; + + public String getRuleId() { + return ruleId; + } + + public void setRuleId(String ruleId) { + this.ruleId = ruleId; + } + + public List getRuleConditions() { + return ruleConditions; + } + + public void setRuleConditions(List ruleConditions) { + this.ruleConditions = ruleConditions; + } + + public List getRuleActions() { + return ruleActions; + } + + public void setRuleActions(List ruleActions) { + this.ruleActions = ruleActions; + } + + public Boolean getIsDefault() { + return isDefault; + } + + public void setIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + } + + public Boolean getPass() { + return pass; + } + + public void setPass(Boolean pass) { + this.pass = pass; + } + } + + public static class RuleAction extends Response { + + /** 动作类型。限定枚举值:Forward */ + @SerializedName("Type") + private String type; + + /** 转发服务节点相关配置。 具体结构详见 ForwardConfigSet */ + @SerializedName("ForwardConfig") + private ForwardConfigSet forwardConfig; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ForwardConfigSet getForwardConfig() { + return forwardConfig; + } + + public void setForwardConfig(ForwardConfigSet forwardConfig) { + this.forwardConfig = forwardConfig; + } + } + + public static class RuleCondition extends Response { + + /** 匹配条件类型。限定枚举值:Host,Path */ + @SerializedName("Type") + private String type; + + /** 域名相关配置。Type为Host时必填。具体结构详见 HostConfigSet */ + @SerializedName("HostConfig") + private HostConfigSet hostConfig; + + /** 路径相关配置。Type为Path时必填。具体结构详见 PathConfigSet */ + @SerializedName("PathConfig") + private PathConfigSet pathConfig; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public HostConfigSet getHostConfig() { + return hostConfig; + } + + public void setHostConfig(HostConfigSet hostConfig) { + this.hostConfig = hostConfig; + } + + public PathConfigSet getPathConfig() { + return pathConfig; + } + + public void setPathConfig(PathConfigSet pathConfig) { + this.pathConfig = pathConfig; + } + } + + public static class StickinessConfigSet extends Response { + + /** 是否开启会话保持功能。应用型负载均衡实例基于Cookie实现 */ + @SerializedName("Enabled") + private Boolean enabled; + + /** (应用型专用)Cookie处理方式。限定枚举值: ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY */ + @SerializedName("Type") + private String type; + + /** (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效 */ + @SerializedName("CookieName") + private String cookieName; + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getCookieName() { + return cookieName; + } + + public void setCookieName(String cookieName) { + this.cookieName = cookieName; + } + } + + public static class Target extends Response { + + /** + * 服务节点的类型。限定枚举值:UHost -> 云主机,UNI -> 虚拟网卡,UPM -> 物理云主机,IP -> IP类型; 默认值:"UHost"; + * 非IP类型,如果该资源有多个IP,将只能添加主IP; 非IP类型,展示时,会显示相关资源信息,IP类型只展示IP信息。 + * 在相关资源被删除时,非IP类型会把相关资源从lb中剔除,IP类型不保证这个逻辑 + */ + @SerializedName("ResourceType") + private String resourceType; + + /** 服务节点的资源ID */ + @SerializedName("ResourceId") + private String resourceId; + + /** 服务节点的资源名称 */ + @SerializedName("ResourceName") + private String resourceName; + + /** 服务节点的VPC资源ID */ + @SerializedName("VPCId") + private String vpcId; + + /** 服务节点的子网资源ID */ + @SerializedName("SubnetId") + private String subnetId; + + /** 服务节点的IP */ + @SerializedName("ResourceIP") + private String resourceIP; + + /** 服务节点的端口 */ + @SerializedName("Port") + private Integer port; + + /** 服务节点的权重。仅在加权轮询算法时有效 */ + @SerializedName("Weight") + private Integer weight; + + /** 服务节点是否启用 */ + @SerializedName("Enabled") + private Boolean enabled; + + /** 服务节点是否为备节点 */ + @SerializedName("IsBackup") + private Boolean isBackup; + + /** 服务节点的标识ID。为ALB/NLB中使用,与资源自身ID无关,可用于UpdateTargetsAttribute/RemoveTargets */ + @SerializedName("Id") + private String id; + + /** 服务节点的健康检查状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康 */ + @SerializedName("State") + private String state; + + public String getResourceType() { + return resourceType; + } + + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getResourceName() { + return resourceName; + } + + public void setResourceName(String resourceName) { + this.resourceName = resourceName; + } + + public String getVPCId() { + return vpcId; + } + + public void setVPCId(String vpcId) { + this.vpcId = vpcId; + } + + public String getSubnetId() { + return subnetId; + } + + public void setSubnetId(String subnetId) { + this.subnetId = subnetId; + } + + public String getResourceIP() { + return resourceIP; + } + + public void setResourceIP(String resourceIP) { + this.resourceIP = resourceIP; + } + + public Integer getPort() { + return port; + } + + public void setPort(Integer port) { + this.port = port; + } + + public Integer getWeight() { + return weight; + } + + public void setWeight(Integer weight) { + this.weight = weight; + } + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public Boolean getIsBackup() { + return isBackup; + } + + public void setIsBackup(Boolean isBackup) { + this.isBackup = isBackup; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + } +} diff --git a/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeLoadBalancersRequest.java b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeLoadBalancersRequest.java new file mode 100644 index 00000000..14c63ddf --- /dev/null +++ b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeLoadBalancersRequest.java @@ -0,0 +1,136 @@ +/** + * 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.ulb.models; + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +import java.util.List; + +public class DescribeLoadBalancersRequest 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) + */ + @NotEmpty + @UCloudParam("ProjectId") + private String projectId; + + /** 负载均衡实例的类型。限定枚举值:"Application" / "Network",默认值:"Application" */ + @UCloudParam("Type") + private String type; + + /** 是否获取监听器和后端服务节点的详细信息。默认值:false */ + @UCloudParam("ShowDetail") + private Boolean showDetail; + + /** 负载均衡实例的ID。必须是同一类型的实例,若指定了实例ID,将忽略除Type外的其他过滤条件 */ + @UCloudParam("LoadBalancerIds") + private List loadBalancerIds; + + /** 限定所在的VPC */ + @UCloudParam("VPCId") + private String vpcId; + + /** 限定所在的子网 */ + @UCloudParam("SubnetId") + private String subnetId; + + /** 数据偏移量,默认为0 */ + @UCloudParam("Offset") + private String offset; + + /** 数据分页值,默认为100 */ + @UCloudParam("Limit") + private String limit; + + 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 String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Boolean getShowDetail() { + return showDetail; + } + + public void setShowDetail(Boolean showDetail) { + this.showDetail = showDetail; + } + + public List getLoadBalancerIds() { + return loadBalancerIds; + } + + public void setLoadBalancerIds(List loadBalancerIds) { + this.loadBalancerIds = loadBalancerIds; + } + + public String getVPCId() { + return vpcId; + } + + public void setVPCId(String vpcId) { + this.vpcId = vpcId; + } + + public String getSubnetId() { + return subnetId; + } + + public void setSubnetId(String subnetId) { + this.subnetId = subnetId; + } + + public String getOffset() { + return offset; + } + + public void setOffset(String offset) { + this.offset = offset; + } + + public String getLimit() { + return limit; + } + + public void setLimit(String limit) { + this.limit = limit; + } +} diff --git a/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeLoadBalancersResponse.java b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeLoadBalancersResponse.java new file mode 100644 index 00000000..1f3d7b2c --- /dev/null +++ b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeLoadBalancersResponse.java @@ -0,0 +1,1125 @@ +/** + * 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.ulb.models; + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +import java.util.List; + +public class DescribeLoadBalancersResponse extends Response { + + /** 满足条件的负载均衡实例总数 */ + @SerializedName("TotalCount") + private Integer totalCount; + + /** 负载均衡实例信息 */ + @SerializedName("LoadBalancers") + private List loadBalancers; + + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + public List getLoadBalancers() { + return loadBalancers; + } + + public void setLoadBalancers(List loadBalancers) { + this.loadBalancers = loadBalancers; + } + + public static class AccessLogConfigSet extends Response { + + /** (应用型专用)是否开启访问日志记录功能 */ + @SerializedName("Enabled") + private Boolean enabled; + + /** (应用型专用)用于存储访问日志的bucket */ + @SerializedName("US3BucketName") + private String us3BucketName; + + /** (应用型专用)上传访问日志到bucket所需的token */ + @SerializedName("US3TokenId") + private String us3TokenId; + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public String getUS3BucketName() { + return us3BucketName; + } + + public void setUS3BucketName(String us3BucketName) { + this.us3BucketName = us3BucketName; + } + + public String getUS3TokenId() { + return us3TokenId; + } + + public void setUS3TokenId(String us3TokenId) { + this.us3TokenId = us3TokenId; + } + } + + public static class Certificate extends Response { + + /** 证书ID */ + @SerializedName("SSLId") + private String sslId; + + /** 是否为默认证书 */ + @SerializedName("IsDefault") + private Boolean isDefault; + + public String getSSLId() { + return sslId; + } + + public void setSSLId(String sslId) { + this.sslId = sslId; + } + + public Boolean getIsDefault() { + return isDefault; + } + + public void setIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + } + } + + public static class FirewallSet extends Response { + + /** 防火墙名称 */ + @SerializedName("FirewallName") + private String firewallName; + + /** 防火墙ID */ + @SerializedName("FirewallId") + private String firewallId; + + public String getFirewallName() { + return firewallName; + } + + public void setFirewallName(String firewallName) { + this.firewallName = firewallName; + } + + public String getFirewallId() { + return firewallId; + } + + public void setFirewallId(String firewallId) { + this.firewallId = firewallId; + } + } + + public static class ForwardConfigSet extends Response { + + /** 转发的后端服务节点。限定在监听器的服务节点池里;数组长度可以为0。具体结构详见 ForwardTargetSet */ + @SerializedName("Targets") + private List targets; + + public List getTargets() { + return targets; + } + + public void setTargets(List targets) { + this.targets = targets; + } + } + + public static class ForwardTargetSet extends Response { + + /** 服务节点的标识ID */ + @SerializedName("Id") + private String id; + + /** 权重。仅监听器负载均衡算法是加权轮询是有效;取值范围[1-100],默认值为1 */ + @SerializedName("Weight") + private Integer weight; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Integer getWeight() { + return weight; + } + + public void setWeight(Integer weight) { + this.weight = weight; + } + } + + public static class HealthCheckConfigSet extends Response { + + /** 是否开启健康检查功能。暂时不支持关闭。 默认值为:true */ + @SerializedName("Enabled") + private Boolean enabled; + + /** 健康检查方式。应用型限定取值: Port -> 端口检查;HTTP -> HTTP检查; 默认值:Port */ + @SerializedName("Type") + private String type; + + /** (应用型专用)HTTP检查域名。 当Type为HTTP时,此字段有意义,代表HTTP检查域名 */ + @SerializedName("Domain") + private String domain; + + /** (应用型专用)HTTP检查路径。当Type为HTTP时,此字段有意义,代表HTTP检查路径 */ + @SerializedName("Path") + private String path; + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + } + + public static class HostConfigSet extends Response { + + /** 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 */ + @SerializedName("Values") + private List values; + + /** 匹配方式。限定枚举值:Regular-正则,Wildcard-泛域名; 默认值:Regular */ + @SerializedName("MatchMode") + private String matchMode; + + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + + public String getMatchMode() { + return matchMode; + } + + public void setMatchMode(String matchMode) { + this.matchMode = matchMode; + } + } + + public static class IPInfo extends Response { + + /** IP地址 */ + @SerializedName("IP") + private String ip; + + /** 唯一标识ID */ + @SerializedName("Id") + private String id; + + /** IP协议版本 */ + @SerializedName("IPVersion") + private String ipVersion; + + /** + * 外网IP的运营商信息。枚举值为:Telecom -> 电信,Unicom -> 联通,International -> 国际IP,Bgp -> BGP,Duplet -> + * 双线(电信+联通双线路),BGPPro -> 精品BGP,China-mobile -> 中国移动,Anycast -> AnycastEIP + */ + @SerializedName("OperatorName") + private String operatorName; + + /** 带宽类型。限定枚举值:1 -> 共享带宽,0 -> 普通带宽类型 */ + @SerializedName("BandwidthType") + private Integer bandwidthType; + + /** 带宽值。单位M */ + @SerializedName("Bandwidth") + private Integer bandwidth; + + /** 网络模式。 限定枚举值:Internet -> 互联网,Intranet -> 内联网 */ + @SerializedName("AddressType") + private String addressType; + + public String getIP() { + return ip; + } + + public void setIP(String ip) { + this.ip = ip; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIPVersion() { + return ipVersion; + } + + public void setIPVersion(String ipVersion) { + this.ipVersion = ipVersion; + } + + public String getOperatorName() { + return operatorName; + } + + public void setOperatorName(String operatorName) { + this.operatorName = operatorName; + } + + public Integer getBandwidthType() { + return bandwidthType; + } + + public void setBandwidthType(Integer bandwidthType) { + this.bandwidthType = bandwidthType; + } + + public Integer getBandwidth() { + return bandwidth; + } + + public void setBandwidth(Integer bandwidth) { + this.bandwidth = bandwidth; + } + + public String getAddressType() { + return addressType; + } + + public void setAddressType(String addressType) { + this.addressType = addressType; + } + } + + public static class Listener extends Response { + + /** 监听器的ID */ + @SerializedName("ListenerId") + private String listenerId; + + /** 监听器的名称 */ + @SerializedName("Name") + private String name; + + /** 监听器的备注信息 */ + @SerializedName("Remark") + private String remark; + + /** 监听器的监听端口 */ + @SerializedName("ListenerPort") + private Integer listenerPort; + + /** 监听协议。应用型限定取值: HTTP、HTTPS */ + @SerializedName("ListenerProtocol") + private String listenerProtocol; + + /** (应用型专用)服务器默认证书ID。仅HTTPS监听支持。具体接口详见 Certificate */ + @SerializedName("Certificates") + private List certificates; + + /** (应用型专用)安全策略组ID。仅HTTPS监听支持绑定;Default -> 原生策略 */ + @SerializedName("SecurityPolicyId") + private String securityPolicyId; + + /** 连接空闲超时时间。单位:秒 */ + @SerializedName("IdleTimeout") + private Integer idleTimeout; + + /** + * 负载均衡算法。应用型限定取值:Roundrobin -> 轮询;Source -> 源地址; WeightRoundrobin -> 加权轮询; Leastconn -> + * 最小连接数;Backup ->主备模式 + */ + @SerializedName("Scheduler") + private String scheduler; + + /** 会话保持相关配置。具体结构详见 StickinessConfigSet */ + @SerializedName("StickinessConfig") + private StickinessConfigSet stickinessConfig; + + /** 健康检查相关配置。具体结构详见 HealthCheckConfigSet */ + @SerializedName("HealthCheckConfig") + private HealthCheckConfigSet healthCheckConfig; + + /** (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩 */ + @SerializedName("CompressionEnabled") + private Boolean compressionEnabled; + + /** (应用型专用)是否开启HTTP/2特性。仅HTTPS监听支持开启 */ + @SerializedName("HTTP2Enabled") + private Boolean http2Enabled; + + /** (应用型专用)是否开启HTTP重定向到HTTPS。仅HTTP监听支持开启 */ + @SerializedName("RedirectEnabled") + private Boolean redirectEnabled; + + /** (应用型专用)重定向端口 */ + @SerializedName("RedirectPort") + private Integer redirectPort; + + /** 添加的服务节点信息。具体结构详见 Target */ + @SerializedName("Targets") + private List targets; + + /** (应用型专用)转发规则信息 */ + @SerializedName("Rules") + private List rules; + + /** listener健康状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康,PartialHealth -> 部分健康,None -> 无节点状态 */ + @SerializedName("State") + private String state; + + public String getListenerId() { + return listenerId; + } + + public void setListenerId(String listenerId) { + this.listenerId = listenerId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Integer getListenerPort() { + return listenerPort; + } + + public void setListenerPort(Integer listenerPort) { + this.listenerPort = listenerPort; + } + + public String getListenerProtocol() { + return listenerProtocol; + } + + public void setListenerProtocol(String listenerProtocol) { + this.listenerProtocol = listenerProtocol; + } + + public List getCertificates() { + return certificates; + } + + public void setCertificates(List certificates) { + this.certificates = certificates; + } + + public String getSecurityPolicyId() { + return securityPolicyId; + } + + public void setSecurityPolicyId(String securityPolicyId) { + this.securityPolicyId = securityPolicyId; + } + + public Integer getIdleTimeout() { + return idleTimeout; + } + + public void setIdleTimeout(Integer idleTimeout) { + this.idleTimeout = idleTimeout; + } + + public String getScheduler() { + return scheduler; + } + + public void setScheduler(String scheduler) { + this.scheduler = scheduler; + } + + public StickinessConfigSet getStickinessConfig() { + return stickinessConfig; + } + + public void setStickinessConfig(StickinessConfigSet stickinessConfig) { + this.stickinessConfig = stickinessConfig; + } + + public HealthCheckConfigSet getHealthCheckConfig() { + return healthCheckConfig; + } + + public void setHealthCheckConfig(HealthCheckConfigSet healthCheckConfig) { + this.healthCheckConfig = healthCheckConfig; + } + + public Boolean getCompressionEnabled() { + return compressionEnabled; + } + + public void setCompressionEnabled(Boolean compressionEnabled) { + this.compressionEnabled = compressionEnabled; + } + + public Boolean getHTTP2Enabled() { + return http2Enabled; + } + + public void setHTTP2Enabled(Boolean http2Enabled) { + this.http2Enabled = http2Enabled; + } + + public Boolean getRedirectEnabled() { + return redirectEnabled; + } + + public void setRedirectEnabled(Boolean redirectEnabled) { + this.redirectEnabled = redirectEnabled; + } + + public Integer getRedirectPort() { + return redirectPort; + } + + public void setRedirectPort(Integer redirectPort) { + this.redirectPort = redirectPort; + } + + public List getTargets() { + return targets; + } + + public void setTargets(List targets) { + this.targets = targets; + } + + public List getRules() { + return rules; + } + + public void setRules(List rules) { + this.rules = rules; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + } + + public static class LoadBalancer extends Response { + + /** 负载均衡实例所属的VPC资源ID */ + @SerializedName("VPCId") + private String vpcId; + + /** 负载均衡实例所属的子网资源ID。负载均衡实例的内网VIP和SNAT场景的源IP限定在该子网内;指定子网不影响添加后端服务节点时的范围,依旧是整个VPC下支持的资源 */ + @SerializedName("SubnetId") + private String subnetId; + + /** 负载均衡实例的ID */ + @SerializedName("LoadBalancerId") + private String loadBalancerId; + + /** 负载均衡实例的类型。限定枚举值:Application -> 应用型,Network -> 网络型 */ + @SerializedName("Type") + private String type; + + /** 负载均衡实例的名称 */ + @SerializedName("Name") + private String name; + + /** 负载均衡实例所属的业务组ID */ + @SerializedName("Tag") + private String tag; + + /** 负载均衡实例的备注信息 */ + @SerializedName("Remark") + private String remark; + + /** 负载均衡实例支持的IP协议版本 */ + @SerializedName("IPVersion") + private String ipVersion; + + /** 绑定的IP信息。具体结构详见 IPInfo */ + @SerializedName("IPInfos") + private List ipInfos; + + /** 应用型实例的代理IP或网络型FULLNAT模式下snat所用的IP */ + @SerializedName("SnatIPs") + private List snatIPs; + + /** 防火墙信息 */ + @SerializedName("Firewall") + private FirewallSet firewall; + + /** (应用型专用)访问日志相关配置 */ + @SerializedName("AccessLogConfig") + private AccessLogConfigSet accessLogConfig; + + /** 付费模式 */ + @SerializedName("ChargeType") + private String chargeType; + + /** 有效期(计费)。格式为Unix Timestamp */ + @SerializedName("PurchaseValue") + private Integer purchaseValue; + + /** 负载均衡实例创建时间。格式为Unix Timestamp */ + @SerializedName("CreateTime") + private Integer createTime; + + /** 监听器信息。当ShowDetail为false时,为空 */ + @SerializedName("Listeners") + private List listeners; + + /** lb状态:Normal-正常;Arrears-欠费停服 */ + @SerializedName("Status") + private String status; + + /** 是否开启自动续费 */ + @SerializedName("AutoRenewEnabled") + private Boolean autoRenewEnabled; + + public String getVPCId() { + return vpcId; + } + + public void setVPCId(String vpcId) { + this.vpcId = vpcId; + } + + public String getSubnetId() { + return subnetId; + } + + public void setSubnetId(String subnetId) { + this.subnetId = subnetId; + } + + public String getLoadBalancerId() { + return loadBalancerId; + } + + public void setLoadBalancerId(String loadBalancerId) { + this.loadBalancerId = loadBalancerId; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getIPVersion() { + return ipVersion; + } + + public void setIPVersion(String ipVersion) { + this.ipVersion = ipVersion; + } + + public List getIPInfos() { + return ipInfos; + } + + public void setIPInfos(List ipInfos) { + this.ipInfos = ipInfos; + } + + public List getSnatIPs() { + return snatIPs; + } + + public void setSnatIPs(List snatIPs) { + this.snatIPs = snatIPs; + } + + public FirewallSet getFirewall() { + return firewall; + } + + public void setFirewall(FirewallSet firewall) { + this.firewall = firewall; + } + + public AccessLogConfigSet getAccessLogConfig() { + return accessLogConfig; + } + + public void setAccessLogConfig(AccessLogConfigSet accessLogConfig) { + this.accessLogConfig = accessLogConfig; + } + + public String getChargeType() { + return chargeType; + } + + public void setChargeType(String chargeType) { + this.chargeType = chargeType; + } + + public Integer getPurchaseValue() { + return purchaseValue; + } + + public void setPurchaseValue(Integer purchaseValue) { + this.purchaseValue = purchaseValue; + } + + public Integer getCreateTime() { + return createTime; + } + + public void setCreateTime(Integer createTime) { + this.createTime = createTime; + } + + public List getListeners() { + return listeners; + } + + public void setListeners(List listeners) { + this.listeners = listeners; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Boolean getAutoRenewEnabled() { + return autoRenewEnabled; + } + + public void setAutoRenewEnabled(Boolean autoRenewEnabled) { + this.autoRenewEnabled = autoRenewEnabled; + } + } + + public static class PathConfigSet extends Response { + + /** 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 */ + @SerializedName("Values") + private List values; + + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + } + + public static class Rule extends Response { + + /** 转发规则的ID */ + @SerializedName("RuleId") + private String ruleId; + + /** 转发规则匹配条件。具体结构详见 RuleCondition */ + @SerializedName("RuleConditions") + private List ruleConditions; + + /** 转发动作。具体规则详见RuleAction */ + @SerializedName("RuleActions") + private List ruleActions; + + /** 是否为默认转发规则 */ + @SerializedName("IsDefault") + private Boolean isDefault; + + /** 当转发的服务节点为空时,规则是否忽略 */ + @SerializedName("Pass") + private Boolean pass; + + public String getRuleId() { + return ruleId; + } + + public void setRuleId(String ruleId) { + this.ruleId = ruleId; + } + + public List getRuleConditions() { + return ruleConditions; + } + + public void setRuleConditions(List ruleConditions) { + this.ruleConditions = ruleConditions; + } + + public List getRuleActions() { + return ruleActions; + } + + public void setRuleActions(List ruleActions) { + this.ruleActions = ruleActions; + } + + public Boolean getIsDefault() { + return isDefault; + } + + public void setIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + } + + public Boolean getPass() { + return pass; + } + + public void setPass(Boolean pass) { + this.pass = pass; + } + } + + public static class RuleAction extends Response { + + /** 动作类型。限定枚举值:Forward */ + @SerializedName("Type") + private String type; + + /** 转发服务节点相关配置。 具体结构详见 ForwardConfigSet */ + @SerializedName("ForwardConfig") + private ForwardConfigSet forwardConfig; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ForwardConfigSet getForwardConfig() { + return forwardConfig; + } + + public void setForwardConfig(ForwardConfigSet forwardConfig) { + this.forwardConfig = forwardConfig; + } + } + + public static class RuleCondition extends Response { + + /** 匹配条件类型。限定枚举值:Host,Path */ + @SerializedName("Type") + private String type; + + /** 域名相关配置。Type为Host时必填。具体结构详见 HostConfigSet */ + @SerializedName("HostConfig") + private HostConfigSet hostConfig; + + /** 路径相关配置。Type为Path时必填。具体结构详见 PathConfigSet */ + @SerializedName("PathConfig") + private PathConfigSet pathConfig; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public HostConfigSet getHostConfig() { + return hostConfig; + } + + public void setHostConfig(HostConfigSet hostConfig) { + this.hostConfig = hostConfig; + } + + public PathConfigSet getPathConfig() { + return pathConfig; + } + + public void setPathConfig(PathConfigSet pathConfig) { + this.pathConfig = pathConfig; + } + } + + public static class StickinessConfigSet extends Response { + + /** 是否开启会话保持功能。应用型负载均衡实例基于Cookie实现 */ + @SerializedName("Enabled") + private Boolean enabled; + + /** (应用型专用)Cookie处理方式。限定枚举值: ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY */ + @SerializedName("Type") + private String type; + + /** (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效 */ + @SerializedName("CookieName") + private String cookieName; + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getCookieName() { + return cookieName; + } + + public void setCookieName(String cookieName) { + this.cookieName = cookieName; + } + } + + public static class Target extends Response { + + /** + * 服务节点的类型。限定枚举值:UHost -> 云主机,UNI -> 虚拟网卡,UPM -> 物理云主机,IP -> IP类型; 默认值:"UHost"; + * 非IP类型,如果该资源有多个IP,将只能添加主IP; 非IP类型,展示时,会显示相关资源信息,IP类型只展示IP信息。 + * 在相关资源被删除时,非IP类型会把相关资源从lb中剔除,IP类型不保证这个逻辑 + */ + @SerializedName("ResourceType") + private String resourceType; + + /** 服务节点的资源ID */ + @SerializedName("ResourceId") + private String resourceId; + + /** 服务节点的资源名称 */ + @SerializedName("ResourceName") + private String resourceName; + + /** 服务节点的VPC资源ID */ + @SerializedName("VPCId") + private String vpcId; + + /** 服务节点的子网资源ID */ + @SerializedName("SubnetId") + private String subnetId; + + /** 服务节点的IP */ + @SerializedName("ResourceIP") + private String resourceIP; + + /** 服务节点的端口 */ + @SerializedName("Port") + private Integer port; + + /** 服务节点的权重。仅在加权轮询算法时有效 */ + @SerializedName("Weight") + private Integer weight; + + /** 服务节点是否启用 */ + @SerializedName("Enabled") + private Boolean enabled; + + /** 服务节点是否为备节点 */ + @SerializedName("IsBackup") + private Boolean isBackup; + + /** 服务节点的标识ID。为ALB/NLB中使用,与资源自身ID无关,可用于UpdateTargetsAttribute/RemoveTargets */ + @SerializedName("Id") + private String id; + + /** 服务节点的健康检查状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康 */ + @SerializedName("State") + private String state; + + public String getResourceType() { + return resourceType; + } + + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getResourceName() { + return resourceName; + } + + public void setResourceName(String resourceName) { + this.resourceName = resourceName; + } + + public String getVPCId() { + return vpcId; + } + + public void setVPCId(String vpcId) { + this.vpcId = vpcId; + } + + public String getSubnetId() { + return subnetId; + } + + public void setSubnetId(String subnetId) { + this.subnetId = subnetId; + } + + public String getResourceIP() { + return resourceIP; + } + + public void setResourceIP(String resourceIP) { + this.resourceIP = resourceIP; + } + + public Integer getPort() { + return port; + } + + public void setPort(Integer port) { + this.port = port; + } + + public Integer getWeight() { + return weight; + } + + public void setWeight(Integer weight) { + this.weight = weight; + } + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public Boolean getIsBackup() { + return isBackup; + } + + public void setIsBackup(Boolean isBackup) { + this.isBackup = isBackup; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + } +} diff --git a/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeRulesRequest.java b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeRulesRequest.java new file mode 100644 index 00000000..9818f19a --- /dev/null +++ b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeRulesRequest.java @@ -0,0 +1,89 @@ +/** + * 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.ulb.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DescribeRulesRequest 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) + */ + @NotEmpty + @UCloudParam("ProjectId") + private String projectId; + + /** 应用型负载均衡实例的ID */ + @NotEmpty + @UCloudParam("LoadBalancerId") + private String loadBalancerId; + + /** 监听器的ID */ + @NotEmpty + @UCloudParam("ListenerId") + private String listenerId; + + /** 应用型负载均衡转发规则的ID。指定RuleId,则只描述该规则 */ + @UCloudParam("RuleId") + private String ruleId; + + 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 String getLoadBalancerId() { + return loadBalancerId; + } + + public void setLoadBalancerId(String loadBalancerId) { + this.loadBalancerId = loadBalancerId; + } + + public String getListenerId() { + return listenerId; + } + + public void setListenerId(String listenerId) { + this.listenerId = listenerId; + } + + public String getRuleId() { + return ruleId; + } + + public void setRuleId(String ruleId) { + this.ruleId = ruleId; + } +} diff --git a/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeRulesResponse.java b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeRulesResponse.java new file mode 100644 index 00000000..54622e87 --- /dev/null +++ b/ucloud-sdk-java-ulb/src/main/java/cn/ucloud/ulb/models/DescribeRulesResponse.java @@ -0,0 +1,248 @@ +/** + * 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.ulb.models; + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +import java.util.List; + +public class DescribeRulesResponse extends Response { + + /** 转发规则信息 */ + @SerializedName("Rules") + private List rules; + + public List getRules() { + return rules; + } + + public void setRules(List rules) { + this.rules = rules; + } + + public static class ForwardConfigSet extends Response { + + /** 转发的后端服务节点。限定在监听器的服务节点池里;数组长度可以为0。具体结构详见 ForwardTargetSet */ + @SerializedName("Targets") + private List targets; + + public List getTargets() { + return targets; + } + + public void setTargets(List targets) { + this.targets = targets; + } + } + + public static class ForwardTargetSet extends Response { + + /** 服务节点的标识ID */ + @SerializedName("Id") + private String id; + + /** 权重。仅监听器负载均衡算法是加权轮询是有效;取值范围[1-100],默认值为1 */ + @SerializedName("Weight") + private Integer weight; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Integer getWeight() { + return weight; + } + + public void setWeight(Integer weight) { + this.weight = weight; + } + } + + public static class HostConfigSet extends Response { + + /** 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 */ + @SerializedName("Values") + private List values; + + /** 匹配方式。限定枚举值:Regular-正则,Wildcard-泛域名; 默认值:Regular */ + @SerializedName("MatchMode") + private String matchMode; + + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + + public String getMatchMode() { + return matchMode; + } + + public void setMatchMode(String matchMode) { + this.matchMode = matchMode; + } + } + + public static class PathConfigSet extends Response { + + /** 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 */ + @SerializedName("Values") + private List values; + + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + } + + public static class Rule extends Response { + + /** 转发规则的ID */ + @SerializedName("RuleId") + private String ruleId; + + /** 转发规则匹配条件。具体结构详见 RuleCondition */ + @SerializedName("RuleConditions") + private List ruleConditions; + + /** 转发动作。具体规则详见RuleAction */ + @SerializedName("RuleActions") + private List ruleActions; + + /** 是否为默认转发规则 */ + @SerializedName("IsDefault") + private Boolean isDefault; + + /** 当转发的服务节点为空时,规则是否忽略 */ + @SerializedName("Pass") + private Boolean pass; + + public String getRuleId() { + return ruleId; + } + + public void setRuleId(String ruleId) { + this.ruleId = ruleId; + } + + public List getRuleConditions() { + return ruleConditions; + } + + public void setRuleConditions(List ruleConditions) { + this.ruleConditions = ruleConditions; + } + + public List getRuleActions() { + return ruleActions; + } + + public void setRuleActions(List ruleActions) { + this.ruleActions = ruleActions; + } + + public Boolean getIsDefault() { + return isDefault; + } + + public void setIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + } + + public Boolean getPass() { + return pass; + } + + public void setPass(Boolean pass) { + this.pass = pass; + } + } + + public static class RuleAction extends Response { + + /** 动作类型。限定枚举值:Forward */ + @SerializedName("Type") + private String type; + + /** 转发服务节点相关配置。 具体结构详见 ForwardConfigSet */ + @SerializedName("ForwardConfig") + private ForwardConfigSet forwardConfig; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ForwardConfigSet getForwardConfig() { + return forwardConfig; + } + + public void setForwardConfig(ForwardConfigSet forwardConfig) { + this.forwardConfig = forwardConfig; + } + } + + public static class RuleCondition extends Response { + + /** 匹配条件类型。限定枚举值:Host,Path */ + @SerializedName("Type") + private String type; + + /** 域名相关配置。Type为Host时必填。具体结构详见 HostConfigSet */ + @SerializedName("HostConfig") + private HostConfigSet hostConfig; + + /** 路径相关配置。Type为Path时必填。具体结构详见 PathConfigSet */ + @SerializedName("PathConfig") + private PathConfigSet pathConfig; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public HostConfigSet getHostConfig() { + return hostConfig; + } + + public void setHostConfig(HostConfigSet hostConfig) { + this.hostConfig = hostConfig; + } + + public PathConfigSet getPathConfig() { + return pathConfig; + } + + public void setPathConfig(PathConfigSet pathConfig) { + this.pathConfig = pathConfig; + } + } +} diff --git a/ucloud-sdk-java-umem/pom.xml b/ucloud-sdk-java-umem/pom.xml index aaa48802..075f1ee4 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-umem - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-umongodb/pom.xml b/ucloud-sdk-java-umongodb/pom.xml index 4de270a8..e38f61b3 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-umongodb - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-unet/pom.xml b/ucloud-sdk-java-unet/pom.xml index 727cd2b7..1cbd3d66 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-unet - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-upgsql/pom.xml b/ucloud-sdk-java-upgsql/pom.xml index ed762ac4..e551a614 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-upgsql - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-uphone/pom.xml b/ucloud-sdk-java-uphone/pom.xml index 3fe1e6fa..4cfcb3ee 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-uphone - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-uphost/pom.xml b/ucloud-sdk-java-uphost/pom.xml index 2cda3a5f..86f600b9 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-uphost - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-uslk/pom.xml b/ucloud-sdk-java-uslk/pom.xml index 3c2e1ee3..cd28d2ab 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-uslk - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-usms/pom.xml b/ucloud-sdk-java-usms/pom.xml index a5b5da43..290fe91e 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-usms - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/client/USMSClient.java b/ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/client/USMSClient.java index 6f53dace..2e9cc1a5 100644 --- a/ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/client/USMSClient.java +++ b/ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/client/USMSClient.java @@ -17,6 +17,8 @@ import cn.ucloud.common.config.Config; import cn.ucloud.common.credential.Credential; import cn.ucloud.common.exception.UCloudException; +import cn.ucloud.usms.models.AddBackfillRequest; +import cn.ucloud.usms.models.AddBackfillResponse; import cn.ucloud.usms.models.CreateUSMSSignatureRequest; import cn.ucloud.usms.models.CreateUSMSSignatureResponse; import cn.ucloud.usms.models.CreateUSMSTemplateRequest; @@ -46,6 +48,17 @@ public USMSClient(Config config, Credential credential) { super(config, credential); } + /** + * AddBackfill - 添加回填 + * + * @param request Request object + * @throws UCloudException Exception + */ + public AddBackfillResponse addBackfill(AddBackfillRequest request) throws UCloudException { + request.setAction("AddBackfill"); + return (AddBackfillResponse) this.invoke(request, AddBackfillResponse.class); + } + /** * CreateUSMSSignature - 申请短信签名 * diff --git a/ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/client/USMSClientInterface.java b/ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/client/USMSClientInterface.java index ca5d96d1..e5474174 100644 --- a/ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/client/USMSClientInterface.java +++ b/ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/client/USMSClientInterface.java @@ -15,6 +15,8 @@ import cn.ucloud.common.client.Client; import cn.ucloud.common.exception.UCloudException; +import cn.ucloud.usms.models.AddBackfillRequest; +import cn.ucloud.usms.models.AddBackfillResponse; import cn.ucloud.usms.models.CreateUSMSSignatureRequest; import cn.ucloud.usms.models.CreateUSMSSignatureResponse; import cn.ucloud.usms.models.CreateUSMSTemplateRequest; @@ -41,6 +43,14 @@ /** This client is used to call actions of **USMS** service */ public interface USMSClientInterface extends Client { + /** + * AddBackfill - 添加回填 + * + * @param request Request object + * @throws UCloudException Exception + */ + public AddBackfillResponse addBackfill(AddBackfillRequest request) throws UCloudException; + /** * CreateUSMSSignature - 申请短信签名 * diff --git a/ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/models/AddBackfillRequest.java b/ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/models/AddBackfillRequest.java new file mode 100644 index 00000000..a4982eb4 --- /dev/null +++ b/ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/models/AddBackfillRequest.java @@ -0,0 +1,124 @@ +/** + * 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.usms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class AddBackfillRequest extends Request { + + /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @UCloudParam("Region") + private String region; + + /** 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @UCloudParam("Zone") + private String zone; + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @NotEmpty + @UCloudParam("ProjectId") + private String projectId; + + /** 发送Number,记录一次发送请求的唯一性 */ + @NotEmpty + @UCloudParam("SendNo") + private String sendNo; + + /** 短信的接收目标,手机号需要添加国家码,比如(1)231xxxx */ + @NotEmpty + @UCloudParam("Target") + private String target; + + /** 回填时间,秒级别时间戳 */ + @UCloudParam("BackfillTime") + private Integer backfillTime; + + /** 回填内容 */ + @UCloudParam("Content") + private String content; + + /** 发送请求的时间,秒级别时间戳 */ + @UCloudParam("SendTime") + private Integer sendTime; + + 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 getSendNo() { + return sendNo; + } + + public void setSendNo(String sendNo) { + this.sendNo = sendNo; + } + + public String getTarget() { + return target; + } + + public void setTarget(String target) { + this.target = target; + } + + public Integer getBackfillTime() { + return backfillTime; + } + + public void setBackfillTime(Integer backfillTime) { + this.backfillTime = backfillTime; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Integer getSendTime() { + return sendTime; + } + + public void setSendTime(Integer sendTime) { + this.sendTime = sendTime; + } +} diff --git a/ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/models/AddBackfillResponse.java b/ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/models/AddBackfillResponse.java new file mode 100644 index 00000000..57ba25fc --- /dev/null +++ b/ucloud-sdk-java-usms/src/main/java/cn/ucloud/usms/models/AddBackfillResponse.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.usms.models; + + + +import cn.ucloud.common.response.Response; + +public class AddBackfillResponse extends Response {} diff --git a/ucloud-sdk-java-usnap/pom.xml b/ucloud-sdk-java-usnap/pom.xml index c0f51b4f..bc858aee 100644 --- a/ucloud-sdk-java-usnap/pom.xml +++ b/ucloud-sdk-java-usnap/pom.xml @@ -5,18 +5,18 @@ ucloud-sdk-java cn.ucloud - 1.2.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-usnap - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-uvms/pom.xml b/ucloud-sdk-java-uvms/pom.xml index bd92a729..7037ceab 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-uvms - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release diff --git a/ucloud-sdk-java-vpc/pom.xml b/ucloud-sdk-java-vpc/pom.xml index 4476c853..11ecccf2 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.19-release + 1.2.20-release 4.0.0 ucloud-sdk-java-vpc - 1.2.19-release + 1.2.20-release cn.ucloud ucloud-sdk-java-common - 1.2.19-release + 1.2.20-release