Skip to content

Commit 62c4cf1

Browse files
committed
Add SmartqQueryAbility api.
1 parent e57e745 commit 62c4cf1

File tree

6 files changed

+294
-1
lines changed

6 files changed

+294
-1
lines changed

aliyun-java-sdk-quickbi-public/ChangeLog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2024-11-26 Version: 2.1.11
2+
- Add SmartqQueryAbility api.
3+
14
2024-10-10 Version: 2.1.10
25
- Add ManualRunMailTask, GetMailTaskStatus and GetWorksEmbedList apis.
36

aliyun-java-sdk-quickbi-public/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.aliyun</groupId>
55
<artifactId>aliyun-java-sdk-quickbi-public</artifactId>
66
<packaging>jar</packaging>
7-
<version>2.1.10</version>
7+
<version>2.1.11</version>
88
<name>aliyun-java-sdk-quickbi-public</name>
99
<url>http://www.aliyun.com</url>
1010
<description>Aliyun Open API SDK for Java

aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/model/v20220101/AddUserRequest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public class AddUserRequest extends RpcAcsRequest<AddUserResponse> {
2626

2727
private Boolean adminUser;
2828

29+
private String accountId;
30+
2931
private String roleIds;
3032

3133
private String accountName;
@@ -51,6 +53,17 @@ public void setAdminUser(Boolean adminUser) {
5153
}
5254
}
5355

