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