Skip to content

Commit

Permalink
release 3.0.20-beta source code for java
Browse files Browse the repository at this point in the history
  • Loading branch information
Huaweicloud-SDK committed Nov 2, 2020
1 parent 3750e91 commit 5c5233b
Show file tree
Hide file tree
Showing 143 changed files with 1,351 additions and 1,377 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## 3.0.20-beta 2020-11-02
## HuaweiCloud SDK CES
- ### Features
- None
- ### Bug Fix
- None
- ### Change
- Interface adjustment: property `alarm_type` in class `CreateAlarmRequestBody` support key `RESOURCE_GROUP`.
- Interface adjustment: property `meta_data` in class `ListAlarmHistoriesResponse` only returns total number of alarm histories.

## HuaweiCloud SDK ELB
- ### Features
- None
- ### Bug Fix
- Modify wrong parameter in class `CreateL7ruleRequestBody`.
- ### Change
- None


## 3.0.19-beta 2020-10-31
## HuaweiCloud SDK CBR
- ### Features
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG_CN.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## 3.0.20-beta 2020-11-02
## HuaweiCloud SDK CES
- ### 新增特性
-
- ### 解决问题
-
- ### 特性变更
- 创建告警规则接口增加资源分组字段
- 查询告警历史接口响应体metadata修改,只返回total字段

## HuaweiCloud SDK ELB
- ### 新增特性
-
- ### 解决问题
- 创建转发规则接口参数名错误问题修复
- ### 特性变更
-


## 3.0.19-beta 2020-10-31
## HuaweiCloud SDK CBR
- ### 新增特性
Expand Down
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

<parent>
<groupId>com.huaweicloud.sdk</groupId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<artifactId>huaweicloud-sdk</artifactId>
</parent>

<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<artifactId>huaweicloud-sdk-core</artifactId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<name>Huaweicloud SDK for Java Core</name>
<description>Core code for Huaweicloud SDK for Java</description>
<url>https://github.com/huaweicloud/huaweicloud-sdk-java-v3</url>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<packaging>pom</packaging>
<groupId>com.huaweicloud.sdk</groupId>
<artifactId>huaweicloud-sdk</artifactId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<name>Huaweicloud SDK for Java</name>
<description>Huaweicloud SDK for Java</description>
<url>https://github.com/huaweicloud/huaweicloud-sdk-java-v3</url>
Expand Down Expand Up @@ -48,7 +48,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<revision>3.0.19-beta</revision>
<revision>3.0.20-beta</revision>
<jackson.version>2.11.1</jackson.version>
<validation-api.version>2.0.1.Final</validation-api.version>
<okhttp.version>3.14.2</okhttp.version>
Expand Down
4 changes: 2 additions & 2 deletions services/apig/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.huaweicloud.sdk</groupId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<artifactId>huaweicloud-sdk-services</artifactId>
<relativePath>..</relativePath>
</parent>
<groupId>com.huaweicloud.sdk</groupId>
<artifactId>huaweicloud-sdk-apig</artifactId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<name>huaweicloud sdk apig</name>

<modelVersion>4.0.0</modelVersion>
Expand Down
4 changes: 2 additions & 2 deletions services/as/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.huaweicloud.sdk</groupId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<artifactId>huaweicloud-sdk-services</artifactId>
<relativePath>..</relativePath>
</parent>
<groupId>com.huaweicloud.sdk</groupId>
<artifactId>huaweicloud-sdk-as</artifactId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<name>huaweicloud sdk as</name>

<modelVersion>4.0.0</modelVersion>
Expand Down
4 changes: 2 additions & 2 deletions services/bss/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.huaweicloud.sdk</groupId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<artifactId>huaweicloud-sdk-services</artifactId>
<relativePath>..</relativePath>
</parent>
<groupId>com.huaweicloud.sdk</groupId>
<artifactId>huaweicloud-sdk-bss</artifactId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<name>huaweicloud sdk bss</name>

<modelVersion>4.0.0</modelVersion>
Expand Down
4 changes: 2 additions & 2 deletions services/bssintl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.huaweicloud.sdk</groupId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<artifactId>huaweicloud-sdk-services</artifactId>
<relativePath>..</relativePath>
</parent>
<groupId>com.huaweicloud.sdk</groupId>
<artifactId>huaweicloud-sdk-bssintl</artifactId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<name>huaweicloud sdk bssintl</name>

