"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.SearchDentriesResponse = exports.SearchDentriesResponseBody = exports.SearchDentriesRequest = exports.SearchDentriesHeaders = exports.ManagerSetDefaultHandOverUserResponse = exports.ManagerSetDefaultHandOverUserResponseBody = exports.ManagerSetDefaultHandOverUserRequest = exports.ManagerSetDefaultHandOverUserHeaders = exports.ManagerGetDefaultHandOverUserResponse = exports.ManagerGetDefaultHandOverUserResponseBody = exports.ManagerGetDefaultHandOverUserRequest = exports.ManagerGetDefaultHandOverUserHeaders = exports.ListPermissionsResponse = exports.ListPermissionsResponseBody = exports.ListPermissionsRequest = exports.ListPermissionsHeaders = exports.ListOperationLogsResponse = exports.ListOperationLogsResponseBody = exports.ListOperationLogsRequest = exports.ListOperationLogsHeaders = exports.GetPermissionShareScopeResponse = exports.GetPermissionShareScopeResponseBody = exports.GetPermissionShareScopeRequest = exports.GetPermissionShareScopeHeaders = exports.GetPermissionInheritanceResponse = exports.GetPermissionInheritanceResponseBody = exports.GetPermissionInheritanceRequest = exports.GetPermissionInheritanceHeaders = exports.GetFileUploadInfoResponse = exports.GetFileUploadInfoResponseBody = exports.GetFileUploadInfoRequest = exports.GetFileUploadInfoHeaders = exports.DeletePermissionResponse = exports.DeletePermissionResponseBody = exports.DeletePermissionRequest = exports.DeletePermissionHeaders = exports.CommitFileResponse = exports.CommitFileResponseBody = exports.CommitFileRequest = exports.CommitFileHeaders = exports.BatchQueryRolesResponse = exports.BatchQueryRolesResponseBody = exports.BatchQueryRolesRequest = exports.BatchQueryRolesHeaders = exports.AddPermissionResponse = exports.AddPermissionResponseBody = exports.AddPermissionRequest = exports.AddPermissionHeaders = exports.DentryAppPropertiesValue = exports.RoleMapValue = void 0;
exports.UpdatePermissionRequestMembers = exports.SetPermissionShareScopeRequestOption = exports.SearchWorkspacesResponseBodyItems = exports.SearchWorkspacesRequestOption = exports.SearchPublishDentriesResponseBodyItems = exports.SearchPublishDentriesRequestOption = exports.SearchDentriesResponseBodyItems = exports.SearchDentriesResponseBodyItemsPath = exports.SearchDentriesResponseBodyItemsModifier = exports.SearchDentriesResponseBodyItemsCreator = exports.SearchDentriesRequestOption = exports.SearchDentriesRequestOptionVisitTimeRange = exports.SearchDentriesRequestOptionCreateTimeRange = exports.ListPermissionsResponseBodyPermissions = exports.ListPermissionsResponseBodyPermissionsRole = exports.ListPermissionsResponseBodyPermissionsMember = exports.ListPermissionsRequestOption = exports.ListOperationLogsResponseBodyItems = exports.ListOperationLogsRequestOption = exports.GetFileUploadInfoResponseBodyHeaderSignatureInfo = exports.GetFileUploadInfoRequestOption = exports.GetFileUploadInfoRequestOptionPreCheckParam = exports.DeletePermissionRequestMembers = exports.CommitFileResponseBodyDentry = exports.CommitFileResponseBodyDentryThumbnail = exports.CommitFileResponseBodyDentryProperties = exports.CommitFileRequestOption = exports.CommitFileRequestOptionAppProperties = exports.AddPermissionRequestOption = exports.AddPermissionRequestMembers = exports.UpdatePermissionResponse = exports.UpdatePermissionResponseBody = exports.UpdatePermissionRequest = exports.UpdatePermissionHeaders = exports.SetPermissionShareScopeResponse = exports.SetPermissionShareScopeResponseBody = exports.SetPermissionShareScopeRequest = exports.SetPermissionShareScopeHeaders = exports.SetPermissionInheritanceResponse = exports.SetPermissionInheritanceResponseBody = exports.SetPermissionInheritanceRequest = exports.SetPermissionInheritanceHeaders = exports.SearchWorkspacesResponse = exports.SearchWorkspacesResponseBody = exports.SearchWorkspacesRequest = exports.SearchWorkspacesHeaders = exports.SearchPublishDentriesResponse = exports.SearchPublishDentriesResponseBody = exports.SearchPublishDentriesRequest = exports.SearchPublishDentriesHeaders = void 0;
exports.UpdatePermissionRequestOption = 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 RoleMapValue extends $tea.Model {
    static names() {
        return {
            id: 'id',
            name: 'name',
        };
    }
    static types() {
        return {
            id: 'string',
            name: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RoleMapValue = RoleMapValue;
class DentryAppPropertiesValue extends $tea.Model {
    static names() {
        return {
            name: 'name',
            value: 'value',
            visibility: 'visibility',
        };
    }
    static types() {
        return {
            name: 'string',
            value: 'string',
            visibility: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DentryAppPropertiesValue = DentryAppPropertiesValue;
class AddPermissionHeaders 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.AddPermissionHeaders = AddPermissionHeaders;
class AddPermissionRequest extends $tea.Model {
    static names() {
        return {
            members: 'members',
            option: 'option',
            roleId: 'roleId',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            members: { 'type': 'array', 'itemType': AddPermissionRequestMembers },
            option: AddPermissionRequestOption,
            roleId: 'string',
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddPermissionRequest = AddPermissionRequest;
class AddPermissionResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddPermissionResponseBody = AddPermissionResponseBody;
class AddPermissionResponse 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: AddPermissionResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddPermissionResponse = AddPermissionResponse;
class BatchQueryRolesHeaders 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.BatchQueryRolesHeaders = BatchQueryRolesHeaders;
class BatchQueryRolesRequest extends $tea.Model {
    static names() {
        return {
            dentryUuidList: 'dentryUuidList',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            dentryUuidList: { 'type': 'array', 'itemType': 'string' },
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchQueryRolesRequest = BatchQueryRolesRequest;
class BatchQueryRolesResponseBody extends $tea.Model {
    static names() {
        return {
            roleMap: 'roleMap',
        };
    }
    static types() {
        return {
            roleMap: { 'type': 'map', 'keyType': 'string', 'valueType': { 'type': 'array', 'itemType': RoleMapValue } },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchQueryRolesResponseBody = BatchQueryRolesResponseBody;
class BatchQueryRolesResponse 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: BatchQueryRolesResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchQueryRolesResponse = BatchQueryRolesResponse;
class CommitFileHeaders 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.CommitFileHeaders = CommitFileHeaders;
class CommitFileRequest extends $tea.Model {
    static names() {
        return {
            name: 'name',
            option: 'option',
            uploadKey: 'uploadKey',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            name: 'string',
            option: CommitFileRequestOption,
            uploadKey: 'string',
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CommitFileRequest = CommitFileRequest;
class CommitFileResponseBody extends $tea.Model {
    static names() {
        return {
            dentry: 'dentry',
        };
    }
    static types() {
        return {
            dentry: CommitFileResponseBodyDentry,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CommitFileResponseBody = CommitFileResponseBody;
class CommitFileResponse 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: CommitFileResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CommitFileResponse = CommitFileResponse;
class DeletePermissionHeaders 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.DeletePermissionHeaders = DeletePermissionHeaders;
class DeletePermissionRequest extends $tea.Model {
    static names() {
        return {
            members: 'members',
            roleId: 'roleId',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            members: { 'type': 'array', 'itemType': DeletePermissionRequestMembers },
            roleId: 'string',
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeletePermissionRequest = DeletePermissionRequest;
class DeletePermissionResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeletePermissionResponseBody = DeletePermissionResponseBody;
class DeletePermissionResponse 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: DeletePermissionResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeletePermissionResponse = DeletePermissionResponse;
class GetFileUploadInfoHeaders 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.GetFileUploadInfoHeaders = GetFileUploadInfoHeaders;
class GetFileUploadInfoRequest extends $tea.Model {
    static names() {
        return {
            option: 'option',
            protocol: 'protocol',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            option: GetFileUploadInfoRequestOption,
            protocol: 'string',
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetFileUploadInfoRequest = GetFileUploadInfoRequest;
class GetFileUploadInfoResponseBody extends $tea.Model {
    static names() {
        return {
            headerSignatureInfo: 'headerSignatureInfo',
            protocol: 'protocol',
            storageDriver: 'storageDriver',
            uploadKey: 'uploadKey',
        };
    }
    static types() {
        return {
            headerSignatureInfo: GetFileUploadInfoResponseBodyHeaderSignatureInfo,
            protocol: 'string',
            storageDriver: 'string',
            uploadKey: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetFileUploadInfoResponseBody = GetFileUploadInfoResponseBody;
class GetFileUploadInfoResponse 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: GetFileUploadInfoResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetFileUploadInfoResponse = GetFileUploadInfoResponse;
class GetPermissionInheritanceHeaders 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.GetPermissionInheritanceHeaders = GetPermissionInheritanceHeaders;
class GetPermissionInheritanceRequest extends $tea.Model {
    static names() {
        return {
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetPermissionInheritanceRequest = GetPermissionInheritanceRequest;
class GetPermissionInheritanceResponseBody extends $tea.Model {
    static names() {
        return {
            inheritance: 'inheritance',
        };
    }
    static types() {
        return {
            inheritance: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetPermissionInheritanceResponseBody = GetPermissionInheritanceResponseBody;
class GetPermissionInheritanceResponse 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: GetPermissionInheritanceResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetPermissionInheritanceResponse = GetPermissionInheritanceResponse;
class GetPermissionShareScopeHeaders 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.GetPermissionShareScopeHeaders = GetPermissionShareScopeHeaders;
class GetPermissionShareScopeRequest extends $tea.Model {
    static names() {
        return {
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetPermissionShareScopeRequest = GetPermissionShareScopeRequest;
class GetPermissionShareScopeResponseBody extends $tea.Model {
    static names() {
        return {
            scope: 'scope',
        };
    }
    static types() {
        return {
            scope: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetPermissionShareScopeResponseBody = GetPermissionShareScopeResponseBody;
class GetPermissionShareScopeResponse 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: GetPermissionShareScopeResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetPermissionShareScopeResponse = GetPermissionShareScopeResponse;
class ListOperationLogsHeaders 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.ListOperationLogsHeaders = ListOperationLogsHeaders;
class ListOperationLogsRequest extends $tea.Model {
    static names() {
        return {
            endTime: 'endTime',
            option: 'option',
            startTime: 'startTime',
        };
    }
    static types() {
        return {
            endTime: 'number',
            option: ListOperationLogsRequestOption,
            startTime: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListOperationLogsRequest = ListOperationLogsRequest;
class ListOperationLogsResponseBody extends $tea.Model {
    static names() {
        return {
            items: 'items',
            nextToken: 'nextToken',
            totalCount: 'totalCount',
        };
    }
    static types() {
        return {
            items: { 'type': 'array', 'itemType': ListOperationLogsResponseBodyItems },
            nextToken: 'string',
            totalCount: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListOperationLogsResponseBody = ListOperationLogsResponseBody;
class ListOperationLogsResponse 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: ListOperationLogsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListOperationLogsResponse = ListOperationLogsResponse;
class ListPermissionsHeaders 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.ListPermissionsHeaders = ListPermissionsHeaders;
class ListPermissionsRequest extends $tea.Model {
    static names() {
        return {
            option: 'option',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            option: ListPermissionsRequestOption,
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListPermissionsRequest = ListPermissionsRequest;
class ListPermissionsResponseBody extends $tea.Model {
    static names() {
        return {
            nextToken: 'nextToken',
            permissions: 'permissions',
        };
    }
    static types() {
        return {
            nextToken: 'string',
            permissions: { 'type': 'array', 'itemType': ListPermissionsResponseBodyPermissions },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListPermissionsResponseBody = ListPermissionsResponseBody;
class ListPermissionsResponse 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: ListPermissionsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListPermissionsResponse = ListPermissionsResponse;
class ManagerGetDefaultHandOverUserHeaders 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.ManagerGetDefaultHandOverUserHeaders = ManagerGetDefaultHandOverUserHeaders;
class ManagerGetDefaultHandOverUserRequest extends $tea.Model {
    static names() {
        return {
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ManagerGetDefaultHandOverUserRequest = ManagerGetDefaultHandOverUserRequest;
class ManagerGetDefaultHandOverUserResponseBody extends $tea.Model {
    static names() {
        return {
            defaultHandoverUserId: 'defaultHandoverUserId',
        };
    }
    static types() {
        return {
            defaultHandoverUserId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ManagerGetDefaultHandOverUserResponseBody = ManagerGetDefaultHandOverUserResponseBody;
class ManagerGetDefaultHandOverUserResponse 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: ManagerGetDefaultHandOverUserResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ManagerGetDefaultHandOverUserResponse = ManagerGetDefaultHandOverUserResponse;
class ManagerSetDefaultHandOverUserHeaders 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.ManagerSetDefaultHandOverUserHeaders = ManagerSetDefaultHandOverUserHeaders;
class ManagerSetDefaultHandOverUserRequest extends $tea.Model {
    static names() {
        return {
            defaultHandoverUserId: 'defaultHandoverUserId',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            defaultHandoverUserId: 'string',
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ManagerSetDefaultHandOverUserRequest = ManagerSetDefaultHandOverUserRequest;
class ManagerSetDefaultHandOverUserResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ManagerSetDefaultHandOverUserResponseBody = ManagerSetDefaultHandOverUserResponseBody;
class ManagerSetDefaultHandOverUserResponse 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: ManagerSetDefaultHandOverUserResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ManagerSetDefaultHandOverUserResponse = ManagerSetDefaultHandOverUserResponse;
class SearchDentriesHeaders 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.SearchDentriesHeaders = SearchDentriesHeaders;
class SearchDentriesRequest extends $tea.Model {
    static names() {
        return {
            keyword: 'keyword',
            option: 'option',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            keyword: 'string',
            option: SearchDentriesRequestOption,
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchDentriesRequest = SearchDentriesRequest;
class SearchDentriesResponseBody extends $tea.Model {
    static names() {
        return {
            items: 'items',
            nextToken: 'nextToken',
        };
    }
    static types() {
        return {
            items: { 'type': 'array', 'itemType': SearchDentriesResponseBodyItems },
            nextToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchDentriesResponseBody = SearchDentriesResponseBody;
class SearchDentriesResponse 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: SearchDentriesResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchDentriesResponse = SearchDentriesResponse;
class SearchPublishDentriesHeaders 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.SearchPublishDentriesHeaders = SearchPublishDentriesHeaders;
class SearchPublishDentriesRequest extends $tea.Model {
    static names() {
        return {
            keyword: 'keyword',
            option: 'option',
            workspaceId: 'workspaceId',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            keyword: 'string',
            option: SearchPublishDentriesRequestOption,
            workspaceId: 'string',
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchPublishDentriesRequest = SearchPublishDentriesRequest;
class SearchPublishDentriesResponseBody extends $tea.Model {
    static names() {
        return {
            items: 'items',
            nextToken: 'nextToken',
        };
    }
    static types() {
        return {
            items: { 'type': 'array', 'itemType': SearchPublishDentriesResponseBodyItems },
            nextToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchPublishDentriesResponseBody = SearchPublishDentriesResponseBody;
class SearchPublishDentriesResponse 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: SearchPublishDentriesResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchPublishDentriesResponse = SearchPublishDentriesResponse;
class SearchWorkspacesHeaders 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.SearchWorkspacesHeaders = SearchWorkspacesHeaders;
class SearchWorkspacesRequest extends $tea.Model {
    static names() {
        return {
            keyword: 'keyword',
            option: 'option',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            keyword: 'string',
            option: SearchWorkspacesRequestOption,
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchWorkspacesRequest = SearchWorkspacesRequest;
class SearchWorkspacesResponseBody extends $tea.Model {
    static names() {
        return {
            items: 'items',
            nextToken: 'nextToken',
        };
    }
    static types() {
        return {
            items: { 'type': 'array', 'itemType': SearchWorkspacesResponseBodyItems },
            nextToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchWorkspacesResponseBody = SearchWorkspacesResponseBody;
class SearchWorkspacesResponse 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: SearchWorkspacesResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchWorkspacesResponse = SearchWorkspacesResponse;
class SetPermissionInheritanceHeaders 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.SetPermissionInheritanceHeaders = SetPermissionInheritanceHeaders;
class SetPermissionInheritanceRequest extends $tea.Model {
    static names() {
        return {
            inheritance: 'inheritance',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            inheritance: 'string',
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SetPermissionInheritanceRequest = SetPermissionInheritanceRequest;
class SetPermissionInheritanceResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SetPermissionInheritanceResponseBody = SetPermissionInheritanceResponseBody;
class SetPermissionInheritanceResponse 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: SetPermissionInheritanceResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SetPermissionInheritanceResponse = SetPermissionInheritanceResponse;
class SetPermissionShareScopeHeaders 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.SetPermissionShareScopeHeaders = SetPermissionShareScopeHeaders;
class SetPermissionShareScopeRequest extends $tea.Model {
    static names() {
        return {
            option: 'option',
            scope: 'scope',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            option: SetPermissionShareScopeRequestOption,
            scope: 'string',
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SetPermissionShareScopeRequest = SetPermissionShareScopeRequest;
class SetPermissionShareScopeResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SetPermissionShareScopeResponseBody = SetPermissionShareScopeResponseBody;
class SetPermissionShareScopeResponse 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: SetPermissionShareScopeResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SetPermissionShareScopeResponse = SetPermissionShareScopeResponse;
class UpdatePermissionHeaders 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.UpdatePermissionHeaders = UpdatePermissionHeaders;
class UpdatePermissionRequest extends $tea.Model {
    static names() {
        return {
            members: 'members',
            option: 'option',
            roleId: 'roleId',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            members: { 'type': 'array', 'itemType': UpdatePermissionRequestMembers },
            option: UpdatePermissionRequestOption,
            roleId: 'string',
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdatePermissionRequest = UpdatePermissionRequest;
class UpdatePermissionResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdatePermissionResponseBody = UpdatePermissionResponseBody;
class UpdatePermissionResponse 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: UpdatePermissionResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdatePermissionResponse = UpdatePermissionResponse;
class AddPermissionRequestMembers extends $tea.Model {
    static names() {
        return {
            corpId: 'corpId',
            id: 'id',
            type: 'type',
        };
    }
    static types() {
        return {
            corpId: 'string',
            id: 'string',
            type: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddPermissionRequestMembers = AddPermissionRequestMembers;
class AddPermissionRequestOption extends $tea.Model {
    static names() {
        return {
            duration: 'duration',
        };
    }
    static types() {
        return {
            duration: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddPermissionRequestOption = AddPermissionRequestOption;
class CommitFileRequestOptionAppProperties extends $tea.Model {
    static names() {
        return {
            name: 'name',
            value: 'value',
            visibility: 'visibility',
        };
    }
    static types() {
        return {
            name: 'string',
            value: 'string',
            visibility: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CommitFileRequestOptionAppProperties = CommitFileRequestOptionAppProperties;
class CommitFileRequestOption extends $tea.Model {
    static names() {
        return {
            appProperties: 'appProperties',
            conflictStrategy: 'conflictStrategy',
            convertToOnlineDoc: 'convertToOnlineDoc',
            convertToOnlineDocTargetDocumentType: 'convertToOnlineDocTargetDocumentType',
            size: 'size',
        };
    }
    static types() {
        return {
            appProperties: { 'type': 'array', 'itemType': CommitFileRequestOptionAppProperties },
            conflictStrategy: 'string',
            convertToOnlineDoc: 'boolean',
            convertToOnlineDocTargetDocumentType: 'string',
            size: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CommitFileRequestOption = CommitFileRequestOption;
class CommitFileResponseBodyDentryProperties extends $tea.Model {
    static names() {
        return {
            readOnly: 'readOnly',
        };
    }
    static types() {
        return {
            readOnly: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CommitFileResponseBodyDentryProperties = CommitFileResponseBodyDentryProperties;
class CommitFileResponseBodyDentryThumbnail extends $tea.Model {
    static names() {
        return {
            height: 'height',
            url: 'url',
            width: 'width',
        };
    }
    static types() {
        return {
            height: 'number',
            url: 'string',
            width: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CommitFileResponseBodyDentryThumbnail = CommitFileResponseBodyDentryThumbnail;
class CommitFileResponseBodyDentry extends $tea.Model {
    static names() {
        return {
            appProperties: 'appProperties',
            category: 'category',
            createTime: 'createTime',
            creatorId: 'creatorId',
            extension: 'extension',
            id: 'id',
            modifiedTime: 'modifiedTime',
            modifierId: 'modifierId',
            name: 'name',
            parentId: 'parentId',
            partitionType: 'partitionType',
            path: 'path',
            properties: 'properties',
            size: 'size',
            spaceId: 'spaceId',
            status: 'status',
            storageDriver: 'storageDriver',
            thumbnail: 'thumbnail',
            type: 'type',
            uuid: 'uuid',
            version: 'version',
        };
    }
    static types() {
        return {
            appProperties: { 'type': 'map', 'keyType': 'string', 'valueType': { 'type': 'array', 'itemType': DentryAppPropertiesValue } },
            category: 'string',
            createTime: 'string',
            creatorId: 'string',
            extension: 'string',
            id: 'string',
            modifiedTime: 'string',
            modifierId: 'string',
            name: 'string',
            parentId: 'string',
            partitionType: 'string',
            path: 'string',
            properties: CommitFileResponseBodyDentryProperties,
            size: 'number',
            spaceId: 'string',
            status: 'string',
            storageDriver: 'string',
            thumbnail: CommitFileResponseBodyDentryThumbnail,
            type: 'string',
            uuid: 'string',
            version: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CommitFileResponseBodyDentry = CommitFileResponseBodyDentry;
class DeletePermissionRequestMembers extends $tea.Model {
    static names() {
        return {
            corpId: 'corpId',
            id: 'id',
            type: 'type',
        };
    }
    static types() {
        return {
            corpId: 'string',
            id: 'string',
            type: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeletePermissionRequestMembers = DeletePermissionRequestMembers;
class GetFileUploadInfoRequestOptionPreCheckParam extends $tea.Model {
    static names() {
        return {
            name: 'name',
            size: 'size',
        };
    }
    static types() {
        return {
            name: 'string',
            size: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetFileUploadInfoRequestOptionPreCheckParam = GetFileUploadInfoRequestOptionPreCheckParam;
class GetFileUploadInfoRequestOption extends $tea.Model {
    static names() {
        return {
            preCheckParam: 'preCheckParam',
            preferIntranet: 'preferIntranet',
            preferRegion: 'preferRegion',
            storageDriver: 'storageDriver',
        };
    }
    static types() {
        return {
            preCheckParam: GetFileUploadInfoRequestOptionPreCheckParam,
            preferIntranet: 'boolean',
            preferRegion: 'string',
            storageDriver: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetFileUploadInfoRequestOption = GetFileUploadInfoRequestOption;
class GetFileUploadInfoResponseBodyHeaderSignatureInfo extends $tea.Model {
    static names() {
        return {
            expirationSeconds: 'expirationSeconds',
            headers: 'headers',
            internalResourceUrls: 'internalResourceUrls',
            region: 'region',
            resourceUrls: 'resourceUrls',
        };
    }
    static types() {
        return {
            expirationSeconds: 'number',
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            internalResourceUrls: { 'type': 'array', 'itemType': 'string' },
            region: 'string',
            resourceUrls: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetFileUploadInfoResponseBodyHeaderSignatureInfo = GetFileUploadInfoResponseBodyHeaderSignatureInfo;
class ListOperationLogsRequestOption extends $tea.Model {
    static names() {
        return {
            actions: 'actions',
            maxResults: 'maxResults',
            nextToken: 'nextToken',
            operatorId: 'operatorId',
            scenes: 'scenes',
            subjectId: 'subjectId',
        };
    }
    static types() {
        return {
            actions: { 'type': 'array', 'itemType': 'string' },
            maxResults: 'number',
            nextToken: 'string',
            operatorId: 'string',
            scenes: { 'type': 'array', 'itemType': 'string' },
            subjectId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListOperationLogsRequestOption = ListOperationLogsRequestOption;
class ListOperationLogsResponseBodyItems extends $tea.Model {
    static names() {
        return {
            action: 'action',
            details: 'details',
            id: 'id',
            operateTime: 'operateTime',
            operatorId: 'operatorId',
            scene: 'scene',
            subjectId: 'subjectId',
            subjectName: 'subjectName',
            subjectType: 'subjectType',
            subjectUrl: 'subjectUrl',
        };
    }
    static types() {
        return {
            action: 'string',
            details: 'string',
            id: 'string',
            operateTime: 'number',
            operatorId: 'string',
            scene: 'string',
            subjectId: 'string',
            subjectName: 'string',
            subjectType: 'string',
            subjectUrl: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListOperationLogsResponseBodyItems = ListOperationLogsResponseBodyItems;
class ListPermissionsRequestOption extends $tea.Model {
    static names() {
        return {
            filterRoleIds: 'filterRoleIds',
            maxResults: 'maxResults',
            nextToken: 'nextToken',
        };
    }
    static types() {
        return {
            filterRoleIds: { 'type': 'array', 'itemType': 'string' },
            maxResults: 'number',
            nextToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListPermissionsRequestOption = ListPermissionsRequestOption;
class ListPermissionsResponseBodyPermissionsMember extends $tea.Model {
    static names() {
        return {
            corpId: 'corpId',
            id: 'id',
            type: 'type',
        };
    }
    static types() {
        return {
            corpId: 'string',
            id: 'string',
            type: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListPermissionsResponseBodyPermissionsMember = ListPermissionsResponseBodyPermissionsMember;
class ListPermissionsResponseBodyPermissionsRole extends $tea.Model {
    static names() {
        return {
            id: 'id',
            name: 'name',
        };
    }
    static types() {
        return {
            id: 'string',
            name: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListPermissionsResponseBodyPermissionsRole = ListPermissionsResponseBodyPermissionsRole;
class ListPermissionsResponseBodyPermissions extends $tea.Model {
    static names() {
        return {
            dentryUuid: 'dentryUuid',
            duration: 'duration',
            member: 'member',
            role: 'role',
        };
    }
    static types() {
        return {
            dentryUuid: 'string',
            duration: 'number',
            member: ListPermissionsResponseBodyPermissionsMember,
            role: ListPermissionsResponseBodyPermissionsRole,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListPermissionsResponseBodyPermissions = ListPermissionsResponseBodyPermissions;
class SearchDentriesRequestOptionCreateTimeRange extends $tea.Model {
    static names() {
        return {
            endTime: 'endTime',
            startTime: 'startTime',
        };
    }
    static types() {
        return {
            endTime: 'number',
            startTime: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchDentriesRequestOptionCreateTimeRange = SearchDentriesRequestOptionCreateTimeRange;
class SearchDentriesRequestOptionVisitTimeRange extends $tea.Model {
    static names() {
        return {
            endTime: 'endTime',
            startTime: 'startTime',
        };
    }
    static types() {
        return {
            endTime: 'number',
            startTime: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchDentriesRequestOptionVisitTimeRange = SearchDentriesRequestOptionVisitTimeRange;
class SearchDentriesRequestOption extends $tea.Model {
    static names() {
        return {
            createTimeRange: 'createTimeRange',
            creatorIds: 'creatorIds',
            dentryCategories: 'dentryCategories',
            maxResults: 'maxResults',
            modifierIds: 'modifierIds',
            nextToken: 'nextToken',
            spaceIds: 'spaceIds',
            visitTimeRange: 'visitTimeRange',
        };
    }
    static types() {
        return {
            createTimeRange: SearchDentriesRequestOptionCreateTimeRange,
            creatorIds: { 'type': 'array', 'itemType': 'string' },
            dentryCategories: { 'type': 'array', 'itemType': 'string' },
            maxResults: 'number',
            modifierIds: { 'type': 'array', 'itemType': 'string' },
            nextToken: 'string',
            spaceIds: { 'type': 'array', 'itemType': 'number' },
            visitTimeRange: SearchDentriesRequestOptionVisitTimeRange,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchDentriesRequestOption = SearchDentriesRequestOption;
class SearchDentriesResponseBodyItemsCreator extends $tea.Model {
    static names() {
        return {
            name: 'name',
            userId: 'userId',
        };
    }
    static types() {
        return {
            name: 'string',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchDentriesResponseBodyItemsCreator = SearchDentriesResponseBodyItemsCreator;
class SearchDentriesResponseBodyItemsModifier extends $tea.Model {
    static names() {
        return {
            name: 'name',
            userId: 'userId',
        };
    }
    static types() {
        return {
            name: 'string',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchDentriesResponseBodyItemsModifier = SearchDentriesResponseBodyItemsModifier;
class SearchDentriesResponseBodyItemsPath extends $tea.Model {
    static names() {
        return {
            longPath: 'longPath',
            path: 'path',
            url: 'url',
        };
    }
    static types() {
        return {
            longPath: 'string',
            path: 'string',
            url: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchDentriesResponseBodyItemsPath = SearchDentriesResponseBodyItemsPath;
class SearchDentriesResponseBodyItems extends $tea.Model {
    static names() {
        return {
            creator: 'creator',
            dentryUuid: 'dentryUuid',
            lastModifyTime: 'lastModifyTime',
            modifier: 'modifier',
            name: 'name',
            path: 'path',
        };
    }
    static types() {
        return {
            creator: SearchDentriesResponseBodyItemsCreator,
            dentryUuid: 'string',
            lastModifyTime: 'number',
            modifier: SearchDentriesResponseBodyItemsModifier,
            name: 'string',
            path: SearchDentriesResponseBodyItemsPath,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchDentriesResponseBodyItems = SearchDentriesResponseBodyItems;
class SearchPublishDentriesRequestOption extends $tea.Model {
    static names() {
        return {
            maxResults: 'maxResults',
            nextToken: 'nextToken',
        };
    }
    static types() {
        return {
            maxResults: 'number',
            nextToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchPublishDentriesRequestOption = SearchPublishDentriesRequestOption;
class SearchPublishDentriesResponseBodyItems extends $tea.Model {
    static names() {
        return {
            name: 'name',
            path: 'path',
            summary: 'summary',
            url: 'url',
        };
    }
    static types() {
        return {
            name: 'string',
            path: 'string',
            summary: 'string',
            url: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchPublishDentriesResponseBodyItems = SearchPublishDentriesResponseBodyItems;
class SearchWorkspacesRequestOption extends $tea.Model {
    static names() {
        return {
            maxResults: 'maxResults',
            nextToken: 'nextToken',
        };
    }
    static types() {
        return {
            maxResults: 'number',
            nextToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchWorkspacesRequestOption = SearchWorkspacesRequestOption;
class SearchWorkspacesResponseBodyItems extends $tea.Model {
    static names() {
        return {
            name: 'name',
            url: 'url',
            workspaceId: 'workspaceId',
        };
    }
    static types() {
        return {
            name: 'string',
            url: 'string',
            workspaceId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SearchWorkspacesResponseBodyItems = SearchWorkspacesResponseBodyItems;
class SetPermissionShareScopeRequestOption extends $tea.Model {
    static names() {
        return {
            canSearch: 'canSearch',
        };
    }
    static types() {
        return {
            canSearch: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SetPermissionShareScopeRequestOption = SetPermissionShareScopeRequestOption;
class UpdatePermissionRequestMembers extends $tea.Model {
    static names() {
        return {
            corpId: 'corpId',
            id: 'id',
            type: 'type',
        };
    }
    static types() {
        return {
            corpId: 'string',
            id: 'string',
            type: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdatePermissionRequestMembers = UpdatePermissionRequestMembers;
class UpdatePermissionRequestOption extends $tea.Model {
    static names() {
        return {
            duration: 'duration',
        };
    }
    static types() {
        return {
            duration: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdatePermissionRequestOption = UpdatePermissionRequestOption;
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 - AddPermissionRequest
     * @param headers - AddPermissionHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns AddPermissionResponse
     */
    async addPermissionWithOptions(dentryUuid, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.unionId)) {
            query["unionId"] = request.unionId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.members)) {
            body["members"] = request.members;
        }
        if (!tea_util_1.default.isUnset(request.option)) {
            body["option"] = request.option;
        }
        if (!tea_util_1.default.isUnset(request.roleId)) {
            body["roleId"] = request.roleId;
        }
        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),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "AddPermission",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/spaces/dentries/${dentryUuid}/permissions`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new AddPermissionResponse({}));
    }
    /**
     * 添加权限
     *
     * @param request - AddPermissionRequest
     * @returns AddPermissionResponse
     */
    async addPermission(dentryUuid, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new AddPermissionHeaders({});
        return await this.addPermissionWithOptions(dentryUuid, request, headers, runtime);
    }
    /**
     * 获取权限列表
     *
     * @param request - BatchQueryRolesRequest
     * @param headers - BatchQueryRolesHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns BatchQueryRolesResponse
     */
    async batchQueryRolesWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.unionId)) {
            query["unionId"] = request.unionId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.dentryUuidList)) {
            body["dentryUuidList"] = request.dentryUuidList;
        }
        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),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "BatchQueryRoles",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/spaces/dentries/permissions/roles/batchQuery`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new BatchQueryRolesResponse({}));
    }
    /**
     * 获取权限列表
     *
     * @param request - BatchQueryRolesRequest
     * @returns BatchQueryRolesResponse
     */
    async batchQueryRoles(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new BatchQueryRolesHeaders({});
        return await this.batchQueryRolesWithOptions(request, headers, runtime);
    }
    /**
     * 提交文件
     *
     * @param request - CommitFileRequest
     * @param headers - CommitFileHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns CommitFileResponse
     */
    async commitFileWithOptions(parentDentryUuid, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.unionId)) {
            query["unionId"] = request.unionId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.name)) {
            body["name"] = request.name;
        }
        if (!tea_util_1.default.isUnset(request.option)) {
            body["option"] = request.option;
        }
        if (!tea_util_1.default.isUnset(request.uploadKey)) {
            body["uploadKey"] = request.uploadKey;
        }
        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),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "CommitFile",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/spaces/files/${parentDentryUuid}/commit`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new CommitFileResponse({}));
    }
    /**
     * 提交文件
     *
     * @param request - CommitFileRequest
     * @returns CommitFileResponse
     */
    async commitFile(parentDentryUuid, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new CommitFileHeaders({});
        return await this.commitFileWithOptions(parentDentryUuid, request, headers, runtime);
    }
    /**
     * 删除权限
     *
     * @param request - DeletePermissionRequest
     * @param headers - DeletePermissionHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns DeletePermissionResponse
     */
    async deletePermissionWithOptions(dentryUuid, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.unionId)) {
            query["unionId"] = request.unionId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.members)) {
            body["members"] = request.members;
        }
        if (!tea_util_1.default.isUnset(request.roleId)) {
            body["roleId"] = request.roleId;
        }
        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),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "DeletePermission",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/spaces/dentries/${dentryUuid}/permissions/remove`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new DeletePermissionResponse({}));
    }
    /**
     * 删除权限
     *
     * @param request - DeletePermissionRequest
     * @returns DeletePermissionResponse
     */
    async deletePermission(dentryUuid, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new DeletePermissionHeaders({});
        return await this.deletePermissionWithOptions(dentryUuid, request, headers, runtime);
    }
    /**
     * 获取文件上传信息
     *
     * @param request - GetFileUploadInfoRequest
     * @param headers - GetFileUploadInfoHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetFileUploadInfoResponse
     */
    async getFileUploadInfoWithOptions(parentDentryUuid, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.unionId)) {
            query["unionId"] = request.unionId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.option)) {
            body["option"] = request.option;
        }
        if (!tea_util_1.default.isUnset(request.protocol)) {
            body["protocol"] = request.protocol;
        }
        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),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "GetFileUploadInfo",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/spaces/files/${parentDentryUuid}/uploadInfos/query`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetFileUploadInfoResponse({}));
    }
    /**
     * 获取文件上传信息
     *
     * @param request - GetFileUploadInfoRequest
     * @returns GetFileUploadInfoResponse
     */
    async getFileUploadInfo(parentDentryUuid, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetFileUploadInfoHeaders({});
        return await this.getFileUploadInfoWithOptions(parentDentryUuid, request, headers, runtime);
    }
    /**
     * 获取权限继承模式
     *
     * @param request - GetPermissionInheritanceRequest
     * @param headers - GetPermissionInheritanceHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetPermissionInheritanceResponse
     */
    async getPermissionInheritanceWithOptions(dentryUuid, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        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: "GetPermissionInheritance",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/spaces/dentries/${dentryUuid}/permissions/inheritances`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetPermissionInheritanceResponse({}));
    }
    /**
     * 获取权限继承模式
     *
     * @param request - GetPermissionInheritanceRequest
     * @returns GetPermissionInheritanceResponse
     */
    async getPermissionInheritance(dentryUuid, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetPermissionInheritanceHeaders({});
        return await this.getPermissionInheritanceWithOptions(dentryUuid, request, headers, runtime);
    }
    /**
     * 获取分享范围
     *
     * @param request - GetPermissionShareScopeRequest
     * @param headers - GetPermissionShareScopeHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetPermissionShareScopeResponse
     */
    async getPermissionShareScopeWithOptions(dentryUuid, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        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: "GetPermissionShareScope",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/spaces/dentries/${dentryUuid}/permissions/scopes`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetPermissionShareScopeResponse({}));
    }
    /**
     * 获取分享范围
     *
     * @param request - GetPermissionShareScopeRequest
     * @returns GetPermissionShareScopeResponse
     */
    async getPermissionShareScope(dentryUuid, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetPermissionShareScopeHeaders({});
        return await this.getPermissionShareScopeWithOptions(dentryUuid, request, headers, runtime);
    }
    /**
     * 查询操作日志
     *
     * @param request - ListOperationLogsRequest
     * @param headers - ListOperationLogsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListOperationLogsResponse
     */
    async listOperationLogsWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.endTime)) {
            body["endTime"] = request.endTime;
        }
        if (!tea_util_1.default.isUnset(request.option)) {
            body["option"] = request.option;
        }
        if (!tea_util_1.default.isUnset(request.startTime)) {
            body["startTime"] = request.startTime;
        }
        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: "ListOperationLogs",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/managements/operationLogs/list`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListOperationLogsResponse({}));
    }
    /**
     * 查询操作日志
     *
     * @param request - ListOperationLogsRequest
     * @returns ListOperationLogsResponse
     */
    async listOperationLogs(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListOperationLogsHeaders({});
        return await this.listOperationLogsWithOptions(request, headers, runtime);
    }
    /**
     * 获取权限列表
     *
     * @param request - ListPermissionsRequest
     * @param headers - ListPermissionsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListPermissionsResponse
     */
    async listPermissionsWithOptions(dentryUuid, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.unionId)) {
            query["unionId"] = request.unionId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.option)) {
            body["option"] = request.option;
        }
        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),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "ListPermissions",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/spaces/dentries/${dentryUuid}/permissions/query`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListPermissionsResponse({}));
    }
    /**
     * 获取权限列表
     *
     * @param request - ListPermissionsRequest
     * @returns ListPermissionsResponse
     */
    async listPermissions(dentryUuid, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListPermissionsHeaders({});
        return await this.listPermissionsWithOptions(dentryUuid, request, headers, runtime);
    }
    /**
     * 查询员工离职时空间默认转交人(管理员)
     *
     * @param request - ManagerGetDefaultHandOverUserRequest
     * @param headers - ManagerGetDefaultHandOverUserHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ManagerGetDefaultHandOverUserResponse
     */
    async managerGetDefaultHandOverUserWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        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: "ManagerGetDefaultHandOverUser",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/managementSettings/defaultHandOverUsers`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ManagerGetDefaultHandOverUserResponse({}));
    }
    /**
     * 查询员工离职时空间默认转交人(管理员)
     *
     * @param request - ManagerGetDefaultHandOverUserRequest
     * @returns ManagerGetDefaultHandOverUserResponse
     */
    async managerGetDefaultHandOverUser(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ManagerGetDefaultHandOverUserHeaders({});
        return await this.managerGetDefaultHandOverUserWithOptions(request, headers, runtime);
    }
    /**
     * 设置员工离职时空间默认转交人(管理员)
     *
     * @param request - ManagerSetDefaultHandOverUserRequest
     * @param headers - ManagerSetDefaultHandOverUserHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ManagerSetDefaultHandOverUserResponse
     */
    async managerSetDefaultHandOverUserWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.defaultHandoverUserId)) {
            body["defaultHandoverUserId"] = request.defaultHandoverUserId;
        }
        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),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "ManagerSetDefaultHandOverUser",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/managementSettings/defaultHandOverUsers/set`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ManagerSetDefaultHandOverUserResponse({}));
    }
    /**
     * 设置员工离职时空间默认转交人(管理员)
     *
     * @param request - ManagerSetDefaultHandOverUserRequest
     * @returns ManagerSetDefaultHandOverUserResponse
     */
    async managerSetDefaultHandOverUser(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ManagerSetDefaultHandOverUserHeaders({});
        return await this.managerSetDefaultHandOverUserWithOptions(request, headers, runtime);
    }
    /**
     * 搜索文件
     *
     * @param request - SearchDentriesRequest
     * @param headers - SearchDentriesHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns SearchDentriesResponse
     */
    async searchDentriesWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.keyword)) {
            body["keyword"] = request.keyword;
        }
        if (!tea_util_1.default.isUnset(request.option)) {
            body["option"] = request.option;
        }
        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),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "SearchDentries",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/dentries/search`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new SearchDentriesResponse({}));
    }
    /**
     * 搜索文件
     *
     * @param request - SearchDentriesRequest
     * @returns SearchDentriesResponse
     */
    async searchDentries(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new SearchDentriesHeaders({});
        return await this.searchDentriesWithOptions(request, headers, runtime);
    }
    /**
     * 搜索公开发布文件
     *
     * @param request - SearchPublishDentriesRequest
     * @param headers - SearchPublishDentriesHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns SearchPublishDentriesResponse
     */
    async searchPublishDentriesWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.keyword)) {
            body["keyword"] = request.keyword;
        }
        if (!tea_util_1.default.isUnset(request.option)) {
            body["option"] = request.option;
        }
        if (!tea_util_1.default.isUnset(request.workspaceId)) {
            body["workspaceId"] = request.workspaceId;
        }
        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),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "SearchPublishDentries",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/publishDentries/search`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new SearchPublishDentriesResponse({}));
    }
    /**
     * 搜索公开发布文件
     *
     * @param request - SearchPublishDentriesRequest
     * @returns SearchPublishDentriesResponse
     */
    async searchPublishDentries(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new SearchPublishDentriesHeaders({});
        return await this.searchPublishDentriesWithOptions(request, headers, runtime);
    }
    /**
     * 搜索知识库
     *
     * @param request - SearchWorkspacesRequest
     * @param headers - SearchWorkspacesHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns SearchWorkspacesResponse
     */
    async searchWorkspacesWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.keyword)) {
            body["keyword"] = request.keyword;
        }
        if (!tea_util_1.default.isUnset(request.option)) {
            body["option"] = request.option;
        }
        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),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "SearchWorkspaces",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/workspaces/search`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new SearchWorkspacesResponse({}));
    }
    /**
     * 搜索知识库
     *
     * @param request - SearchWorkspacesRequest
     * @returns SearchWorkspacesResponse
     */
    async searchWorkspaces(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new SearchWorkspacesHeaders({});
        return await this.searchWorkspacesWithOptions(request, headers, runtime);
    }
    /**
     * 设置权限继承模式
     *
     * @param request - SetPermissionInheritanceRequest
     * @param headers - SetPermissionInheritanceHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns SetPermissionInheritanceResponse
     */
    async setPermissionInheritanceWithOptions(dentryUuid, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.unionId)) {
            query["unionId"] = request.unionId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.inheritance)) {
            body["inheritance"] = request.inheritance;
        }
        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),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "SetPermissionInheritance",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/spaces/dentries/${dentryUuid}/permissions/inheritances`,
            method: "PUT",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new SetPermissionInheritanceResponse({}));
    }
    /**
     * 设置权限继承模式
     *
     * @param request - SetPermissionInheritanceRequest
     * @returns SetPermissionInheritanceResponse
     */
    async setPermissionInheritance(dentryUuid, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new SetPermissionInheritanceHeaders({});
        return await this.setPermissionInheritanceWithOptions(dentryUuid, request, headers, runtime);
    }
    /**
     * 设置分享范围
     *
     * @param request - SetPermissionShareScopeRequest
     * @param headers - SetPermissionShareScopeHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns SetPermissionShareScopeResponse
     */
    async setPermissionShareScopeWithOptions(dentryUuid, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.unionId)) {
            query["unionId"] = request.unionId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.option)) {
            body["option"] = request.option;
        }
        if (!tea_util_1.default.isUnset(request.scope)) {
            body["scope"] = request.scope;
        }
        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),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "SetPermissionShareScope",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/spaces/dentries/${dentryUuid}/permissions/scopes`,
            method: "PUT",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new SetPermissionShareScopeResponse({}));
    }
    /**
     * 设置分享范围
     *
     * @param request - SetPermissionShareScopeRequest
     * @returns SetPermissionShareScopeResponse
     */
    async setPermissionShareScope(dentryUuid, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new SetPermissionShareScopeHeaders({});
        return await this.setPermissionShareScopeWithOptions(dentryUuid, request, headers, runtime);
    }
    /**
     * 修改权限
     *
     * @param request - UpdatePermissionRequest
     * @param headers - UpdatePermissionHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns UpdatePermissionResponse
     */
    async updatePermissionWithOptions(dentryUuid, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.unionId)) {
            query["unionId"] = request.unionId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.members)) {
            body["members"] = request.members;
        }
        if (!tea_util_1.default.isUnset(request.option)) {
            body["option"] = request.option;
        }
        if (!tea_util_1.default.isUnset(request.roleId)) {
            body["roleId"] = request.roleId;
        }
        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),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "UpdatePermission",
            version: "storage_2.0",
            protocol: "HTTP",
            pathname: `/v2.0/storage/spaces/dentries/${dentryUuid}/permissions`,
            method: "PUT",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new UpdatePermissionResponse({}));
    }
    /**
     * 修改权限
     *
     * @param request - UpdatePermissionRequest
     * @returns UpdatePermissionResponse
     */
    async updatePermission(dentryUuid, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new UpdatePermissionHeaders({});
        return await this.updatePermissionWithOptions(dentryUuid, request, headers, runtime);
    }
}
exports.default = Client;
//# sourceMappingURL=client.js.map