Search in sources :

Example 91 with JsonResponseModel

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

the class VpcClient method DisassociateNatGatewayAddress.

/**
 *This API (DisassociateNatGatewayAddress) is used to unbind an EIP from a NAT gateway.
 * @param req DisassociateNatGatewayAddressRequest
 * @return DisassociateNatGatewayAddressResponse
 * @throws TencentCloudSDKException
 */
public DisassociateNatGatewayAddressResponse DisassociateNatGatewayAddress(DisassociateNatGatewayAddressRequest req) throws TencentCloudSDKException {
    JsonResponseModel<DisassociateNatGatewayAddressResponse> rsp = null;
    String rspStr = "";
    try {
        Type type = new TypeToken<JsonResponseModel<DisassociateNatGatewayAddressResponse>>() {
        }.getType();
        rspStr = this.internalRequest(req, "DisassociateNatGatewayAddress");
        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 92 with JsonResponseModel

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

the class VodClient method WeChatMiniProgramPublish.

/**
 *This API is used to publish a VOD video on WeChat Mini Program for playback in the WeChat Mini Program player.
 * @param req WeChatMiniProgramPublishRequest
 * @return WeChatMiniProgramPublishResponse
 * @throws TencentCloudSDKException
 */
public WeChatMiniProgramPublishResponse WeChatMiniProgramPublish(WeChatMiniProgramPublishRequest req) throws TencentCloudSDKException {
    JsonResponseModel<WeChatMiniProgramPublishResponse> rsp = null;
    String rspStr = "";
    try {
        Type type = new TypeToken<JsonResponseModel<WeChatMiniProgramPublishResponse>>() {
        }.getType();
        rspStr = this.internalRequest(req, "WeChatMiniProgramPublish");
        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 93 with JsonResponseModel

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

the class VpcClient method ModifyNetworkAclEntries.

/**
 *This API is used to modify (add or delete) the inbound and outbound rules of a network ACL.
 * @param req ModifyNetworkAclEntriesRequest
 * @return ModifyNetworkAclEntriesResponse
 * @throws TencentCloudSDKException
 */
public ModifyNetworkAclEntriesResponse ModifyNetworkAclEntries(ModifyNetworkAclEntriesRequest req) throws TencentCloudSDKException {
    JsonResponseModel<ModifyNetworkAclEntriesResponse> rsp = null;
    String rspStr = "";
    try {
        Type type = new TypeToken<JsonResponseModel<ModifyNetworkAclEntriesResponse>>() {
        }.getType();
        rspStr = this.internalRequest(req, "ModifyNetworkAclEntries");
        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 94 with JsonResponseModel

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

the class MariadbClient method DescribeDBParameters.

/**
 *This API is used to get the current parameter settings of a database.
 * @param req DescribeDBParametersRequest
 * @return DescribeDBParametersResponse
 * @throws TencentCloudSDKException
 */
public DescribeDBParametersResponse DescribeDBParameters(DescribeDBParametersRequest req) throws TencentCloudSDKException {
    JsonResponseModel<DescribeDBParametersResponse> rsp = null;
    String rspStr = "";
    try {
        Type type = new TypeToken<JsonResponseModel<DescribeDBParametersResponse>>() {
        }.getType();
        rspStr = this.internalRequest(req, "DescribeDBParameters");
        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 95 with JsonResponseModel

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

the class MariadbClient method ModifyLogFileRetentionPeriod.

/**
 *This API is used to modify the number of days for retention of database backup logs.
 * @param req ModifyLogFileRetentionPeriodRequest
 * @return ModifyLogFileRetentionPeriodResponse
 * @throws TencentCloudSDKException
 */
public ModifyLogFileRetentionPeriodResponse ModifyLogFileRetentionPeriod(ModifyLogFileRetentionPeriodRequest req) throws TencentCloudSDKException {
    JsonResponseModel<ModifyLogFileRetentionPeriodResponse> rsp = null;
    String rspStr = "";
    try {
        Type type = new TypeToken<JsonResponseModel<ModifyLogFileRetentionPeriodResponse>>() {
        }.getType();
        rspStr = this.internalRequest(req, "ModifyLogFileRetentionPeriod");
        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