"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.WriteSalaryCalculationRequestItems = exports.WriteSalaryCalculationRequestItemsContents = exports.ListSalaryCalculationResponseBodyResult = exports.ListSalaryCalculationResponseBodyResultData = exports.ListSalaryCalculationResponseBodyResultDataDataList = exports.GetSalaryItemGroupResponseBodyResult = exports.GetSalaryItemResponseBodyResult = exports.GetSalaryGroupResponseBodyResult = exports.GetSalaryCalculationResponseBodyResult = exports.WriteSalaryCalculationResponse = exports.WriteSalaryCalculationResponseBody = exports.WriteSalaryCalculationRequest = exports.WriteSalaryCalculationHeaders = exports.ListSalaryCalculationResponse = exports.ListSalaryCalculationResponseBody = exports.ListSalaryCalculationRequest = exports.ListSalaryCalculationHeaders = exports.GetSalaryItemGroupResponse = exports.GetSalaryItemGroupResponseBody = exports.GetSalaryItemGroupHeaders = exports.GetSalaryItemResponse = exports.GetSalaryItemResponseBody = exports.GetSalaryItemRequest = exports.GetSalaryItemHeaders = exports.GetSalaryGroupResponse = exports.GetSalaryGroupResponseBody = exports.GetSalaryGroupHeaders = exports.GetSalaryCalculationResponse = exports.GetSalaryCalculationResponseBody = exports.GetSalaryCalculationRequest = exports.GetSalaryCalculationHeaders = 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 GetSalaryCalculationHeaders 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.GetSalaryCalculationHeaders = GetSalaryCalculationHeaders;
class GetSalaryCalculationRequest extends $tea.Model {
    static names() {
        return {
            date: 'date',
            salaryGroupId: 'salaryGroupId',
        };
    }
    static types() {
        return {
            date: 'string',
            salaryGroupId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSalaryCalculationRequest = GetSalaryCalculationRequest;
class GetSalaryCalculationResponseBody extends $tea.Model {
    static names() {
        return {
            result: 'result',
        };
    }
    static types() {
        return {
            result: GetSalaryCalculationResponseBodyResult,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSalaryCalculationResponseBody = GetSalaryCalculationResponseBody;
class GetSalaryCalculationResponse 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: GetSalaryCalculationResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSalaryCalculationResponse = GetSalaryCalculationResponse;
class GetSalaryGroupHeaders 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.GetSalaryGroupHeaders = GetSalaryGroupHeaders;
class GetSalaryGroupResponseBody extends $tea.Model {
    static names() {
        return {
            result: 'result',
        };
    }
    static types() {
        return {
            result: { 'type': 'array', 'itemType': GetSalaryGroupResponseBodyResult },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSalaryGroupResponseBody = GetSalaryGroupResponseBody;
class GetSalaryGroupResponse 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: GetSalaryGroupResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSalaryGroupResponse = GetSalaryGroupResponse;
class GetSalaryItemHeaders 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.GetSalaryItemHeaders = GetSalaryItemHeaders;
class GetSalaryItemRequest extends $tea.Model {
    static names() {
        return {
            salaryItemGroupId: 'salaryItemGroupId',
        };
    }
    static types() {
        return {
            salaryItemGroupId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSalaryItemRequest = GetSalaryItemRequest;
class GetSalaryItemResponseBody extends $tea.Model {
    static names() {
        return {
            result: 'result',
        };
    }
    static types() {
        return {
            result: { 'type': 'array', 'itemType': GetSalaryItemResponseBodyResult },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSalaryItemResponseBody = GetSalaryItemResponseBody;
class GetSalaryItemResponse 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: GetSalaryItemResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSalaryItemResponse = GetSalaryItemResponse;
class GetSalaryItemGroupHeaders 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.GetSalaryItemGroupHeaders = GetSalaryItemGroupHeaders;
class GetSalaryItemGroupResponseBody extends $tea.Model {
    static names() {
        return {
            result: 'result',
        };
    }
    static types() {
        return {
            result: { 'type': 'array', 'itemType': GetSalaryItemGroupResponseBodyResult },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSalaryItemGroupResponseBody = GetSalaryItemGroupResponseBody;
class GetSalaryItemGroupResponse 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: GetSalaryItemGroupResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSalaryItemGroupResponse = GetSalaryItemGroupResponse;
class ListSalaryCalculationHeaders 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.ListSalaryCalculationHeaders = ListSalaryCalculationHeaders;
class ListSalaryCalculationRequest extends $tea.Model {
    static names() {
        return {
            date: 'date',
            pageIndex: 'pageIndex',
            pageSize: 'pageSize',
            salaryGroupId: 'salaryGroupId',
        };
    }
    static types() {
        return {
            date: 'string',
            pageIndex: 'number',
            pageSize: 'number',
            salaryGroupId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSalaryCalculationRequest = ListSalaryCalculationRequest;
class ListSalaryCalculationResponseBody extends $tea.Model {
    static names() {
        return {
            result: 'result',
        };
    }
    static types() {
        return {
            result: ListSalaryCalculationResponseBodyResult,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSalaryCalculationResponseBody = ListSalaryCalculationResponseBody;
class ListSalaryCalculationResponse 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: ListSalaryCalculationResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSalaryCalculationResponse = ListSalaryCalculationResponse;
class WriteSalaryCalculationHeaders 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.WriteSalaryCalculationHeaders = WriteSalaryCalculationHeaders;
class WriteSalaryCalculationRequest extends $tea.Model {
    static names() {
        return {
            date: 'date',
            items: 'items',
        };
    }
    static types() {
        return {
            date: 'string',
            items: { 'type': 'array', 'itemType': WriteSalaryCalculationRequestItems },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.WriteSalaryCalculationRequest = WriteSalaryCalculationRequest;
class WriteSalaryCalculationResponseBody extends $tea.Model {
    static names() {
        return {
            result: 'result',
        };
    }
    static types() {
        return {
            result: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.WriteSalaryCalculationResponseBody = WriteSalaryCalculationResponseBody;
class WriteSalaryCalculationResponse 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: WriteSalaryCalculationResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.WriteSalaryCalculationResponse = WriteSalaryCalculationResponse;
class GetSalaryCalculationResponseBodyResult extends $tea.Model {
    static names() {
        return {
            calStatus: 'calStatus',
            endDate: 'endDate',
            startDate: 'startDate',
            status: 'status',
        };
    }
    static types() {
        return {
            calStatus: 'boolean',
            endDate: 'string',
            startDate: 'string',
            status: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSalaryCalculationResponseBodyResult = GetSalaryCalculationResponseBodyResult;
class GetSalaryGroupResponseBodyResult extends $tea.Model {
    static names() {
        return {
            enableFlag: 'enableFlag',
            salaryGroupId: 'salaryGroupId',
            salaryGroupName: 'salaryGroupName',
        };
    }
    static types() {
        return {
            enableFlag: 'boolean',
            salaryGroupId: 'string',
            salaryGroupName: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSalaryGroupResponseBodyResult = GetSalaryGroupResponseBodyResult;
class GetSalaryItemResponseBodyResult extends $tea.Model {
    static names() {
        return {
            salaryItemId: 'salaryItemId',
            salaryItemName: 'salaryItemName',
        };
    }
    static types() {
        return {
            salaryItemId: 'string',
            salaryItemName: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSalaryItemResponseBodyResult = GetSalaryItemResponseBodyResult;
class GetSalaryItemGroupResponseBodyResult extends $tea.Model {
    static names() {
        return {
            salaryItemGroupId: 'salaryItemGroupId',
            salaryItemGroupName: 'salaryItemGroupName',
        };
    }
    static types() {
        return {
            salaryItemGroupId: 'string',
            salaryItemGroupName: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSalaryItemGroupResponseBodyResult = GetSalaryItemGroupResponseBodyResult;
class ListSalaryCalculationResponseBodyResultDataDataList extends $tea.Model {
    static names() {
        return {
            salaryItemId: 'salaryItemId',
            salaryItemName: 'salaryItemName',
            salaryItemValue: 'salaryItemValue',
        };
    }
    static types() {
        return {
            salaryItemId: 'string',
            salaryItemName: 'string',
            salaryItemValue: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSalaryCalculationResponseBodyResultDataDataList = ListSalaryCalculationResponseBodyResultDataDataList;
class ListSalaryCalculationResponseBodyResultData extends $tea.Model {
    static names() {
        return {
            dataList: 'dataList',
            userId: 'userId',
        };
    }
    static types() {
        return {
            dataList: { 'type': 'array', 'itemType': ListSalaryCalculationResponseBodyResultDataDataList },
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSalaryCalculationResponseBodyResultData = ListSalaryCalculationResponseBodyResultData;
class ListSalaryCalculationResponseBodyResult extends $tea.Model {
    static names() {
        return {
            data: 'data',
            hasMore: 'hasMore',
        };
    }
    static types() {
        return {
            data: { 'type': 'array', 'itemType': ListSalaryCalculationResponseBodyResultData },
            hasMore: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSalaryCalculationResponseBodyResult = ListSalaryCalculationResponseBodyResult;
class WriteSalaryCalculationRequestItemsContents extends $tea.Model {
    static names() {
        return {
            salaryItemId: 'salaryItemId',
            salaryItemValue: 'salaryItemValue',
        };
    }
    static types() {
        return {
            salaryItemId: 'string',
            salaryItemValue: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.WriteSalaryCalculationRequestItemsContents = WriteSalaryCalculationRequestItemsContents;
class WriteSalaryCalculationRequestItems extends $tea.Model {
    static names() {
        return {
            contents: 'contents',
            userId: 'userId',
        };
    }
    static types() {
        return {
            contents: { 'type': 'array', 'itemType': WriteSalaryCalculationRequestItemsContents },
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.WriteSalaryCalculationRequestItems = WriteSalaryCalculationRequestItems;
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 - GetSalaryCalculationRequest
     * @param headers - GetSalaryCalculationHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetSalaryCalculationResponse
     */
    async getSalaryCalculationWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.date)) {
            query["date"] = request.date;
        }
        if (!tea_util_1.default.isUnset(request.salaryGroupId)) {
            query["salaryGroupId"] = request.salaryGroupId;
        }
        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,
            query: openapi_util_1.default.query(query),
        });
        let params = new $OpenApi.Params({
            action: "GetSalaryCalculation",
            version: "salary_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/salary/calculation`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetSalaryCalculationResponse({}));
    }
    /**
     * 小微薪酬获取薪资记录
     *
     * @param request - GetSalaryCalculationRequest
     * @returns GetSalaryCalculationResponse
     */
    async getSalaryCalculation(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetSalaryCalculationHeaders({});
        return await this.getSalaryCalculationWithOptions(request, headers, runtime);
    }
    /**
     * 小微薪酬获取薪资组
     *
     * @param headers - GetSalaryGroupHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetSalaryGroupResponse
     */
    async getSalaryGroupWithOptions(headers, runtime) {
        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,
        });
        let params = new $OpenApi.Params({
            action: "GetSalaryGroup",
            version: "salary_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/salary/group`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetSalaryGroupResponse({}));
    }
    /**
     * 小微薪酬获取薪资组
     * @returns GetSalaryGroupResponse
     */
    async getSalaryGroup() {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetSalaryGroupHeaders({});
        return await this.getSalaryGroupWithOptions(headers, runtime);
    }
    /**
     * 小微薪酬获取薪资项目
     *
     * @param request - GetSalaryItemRequest
     * @param headers - GetSalaryItemHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetSalaryItemResponse
     */
    async getSalaryItemWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.salaryItemGroupId)) {
            query["salaryItemGroupId"] = request.salaryItemGroupId;
        }
        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,
            query: openapi_util_1.default.query(query),
        });
        let params = new $OpenApi.Params({
            action: "GetSalaryItem",
            version: "salary_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/salary/item`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetSalaryItemResponse({}));
    }
    /**
     * 小微薪酬获取薪资项目
     *
     * @param request - GetSalaryItemRequest
     * @returns GetSalaryItemResponse
     */
    async getSalaryItem(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetSalaryItemHeaders({});
        return await this.getSalaryItemWithOptions(request, headers, runtime);
    }
    /**
     * 小微薪酬获取薪资项目大类
     *
     * @param headers - GetSalaryItemGroupHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetSalaryItemGroupResponse
     */
    async getSalaryItemGroupWithOptions(headers, runtime) {
        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,
        });
        let params = new $OpenApi.Params({
            action: "GetSalaryItemGroup",
            version: "salary_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/salary/itemGroup`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetSalaryItemGroupResponse({}));
    }
    /**
     * 小微薪酬获取薪资项目大类
     * @returns GetSalaryItemGroupResponse
     */
    async getSalaryItemGroup() {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetSalaryItemGroupHeaders({});
        return await this.getSalaryItemGroupWithOptions(headers, runtime);
    }
    /**
     * 小微薪酬获取薪资记录数据
     *
     * @param request - ListSalaryCalculationRequest
     * @param headers - ListSalaryCalculationHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListSalaryCalculationResponse
     */
    async listSalaryCalculationWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.date)) {
            body["date"] = request.date;
        }
        if (!tea_util_1.default.isUnset(request.pageIndex)) {
            body["pageIndex"] = request.pageIndex;
        }
        if (!tea_util_1.default.isUnset(request.pageSize)) {
            body["pageSize"] = request.pageSize;
        }
        if (!tea_util_1.default.isUnset(request.salaryGroupId)) {
            body["salaryGroupId"] = request.salaryGroupId;
        }
        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: "ListSalaryCalculation",
            version: "salary_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/salary/calculation`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListSalaryCalculationResponse({}));
    }
    /**
     * 小微薪酬获取薪资记录数据
     *
     * @param request - ListSalaryCalculationRequest
     * @returns ListSalaryCalculationResponse
     */
    async listSalaryCalculation(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListSalaryCalculationHeaders({});
        return await this.listSalaryCalculationWithOptions(request, headers, runtime);
    }
    /**
     * 小微薪酬获取薪资记录写入
     *
     * @param request - WriteSalaryCalculationRequest
     * @param headers - WriteSalaryCalculationHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns WriteSalaryCalculationResponse
     */
    async writeSalaryCalculationWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.date)) {
            body["date"] = request.date;
        }
        if (!tea_util_1.default.isUnset(request.items)) {
            body["items"] = request.items;
        }
        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: "WriteSalaryCalculation",
            version: "salary_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/salary/calculation/write`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new WriteSalaryCalculationResponse({}));
    }
    /**
     * 小微薪酬获取薪资记录写入
     *
     * @param request - WriteSalaryCalculationRequest
     * @returns WriteSalaryCalculationResponse
     */
    async writeSalaryCalculation(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new WriteSalaryCalculationHeaders({});
        return await this.writeSalaryCalculationWithOptions(request, headers, runtime);
    }
}
exports.default = Client;
//# sourceMappingURL=client.js.map