Skip to content

Commit a9d91ce

Browse files
authored
Merge pull request #194 from Tanc009/master
jdcloud-sdk-java
2 parents 94fbf5f + 4b711de commit a9d91ce

File tree

75 files changed

+8540
-128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+8540
-128
lines changed

jdccs/ChangeLog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# 更新历史 #
2-
API版本:1.1.0
2+
API版本:1.1.2
33

44
|发布时间|版本号|更新|说明|
55
|---|---|---|---|
6+
|2021-03-15|1.1.2|新增接口|金山云需求:开放设备数据信息接口|
7+
|2020-11-03|1.1.1|新增接口|新增机房巡检列表接口<br>新增设备巡检接口<br>新增机房巡检详情接口|
68
|2020-08-04|1.1.0|新增接口|新增机房概览接口<br>新增提交通用服务工单接口<br>新增创建、启用、禁用和删除报警规则|
79
|2020-06-22|1.0.10|接口变更|带宽(上、下行流量)监控项数据2小时范围查询支持5m粒度|
810
|2020-03-20|1.0.9|接口变更|公网IP列表新增IP地址数量、IP类型、线路类型<br>带宽(出口)列表、详情新增计费方式|

jdccs/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.jdcloud.sdk</groupId>
77
<artifactId>jdccs</artifactId>
8-
<version>1.1.0</version>
8+
<version>1.1.2</version>
99
<packaging>jar</packaging>
1010
<name>jdccs</name>
1111
<url>http://www.jdcloud.com</url>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright 2018 JDCLOUD.COM
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http:#www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* Monitor API
17+
* 云托管服务的监控API
18+
*
19+
* OpenAPI spec version: v1
20+
* Contact:
21+
*
22+
* NOTE: This class is auto generated by the jdcloud code generator program.
23+
*/
24+
25+
package com.jdcloud.sdk.service.jdccs.client;
26+
27+
import com.jdcloud.sdk.client.JdcloudExecutor;
28+
import com.jdcloud.sdk.service.JdcloudResponse;
29+
import com.jdcloud.sdk.service.jdccs.model.DescribeOpenDevicesDataResponse;
30+
31+
/**
32+
* 查询开放设备数据信息接口
33+
*/
34+
class DescribeOpenDevicesDataExecutor extends JdcloudExecutor {
35+
36+
@Override
37+
public String method() {
38+
return "GET";
39+
}
40+
41+
@Override
42+
public String url() {
43+
return "/openDevicesData";
44+
}
45+
46+
@Override
47+
public Class<? extends JdcloudResponse> returnType() {
48+
return DescribeOpenDevicesDataResponse.class;
49+
}
50+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright 2018 JDCLOUD.COM
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http:#www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* Monitor API
17+
* 云托管服务的监控API
18+
*
19+
* OpenAPI spec version: v1
20+
* Contact:
21+
*
22+
* NOTE: This class is auto generated by the jdcloud code generator program.
23+
*/
24+
25+
package com.jdcloud.sdk.service.jdccs.client;
26+
27+
import com.jdcloud.sdk.client.JdcloudExecutor;
28+
import com.jdcloud.sdk.service.JdcloudResponse;
29+
import com.jdcloud.sdk.service.jdccs.model.DescribeOpenDevicesResponse;
30+
31+
/**
32+
* 查询开放设备列表
33+
*/
34+
class DescribeOpenDevicesExecutor extends JdcloudExecutor {
35+
36+
@Override
37+
public String method() {
38+
return "GET";
39+
}
40+
41+
@Override
42+
public String url() {
43+
return "/openDevices";
44+
}
45+
46+
@Override
47+
public Class<? extends JdcloudResponse> returnType() {
48+
return DescribeOpenDevicesResponse.class;
49+
}
50+
}

jdccs/src/main/java/com/jdcloud/sdk/service/jdccs/client/JdccsClient.java

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
import com.jdcloud.sdk.service.jdccs.model.SwitchAlarmRequest;
4747
import com.jdcloud.sdk.service.jdccs.model.SwitchAlarmResponse;
4848
import com.jdcloud.sdk.service.jdccs.client.SwitchAlarmExecutor;
49+
import com.jdcloud.sdk.service.jdccs.model.DescribeOpenDevicesDataRequest;
50+
import com.jdcloud.sdk.service.jdccs.model.DescribeOpenDevicesDataResponse;
51+
import com.jdcloud.sdk.service.jdccs.client.DescribeOpenDevicesDataExecutor;
4952
import com.jdcloud.sdk.service.jdccs.model.DescribeBandwidthRequest;
5053
import com.jdcloud.sdk.service.jdccs.model.DescribeBandwidthResponse;
5154
import com.jdcloud.sdk.service.jdccs.client.DescribeBandwidthExecutor;
@@ -55,6 +58,9 @@
5558
import com.jdcloud.sdk.service.jdccs.model.DescribeCabinetsRequest;
5659
import com.jdcloud.sdk.service.jdccs.model.DescribeCabinetsResponse;
5760
import com.jdcloud.sdk.service.jdccs.client.DescribeCabinetsExecutor;
61+
import com.jdcloud.sdk.service.jdccs.model.DescribeOpenDevicesRequest;
62+
import com.jdcloud.sdk.service.jdccs.model.DescribeOpenDevicesResponse;
63+
import com.jdcloud.sdk.service.jdccs.client.DescribeOpenDevicesExecutor;
5864
import com.jdcloud.sdk.service.jdccs.model.DescribeMetricDataRequest;
5965
import com.jdcloud.sdk.service.jdccs.model.DescribeMetricDataResponse;
6066
import com.jdcloud.sdk.service.jdccs.client.DescribeMetricDataExecutor;
@@ -88,6 +94,9 @@
8894
import com.jdcloud.sdk.service.jdccs.model.DescribeIpsRequest;
8995
import com.jdcloud.sdk.service.jdccs.model.DescribeIpsResponse;
9096
import com.jdcloud.sdk.service.jdccs.client.DescribeIpsExecutor;
97+
import com.jdcloud.sdk.service.jdccs.model.UpdateAlarmRequest;
98+
import com.jdcloud.sdk.service.jdccs.model.UpdateAlarmResponse;
99+
import com.jdcloud.sdk.service.jdccs.client.UpdateAlarmExecutor;
91100
import com.jdcloud.sdk.service.jdccs.model.DescribeMetricsRequest;
92101
import com.jdcloud.sdk.service.jdccs.model.DescribeMetricsResponse;
93102
import com.jdcloud.sdk.service.jdccs.client.DescribeMetricsExecutor;
@@ -211,6 +220,17 @@ public SwitchAlarmResponse switchAlarm(SwitchAlarmRequest request) throws Jdclou
211220
return new SwitchAlarmExecutor().client(this).execute(request);
212221
}
213222