56+
public String getAccountId() {
57+
return this.accountId;
58+
}
59+
60+
public void setAccountId(String accountId) {
61+
this.accountId = accountId;
62+
if(accountId != null){
63+
putQueryParameter("AccountId", accountId);
64+
}
65+
}
66+
5467
public String getRoleIds() {
5568
return this.roleIds;
5669
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
*
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
15+
package com.aliyuncs.quickbi_public.model.v20220101;
16+
17+
import com.aliyuncs.RpcAcsRequest;
18+
import com.aliyuncs.http.ProtocolType;
19+
import com.aliyuncs.http.MethodType;
20+
21+
/**
22+
* @author auto create
23+
* @version
24+
*/
25+
public class SmartqQueryAbilityRequest extends RpcAcsRequest<SmartqQueryAbilityResponse> {
26+
27+
28+
private String userId;
29+
30+
private String userQuestion;
31+
32+
private String cubeId;
33+
public SmartqQueryAbilityRequest() {
34+
super("quickbi-public", "2022-01-01", "SmartqQueryAbility", "2.2.0");
35+
setProtocol(ProtocolType.HTTPS);
36+
setMethod(MethodType.POST);
37+
}
38+
39+
public String getUserId() {
40+
return this.userId;
41+
}
42+
43+
public void setUserId(String userId) {
44+
this.userId = userId;
45+
if(userId != null){
46+
putQueryParameter("UserId", userId);
47+
}
48+
}
49+
50+
public String getUserQuestion() {
51+
return this.userQuestion;
52+
}
53+
54+
public void setUserQuestion(String userQuestion) {
55+
this.userQuestion = userQuestion;
56+
if(userQuestion != null){
57+
putQueryParameter("UserQuestion", userQuestion);
58+
}
59+
}
60+
61+
public String getCubeId() {
62+
return this.cubeId;
63+
}
64+
65+
public void setCubeId(String cubeId) {
66+
this.cubeId = cubeId;
67+
if(cubeId != null){
68+
putQueryParameter("CubeId", cubeId);
69+
}
70+
}
71+
72+
@Override
73+
public Class<SmartqQueryAbilityResponse> getResponseClass() {
74+
return SmartqQueryAbilityResponse.class;
75+
}
76+
77+
}
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
*
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
15+
package com.aliyuncs.quickbi_public.model.v20220101;
16+
17+
import java.util.List;
18+
import com.aliyuncs.AcsResponse;
19+
import com.aliyuncs.quickbi_public.transform.v20220101.SmartqQueryAbilityResponseUnmarshaller;
20+
import com.aliyuncs.transform.UnmarshallerContext;
21+
22+
/**
23+
* @author auto create
24+
* @version
25+
*/
26+
public class SmartqQueryAbilityResponse extends AcsResponse {
27+
28+
private String requestId;
29+
30+
private Boolean success;
31+
32+
private Result result;
33+
34+
public String getRequestId() {
35+
return this.requestId;
36+
}
37+
38+
public void setRequestId(String requestId) {
39+
this.requestId = requestId;
40+
}
41+
42+
public Boolean getSuccess() {
43+
return this.success;
44+
}
45+
46+
public void setSuccess(Boolean success) {
47+
this.success = success;
48+
}
49+
50+
public Result getResult() {
51+
return this.result;
52+
}
53+
54+
public void setResult(Result result) {
55+
this.result = result;
56+
}
57+
58+
public static class Result {
59+
60+
private String chartType;
61+
62+
private List<MetaTypeItem> metaType;
63+
64+
private List<ValuesItem> values;
65+
66+
public String getChartType() {
67+
return this.chartType;
68+
}
69+
70+
public void setChartType(String chartType) {
71+
this.chartType = chartType;
72+
}
73+
74+
public List<MetaTypeItem> getMetaType() {
75+
return this.metaType;
76+
}
77+
78+
public void setMetaType(List<MetaTypeItem> metaType) {
79+
this.metaType = metaType;
80+
}
81+
82+
public List<ValuesItem> getValues() {
83+
return this.values;
84+
}
85+
86+
public void setValues(List<ValuesItem> values) {
87+
this.values = values;
88+
}
89+
90+
public static class MetaTypeItem {
91+
92+
private String key;
93+
94+
private String value;
95+
96+
public String getKey() {
97+
return this.key;
98+
}
99+
100+
public void setKey(String key) {
101+
this.key = key;
102+
}
103+
104+
public String getValue() {
105+
return this.value;
106+
}
107+
108+
public void setValue(String value) {
109+
this.value = value;
110+
}
111+
}
112+
113+
public static class ValuesItem {
114+
115+
private List<String> row;
116+
117+
public List<String> getRow() {
118+
return this.row;
119+
}
120+
121+
public void setRow(List<String> row) {
122+
this.row = row;
123+
}
124+
}
125+
}
126+
127+
@Override
128+
public SmartqQueryAbilityResponse getInstance(UnmarshallerContext context) {
129+
return SmartqQueryAbilityResponseUnmarshaller.unmarshall(this, context);
130+
}
131+
132+
@Override
133+
public boolean checkShowJsonItemName() {
134+
return false;
135+
}
136+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
*
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
15+
package com.aliyuncs.quickbi_public.transform.v20220101;
16+
17+
import java.util.ArrayList;
18+
import java.util.List;
19+
20+
import com.aliyuncs.quickbi_public.model.v20220101.SmartqQueryAbilityResponse;
21+
import com.aliyuncs.quickbi_public.model.v20220101.SmartqQueryAbilityResponse.Result;
22+
import com.aliyuncs.quickbi_public.model.v20220101.SmartqQueryAbilityResponse.Result.MetaTypeItem;
23+
import com.aliyuncs.quickbi_public.model.v20220101.SmartqQueryAbilityResponse.Result.ValuesItem;
24+
import com.aliyuncs.transform.UnmarshallerContext;
25+
26+
27+
public class SmartqQueryAbilityResponseUnmarshaller {
28+
29+
public static SmartqQueryAbilityResponse unmarshall(SmartqQueryAbilityResponse smartqQueryAbilityResponse, UnmarshallerContext _ctx) {
30+
31+
smartqQueryAbilityResponse.setRequestId(_ctx.stringValue("SmartqQueryAbilityResponse.RequestId"));
32+
smartqQueryAbilityResponse.setSuccess(_ctx.booleanValue("SmartqQueryAbilityResponse.Success"));
33+
34+
Result result = new Result();
35+
result.setChartType(_ctx.stringValue("SmartqQueryAbilityResponse.Result.ChartType"));
36+
37+
List<MetaTypeItem> metaType = new ArrayList<MetaTypeItem>();
38+
for (int i = 0; i < _ctx.lengthValue("SmartqQueryAbilityResponse.Result.MetaType.Length"); i++) {
39+
MetaTypeItem metaTypeItem = new MetaTypeItem();
40+
metaTypeItem.setKey(_ctx.stringValue("SmartqQueryAbilityResponse.Result.MetaType["+ i +"].Key"));
41+
metaTypeItem.setValue(_ctx.stringValue("SmartqQueryAbilityResponse.Result.MetaType["+ i +"].Value"));
42+
43+
metaType.add(metaTypeItem);
44+
}
45+
result.setMetaType(metaType);
46+
47+
List<ValuesItem> values = new ArrayList<ValuesItem>();
48+
for (int i = 0; i < _ctx.lengthValue("SmartqQueryAbilityResponse.Result.Values.Length"); i++) {
49+
ValuesItem valuesItem = new ValuesItem();
50+
51+
List<String> row = new ArrayList<String>();
52+
for (int j = 0; j < _ctx.lengthValue("SmartqQueryAbilityResponse.Result.Values["+ i +"].Row.Length"); j++) {
53+
row.add(_ctx.stringValue("SmartqQueryAbilityResponse.Result.Values["+ i +"].Row["+ j +"]"));
54+
}
55+
valuesItem.setRow(row);
56+
57+
values.add(valuesItem);
58+
}
59+
result.setValues(values);
60+
smartqQueryAbilityResponse.setResult(result);
61+
62+
return smartqQueryAbilityResponse;
63+
}
64+
}

0 commit comments

Comments
 (0)