"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AmdpOrganizationDataPushRequestParam = exports.AmdpJobPositionDataPushRequestParam = exports.AmdpEmployeeDataPushRequestParam = exports.AmdpEmpRoleDataPushRequestParam = exports.AmdpOrganizationDataPushResponse = exports.AmdpOrganizationDataPushResponseBody = exports.AmdpOrganizationDataPushRequest = exports.AmdpOrganizationDataPushHeaders = exports.AmdpJobPositionDataPushResponse = exports.AmdpJobPositionDataPushResponseBody = exports.AmdpJobPositionDataPushRequest = exports.AmdpJobPositionDataPushHeaders = exports.AmdpEmployeeDataPushResponse = exports.AmdpEmployeeDataPushResponseBody = exports.AmdpEmployeeDataPushRequest = exports.AmdpEmployeeDataPushHeaders = exports.AmdpEmpRoleDataPushResponse = exports.AmdpEmpRoleDataPushResponseBody = exports.AmdpEmpRoleDataPushRequest = exports.AmdpEmpRoleDataPushHeaders = void 0;
// This file is auto-generated, don't edit it
/**
 */
const tea_util_1 = __importStar(require("@alicloud/tea-util")), $Util = tea_util_1;
const gateway_dingtalk_1 = __importDefault(require("@alicloud/gateway-dingtalk"));
const openapi_client_1 = __importStar(require("@alicloud/openapi-client")), $OpenApi = openapi_client_1;
const openapi_util_1 = __importDefault(require("@alicloud/openapi-util"));
const $tea = __importStar(require("@alicloud/tea-typescript"));
class AmdpEmpRoleDataPushHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpEmpRoleDataPushHeaders = AmdpEmpRoleDataPushHeaders;
class AmdpEmpRoleDataPushRequest extends $tea.Model {
    static names() {
        return {
            param: 'param',
        };
    }
    static types() {
        return {
            param: { 'type': 'array', 'itemType': AmdpEmpRoleDataPushRequestParam },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpEmpRoleDataPushRequest = AmdpEmpRoleDataPushRequest;
class AmdpEmpRoleDataPushResponseBody extends $tea.Model {
    static names() {
        return {
            requestId: 'requestId',
            result: 'result',
            status: 'status',
            success: 'success',
        };
    }
    static types() {
        return {
            requestId: 'string',
            result: 'boolean',
            status: 'string',
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpEmpRoleDataPushResponseBody = AmdpEmpRoleDataPushResponseBody;
class AmdpEmpRoleDataPushResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: AmdpEmpRoleDataPushResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpEmpRoleDataPushResponse = AmdpEmpRoleDataPushResponse;
class AmdpEmployeeDataPushHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpEmployeeDataPushHeaders = AmdpEmployeeDataPushHeaders;
class AmdpEmployeeDataPushRequest extends $tea.Model {
    static names() {
        return {
            param: 'param',
        };
    }
    static types() {
        return {
            param: { 'type': 'array', 'itemType': AmdpEmployeeDataPushRequestParam },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpEmployeeDataPushRequest = AmdpEmployeeDataPushRequest;
class AmdpEmployeeDataPushResponseBody extends $tea.Model {
    static names() {
        return {
            requestId: 'requestId',
            result: 'result',
            status: 'status',
            success: 'success',
        };
    }
    static types() {
        return {
            requestId: 'string',
            result: 'boolean',
            status: 'string',
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpEmployeeDataPushResponseBody = AmdpEmployeeDataPushResponseBody;
class AmdpEmployeeDataPushResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: AmdpEmployeeDataPushResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpEmployeeDataPushResponse = AmdpEmployeeDataPushResponse;
class AmdpJobPositionDataPushHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpJobPositionDataPushHeaders = AmdpJobPositionDataPushHeaders;
class AmdpJobPositionDataPushRequest extends $tea.Model {
    static names() {
        return {
            param: 'param',
        };
    }
    static types() {
        return {
            param: { 'type': 'array', 'itemType': AmdpJobPositionDataPushRequestParam },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpJobPositionDataPushRequest = AmdpJobPositionDataPushRequest;
class AmdpJobPositionDataPushResponseBody extends $tea.Model {
    static names() {
        return {
            requestId: 'requestId',
            result: 'result',
            status: 'status',
            success: 'success',
        };
    }
    static types() {
        return {
            requestId: 'string',
            result: 'boolean',
            status: 'string',
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpJobPositionDataPushResponseBody = AmdpJobPositionDataPushResponseBody;
class AmdpJobPositionDataPushResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: AmdpJobPositionDataPushResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpJobPositionDataPushResponse = AmdpJobPositionDataPushResponse;
class AmdpOrganizationDataPushHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpOrganizationDataPushHeaders = AmdpOrganizationDataPushHeaders;
class AmdpOrganizationDataPushRequest extends $tea.Model {
    static names() {
        return {
            param: 'param',
        };
    }
    static types() {
        return {
            param: { 'type': 'array', 'itemType': AmdpOrganizationDataPushRequestParam },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpOrganizationDataPushRequest = AmdpOrganizationDataPushRequest;
class AmdpOrganizationDataPushResponseBody extends $tea.Model {
    static names() {
        return {
            requestId: 'requestId',
            result: 'result',
            status: 'status',
            success: 'success',
        };
    }
    static types() {
        return {
            requestId: 'string',
            result: 'boolean',
            status: 'string',
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpOrganizationDataPushResponseBody = AmdpOrganizationDataPushResponseBody;
class AmdpOrganizationDataPushResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: AmdpOrganizationDataPushResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpOrganizationDataPushResponse = AmdpOrganizationDataPushResponse;
class AmdpEmpRoleDataPushRequestParam extends $tea.Model {
    static names() {
        return {
            deptId: 'deptId',
            isDelete: 'isDelete',
            roleCode: 'roleCode',
            userId: 'userId',
        };
    }
    static types() {
        return {
            deptId: 'string',
            isDelete: 'string',
            roleCode: 'string',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpEmpRoleDataPushRequestParam = AmdpEmpRoleDataPushRequestParam;
class AmdpEmployeeDataPushRequestParam extends $tea.Model {
    static names() {
        return {
            avatar: 'avatar',
            isDelete: 'isDelete',
            name: 'name',
            unionId: 'unionId',
            userId: 'userId',
            workNo: 'workNo',
        };
    }
    static types() {
        return {
            avatar: 'string',
            isDelete: 'string',
            name: 'string',
            unionId: 'string',
            userId: 'string',
            workNo: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpEmployeeDataPushRequestParam = AmdpEmployeeDataPushRequestParam;
class AmdpJobPositionDataPushRequestParam extends $tea.Model {
    static names() {
        return {
            deptId: 'deptId',
            deptLeader: 'deptLeader',
            isDelete: 'isDelete',
            leaderDeptId: 'leaderDeptId',
            orderNumber: 'orderNumber',
            userId: 'userId',
        };
    }
    static types() {
        return {
            deptId: 'string',
            deptLeader: 'string',
            isDelete: 'string',
            leaderDeptId: 'string',
            orderNumber: 'string',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpJobPositionDataPushRequestParam = AmdpJobPositionDataPushRequestParam;
class AmdpOrganizationDataPushRequestParam extends $tea.Model {
    static names() {
        return {
            deptId: 'deptId',
            deptManagerIdList: 'deptManagerIdList',
            dingTalkDeptId: 'dingTalkDeptId',
            dingTalkParentId: 'dingTalkParentId',
            isDelete: 'isDelete',
            name: 'name',
            parentId: 'parentId',
        };
    }
    static types() {
        return {
            deptId: 'string',
            deptManagerIdList: { 'type': 'array', 'itemType': 'string' },
            dingTalkDeptId: 'string',
            dingTalkParentId: 'string',
            isDelete: 'string',
            name: 'string',
            parentId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AmdpOrganizationDataPushRequestParam = AmdpOrganizationDataPushRequestParam;
class Client extends openapi_client_1.default {
    constructor(config) {
        super(config);
        let gatewayClient = new gateway_dingtalk_1.default();
        this._spi = gatewayClient;
        this._endpointRule = "";
        if (tea_util_1.default.empty(this._endpoint)) {
            this._endpoint = "api.dingtalk.com";
        }
    }
    /**
     * 人员角色数据推送
     *
     * @param request - AmdpEmpRoleDataPushRequest
     * @param headers - AmdpEmpRoleDataPushHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns AmdpEmpRoleDataPushResponse
     */
    async amdpEmpRoleDataPushWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.param)) {
            body["param"] = request.param;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "AmdpEmpRoleDataPush",
            version: "amdp_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/amdp/employeeRoles/datas/push`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new AmdpEmpRoleDataPushResponse({}));
    }
    /**
     * 人员角色数据推送
     *
     * @param request - AmdpEmpRoleDataPushRequest
     * @returns AmdpEmpRoleDataPushResponse
     */
    async amdpEmpRoleDataPush(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new AmdpEmpRoleDataPushHeaders({});
        return await this.amdpEmpRoleDataPushWithOptions(request, headers, runtime);
    }
    /**
     * 人员数据推送
     *
     * @param request - AmdpEmployeeDataPushRequest
     * @param headers - AmdpEmployeeDataPushHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns AmdpEmployeeDataPushResponse
     */
    async amdpEmployeeDataPushWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.param)) {
            body["param"] = request.param;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "AmdpEmployeeDataPush",
            version: "amdp_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/amdp/employees/datas/push`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new AmdpEmployeeDataPushResponse({}));
    }
    /**
     * 人员数据推送
     *
     * @param request - AmdpEmployeeDataPushRequest
     * @returns AmdpEmployeeDataPushResponse
     */
    async amdpEmployeeDataPush(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new AmdpEmployeeDataPushHeaders({});
        return await this.amdpEmployeeDataPushWithOptions(request, headers, runtime);
    }
    /**
     * 任职数据推送
     *
     * @param request - AmdpJobPositionDataPushRequest
     * @param headers - AmdpJobPositionDataPushHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns AmdpJobPositionDataPushResponse
     */
    async amdpJobPositionDataPushWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.param)) {
            body["param"] = request.param;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "AmdpJobPositionDataPush",
            version: "amdp_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/amdp/empJobs/datas/push`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new AmdpJobPositionDataPushResponse({}));
    }
    /**
     * 任职数据推送
     *
     * @param request - AmdpJobPositionDataPushRequest
     * @returns AmdpJobPositionDataPushResponse
     */
    async amdpJobPositionDataPush(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new AmdpJobPositionDataPushHeaders({});
        return await this.amdpJobPositionDataPushWithOptions(request, headers, runtime);
    }
    /**
     * 组织部门数据推送
     *
     * @param request - AmdpOrganizationDataPushRequest
     * @param headers - AmdpOrganizationDataPushHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns AmdpOrganizationDataPushResponse
     */
    async amdpOrganizationDataPushWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.param)) {
            body["param"] = request.param;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "AmdpOrganizationDataPush",
            version: "amdp_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/amdp/organizations/departments/datas/push`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new AmdpOrganizationDataPushResponse({}));
    }
    /**
     * 组织部门数据推送
     *
     * @param request - AmdpOrganizationDataPushRequest
     * @returns AmdpOrganizationDataPushResponse
     */
    async amdpOrganizationDataPush(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new AmdpOrganizationDataPushHeaders({});
        return await this.amdpOrganizationDataPushWithOptions(request, headers, runtime);
    }
}
exports.default = Client;
//# sourceMappingURL=client.js.map