223+
/**
224+
* 查询开放设备数据信息接口
225+
*
226+
* @param request
227+
* @return
228+
* @throws JdcloudSdkException
229+
*/
230+
public DescribeOpenDevicesDataResponse describeOpenDevicesData(DescribeOpenDevicesDataRequest request) throws JdcloudSdkException {
231+
return new DescribeOpenDevicesDataExecutor().client(this).execute(request);
232+
}
233+
214234
/**
215235
* 查询带宽(出口)详情
216236
*
@@ -244,6 +264,17 @@ public DescribeCabinetsResponse describeCabinets(DescribeCabinetsRequest request
244264
return new DescribeCabinetsExecutor().client(this).execute(request);
245265
}
246266

267+
/**
268+
* 查询开放设备列表
269+
*
270+
* @param request
271+
* @return
272+
* @throws JdcloudSdkException
273+
*/
274+
public DescribeOpenDevicesResponse describeOpenDevices(DescribeOpenDevicesRequest request) throws JdcloudSdkException {
275+
return new DescribeOpenDevicesExecutor().client(this).execute(request);
276+
}
277+
247278
/**
248279
* 查看某资源单个监控项数据
249280
*
@@ -365,6 +396,17 @@ public DescribeIpsResponse describeIps(DescribeIpsRequest request) throws Jdclou
365396
return new DescribeIpsExecutor().client(this).execute(request);
366397
}
367398

399+
/**
400+
* 修改报警规则
401+
*
402+
* @param request
403+
* @return
404+
* @throws JdcloudSdkException
405+
*/
406+
public UpdateAlarmResponse updateAlarm(UpdateAlarmRequest request) throws JdcloudSdkException {
407+
return new UpdateAlarmExecutor().client(this).execute(request);
408+
}
409+
368410
/**
369411
* 查询可用监控项列表
370412
*
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright 2018 JDCLOUD.COM
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http:#www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* Alarm API
17+
* 云托管服务的报警API
18+
*
19+
* OpenAPI spec version: v1
20+
* Contact:
21+
*
22+
* NOTE: This class is auto generated by the jdcloud code generator program.
23+
*/
24+
25+
package com.jdcloud.sdk.service.jdccs.client;
26+
27+
import com.jdcloud.sdk.client.JdcloudExecutor;
28+
import com.jdcloud.sdk.service.JdcloudResponse;
29+
import com.jdcloud.sdk.service.jdccs.model.UpdateAlarmResponse;
30+
31+
/**
32+
* 修改报警规则
33+
*/
34+
class UpdateAlarmExecutor extends JdcloudExecutor {
35+
36+
@Override
37+
public String method() {
38+
return "PUT";
39+
}
40+
41+
@Override
42+
public String url() {
43+
return "/alarms/{alarmId}";
44+
}
45+
46+
@Override
47+
public Class<? extends JdcloudResponse> returnType() {
48+
return UpdateAlarmResponse.class;
49+
}
50+
}

