"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.ListResidentSubDeptsResponseBody = exports.ListResidentSubDeptsRequest = exports.ListResidentSubDeptsHeaders = exports.ListResidentDeptUsersResponse = exports.ListResidentDeptUsersResponseBody = exports.ListResidentDeptUsersRequest = exports.ListResidentDeptUsersHeaders = exports.ListParentByUserResponse = exports.ListParentByUserResponseBody = exports.ListParentByUserRequest = exports.ListParentByUserHeaders = exports.ListParentByDeptResponse = exports.ListParentByDeptResponseBody = exports.ListParentByDeptRequest = exports.ListParentByDeptHeaders = exports.ListDeptUsersResponse = exports.ListDeptUsersResponseBody = exports.ListDeptUsersRequest = exports.ListDeptUsersHeaders = exports.ListDeptUserIdsResponse = exports.ListDeptUserIdsResponseBody = exports.ListDeptUserIdsRequest = exports.ListDeptUserIdsHeaders = exports.ListDeptSimpleUsersResponse = exports.ListDeptSimpleUsersResponseBody = exports.ListDeptSimpleUsersRequest = exports.ListDeptSimpleUsersHeaders = exports.GetVillageOrgInfoResponse = exports.GetVillageOrgInfoResponseBody = exports.GetVillageOrgInfoHeaders = exports.GetUserByUnionIdResponse = exports.GetUserByUnionIdResponseBody = exports.GetUserByUnionIdRequest = exports.GetUserByUnionIdHeaders = exports.GetUserResponse = exports.GetUserResponseBody = exports.GetUserRequest = exports.GetUserHeaders = exports.GetResidentUserInfoResponse = exports.GetResidentUserInfoResponseBody = exports.GetResidentUserInfoRequest = exports.GetResidentUserInfoHeaders = exports.GetResidentDeptResponse = exports.GetResidentDeptResponseBody = exports.GetResidentDeptRequest = exports.GetResidentDeptHeaders = exports.GetDeptResponse = exports.GetDeptResponseBody = exports.GetDeptRequest = exports.GetDeptHeaders = void 0;
exports.ListSubDeptResponseBodyResult = exports.ListSubCorpsResponseBodyCorpList = exports.ListSimpleUsersByRoleResponseBodyUserList = exports.ListResidentUserInfosResponseBodyUserList = exports.ListResidentUserInfosResponseBodyUserListRoles = exports.ListResidentSubDeptsResponseBodyDepartmentList = exports.ListResidentDeptUsersResponseBodyUserList = exports.ListResidentDeptUsersResponseBodyUserListRoles = exports.ListDeptUsersResponseBodyUserList = exports.ListDeptSimpleUsersResponseBodyUserList = exports.GetUserResponseBodyUnionEmpExt = exports.GetUserResponseBodyUnionEmpExtUnionEmpMapList = exports.GetUserResponseBodyRoleList = exports.GetUserResponseBodyLeaderInDepartment = exports.GetUserResponseBodyDepartmentOrderSet = exports.GetResidentUserInfoResponseBodyRoles = exports.ListSubDeptIdsResponse = exports.ListSubDeptIdsResponseBody = exports.ListSubDeptIdsRequest = exports.ListSubDeptIdsHeaders = exports.ListSubDeptResponse = exports.ListSubDeptResponseBody = exports.ListSubDeptRequest = exports.ListSubDeptHeaders = exports.ListSubCorpsResponse = exports.ListSubCorpsResponseBody = exports.ListSubCorpsRequest = exports.ListSubCorpsHeaders = exports.ListSimpleUsersByRoleResponse = exports.ListSimpleUsersByRoleResponseBody = exports.ListSimpleUsersByRoleRequest = exports.ListSimpleUsersByRoleHeaders = exports.ListResidentUserInfosResponse = exports.ListResidentUserInfosResponseBody = exports.ListResidentUserInfosShrinkRequest = exports.ListResidentUserInfosRequest = exports.ListResidentUserInfosHeaders = exports.ListResidentSubDeptsResponse = 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 GetDeptHeaders 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.GetDeptHeaders = GetDeptHeaders;
class GetDeptRequest extends $tea.Model {
    static names() {
        return {
            language: 'language',
            subCorpId: 'subCorpId',
        };
    }
    static types() {
        return {
            language: 'string',
            subCorpId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDeptRequest = GetDeptRequest;
class GetDeptResponseBody extends $tea.Model {
    static names() {
        return {
            departmentId: 'departmentId',
            departmentName: 'departmentName',
            fromUnionOrg: 'fromUnionOrg',
            order: 'order',
            parentDepartmentId: 'parentDepartmentId',
        };
    }
    static types() {
        return {
            departmentId: 'number',
            departmentName: 'string',
            fromUnionOrg: 'boolean',
            order: 'number',
            parentDepartmentId: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDeptResponseBody = GetDeptResponseBody;
class GetDeptResponse 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: GetDeptResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDeptResponse = GetDeptResponse;
class GetResidentDeptHeaders 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.GetResidentDeptHeaders = GetResidentDeptHeaders;
class GetResidentDeptRequest extends $tea.Model {
    static names() {
        return {
            subCorpId: 'subCorpId',
        };
    }
    static types() {
        return {
            subCorpId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetResidentDeptRequest = GetResidentDeptRequest;
class GetResidentDeptResponseBody extends $tea.Model {
    static names() {
        return {
            contactType: 'contactType',
            departmentId: 'departmentId',
            departmentName: 'departmentName',
            deptType: 'deptType',
            feature: 'feature',
        };
    }
    static types() {
        return {
            contactType: 'string',
            departmentId: 'number',
            departmentName: 'string',
            deptType: 'string',
            feature: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetResidentDeptResponseBody = GetResidentDeptResponseBody;
class GetResidentDeptResponse 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: GetResidentDeptResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetResidentDeptResponse = GetResidentDeptResponse;
class GetResidentUserInfoHeaders 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.GetResidentUserInfoHeaders = GetResidentUserInfoHeaders;
class GetResidentUserInfoRequest extends $tea.Model {
    static names() {
        return {
            subCorpId: 'subCorpId',
        };
    }
    static types() {
        return {
            subCorpId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetResidentUserInfoRequest = GetResidentUserInfoRequest;
class GetResidentUserInfoResponseBody extends $tea.Model {
    static names() {
        return {
            feature: 'feature',
            name: 'name',
            roles: 'roles',
            unionId: 'unionId',
            userid: 'userid',
        };
    }
    static types() {
        return {
            feature: 'string',
            name: 'string',
            roles: { 'type': 'array', 'itemType': GetResidentUserInfoResponseBodyRoles },
            unionId: 'string',
            userid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetResidentUserInfoResponseBody = GetResidentUserInfoResponseBody;
class GetResidentUserInfoResponse 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: GetResidentUserInfoResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetResidentUserInfoResponse = GetResidentUserInfoResponse;
class GetUserHeaders 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.GetUserHeaders = GetUserHeaders;
class GetUserRequest extends $tea.Model {
    static names() {
        return {
            language: 'language',
            subCorpId: 'subCorpId',
        };
    }
    static types() {
        return {
            language: 'string',
            subCorpId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserRequest = GetUserRequest;
class GetUserResponseBody extends $tea.Model {
    static names() {
        return {
            active: 'active',
            admin: 'admin',
            boss: 'boss',
            departmentIdList: 'departmentIdList',
            departmentOrderSet: 'departmentOrderSet',
            exclusiveAccount: 'exclusiveAccount',
            exclusiveAccountType: 'exclusiveAccountType',
            extension: 'extension',
            hiredDate: 'hiredDate',
            jobNumber: 'jobNumber',
            leaderInDepartment: 'leaderInDepartment',
            managerUserId: 'managerUserId',
            name: 'name',
            realAuthed: 'realAuthed',
            remark: 'remark',
            roleList: 'roleList',
            senior: 'senior',
            title: 'title',
            unionEmpExt: 'unionEmpExt',
            unionId: 'unionId',
            userId: 'userId',
            workPlace: 'workPlace',
        };
    }
    static types() {
        return {
            active: 'boolean',
            admin: 'boolean',
            boss: 'boolean',
            departmentIdList: { 'type': 'array', 'itemType': 'number' },
            departmentOrderSet: { 'type': 'array', 'itemType': GetUserResponseBodyDepartmentOrderSet },
            exclusiveAccount: 'boolean',
            exclusiveAccountType: 'string',
            extension: 'string',
            hiredDate: 'number',
            jobNumber: 'string',
            leaderInDepartment: { 'type': 'array', 'itemType': GetUserResponseBodyLeaderInDepartment },
            managerUserId: 'string',
            name: 'string',
            realAuthed: 'boolean',
            remark: 'string',
            roleList: { 'type': 'array', 'itemType': GetUserResponseBodyRoleList },
            senior: 'boolean',
            title: 'string',
            unionEmpExt: GetUserResponseBodyUnionEmpExt,
            unionId: 'string',
            userId: 'string',
            workPlace: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserResponseBody = GetUserResponseBody;
class GetUserResponse 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: GetUserResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserResponse = GetUserResponse;
class GetUserByUnionIdHeaders 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.GetUserByUnionIdHeaders = GetUserByUnionIdHeaders;
class GetUserByUnionIdRequest extends $tea.Model {
    static names() {
        return {
            language: 'language',
            subCorpId: 'subCorpId',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            language: 'string',
            subCorpId: 'string',
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserByUnionIdRequest = GetUserByUnionIdRequest;
class GetUserByUnionIdResponseBody extends $tea.Model {
    static names() {
        return {
            contactType: 'contactType',
            userId: 'userId',
        };
    }
    static types() {
        return {
            contactType: 'number',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserByUnionIdResponseBody = GetUserByUnionIdResponseBody;
class GetUserByUnionIdResponse 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: GetUserByUnionIdResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserByUnionIdResponse = GetUserByUnionIdResponse;
class GetVillageOrgInfoHeaders 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.GetVillageOrgInfoHeaders = GetVillageOrgInfoHeaders;
class GetVillageOrgInfoResponseBody extends $tea.Model {
    static names() {
        return {
            regionId: 'regionId',
            regionLocation: 'regionLocation',
            regionType: 'regionType',
        };
    }
    static types() {
        return {
            regionId: 'string',
            regionLocation: 'string',
            regionType: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetVillageOrgInfoResponseBody = GetVillageOrgInfoResponseBody;
class GetVillageOrgInfoResponse 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: GetVillageOrgInfoResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetVillageOrgInfoResponse = GetVillageOrgInfoResponse;
class ListDeptSimpleUsersHeaders 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.ListDeptSimpleUsersHeaders = ListDeptSimpleUsersHeaders;
class ListDeptSimpleUsersRequest extends $tea.Model {
    static names() {
        return {
            containAccessLimit: 'containAccessLimit',
            cursor: 'cursor',
            language: 'language',
            orderField: 'orderField',
            size: 'size',
            subCorpId: 'subCorpId',
        };
    }
    static types() {
        return {
            containAccessLimit: 'boolean',
            cursor: 'number',
            language: 'string',
            orderField: 'string',
            size: 'number',
            subCorpId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDeptSimpleUsersRequest = ListDeptSimpleUsersRequest;
class ListDeptSimpleUsersResponseBody extends $tea.Model {
    static names() {
        return {
            hasMore: 'hasMore',
            nextCursor: 'nextCursor',
            totalCount: 'totalCount',
            userList: 'userList',
        };
    }
    static types() {
        return {
            hasMore: 'boolean',
            nextCursor: 'number',
            totalCount: 'number',
            userList: { 'type': 'array', 'itemType': ListDeptSimpleUsersResponseBodyUserList },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDeptSimpleUsersResponseBody = ListDeptSimpleUsersResponseBody;
class ListDeptSimpleUsersResponse 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: ListDeptSimpleUsersResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDeptSimpleUsersResponse = ListDeptSimpleUsersResponse;
class ListDeptUserIdsHeaders 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.ListDeptUserIdsHeaders = ListDeptUserIdsHeaders;
class ListDeptUserIdsRequest extends $tea.Model {
    static names() {
        return {
            subCorpId: 'subCorpId',
        };
    }
    static types() {
        return {
            subCorpId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDeptUserIdsRequest = ListDeptUserIdsRequest;
class ListDeptUserIdsResponseBody extends $tea.Model {
    static names() {
        return {
            userIdList: 'userIdList',
        };
    }
    static types() {
        return {
            userIdList: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDeptUserIdsResponseBody = ListDeptUserIdsResponseBody;
class ListDeptUserIdsResponse 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: ListDeptUserIdsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDeptUserIdsResponse = ListDeptUserIdsResponse;
class ListDeptUsersHeaders 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.ListDeptUsersHeaders = ListDeptUsersHeaders;
class ListDeptUsersRequest extends $tea.Model {
    static names() {
        return {
            containAccessLimit: 'containAccessLimit',
            cursor: 'cursor',
            language: 'language',
            orderField: 'orderField',
            size: 'size',
            subCorpId: 'subCorpId',
        };
    }
    static types() {
        return {
            containAccessLimit: 'boolean',
            cursor: 'number',
            language: 'string',
            orderField: 'string',
            size: 'number',
            subCorpId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDeptUsersRequest = ListDeptUsersRequest;
class ListDeptUsersResponseBody extends $tea.Model {
    static names() {
        return {
            hasMore: 'hasMore',
            nextCursor: 'nextCursor',
            userList: 'userList',
        };
    }
    static types() {
        return {
            hasMore: 'boolean',
            nextCursor: 'number',
            userList: { 'type': 'array', 'itemType': ListDeptUsersResponseBodyUserList },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDeptUsersResponseBody = ListDeptUsersResponseBody;
class ListDeptUsersResponse 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: ListDeptUsersResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDeptUsersResponse = ListDeptUsersResponse;
class ListParentByDeptHeaders 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.ListParentByDeptHeaders = ListParentByDeptHeaders;
class ListParentByDeptRequest extends $tea.Model {
    static names() {
        return {
            departmentId: 'departmentId',
            subCorpId: 'subCorpId',
        };
    }
    static types() {
        return {
            departmentId: 'number',
            subCorpId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListParentByDeptRequest = ListParentByDeptRequest;
class ListParentByDeptResponseBody extends $tea.Model {
    static names() {
        return {
            departmentIdList: 'departmentIdList',
        };
    }
    static types() {
        return {
            departmentIdList: { 'type': 'array', 'itemType': 'number' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListParentByDeptResponseBody = ListParentByDeptResponseBody;
class ListParentByDeptResponse 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: ListParentByDeptResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListParentByDeptResponse = ListParentByDeptResponse;
class ListParentByUserHeaders 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.ListParentByUserHeaders = ListParentByUserHeaders;
class ListParentByUserRequest extends $tea.Model {
    static names() {
        return {
            subCorpId: 'subCorpId',
            userId: 'userId',
        };
    }
    static types() {
        return {
            subCorpId: 'string',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListParentByUserRequest = ListParentByUserRequest;
class ListParentByUserResponseBody extends $tea.Model {
    static names() {
        return {
            departmentIdList: 'departmentIdList',
        };
    }
    static types() {
        return {
            departmentIdList: { 'type': 'array', 'itemType': 'number' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListParentByUserResponseBody = ListParentByUserResponseBody;
class ListParentByUserResponse 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: ListParentByUserResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListParentByUserResponse = ListParentByUserResponse;
class ListResidentDeptUsersHeaders 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.ListResidentDeptUsersHeaders = ListResidentDeptUsersHeaders;
class ListResidentDeptUsersRequest extends $tea.Model {
    static names() {
        return {
            cursor: 'cursor',
            role: 'role',
            size: 'size',
            subCorpId: 'subCorpId',
        };
    }
    static types() {
        return {
            cursor: 'number',
            role: 'string',
            size: 'number',
            subCorpId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentDeptUsersRequest = ListResidentDeptUsersRequest;
class ListResidentDeptUsersResponseBody extends $tea.Model {
    static names() {
        return {
            hasMore: 'hasMore',
            nextCursor: 'nextCursor',
            userList: 'userList',
        };
    }
    static types() {
        return {
            hasMore: 'boolean',
            nextCursor: 'number',
            userList: { 'type': 'array', 'itemType': ListResidentDeptUsersResponseBodyUserList },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentDeptUsersResponseBody = ListResidentDeptUsersResponseBody;
class ListResidentDeptUsersResponse 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: ListResidentDeptUsersResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentDeptUsersResponse = ListResidentDeptUsersResponse;
class ListResidentSubDeptsHeaders 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.ListResidentSubDeptsHeaders = ListResidentSubDeptsHeaders;
class ListResidentSubDeptsRequest extends $tea.Model {
    static names() {
        return {
            cursor: 'cursor',
            size: 'size',
            subCorpId: 'subCorpId',
        };
    }
    static types() {
        return {
            cursor: 'number',
            size: 'number',
            subCorpId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentSubDeptsRequest = ListResidentSubDeptsRequest;
class ListResidentSubDeptsResponseBody extends $tea.Model {
    static names() {
        return {
            departmentList: 'departmentList',
            hasMore: 'hasMore',
            nextCursor: 'nextCursor',
            total: 'total',
        };
    }
    static types() {
        return {
            departmentList: { 'type': 'array', 'itemType': ListResidentSubDeptsResponseBodyDepartmentList },
            hasMore: 'boolean',
            nextCursor: 'number',
            total: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentSubDeptsResponseBody = ListResidentSubDeptsResponseBody;
class ListResidentSubDeptsResponse 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: ListResidentSubDeptsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentSubDeptsResponse = ListResidentSubDeptsResponse;
class ListResidentUserInfosHeaders 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.ListResidentUserInfosHeaders = ListResidentUserInfosHeaders;
class ListResidentUserInfosRequest extends $tea.Model {
    static names() {
        return {
            subCorpId: 'subCorpId',
            userIds: 'userIds',
        };
    }
    static types() {
        return {
            subCorpId: 'string',
            userIds: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentUserInfosRequest = ListResidentUserInfosRequest;
class ListResidentUserInfosShrinkRequest extends $tea.Model {
    static names() {
        return {
            subCorpId: 'subCorpId',
            userIdsShrink: 'userIds',
        };
    }
    static types() {
        return {
            subCorpId: 'string',
            userIdsShrink: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentUserInfosShrinkRequest = ListResidentUserInfosShrinkRequest;
class ListResidentUserInfosResponseBody extends $tea.Model {
    static names() {
        return {
            userList: 'userList',
        };
    }
    static types() {
        return {
            userList: { 'type': 'array', 'itemType': ListResidentUserInfosResponseBodyUserList },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentUserInfosResponseBody = ListResidentUserInfosResponseBody;
class ListResidentUserInfosResponse 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: ListResidentUserInfosResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentUserInfosResponse = ListResidentUserInfosResponse;
class ListSimpleUsersByRoleHeaders 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.ListSimpleUsersByRoleHeaders = ListSimpleUsersByRoleHeaders;
class ListSimpleUsersByRoleRequest extends $tea.Model {
    static names() {
        return {
            offset: 'offset',
            roleId: 'roleId',
            size: 'size',
            subCorpId: 'subCorpId',
        };
    }
    static types() {
        return {
            offset: 'number',
            roleId: 'number',
            size: 'number',
            subCorpId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSimpleUsersByRoleRequest = ListSimpleUsersByRoleRequest;
class ListSimpleUsersByRoleResponseBody extends $tea.Model {
    static names() {
        return {
            hasMore: 'hasMore',
            nextCursor: 'nextCursor',
            userList: 'userList',
        };
    }
    static types() {
        return {
            hasMore: 'boolean',
            nextCursor: 'number',
            userList: { 'type': 'array', 'itemType': ListSimpleUsersByRoleResponseBodyUserList },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSimpleUsersByRoleResponseBody = ListSimpleUsersByRoleResponseBody;
class ListSimpleUsersByRoleResponse 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: ListSimpleUsersByRoleResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSimpleUsersByRoleResponse = ListSimpleUsersByRoleResponse;
class ListSubCorpsHeaders 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.ListSubCorpsHeaders = ListSubCorpsHeaders;
class ListSubCorpsRequest extends $tea.Model {
    static names() {
        return {
            isOnlyDirect: 'isOnlyDirect',
            subCorpId: 'subCorpId',
            types: 'types',
        };
    }
    static types() {
        return {
            isOnlyDirect: 'boolean',
            subCorpId: 'string',
            types: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSubCorpsRequest = ListSubCorpsRequest;
class ListSubCorpsResponseBody extends $tea.Model {
    static names() {
        return {
            corpList: 'corpList',
        };
    }
    static types() {
        return {
            corpList: { 'type': 'array', 'itemType': ListSubCorpsResponseBodyCorpList },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSubCorpsResponseBody = ListSubCorpsResponseBody;
class ListSubCorpsResponse 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: ListSubCorpsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSubCorpsResponse = ListSubCorpsResponse;
class ListSubDeptHeaders 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.ListSubDeptHeaders = ListSubDeptHeaders;
class ListSubDeptRequest extends $tea.Model {
    static names() {
        return {
            language: 'language',
            subCorpId: 'subCorpId',
        };
    }
    static types() {
        return {
            language: 'string',
            subCorpId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSubDeptRequest = ListSubDeptRequest;
class ListSubDeptResponseBody extends $tea.Model {
    static names() {
        return {
            result: 'result',
        };
    }
    static types() {
        return {
            result: { 'type': 'array', 'itemType': ListSubDeptResponseBodyResult },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSubDeptResponseBody = ListSubDeptResponseBody;
class ListSubDeptResponse 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: ListSubDeptResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSubDeptResponse = ListSubDeptResponse;
class ListSubDeptIdsHeaders 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.ListSubDeptIdsHeaders = ListSubDeptIdsHeaders;
class ListSubDeptIdsRequest extends $tea.Model {
    static names() {
        return {
            subCorpId: 'subCorpId',
        };
    }
    static types() {
        return {
            subCorpId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSubDeptIdsRequest = ListSubDeptIdsRequest;
class ListSubDeptIdsResponseBody extends $tea.Model {
    static names() {
        return {
            departmentIdList: 'departmentIdList',
        };
    }
    static types() {
        return {
            departmentIdList: { 'type': 'array', 'itemType': 'number' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSubDeptIdsResponseBody = ListSubDeptIdsResponseBody;
class ListSubDeptIdsResponse 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: ListSubDeptIdsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSubDeptIdsResponse = ListSubDeptIdsResponse;
class GetResidentUserInfoResponseBodyRoles extends $tea.Model {
    static names() {
        return {
            roleId: 'roleId',
            roleName: 'roleName',
            tagCode: 'tagCode',
        };
    }
    static types() {
        return {
            roleId: 'number',
            roleName: 'string',
            tagCode: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetResidentUserInfoResponseBodyRoles = GetResidentUserInfoResponseBodyRoles;
class GetUserResponseBodyDepartmentOrderSet extends $tea.Model {
    static names() {
        return {
            departmentId: 'departmentId',
            order: 'order',
        };
    }
    static types() {
        return {
            departmentId: 'number',
            order: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserResponseBodyDepartmentOrderSet = GetUserResponseBodyDepartmentOrderSet;
class GetUserResponseBodyLeaderInDepartment extends $tea.Model {
    static names() {
        return {
            departmentId: 'departmentId',
            leader: 'leader',
        };
    }
    static types() {
        return {
            departmentId: 'number',
            leader: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserResponseBodyLeaderInDepartment = GetUserResponseBodyLeaderInDepartment;
class GetUserResponseBodyRoleList extends $tea.Model {
    static names() {
        return {
            groupName: 'groupName',
            roleId: 'roleId',
            roleName: 'roleName',
        };
    }
    static types() {
        return {
            groupName: 'string',
            roleId: 'number',
            roleName: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserResponseBodyRoleList = GetUserResponseBodyRoleList;
class GetUserResponseBodyUnionEmpExtUnionEmpMapList extends $tea.Model {
    static names() {
        return {
            corpId: 'corpId',
            staffId: 'staffId',
        };
    }
    static types() {
        return {
            corpId: 'string',
            staffId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserResponseBodyUnionEmpExtUnionEmpMapList = GetUserResponseBodyUnionEmpExtUnionEmpMapList;
class GetUserResponseBodyUnionEmpExt extends $tea.Model {
    static names() {
        return {
            corpId: 'corpId',
            staffId: 'staffId',
            unionEmpMapList: 'unionEmpMapList',
        };
    }
    static types() {
        return {
            corpId: 'string',
            staffId: 'string',
            unionEmpMapList: { 'type': 'array', 'itemType': GetUserResponseBodyUnionEmpExtUnionEmpMapList },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserResponseBodyUnionEmpExt = GetUserResponseBodyUnionEmpExt;
class ListDeptSimpleUsersResponseBodyUserList extends $tea.Model {
    static names() {
        return {
            name: 'name',
            userId: 'userId',
        };
    }
    static types() {
        return {
            name: 'string',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDeptSimpleUsersResponseBodyUserList = ListDeptSimpleUsersResponseBodyUserList;
class ListDeptUsersResponseBodyUserList extends $tea.Model {
    static names() {
        return {
            active: 'active',
            departmentList: 'departmentList',
            jobNumber: 'jobNumber',
            name: 'name',
            unionId: 'unionId',
            userId: 'userId',
        };
    }
    static types() {
        return {
            active: 'boolean',
            departmentList: { 'type': 'array', 'itemType': 'number' },
            jobNumber: 'string',
            name: 'string',
            unionId: 'string',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDeptUsersResponseBodyUserList = ListDeptUsersResponseBodyUserList;
class ListResidentDeptUsersResponseBodyUserListRoles extends $tea.Model {
    static names() {
        return {
            tagCode: 'tagCode',
            tagId: 'tagId',
            tagName: 'tagName',
        };
    }
    static types() {
        return {
            tagCode: 'string',
            tagId: 'number',
            tagName: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentDeptUsersResponseBodyUserListRoles = ListResidentDeptUsersResponseBodyUserListRoles;
class ListResidentDeptUsersResponseBodyUserList extends $tea.Model {
    static names() {
        return {
            feature: 'feature',
            name: 'name',
            roles: 'roles',
            unionId: 'unionId',
            userId: 'userId',
        };
    }
    static types() {
        return {
            feature: 'string',
            name: 'string',
            roles: { 'type': 'array', 'itemType': ListResidentDeptUsersResponseBodyUserListRoles },
            unionId: 'string',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentDeptUsersResponseBodyUserList = ListResidentDeptUsersResponseBodyUserList;
class ListResidentSubDeptsResponseBodyDepartmentList extends $tea.Model {
    static names() {
        return {
            departmentId: 'departmentId',
            departmentName: 'departmentName',
            superDepartmentId: 'superDepartmentId',
        };
    }
    static types() {
        return {
            departmentId: 'number',
            departmentName: 'string',
            superDepartmentId: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentSubDeptsResponseBodyDepartmentList = ListResidentSubDeptsResponseBodyDepartmentList;
class ListResidentUserInfosResponseBodyUserListRoles extends $tea.Model {
    static names() {
        return {
            tagCode: 'tagCode',
            tagId: 'tagId',
            tagName: 'tagName',
        };
    }
    static types() {
        return {
            tagCode: 'string',
            tagId: 'number',
            tagName: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentUserInfosResponseBodyUserListRoles = ListResidentUserInfosResponseBodyUserListRoles;
class ListResidentUserInfosResponseBodyUserList extends $tea.Model {
    static names() {
        return {
            feature: 'feature',
            roles: 'roles',
            unionId: 'unionId',
            userId: 'userId',
            userName: 'userName',
        };
    }
    static types() {
        return {
            feature: 'string',
            roles: { 'type': 'array', 'itemType': ListResidentUserInfosResponseBodyUserListRoles },
            unionId: 'string',
            userId: 'string',
            userName: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListResidentUserInfosResponseBodyUserList = ListResidentUserInfosResponseBodyUserList;
class ListSimpleUsersByRoleResponseBodyUserList extends $tea.Model {
    static names() {
        return {
            jobNumber: 'jobNumber',
            name: 'name',
            unionId: 'unionId',
            userId: 'userId',
        };
    }
    static types() {
        return {
            jobNumber: 'string',
            name: 'string',
            unionId: 'string',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSimpleUsersByRoleResponseBodyUserList = ListSimpleUsersByRoleResponseBodyUserList;
class ListSubCorpsResponseBodyCorpList extends $tea.Model {
    static names() {
        return {
            corpId: 'corpId',
            corpName: 'corpName',
            industry: 'industry',
            industryCode: 'industryCode',
            regionId: 'regionId',
            regionLocation: 'regionLocation',
            regionType: 'regionType',
        };
    }
    static types() {
        return {
            corpId: 'string',
            corpName: 'string',
            industry: 'string',
            industryCode: 'number',
            regionId: 'string',
            regionLocation: 'string',
            regionType: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSubCorpsResponseBodyCorpList = ListSubCorpsResponseBodyCorpList;
class ListSubDeptResponseBodyResult extends $tea.Model {
    static names() {
        return {
            departmentId: 'departmentId',
            name: 'name',
        };
    }
    static types() {
        return {
            departmentId: 'number',
            name: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListSubDeptResponseBodyResult = ListSubDeptResponseBodyResult;
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 - GetDeptRequest
     * @param headers - GetDeptHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetDeptResponse
     */
    async getDeptWithOptions(departmentId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.language)) {
            query["language"] = request.language;
        }
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        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: "GetDept",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/deptartments/${departmentId}`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetDeptResponse({}));
    }
    /**
     * 获取部门详情
     *
     * @param request - GetDeptRequest
     * @returns GetDeptResponse
     */
    async getDept(departmentId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetDeptHeaders({});
        return await this.getDeptWithOptions(departmentId, request, headers, runtime);
    }
    /**
     * 居民通讯录获取部门信息
     *
     * @param request - GetResidentDeptRequest
     * @param headers - GetResidentDeptHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetResidentDeptResponse
     */
    async getResidentDeptWithOptions(departmentId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        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: "GetResidentDept",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/residentDepartments/departments/${departmentId}`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetResidentDeptResponse({}));
    }
    /**
     * 居民通讯录获取部门信息
     *
     * @param request - GetResidentDeptRequest
     * @returns GetResidentDeptResponse
     */
    async getResidentDept(departmentId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetResidentDeptHeaders({});
        return await this.getResidentDeptWithOptions(departmentId, request, headers, runtime);
    }
    /**
     * 居民通讯录获取部门下某个人的详细信息
     *
     * @param request - GetResidentUserInfoRequest
     * @param headers - GetResidentUserInfoHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetResidentUserInfoResponse
     */
    async getResidentUserInfoWithOptions(departmentId, userId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        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: "GetResidentUserInfo",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/residentDepartments/${departmentId}/users/${userId}`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetResidentUserInfoResponse({}));
    }
    /**
     * 居民通讯录获取部门下某个人的详细信息
     *
     * @param request - GetResidentUserInfoRequest
     * @returns GetResidentUserInfoResponse
     */
    async getResidentUserInfo(departmentId, userId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetResidentUserInfoHeaders({});
        return await this.getResidentUserInfoWithOptions(departmentId, userId, request, headers, runtime);
    }
    /**
     * 查询用户详情
     *
     * @param request - GetUserRequest
     * @param headers - GetUserHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetUserResponse
     */
    async getUserWithOptions(userId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.language)) {
            query["language"] = request.language;
        }
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        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: "GetUser",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/users/getByUserId`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetUserResponse({}));
    }
    /**
     * 查询用户详情
     *
     * @param request - GetUserRequest
     * @returns GetUserResponse
     */
    async getUser(userId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetUserHeaders({});
        return await this.getUserWithOptions(userId, request, headers, runtime);
    }
    /**
     * 根据unionId查询用户详情
     *
     * @param request - GetUserByUnionIdRequest
     * @param headers - GetUserByUnionIdHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetUserByUnionIdResponse
     */
    async getUserByUnionIdWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.language)) {
            query["language"] = request.language;
        }
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        if (!tea_util_1.default.isUnset(request.unionId)) {
            query["unionId"] = request.unionId;
        }
        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: "GetUserByUnionId",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/users/getByUnionId`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetUserByUnionIdResponse({}));
    }
    /**
     * 根据unionId查询用户详情
     *
     * @param request - GetUserByUnionIdRequest
     * @returns GetUserByUnionIdResponse
     */
    async getUserByUnionId(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetUserByUnionIdHeaders({});
        return await this.getUserByUnionIdWithOptions(request, headers, runtime);
    }
    /**
     * 获取对外开放的企业信息
     *
     * @param headers - GetVillageOrgInfoHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetVillageOrgInfoResponse
     */
    async getVillageOrgInfoWithOptions(subCorpId, 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: "GetVillageOrgInfo",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/corps/${subCorpId}`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetVillageOrgInfoResponse({}));
    }
    /**
     * 获取对外开放的企业信息
     * @returns GetVillageOrgInfoResponse
     */
    async getVillageOrgInfo(subCorpId) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetVillageOrgInfoHeaders({});
        return await this.getVillageOrgInfoWithOptions(subCorpId, headers, runtime);
    }
    /**
     * 查询部门下简略用户列表
     *
     * @param request - ListDeptSimpleUsersRequest
     * @param headers - ListDeptSimpleUsersHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListDeptSimpleUsersResponse
     */
    async listDeptSimpleUsersWithOptions(departmentId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.containAccessLimit)) {
            query["containAccessLimit"] = request.containAccessLimit;
        }
        if (!tea_util_1.default.isUnset(request.cursor)) {
            query["cursor"] = request.cursor;
        }
        if (!tea_util_1.default.isUnset(request.language)) {
            query["language"] = request.language;
        }
        if (!tea_util_1.default.isUnset(request.orderField)) {
            query["orderField"] = request.orderField;
        }
        if (!tea_util_1.default.isUnset(request.size)) {
            query["size"] = request.size;
        }
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        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: "ListDeptSimpleUsers",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/departments/${departmentId}/simpleUsers`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListDeptSimpleUsersResponse({}));
    }
    /**
     * 查询部门下简略用户列表
     *
     * @param request - ListDeptSimpleUsersRequest
     * @returns ListDeptSimpleUsersResponse
     */
    async listDeptSimpleUsers(departmentId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListDeptSimpleUsersHeaders({});
        return await this.listDeptSimpleUsersWithOptions(departmentId, request, headers, runtime);
    }
    /**
     * 查询部门下userid列表
     *
     * @param request - ListDeptUserIdsRequest
     * @param headers - ListDeptUserIdsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListDeptUserIdsResponse
     */
    async listDeptUserIdsWithOptions(departmentId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        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: "ListDeptUserIds",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/departments/${departmentId}/userIds`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListDeptUserIdsResponse({}));
    }
    /**
     * 查询部门下userid列表
     *
     * @param request - ListDeptUserIdsRequest
     * @returns ListDeptUserIdsResponse
     */
    async listDeptUserIds(departmentId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListDeptUserIdsHeaders({});
        return await this.listDeptUserIdsWithOptions(departmentId, request, headers, runtime);
    }
    /**
     * 查询部门下user完整信息
     *
     * @param request - ListDeptUsersRequest
     * @param headers - ListDeptUsersHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListDeptUsersResponse
     */
    async listDeptUsersWithOptions(departmentId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.containAccessLimit)) {
            query["containAccessLimit"] = request.containAccessLimit;
        }
        if (!tea_util_1.default.isUnset(request.cursor)) {
            query["cursor"] = request.cursor;
        }
        if (!tea_util_1.default.isUnset(request.language)) {
            query["language"] = request.language;
        }
        if (!tea_util_1.default.isUnset(request.orderField)) {
            query["orderField"] = request.orderField;
        }
        if (!tea_util_1.default.isUnset(request.size)) {
            query["size"] = request.size;
        }
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        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: "ListDeptUsers",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/departments/${departmentId}/users`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListDeptUsersResponse({}));
    }
    /**
     * 查询部门下user完整信息
     *
     * @param request - ListDeptUsersRequest
     * @returns ListDeptUsersResponse
     */
    async listDeptUsers(departmentId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListDeptUsersHeaders({});
        return await this.listDeptUsersWithOptions(departmentId, request, headers, runtime);
    }
    /**
     * 查询部门所有父部门列表
     *
     * @param request - ListParentByDeptRequest
     * @param headers - ListParentByDeptHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListParentByDeptResponse
     */
    async listParentByDeptWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.departmentId)) {
            query["departmentId"] = request.departmentId;
        }
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        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: "ListParentByDept",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/departments/listParentByDepartment`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListParentByDeptResponse({}));
    }
    /**
     * 查询部门所有父部门列表
     *
     * @param request - ListParentByDeptRequest
     * @returns ListParentByDeptResponse
     */
    async listParentByDept(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListParentByDeptHeaders({});
        return await this.listParentByDeptWithOptions(request, headers, runtime);
    }
    /**
     * 查询用户所有父部门列表
     *
     * @param request - ListParentByUserRequest
     * @param headers - ListParentByUserHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListParentByUserResponse
     */
    async listParentByUserWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        if (!tea_util_1.default.isUnset(request.userId)) {
            query["userId"] = request.userId;
        }
        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: "ListParentByUser",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/departments/listParentByUser`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListParentByUserResponse({}));
    }
    /**
     * 查询用户所有父部门列表
     *
     * @param request - ListParentByUserRequest
     * @returns ListParentByUserResponse
     */
    async listParentByUser(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListParentByUserHeaders({});
        return await this.listParentByUserWithOptions(request, headers, runtime);
    }
    /**
     * 居民通讯录获取部门下人员信息
     *
     * @param request - ListResidentDeptUsersRequest
     * @param headers - ListResidentDeptUsersHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListResidentDeptUsersResponse
     */
    async listResidentDeptUsersWithOptions(departmentId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.cursor)) {
            query["cursor"] = request.cursor;
        }
        if (!tea_util_1.default.isUnset(request.role)) {
            query["role"] = request.role;
        }
        if (!tea_util_1.default.isUnset(request.size)) {
            query["size"] = request.size;
        }
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        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: "ListResidentDeptUsers",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/residentDepartments/${departmentId}/users`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListResidentDeptUsersResponse({}));
    }
    /**
     * 居民通讯录获取部门下人员信息
     *
     * @param request - ListResidentDeptUsersRequest
     * @returns ListResidentDeptUsersResponse
     */
    async listResidentDeptUsers(departmentId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListResidentDeptUsersHeaders({});
        return await this.listResidentDeptUsersWithOptions(departmentId, request, headers, runtime);
    }
    /**
     * 居民通讯录获取子部门列表
     *
     * @param request - ListResidentSubDeptsRequest
     * @param headers - ListResidentSubDeptsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListResidentSubDeptsResponse
     */
    async listResidentSubDeptsWithOptions(departmentId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.cursor)) {
            query["cursor"] = request.cursor;
        }
        if (!tea_util_1.default.isUnset(request.size)) {
            query["size"] = request.size;
        }
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        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: "ListResidentSubDepts",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/residentDepartments/${departmentId}/subDepartments`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListResidentSubDeptsResponse({}));
    }
    /**
     * 居民通讯录获取子部门列表
     *
     * @param request - ListResidentSubDeptsRequest
     * @returns ListResidentSubDeptsResponse
     */
    async listResidentSubDepts(departmentId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListResidentSubDeptsHeaders({});
        return await this.listResidentSubDeptsWithOptions(departmentId, request, headers, runtime);
    }
    /**
     * 居民通讯录批量获取用户详细信息
     *
     * @param tmpReq - ListResidentUserInfosRequest
     * @param headers - ListResidentUserInfosHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListResidentUserInfosResponse
     */
    async listResidentUserInfosWithOptions(tmpReq, headers, runtime) {
        tea_util_1.default.validateModel(tmpReq);
        let request = new ListResidentUserInfosShrinkRequest({});
        openapi_util_1.default.convert(tmpReq, request);
        if (!tea_util_1.default.isUnset(tmpReq.userIds)) {
            request.userIdsShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.userIds, "userIds", "json");
        }
        let query = {};
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        if (!tea_util_1.default.isUnset(request.userIdsShrink)) {
            query["userIds"] = request.userIdsShrink;
        }
        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: "ListResidentUserInfos",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/residentUsers/getByUserIds`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListResidentUserInfosResponse({}));
    }
    /**
     * 居民通讯录批量获取用户详细信息
     *
     * @param request - ListResidentUserInfosRequest
     * @returns ListResidentUserInfosResponse
     */
    async listResidentUserInfos(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListResidentUserInfosHeaders({});
        return await this.listResidentUserInfosWithOptions(request, headers, runtime);
    }
    /**
     * 根据角色获取用户列表
     *
     * @param request - ListSimpleUsersByRoleRequest
     * @param headers - ListSimpleUsersByRoleHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListSimpleUsersByRoleResponse
     */
    async listSimpleUsersByRoleWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.offset)) {
            query["offset"] = request.offset;
        }
        if (!tea_util_1.default.isUnset(request.roleId)) {
            query["roleId"] = request.roleId;
        }
        if (!tea_util_1.default.isUnset(request.size)) {
            query["size"] = request.size;
        }
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        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: "ListSimpleUsersByRole",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/users/listByRole`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListSimpleUsersByRoleResponse({}));
    }
    /**
     * 根据角色获取用户列表
     *
     * @param request - ListSimpleUsersByRoleRequest
     * @returns ListSimpleUsersByRoleResponse
     */
    async listSimpleUsersByRole(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListSimpleUsersByRoleHeaders({});
        return await this.listSimpleUsersByRoleWithOptions(request, headers, runtime);
    }
    /**
     * 获取下级指定区域层级组织
     *
     * @param request - ListSubCorpsRequest
     * @param headers - ListSubCorpsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListSubCorpsResponse
     */
    async listSubCorpsWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.isOnlyDirect)) {
            query["isOnlyDirect"] = request.isOnlyDirect;
        }
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        if (!tea_util_1.default.isUnset(request.types)) {
            query["types"] = request.types;
        }
        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: "ListSubCorps",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/corps/subCorps`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListSubCorpsResponse({}));
    }
    /**
     * 获取下级指定区域层级组织
     *
     * @param request - ListSubCorpsRequest
     * @returns ListSubCorpsResponse
     */
    async listSubCorps(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListSubCorpsHeaders({});
        return await this.listSubCorpsWithOptions(request, headers, runtime);
    }
    /**
     * 查询子部门列表
     *
     * @param request - ListSubDeptRequest
     * @param headers - ListSubDeptHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListSubDeptResponse
     */
    async listSubDeptWithOptions(departmentId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.language)) {
            query["language"] = request.language;
        }
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        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: "ListSubDept",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/departments/${departmentId}/subDepartments`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListSubDeptResponse({}));
    }
    /**
     * 查询子部门列表
     *
     * @param request - ListSubDeptRequest
     * @returns ListSubDeptResponse
     */
    async listSubDept(departmentId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListSubDeptHeaders({});
        return await this.listSubDeptWithOptions(departmentId, request, headers, runtime);
    }
    /**
     * 查询部门下的子部门ID列表，不会递归查询，只包含ID
     *
     * @param request - ListSubDeptIdsRequest
     * @param headers - ListSubDeptIdsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListSubDeptIdsResponse
     */
    async listSubDeptIdsWithOptions(departmentId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.subCorpId)) {
            query["subCorpId"] = request.subCorpId;
        }
        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: "ListSubDeptIds",
            version: "village_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/village/departments/${departmentId}/subDepartmentIds`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListSubDeptIdsResponse({}));
    }
    /**
     * 查询部门下的子部门ID列表，不会递归查询，只包含ID
     *
     * @param request - ListSubDeptIdsRequest
     * @returns ListSubDeptIdsResponse
     */
    async listSubDeptIds(departmentId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListSubDeptIdsHeaders({});
        return await this.listSubDeptIdsWithOptions(departmentId, request, headers, runtime);
    }
}
exports.default = Client;
//# sourceMappingURL=client.js.map