From 62c4cf1168995399e008b6498786c65e5d0e432b Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 26 Nov 2024 12:18:30 +0000 Subject: [PATCH] Add SmartqQueryAbility api. --- aliyun-java-sdk-quickbi-public/ChangeLog.txt | 3 + aliyun-java-sdk-quickbi-public/pom.xml | 2 +- .../model/v20220101/AddUserRequest.java | 13 ++ .../v20220101/SmartqQueryAbilityRequest.java | 77 ++++++++++ .../v20220101/SmartqQueryAbilityResponse.java | 136 ++++++++++++++++++ ...martqQueryAbilityResponseUnmarshaller.java | 64 +++++++++ 6 files changed, 294 insertions(+), 1 deletion(-) create mode 100644 aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/model/v20220101/SmartqQueryAbilityRequest.java create mode 100644 aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/model/v20220101/SmartqQueryAbilityResponse.java create mode 100644 aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/transform/v20220101/SmartqQueryAbilityResponseUnmarshaller.java diff --git a/aliyun-java-sdk-quickbi-public/ChangeLog.txt b/aliyun-java-sdk-quickbi-public/ChangeLog.txt index d68ef806da..48b22e74d4 100644 --- a/aliyun-java-sdk-quickbi-public/ChangeLog.txt +++ b/aliyun-java-sdk-quickbi-public/ChangeLog.txt @@ -1,3 +1,6 @@ +2024-11-26 Version: 2.1.11 +- Add SmartqQueryAbility api. + 2024-10-10 Version: 2.1.10 - Add ManualRunMailTask, GetMailTaskStatus and GetWorksEmbedList apis. diff --git a/aliyun-java-sdk-quickbi-public/pom.xml b/aliyun-java-sdk-quickbi-public/pom.xml index e86c2289ee..63e039c555 100644 --- a/aliyun-java-sdk-quickbi-public/pom.xml +++ b/aliyun-java-sdk-quickbi-public/pom.xml @@ -4,7 +4,7 @@ com.aliyun aliyun-java-sdk-quickbi-public jar - 2.1.10 + 2.1.11 aliyun-java-sdk-quickbi-public http://www.aliyun.com Aliyun Open API SDK for Java diff --git a/aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/model/v20220101/AddUserRequest.java b/aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/model/v20220101/AddUserRequest.java index 9fafdcc5ed..0329a9de80 100644 --- a/aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/model/v20220101/AddUserRequest.java +++ b/aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/model/v20220101/AddUserRequest.java @@ -26,6 +26,8 @@ public class AddUserRequest extends RpcAcsRequest { private Boolean adminUser; + private String accountId; + private String roleIds; private String accountName; @@ -51,6 +53,17 @@ public void setAdminUser(Boolean adminUser) { } } + public String getAccountId() { + return this.accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + if(accountId != null){ + putQueryParameter("AccountId", accountId); + } + } + public String getRoleIds() { return this.roleIds; } diff --git a/aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/model/v20220101/SmartqQueryAbilityRequest.java b/aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/model/v20220101/SmartqQueryAbilityRequest.java new file mode 100644 index 0000000000..c499b86ee8 --- /dev/null +++ b/aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/model/v20220101/SmartqQueryAbilityRequest.java @@ -0,0 +1,77 @@ +/* + * 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 com.aliyuncs.quickbi_public.model.v20220101; + +import com.aliyuncs.RpcAcsRequest; +import com.aliyuncs.http.ProtocolType; +import com.aliyuncs.http.MethodType; + +/** + * @author auto create + * @version + */ +public class SmartqQueryAbilityRequest extends RpcAcsRequest { + + + private String userId; + + private String userQuestion; + + private String cubeId; + public SmartqQueryAbilityRequest() { + super("quickbi-public", "2022-01-01", "SmartqQueryAbility", "2.2.0"); + setProtocol(ProtocolType.HTTPS); + setMethod(MethodType.POST); + } + + public String getUserId() { + return this.userId; + } + + public void setUserId(String userId) { + this.userId = userId; + if(userId != null){ + putQueryParameter("UserId", userId); + } + } + + public String getUserQuestion() { + return this.userQuestion; + } + + public void setUserQuestion(String userQuestion) { + this.userQuestion = userQuestion; + if(userQuestion != null){ + putQueryParameter("UserQuestion", userQuestion); + } + } + + public String getCubeId() { + return this.cubeId; + } + + public void setCubeId(String cubeId) { + this.cubeId = cubeId; + if(cubeId != null){ + putQueryParameter("CubeId", cubeId); + } + } + + @Override + public Class getResponseClass() { + return SmartqQueryAbilityResponse.class; + } + +} diff --git a/aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/model/v20220101/SmartqQueryAbilityResponse.java b/aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/model/v20220101/SmartqQueryAbilityResponse.java new file mode 100644 index 0000000000..7a2dd9a125 --- /dev/null +++ b/aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/model/v20220101/SmartqQueryAbilityResponse.java @@ -0,0 +1,136 @@ +/* + * 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 com.aliyuncs.quickbi_public.model.v20220101; + +import java.util.List; +import com.aliyuncs.AcsResponse; +import com.aliyuncs.quickbi_public.transform.v20220101.SmartqQueryAbilityResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + +/** + * @author auto create + * @version + */ +public class SmartqQueryAbilityResponse extends AcsResponse { + + private String requestId; + + private Boolean success; + + private Result result; + + public String getRequestId() { + return this.requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public Boolean getSuccess() { + return this.success; + } + + public void setSuccess(Boolean success) { + this.success = success; + } + + public Result getResult() { + return this.result; + } + + public void setResult(Result result) { + this.result = result; + } + + public static class Result { + + private String chartType; + + private List metaType; + + private List values; + + public String getChartType() { + return this.chartType; + } + + public void setChartType(String chartType) { + this.chartType = chartType; + } + + public List getMetaType() { + return this.metaType; + } + + public void setMetaType(List metaType) { + this.metaType = metaType; + } + + public List getValues() { + return this.values; + } + + public void setValues(List values) { + this.values = values; + } + + public static class MetaTypeItem { + + private String key; + + private String value; + + public String getKey() { + return this.key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getValue() { + return this.value; + } + + public void setValue(String value) { + this.value = value; + } + } + + public static class ValuesItem { + + private List row; + + public List getRow() { + return this.row; + } + + public void setRow(List row) { + this.row = row; + } + } + } + + @Override + public SmartqQueryAbilityResponse getInstance(UnmarshallerContext context) { + return SmartqQueryAbilityResponseUnmarshaller.unmarshall(this, context); + } + + @Override + public boolean checkShowJsonItemName() { + return false; + } +} diff --git a/aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/transform/v20220101/SmartqQueryAbilityResponseUnmarshaller.java b/aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/transform/v20220101/SmartqQueryAbilityResponseUnmarshaller.java new file mode 100644 index 0000000000..3fb17afa51 --- /dev/null +++ b/aliyun-java-sdk-quickbi-public/src/main/java/com/aliyuncs/quickbi_public/transform/v20220101/SmartqQueryAbilityResponseUnmarshaller.java @@ -0,0 +1,64 @@ +/* + * 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 com.aliyuncs.quickbi_public.transform.v20220101; + +import java.util.ArrayList; +import java.util.List; + +import com.aliyuncs.quickbi_public.model.v20220101.SmartqQueryAbilityResponse; +import com.aliyuncs.quickbi_public.model.v20220101.SmartqQueryAbilityResponse.Result; +import com.aliyuncs.quickbi_public.model.v20220101.SmartqQueryAbilityResponse.Result.MetaTypeItem; +import com.aliyuncs.quickbi_public.model.v20220101.SmartqQueryAbilityResponse.Result.ValuesItem; +import com.aliyuncs.transform.UnmarshallerContext; + + +public class SmartqQueryAbilityResponseUnmarshaller { + + public static SmartqQueryAbilityResponse unmarshall(SmartqQueryAbilityResponse smartqQueryAbilityResponse, UnmarshallerContext _ctx) { + + smartqQueryAbilityResponse.setRequestId(_ctx.stringValue("SmartqQueryAbilityResponse.RequestId")); + smartqQueryAbilityResponse.setSuccess(_ctx.booleanValue("SmartqQueryAbilityResponse.Success")); + + Result result = new Result(); + result.setChartType(_ctx.stringValue("SmartqQueryAbilityResponse.Result.ChartType")); + + List metaType = new ArrayList(); + for (int i = 0; i < _ctx.lengthValue("SmartqQueryAbilityResponse.Result.MetaType.Length"); i++) { + MetaTypeItem metaTypeItem = new MetaTypeItem(); + metaTypeItem.setKey(_ctx.stringValue("SmartqQueryAbilityResponse.Result.MetaType["+ i +"].Key")); + metaTypeItem.setValue(_ctx.stringValue("SmartqQueryAbilityResponse.Result.MetaType["+ i +"].Value")); + + metaType.add(metaTypeItem); + } + result.setMetaType(metaType); + + List values = new ArrayList(); + for (int i = 0; i < _ctx.lengthValue("SmartqQueryAbilityResponse.Result.Values.Length"); i++) { + ValuesItem valuesItem = new ValuesItem(); + + List row = new ArrayList(); + for (int j = 0; j < _ctx.lengthValue("SmartqQueryAbilityResponse.Result.Values["+ i +"].Row.Length"); j++) { + row.add(_ctx.stringValue("SmartqQueryAbilityResponse.Result.Values["+ i +"].Row["+ j +"]")); + } + valuesItem.setRow(row); + + values.add(valuesItem); + } + result.setValues(values); + smartqQueryAbilityResponse.setResult(result); + + return smartqQueryAbilityResponse; + } +} \ No newline at end of file