jdccs/src/main/java/com/jdcloud/sdk/service/jdccs/model/Alarm.java

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,26 @@ public class Alarm implements java.io.Serializable {
114114
*/
115115
private String status;
116116

117+
/**
118+
* 通知方式 all:全部 sms:短信 email:邮件
119+
*/
120+
private String noticeMethod;
121+
117122
/**
118123
* 交换机信息
119124
*/
120125
private List<Switchboard> switchboard;
121126

127+
/**
128+
* 通知对象用户ID,若多个用逗号分隔
129+
*/
130+
private String userId;
131+
132+
/**
133+
* 通知对象组ID
134+
*/
135+
private String groupId;
136+
122137

123138
/**
124139
* get 规则实例ID
@@ -408,6 +423,24 @@ public void setStatus(String status) {
408423
this.status = status;
409424
}
410425

426+
/**
427+
* get 通知方式 all:全部 sms:短信 email:邮件
428+
*
429+
* @return
430+
*/
431+
public String getNoticeMethod() {
432+
return noticeMethod;
433+
}
434+
435+
/**
436+
* set 通知方式 all:全部 sms:短信 email:邮件
437+
*
438+
* @param noticeMethod
439+
*/
440+
public void setNoticeMethod(String noticeMethod) {
441+
this.noticeMethod = noticeMethod;
442+
}
443+
411444
/**
412445
* get 交换机信息
413446
*
@@ -426,6 +459,42 @@ public void setSwitchboard(List<Switchboard> switchboard) {
426459
this.switchboard = switchboard;
427460
}
428461

462+
/**
463+
* get 通知对象用户ID,若多个用逗号分隔
464+
*
465+
* @return
466+
*/
467+
public String getUserId() {
468+
return userId;
469+
}
470+
471+
/**
472+
* set 通知对象用户ID,若多个用逗号分隔
473+
*
474+
* @param userId
475+
*/
476+
public void setUserId(String userId) {
477+
this.userId = userId;
478+
}
479+
480+
/**
481+
* get 通知对象组ID
482+
*
483+
* @return
484+
*/
485+
public String getGroupId() {
486+
return groupId;
487+
}
488+
489+
/**
490+
* set 通知对象组ID
491+
*
492+
* @param groupId
493+
*/
494+
public void setGroupId(String groupId) {
495+
this.groupId = groupId;
496+
}
497+
429498

430499
/**
431500
* set 规则实例ID
@@ -587,6 +656,16 @@ public Alarm status(String status) {
587656
return this;
588657
}
589658

659+
/**
660+
* set 通知方式 all:全部 sms:短信 email:邮件
661+
*
662+
* @param noticeMethod
663+
*/
664+
public Alarm noticeMethod(String noticeMethod) {
665+
this.noticeMethod = noticeMethod;
666+
return this;
667+
}
668+
590669
/**
591670
* set 交换机信息
592671
*
@@ -597,6 +676,26 @@ public Alarm switchboard(List<Switchboard> switchboard) {
597676
return this;
598677
}
599678

679+
/**
680+
* set 通知对象用户ID,若多个用逗号分隔
681+
*
682+
* @param userId
683+
*/
684+
public Alarm userId(String userId) {
685+
this.userId = userId;
686+
return this;
687+
}
688+
689+
/**
690+
* set 通知对象组ID
691+
*
692+
* @param groupId
693+
*/
694+
public Alarm groupId(String groupId) {
695+
this.groupId = groupId;
696+
return this;
697+
}
698+
600699

601700
/**
602701
* add item to 交换机信息

0 commit comments

Comments
 (0)