<modelVersion>4.0.0</modelVersion>
Expand Down
4 changes: 2 additions & 2 deletions services/cbr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.huaweicloud.sdk</groupId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<artifactId>huaweicloud-sdk-services</artifactId>
<relativePath>..</relativePath>
</parent>
<groupId>com.huaweicloud.sdk</groupId>
<artifactId>huaweicloud-sdk-cbr</artifactId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<name>huaweicloud sdk cbr</name>

<modelVersion>4.0.0</modelVersion>
Expand Down
4 changes: 2 additions & 2 deletions services/ces/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.huaweicloud.sdk</groupId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<artifactId>huaweicloud-sdk-services</artifactId>
<relativePath>..</relativePath>
</parent>
<groupId>com.huaweicloud.sdk</groupId>
<artifactId>huaweicloud-sdk-ces</artifactId>
<version>3.0.19-beta</version>
<version>3.0.20-beta</version>
<name>huaweicloud sdk ces</name>

<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public CompletableFuture<CreateAlarmResponse> createAlarmAsync(CreateAlarmReques

/**
* 创建自定义告警模板
* 批量查询指定时间范围内指定指标的指定粒度的监控数据,目前最多支持10指标的批量查询
* 创建自定义告警模板
*
* @param CreateAlarmTemplateRequest 请求对象
* @return CompletableFuture<CreateAlarmTemplateResponse>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public CreateAlarmResponse createAlarm(CreateAlarmRequest request) {

/**
* 创建自定义告警模板
* 批量查询指定时间范围内指定指标的指定粒度的监控数据,目前最多支持10指标的批量查询
* 创建自定义告警模板
*
* @param CreateAlarmTemplateRequest 请求对象
* @return CreateAlarmTemplateResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class AlarmTemplateCondition {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="value")

private Integer value;
private Double value;


@JsonInclude(JsonInclude.Include.NON_NULL)
Expand Down Expand Up @@ -162,7 +162,7 @@ public void setUnit(String unit) {
this.unit = unit;
}

public AlarmTemplateCondition withValue(Integer value) {
public AlarmTemplateCondition withValue(Double value) {
this.value = value;
return this;
}
Expand All @@ -174,11 +174,11 @@ public AlarmTemplateCondition withValue(Integer value) {
* 告警阈值,取值范围[0, Number.MAX_VALUE],Number.MAX_VALUE值为1.7976931348623157e+108。具体阈值取值请参见附录中各服务监控指标中取值范围,如支持监控的服务列表中ECS的CPU使用率cpu_util取值范围可配置80。
* @return value
*/
public Integer getValue() {
public Double getValue() {
return value;
}

public void setValue(Integer value) {
public void setValue(Double value) {
this.value = value;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class Condition {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="value")

private Integer value;
private Double value;

public Condition withComparisonOperator(String comparisonOperator) {
this.comparisonOperator = comparisonOperator;
Expand Down Expand Up @@ -155,7 +155,7 @@ public void setUnit(String unit) {
this.unit = unit;
}

public Condition withValue(Integer value) {
public Condition withValue(Double value) {
this.value = value;
return this;
}
Expand All @@ -167,11 +167,11 @@ public Condition withValue(Integer value) {
* 告警阈值,取值范围[0, Number.MAX_VALUE],Number.MAX_VALUE值为1.7976931348623157e+108。具体阈值取值请参见附录中各服务监控指标中取值范围,如支持监控的服务列表中ECS的CPU使用率cpu_util取值范围可配置80。
* @return value
*/
public Integer getValue() {
public Double getValue() {
return value;
}

public void setValue(Integer value) {
public void setValue(Double value) {
this.value = value;
}
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.fasterxml.jackson.annotation.JsonValue;
import com.huaweicloud.sdk.ces.v1.model.AlarmActions;
import com.huaweicloud.sdk.ces.v1.model.Condition;
import com.huaweicloud.sdk.ces.v1.model.MetricInfoExt;
import com.huaweicloud.sdk.ces.v1.model.MetricInfoForAlarm;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -42,7 +42,7 @@ public class CreateAlarmRequestBody {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="metric")

private MetricInfoExt metric = null;
private MetricInfoForAlarm metric = null;


@JsonInclude(JsonInclude.Include.NON_NULL)
Expand All @@ -68,7 +68,7 @@ public class CreateAlarmRequestBody {

private Integer alarmLevel;
/**
* 告警类型。 仅针对事件告警的参数,枚举类型:EVENT.SYS或者EVENT.CUSTOM
* 告警类型,支持的枚举类型:EVENT.SYS:针对系统事件的告警规则;EVENT.CUSTOM:针对自定义事件的告警规则;RESOURCE_GROUP:针对资源分组的告警规则。
*/
public static final class AlarmTypeEnum {

Expand All @@ -83,13 +83,19 @@ public static final class AlarmTypeEnum {
*/
public static final AlarmTypeEnum EVENT_CUSTOM = new AlarmTypeEnum("EVENT.CUSTOM");

/**
* Enum RESOURCE_GROUP for value: "RESOURCE_GROUP"
*/
public static final AlarmTypeEnum RESOURCE_GROUP = new AlarmTypeEnum("RESOURCE_GROUP");


private static final Map<String, AlarmTypeEnum> STATIC_FIELDS = createStaticFields();

private static Map<String, AlarmTypeEnum> createStaticFields() {
Map<String, AlarmTypeEnum> map = new HashMap<>();
map.put("EVENT.SYS", EVENT_SYS);
map.put("EVENT.CUSTOM", EVENT_CUSTOM);
map.put("RESOURCE_GROUP", RESOURCE_GROUP);
return Collections.unmodifiableMap(map);
}

Expand Down Expand Up @@ -216,14 +222,14 @@ public void setAlarmDescription(String alarmDescription) {
this.alarmDescription = alarmDescription;
}

public CreateAlarmRequestBody withMetric(MetricInfoExt metric) {
public CreateAlarmRequestBody withMetric(MetricInfoForAlarm metric) {
this.metric = metric;
return this;
}

public CreateAlarmRequestBody withMetric(Consumer<MetricInfoExt> metricSetter) {
public CreateAlarmRequestBody withMetric(Consumer<MetricInfoForAlarm> metricSetter) {
if(this.metric == null ){
this.metric = new MetricInfoExt();
this.metric = new MetricInfoForAlarm();
metricSetter.accept(this.metric);
}

Expand All @@ -235,11 +241,11 @@ public CreateAlarmRequestBody withMetric(Consumer<MetricInfoExt> metricSetter) {
* Get metric
* @return metric
*/
public MetricInfoExt getMetric() {
public MetricInfoForAlarm getMetric() {
return metric;
}

public void setMetric(MetricInfoExt metric) {
public void setMetric(MetricInfoForAlarm metric) {
this.metric = metric;
}

Expand Down Expand Up @@ -339,7 +345,7 @@ public CreateAlarmRequestBody withAlarmType(AlarmTypeEnum alarmType) {


/**
* 告警类型。 仅针对事件告警的参数,枚举类型:EVENT.SYS或者EVENT.CUSTOM
* 告警类型,支持的枚举类型:EVENT.SYS:针对系统事件的告警规则;EVENT.CUSTOM:针对自定义事件的告警规则;RESOURCE_GROUP:针对资源分组的告警规则。
* @return alarmType
*/
public AlarmTypeEnum getAlarmType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public CreateAlarmTemplateRequestBody withTemplateName(String templateName) {


/**
* 自定义告警模板名称,只能包含0-9/a-z/A-Z/_/-或汉字。
* 自定义告警模板名称,只能包含0-9/a-z/A-Z/_/-或汉字,长度为1-128。
* @return templateName
*/
public String getTemplateName() {
Expand Down Expand Up @@ -99,7 +99,7 @@ public CreateAlarmTemplateRequestBody withNamespace(String namespace) {


/**
* 创建自定义告警模板选择的资源类型,即服务命名空间,如:选择弹性云服务器,则命名空间为SYS.ECS
* 创建自定义告警模板选择的资源类型,即服务命名空间,如:选择弹性云服务器,则命名空间为SYS.ECS
* @return namespace
*/
public String getNamespace() {
Expand All @@ -119,7 +119,7 @@ public CreateAlarmTemplateRequestBody withDimensionName(String dimensionName) {


/**
* 资源类型对应的指标监控维度,选择弹性云服务器,则维度为云服务器,dimension_name值为instance_id
* 资源类型对应的指标监控维度,选择弹性云服务器,则维度为云服务器,dimension_name值为instance_id
* @return dimensionName
*/
public String getDimensionName() {
Expand Down Expand Up @@ -150,7 +150,7 @@ public CreateAlarmTemplateRequestBody withTemplateItems(Consumer<List<TemplateIt
}

/**
* 创建自定义告警模板添加添加一个或者多个指标的告警规则;目前最多可增加30组告警规则策略。
* 创建自定义告警模板添加添加一个或者多个指标的告警规则;目前最多可增加30组告警规则策略。
* @return templateItems
*/
public List<TemplateItem> getTemplateItems() {
Expand Down
Loading

0 comments on commit 5c5233b

Please sign in to comment.