Search in sources :

Example 1 with InitOralProcessRequest

use of com.tencentcloudapi.soe.v20180724.models.InitOralProcessRequest in project tencentcloud-sdk-java by TencentCloud.

the class InitOralProcess method main.

public static void main(String[] args) {
    try {
        // 实例化一个认证对象,入参需要传入腾讯云账户secretId,secretKey
        Credential cred = new Credential("", "");
        // 实例化一个http选项,可选的,没有特殊需求可以跳过
        HttpProfile httpProfile = new HttpProfile();
        // post请求(默认为post请求)
        httpProfile.setReqMethod("POST");
        // 请求连接超时时间,单位为秒(默认60秒)
        httpProfile.setConnTimeout(60);
        // 指定接入地域域名(默认就近接入)
        httpProfile.setEndpoint("soe.ap-beijing.tencentcloudapi.com");
        ClientProfile clientProfile = new ClientProfile();
        clientProfile.setUnsignedPayload(true);
        clientProfile.setHttpProfile(httpProfile);
        // 实例化要请求产品的client对象,clientProfile是可选的
        SoeClient client = new SoeClient(cred, "", clientProfile);
        InitOralProcessRequest req = new InitOralProcessRequest();
        req.setSessionId("test_123456");
        req.setRefText("bike");
        req.setWorkMode(1);
        req.setEvalMode(0);
        req.setScoreCoeff(1.0f);
        req.setServerType(0);
        InitOralProcessResponse res = client.InitOralProcess(req);
        // 输出json格式的字符串回包
        System.out.println(InitOralProcessResponse.toJsonString(res));
        // 也可以取出单个值。
        // 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
        System.out.println(res.getRequestId());
    } catch (TencentCloudSDKException e) {
        e.printStackTrace();
    }
}
Also used : Credential(com.tencentcloudapi.common.Credential) TencentCloudSDKException(com.tencentcloudapi.common.exception.TencentCloudSDKException) ClientProfile(com.tencentcloudapi.common.profile.ClientProfile) HttpProfile(com.tencentcloudapi.common.profile.HttpProfile) InitOralProcessRequest(com.tencentcloudapi.soe.v20180724.models.InitOralProcessRequest) SoeClient(com.tencentcloudapi.soe.v20180724.SoeClient) InitOralProcessResponse(com.tencentcloudapi.soe.v20180724.models.InitOralProcessResponse)

Aggregations

Credential (com.tencentcloudapi.common.Credential)1 TencentCloudSDKException (com.tencentcloudapi.common.exception.TencentCloudSDKException)1 ClientProfile (com.tencentcloudapi.common.profile.ClientProfile)1 HttpProfile (com.tencentcloudapi.common.profile.HttpProfile)1 SoeClient (com.tencentcloudapi.soe.v20180724.SoeClient)1 InitOralProcessRequest (com.tencentcloudapi.soe.v20180724.models.InitOralProcessRequest)1 InitOralProcessResponse (com.tencentcloudapi.soe.v20180724.models.InitOralProcessResponse)1