All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.dingtalkoccupationauth_1_0.Client Maven / Gradle / Ivy

There is a newer version: 2.1.50
Show newest version
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dingtalkoccupationauth_1_0;

import com.aliyun.tea.*;
import com.aliyun.dingtalkoccupationauth_1_0.models.*;
import com.aliyun.teautil.*;
import com.aliyun.teautil.models.*;
import com.aliyun.teaopenapi.*;
import com.aliyun.teaopenapi.models.*;
import com.aliyun.openapiutil.*;

public class Client extends com.aliyun.teaopenapi.Client {

    public Client(Config config) throws Exception {
        super(config);
        this._endpointRule = "";
        if (com.aliyun.teautil.Common.empty(_endpoint)) {
            this._endpoint = "api.dingtalk.com";
        }

    }


    public CheckUserTaskStatusResponse checkUserTaskStatus(CheckUserTaskStatusRequest request) throws Exception {
        RuntimeOptions runtime = new RuntimeOptions();
        CheckUserTaskStatusHeaders headers = new CheckUserTaskStatusHeaders();
        return this.checkUserTaskStatusWithOptions(request, headers, runtime);
    }

    public CheckUserTaskStatusResponse checkUserTaskStatusWithOptions(CheckUserTaskStatusRequest request, CheckUserTaskStatusHeaders headers, RuntimeOptions runtime) throws Exception {
        com.aliyun.teautil.Common.validateModel(request);
        java.util.Map body = new java.util.HashMap<>();
        if (!com.aliyun.teautil.Common.isUnset(request.provinceCode)) {
            body.put("provinceCode", request.provinceCode);
        }

        java.util.Map realHeaders = new java.util.HashMap<>();
        if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }

        if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
        }

        OpenApiRequest req = OpenApiRequest.build(TeaConverter.buildMap(
            new TeaPair("headers", realHeaders),
            new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
        ));
        return TeaModel.toModel(this.doROARequest("CheckUserTaskStatus", "occupationauth_1.0", "HTTP", "POST", "AK", "/v1.0/occupationauth/auths/userTasks", "json", req, runtime), new CheckUserTaskStatusResponse());
    }

    public CheckUserTasksStatusResponse checkUserTasksStatus(CheckUserTasksStatusRequest request) throws Exception {
        RuntimeOptions runtime = new RuntimeOptions();
        CheckUserTasksStatusHeaders headers = new CheckUserTasksStatusHeaders();
        return this.checkUserTasksStatusWithOptions(request, headers, runtime);
    }

    public CheckUserTasksStatusResponse checkUserTasksStatusWithOptions(CheckUserTasksStatusRequest request, CheckUserTasksStatusHeaders headers, RuntimeOptions runtime) throws Exception {
        com.aliyun.teautil.Common.validateModel(request);
        java.util.Map query = new java.util.HashMap<>();
        if (!com.aliyun.teautil.Common.isUnset(request.provinceCode)) {
            query.put("provinceCode", request.provinceCode);
        }

        java.util.Map realHeaders = new java.util.HashMap<>();
        if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }

        if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
        }

        OpenApiRequest req = OpenApiRequest.build(TeaConverter.buildMap(
            new TeaPair("headers", realHeaders),
            new TeaPair("query", com.aliyun.openapiutil.Client.query(query))
        ));
        return TeaModel.toModel(this.doROARequest("CheckUserTasksStatus", "occupationauth_1.0", "HTTP", "POST", "AK", "/v1.0/occupationauth/userTasks/check", "json", req, runtime), new CheckUserTasksStatusResponse());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy