Search in sources :

Example 11 with JsonResponseModel

use of com.tencentcloudapi.common.JsonResponseModel in project tencentcloud-sdk-java by TencentCloud.

the class CwpClient method OpenProVersionPrepaid.

/**
 *本接口 (OpenProVersionPrepaid) 用于开通专业版(包年包月)。
 * @param req OpenProVersionPrepaidRequest
 * @return OpenProVersionPrepaidResponse
 * @throws TencentCloudSDKException
 */
public OpenProVersionPrepaidResponse OpenProVersionPrepaid(OpenProVersionPrepaidRequest req) throws TencentCloudSDKException {
    JsonResponseModel<OpenProVersionPrepaidResponse> rsp = null;
    String rspStr = "";
    try {
        Type type = new TypeToken<JsonResponseModel<OpenProVersionPrepaidResponse>>() {
        }.getType();
        rspStr = this.internalRequest(req, "OpenProVersionPrepaid");
        rsp = gson.fromJson(rspStr, type);
    } catch (JsonSyntaxException e) {
        throw new TencentCloudSDKException("response message: " + rspStr + ".\n Error message: " + e.getMessage());
    }
    return rsp.response;
}
Also used : JsonResponseModel(com.tencentcloudapi.common.JsonResponseModel) Type(java.lang.reflect.Type) TencentCloudSDKException(com.tencentcloudapi.common.exception.TencentCloudSDKException) JsonSyntaxException(com.google.gson.JsonSyntaxException)

Example 12 with JsonResponseModel

use of com.tencentcloudapi.common.JsonResponseModel in project tencentcloud-sdk-java by TencentCloud.

the class CwpClient method ModifyProVersionRenewFlag.

/**
 *本接口 (ModifyProVersionRenewFlag) 用于修改专业版包年包月续费标识。
 * @param req ModifyProVersionRenewFlagRequest
 * @return ModifyProVersionRenewFlagResponse
 * @throws TencentCloudSDKException
 */
public ModifyProVersionRenewFlagResponse ModifyProVersionRenewFlag(ModifyProVersionRenewFlagRequest req) throws TencentCloudSDKException {
    JsonResponseModel<ModifyProVersionRenewFlagResponse> rsp = null;
    String rspStr = "";
    try {
        Type type = new TypeToken<JsonResponseModel<ModifyProVersionRenewFlagResponse>>() {
        }.getType();
        rspStr = this.internalRequest(req, "ModifyProVersionRenewFlag");
        rsp = gson.fromJson(rspStr, type);
    } catch (JsonSyntaxException e) {
        throw new TencentCloudSDKException("response message: " + rspStr + ".\n Error message: " + e.getMessage());
    }
    return rsp.response;
}
Also used : JsonResponseModel(com.tencentcloudapi.common.JsonResponseModel) Type(java.lang.reflect.Type) TencentCloudSDKException(com.tencentcloudapi.common.exception.TencentCloudSDKException) JsonSyntaxException(com.google.gson.JsonSyntaxException)

Example 13 with JsonResponseModel

use of com.tencentcloudapi.common.JsonResponseModel in project tencentcloud-sdk-java by TencentCloud.

the class TsfClient method DescribeServerlessGroup.

/**
 *查询Serverless部署组明细
 * @param req DescribeServerlessGroupRequest
 * @return DescribeServerlessGroupResponse
 * @throws TencentCloudSDKException
 */
public DescribeServerlessGroupResponse DescribeServerlessGroup(DescribeServerlessGroupRequest req) throws TencentCloudSDKException {
    JsonResponseModel<DescribeServerlessGroupResponse> rsp = null;
    String rspStr = "";
    try {
        Type type = new TypeToken<JsonResponseModel<DescribeServerlessGroupResponse>>() {
        }.getType();
        rspStr = this.internalRequest(req, "DescribeServerlessGroup");
        rsp = gson.fromJson(rspStr, type);
    } catch (JsonSyntaxException e) {
        throw new TencentCloudSDKException("response message: " + rspStr + ".\n Error message: " + e.getMessage());
    }
    return rsp.response;
}
Also used : JsonResponseModel(com.tencentcloudapi.common.JsonResponseModel) Type(java.lang.reflect.Type) TencentCloudSDKException(com.tencentcloudapi.common.exception.TencentCloudSDKException) JsonSyntaxException(com.google.gson.JsonSyntaxException)

Example 14 with JsonResponseModel

use of com.tencentcloudapi.common.JsonResponseModel in project tencentcloud-sdk-java by TencentCloud.

the class TsfClient method DescribeServerlessGroups.

/**
 *查询Serverless部署组列表
 * @param req DescribeServerlessGroupsRequest
 * @return DescribeServerlessGroupsResponse
 * @throws TencentCloudSDKException
 */
public DescribeServerlessGroupsResponse DescribeServerlessGroups(DescribeServerlessGroupsRequest req) throws TencentCloudSDKException {
    JsonResponseModel<DescribeServerlessGroupsResponse> rsp = null;
    String rspStr = "";
    try {
        Type type = new TypeToken<JsonResponseModel<DescribeServerlessGroupsResponse>>() {
        }.getType();
        rspStr = this.internalRequest(req, "DescribeServerlessGroups");
        rsp = gson.fromJson(rspStr, type);
    } catch (JsonSyntaxException e) {
        throw new TencentCloudSDKException("response message: " + rspStr + ".\n Error message: " + e.getMessage());
    }
    return rsp.response;
}
Also used : JsonResponseModel(com.tencentcloudapi.common.JsonResponseModel) Type(java.lang.reflect.Type) TencentCloudSDKException(com.tencentcloudapi.common.exception.TencentCloudSDKException) JsonSyntaxException(com.google.gson.JsonSyntaxException)

Example 15 with JsonResponseModel

use of com.tencentcloudapi.common.JsonResponseModel in project tencentcloud-sdk-java by TencentCloud.

the class NlpClient method DescribeTriple.

/**
 *此接口正在维护升级,后续上线另行通知。
 * @param req DescribeTripleRequest
 * @return DescribeTripleResponse
 * @throws TencentCloudSDKException
 */
public DescribeTripleResponse DescribeTriple(DescribeTripleRequest req) throws TencentCloudSDKException {
    JsonResponseModel<DescribeTripleResponse> rsp = null;
    String rspStr = "";
    try {
        Type type = new TypeToken<JsonResponseModel<DescribeTripleResponse>>() {
        }.getType();
        rspStr = this.internalRequest(req, "DescribeTriple");
        rsp = gson.fromJson(rspStr, type);
    } catch (JsonSyntaxException e) {
        throw new TencentCloudSDKException("response message: " + rspStr + ".\n Error message: " + e.getMessage());
    }
    return rsp.response;
}
Also used : JsonResponseModel(com.tencentcloudapi.common.JsonResponseModel) Type(java.lang.reflect.Type) TencentCloudSDKException(com.tencentcloudapi.common.exception.TencentCloudSDKException) JsonSyntaxException(com.google.gson.JsonSyntaxException)

Aggregations

JsonSyntaxException (com.google.gson.JsonSyntaxException)10373 JsonResponseModel (com.tencentcloudapi.common.JsonResponseModel)10373 TencentCloudSDKException (com.tencentcloudapi.common.exception.TencentCloudSDKException)10373 Type (java.lang.reflect.Type)10373