Skip to content

Commit

Permalink
Add SmartqQueryAbility api.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed Nov 26, 2024
1 parent e57e745 commit 62c4cf1
Show file tree
Hide file tree
Showing 6 changed files with 294 additions and 1 deletion.
3 changes: 3 additions & 0 deletions aliyun-java-sdk-quickbi-public/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion aliyun-java-sdk-quickbi-public/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-quickbi-public</artifactId>
<packaging>jar</packaging>
<version>2.1.10</version>
<version>2.1.11</version>
<name>aliyun-java-sdk-quickbi-public</name>
<url>http://www.aliyun.com</url>
<description>Aliyun Open API SDK for Java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public class AddUserRequest extends RpcAcsRequest<AddUserResponse> {

private Boolean adminUser;

private String accountId;

private String roleIds;

private String accountName;
Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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<SmartqQueryAbilityResponse> {


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<SmartqQueryAbilityResponse> getResponseClass() {
return SmartqQueryAbilityResponse.class;
}

}
Original file line number Diff line number Diff line change
@@ -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<MetaTypeItem> metaType;

private List<ValuesItem> values;

public String getChartType() {
return this.chartType;
}

public void setChartType(String chartType) {
this.chartType = chartType;
}

public List<MetaTypeItem> getMetaType() {
return this.metaType;
}

public void setMetaType(List<MetaTypeItem> metaType) {
this.metaType = metaType;
}

public List<ValuesItem> getValues() {
return this.values;
}

public void setValues(List<ValuesItem> 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<String> row;

public List<String> getRow() {
return this.row;
}

public void setRow(List<String> row) {
this.row = row;
}
}
}

@Override
public SmartqQueryAbilityResponse getInstance(UnmarshallerContext context) {
return SmartqQueryAbilityResponseUnmarshaller.unmarshall(this, context);
}

@Override
public boolean checkShowJsonItemName() {
return false;
}
}
Original file line number Diff line number Diff line change
@@ -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<MetaTypeItem> metaType = new ArrayList<MetaTypeItem>();
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<ValuesItem> values = new ArrayList<ValuesItem>();
for (int i = 0; i < _ctx.lengthValue("SmartqQueryAbilityResponse.Result.Values.Length"); i++) {
ValuesItem valuesItem = new ValuesItem();

List<String> row = new ArrayList<String>();
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;
}
}

0 comments on commit 62c4cf1

Please sign in to comment.