"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.GetDentryResponseBodyDentryProperties = exports.GetDentryRequestOption = exports.GetDentriesResponseBodyResultItems = exports.GetDentriesResponseBodyResultItemsDentry = exports.GetDentriesResponseBodyResultItemsDentryThumbnail = exports.GetDentriesResponseBodyResultItemsDentryProperties = exports.GetDentriesRequestOption = exports.UnsubscribeEventResponse = exports.UnsubscribeEventResponseBody = exports.UnsubscribeEventRequest = exports.UnsubscribeEventHeaders = exports.SubscribeEventResponse = exports.SubscribeEventResponseBody = exports.SubscribeEventRequest = exports.SubscribeEventHeaders = exports.ListExpiredResponse = exports.ListExpiredResponseBody = exports.ListExpiredRequest = exports.ListExpiredHeaders = exports.ListDentriesResponse = exports.ListDentriesResponseBody = exports.ListDentriesRequest = exports.ListDentriesHeaders = exports.ListAllDentriesResponse = exports.ListAllDentriesResponseBody = exports.ListAllDentriesRequest = exports.ListAllDentriesHeaders = exports.GetSpaceResponse = exports.GetSpaceResponseBody = exports.GetSpaceRequest = exports.GetSpaceHeaders = exports.GetFileDownloadInfoResponse = exports.GetFileDownloadInfoResponseBody = exports.GetFileDownloadInfoRequest = exports.GetFileDownloadInfoHeaders = exports.GetDentryThumbnailsResponse = exports.GetDentryThumbnailsResponseBody = exports.GetDentryThumbnailsRequest = exports.GetDentryThumbnailsHeaders = exports.GetDentryResponse = exports.GetDentryResponseBody = exports.GetDentryRequest = exports.GetDentryHeaders = exports.GetDentriesResponse = exports.GetDentriesResponseBody = exports.GetDentriesRequest = exports.GetDentriesHeaders = exports.DentriesAppPropertiesValue = exports.DentryAppPropertiesValue = exports.ResultItemsDentryAppPropertiesValue = void 0;
exports.ListExpiredResponseBodyFiles = exports.ListExpiredRequestOption = exports.ListDentriesResponseBodyDentries = exports.ListDentriesResponseBodyDentriesThumbnail = exports.ListDentriesResponseBodyDentriesProperties = exports.ListAllDentriesResponseBodyDentries = exports.ListAllDentriesResponseBodyDentriesThumbnail = exports.ListAllDentriesResponseBodyDentriesProperties = exports.ListAllDentriesRequestOption = exports.GetSpaceResponseBodySpace = exports.GetFileDownloadInfoResponseBodyHeaderSignatureInfo = exports.GetFileDownloadInfoRequestOption = exports.GetDentryThumbnailsResponseBodyResultItems = exports.GetDentryThumbnailsResponseBodyResultItemsThumbnail = exports.GetDentryResponseBodyDentry = exports.GetDentryResponseBodyDentryThumbnail = 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 ResultItemsDentryAppPropertiesValue 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.ResultItemsDentryAppPropertiesValue = ResultItemsDentryAppPropertiesValue;
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 DentriesAppPropertiesValue 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.DentriesAppPropertiesValue = DentriesAppPropertiesValue;
class GetDentriesHeaders 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.GetDentriesHeaders = GetDentriesHeaders;
class GetDentriesRequest extends $tea.Model {
    static names() {
        return {
            dentryIds: 'dentryIds',
            option: 'option',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            dentryIds: { 'type': 'array', 'itemType': 'string' },
            option: GetDentriesRequestOption,
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentriesRequest = GetDentriesRequest;
class GetDentriesResponseBody extends $tea.Model {
    static names() {
        return {
            resultItems: 'resultItems',
        };
    }
    static types() {
        return {
            resultItems: { 'type': 'array', 'itemType': GetDentriesResponseBodyResultItems },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentriesResponseBody = GetDentriesResponseBody;
class GetDentriesResponse 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: GetDentriesResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentriesResponse = GetDentriesResponse;
class GetDentryHeaders 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.GetDentryHeaders = GetDentryHeaders;
class GetDentryRequest extends $tea.Model {
    static names() {
        return {
            option: 'option',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            option: GetDentryRequestOption,
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentryRequest = GetDentryRequest;
class GetDentryResponseBody extends $tea.Model {
    static names() {
        return {
            dentry: 'dentry',
        };
    }
    static types() {
        return {
            dentry: GetDentryResponseBodyDentry,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentryResponseBody = GetDentryResponseBody;
class GetDentryResponse 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: GetDentryResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentryResponse = GetDentryResponse;
class GetDentryThumbnailsHeaders 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.GetDentryThumbnailsHeaders = GetDentryThumbnailsHeaders;
class GetDentryThumbnailsRequest extends $tea.Model {
    static names() {
        return {
            dentryIds: 'dentryIds',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            dentryIds: { 'type': 'array', 'itemType': 'string' },
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentryThumbnailsRequest = GetDentryThumbnailsRequest;
class GetDentryThumbnailsResponseBody extends $tea.Model {
    static names() {
        return {
            resultItems: 'resultItems',
        };
    }
    static types() {
        return {
            resultItems: { 'type': 'array', 'itemType': GetDentryThumbnailsResponseBodyResultItems },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentryThumbnailsResponseBody = GetDentryThumbnailsResponseBody;
class GetDentryThumbnailsResponse 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: GetDentryThumbnailsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentryThumbnailsResponse = GetDentryThumbnailsResponse;
class GetFileDownloadInfoHeaders 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.GetFileDownloadInfoHeaders = GetFileDownloadInfoHeaders;
class GetFileDownloadInfoRequest extends $tea.Model {
    static names() {
        return {
            option: 'option',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            option: GetFileDownloadInfoRequestOption,
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetFileDownloadInfoRequest = GetFileDownloadInfoRequest;
class GetFileDownloadInfoResponseBody extends $tea.Model {
    static names() {
        return {
            headerSignatureInfo: 'headerSignatureInfo',
            protocol: 'protocol',
        };
    }
    static types() {
        return {
            headerSignatureInfo: GetFileDownloadInfoResponseBodyHeaderSignatureInfo,
            protocol: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetFileDownloadInfoResponseBody = GetFileDownloadInfoResponseBody;
class GetFileDownloadInfoResponse 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: GetFileDownloadInfoResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetFileDownloadInfoResponse = GetFileDownloadInfoResponse;
class GetSpaceHeaders 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.GetSpaceHeaders = GetSpaceHeaders;
class GetSpaceRequest extends $tea.Model {
    static names() {
        return {
            openConversationId: 'openConversationId',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            openConversationId: 'string',
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSpaceRequest = GetSpaceRequest;
class GetSpaceResponseBody extends $tea.Model {
    static names() {
        return {
            space: 'space',
        };
    }
    static types() {
        return {
            space: GetSpaceResponseBodySpace,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSpaceResponseBody = GetSpaceResponseBody;
class GetSpaceResponse 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: GetSpaceResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSpaceResponse = GetSpaceResponse;
class ListAllDentriesHeaders 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.ListAllDentriesHeaders = ListAllDentriesHeaders;
class ListAllDentriesRequest extends $tea.Model {
    static names() {
        return {
            option: 'option',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            option: ListAllDentriesRequestOption,
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListAllDentriesRequest = ListAllDentriesRequest;
class ListAllDentriesResponseBody extends $tea.Model {
    static names() {
        return {
            dentries: 'dentries',
            nextToken: 'nextToken',
        };
    }
    static types() {
        return {
            dentries: { 'type': 'array', 'itemType': ListAllDentriesResponseBodyDentries },
            nextToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListAllDentriesResponseBody = ListAllDentriesResponseBody;
class ListAllDentriesResponse 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: ListAllDentriesResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListAllDentriesResponse = ListAllDentriesResponse;
class ListDentriesHeaders 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.ListDentriesHeaders = ListDentriesHeaders;
class ListDentriesRequest extends $tea.Model {
    static names() {
        return {
            maxResults: 'maxResults',
            nextToken: 'nextToken',
            order: 'order',
            orderBy: 'orderBy',
            parentId: 'parentId',
            unionId: 'unionId',
            withThumbnail: 'withThumbnail',
        };
    }
    static types() {
        return {
            maxResults: 'number',
            nextToken: 'string',
            order: 'string',
            orderBy: 'string',
            parentId: 'string',
            unionId: 'string',
            withThumbnail: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDentriesRequest = ListDentriesRequest;
class ListDentriesResponseBody extends $tea.Model {
    static names() {
        return {
            dentries: 'dentries',
            nextToken: 'nextToken',
        };
    }
    static types() {
        return {
            dentries: { 'type': 'array', 'itemType': ListDentriesResponseBodyDentries },
            nextToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDentriesResponseBody = ListDentriesResponseBody;
class ListDentriesResponse 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: ListDentriesResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDentriesResponse = ListDentriesResponse;
class ListExpiredHeaders 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.ListExpiredHeaders = ListExpiredHeaders;
class ListExpiredRequest extends $tea.Model {
    static names() {
        return {
            openConversationId: 'openConversationId',
            option: 'option',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            openConversationId: 'string',
            option: ListExpiredRequestOption,
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListExpiredRequest = ListExpiredRequest;
class ListExpiredResponseBody extends $tea.Model {
    static names() {
        return {
            files: 'files',
            nextToken: 'nextToken',
        };
    }
    static types() {
        return {
            files: { 'type': 'array', 'itemType': ListExpiredResponseBodyFiles },
            nextToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListExpiredResponseBody = ListExpiredResponseBody;
class ListExpiredResponse 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: ListExpiredResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListExpiredResponse = ListExpiredResponse;
class SubscribeEventHeaders 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.SubscribeEventHeaders = SubscribeEventHeaders;
class SubscribeEventRequest extends $tea.Model {
    static names() {
        return {
            scope: 'scope',
            scopeId: 'scopeId',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            scope: 'string',
            scopeId: 'string',
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SubscribeEventRequest = SubscribeEventRequest;
class SubscribeEventResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SubscribeEventResponseBody = SubscribeEventResponseBody;
class SubscribeEventResponse 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: SubscribeEventResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SubscribeEventResponse = SubscribeEventResponse;
class UnsubscribeEventHeaders 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.UnsubscribeEventHeaders = UnsubscribeEventHeaders;
class UnsubscribeEventRequest extends $tea.Model {
    static names() {
        return {
            scope: 'scope',
            scopeId: 'scopeId',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            scope: 'string',
            scopeId: 'string',
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UnsubscribeEventRequest = UnsubscribeEventRequest;
class UnsubscribeEventResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UnsubscribeEventResponseBody = UnsubscribeEventResponseBody;
class UnsubscribeEventResponse 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: UnsubscribeEventResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UnsubscribeEventResponse = UnsubscribeEventResponse;
class GetDentriesRequestOption extends $tea.Model {
    static names() {
        return {
            appIdsForAppProperties: 'appIdsForAppProperties',
        };
    }
    static types() {
        return {
            appIdsForAppProperties: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentriesRequestOption = GetDentriesRequestOption;
class GetDentriesResponseBodyResultItemsDentryProperties extends $tea.Model {
    static names() {
        return {
            readOnly: 'readOnly',
        };
    }
    static types() {
        return {
            readOnly: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentriesResponseBodyResultItemsDentryProperties = GetDentriesResponseBodyResultItemsDentryProperties;
class GetDentriesResponseBodyResultItemsDentryThumbnail 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.GetDentriesResponseBodyResultItemsDentryThumbnail = GetDentriesResponseBodyResultItemsDentryThumbnail;
class GetDentriesResponseBodyResultItemsDentry extends $tea.Model {
    static names() {
        return {
            appProperties: 'appProperties',
            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': ResultItemsDentryAppPropertiesValue } },
            createTime: 'string',
            creatorId: 'string',
            extension: 'string',
            id: 'string',
            modifiedTime: 'string',
            modifierId: 'string',
            name: 'string',
            parentId: 'string',
            partitionType: 'string',
            path: 'string',
            properties: GetDentriesResponseBodyResultItemsDentryProperties,
            size: 'number',
            spaceId: 'string',
            status: 'string',
            storageDriver: 'string',
            thumbnail: GetDentriesResponseBodyResultItemsDentryThumbnail,
            type: 'string',
            uuid: 'string',
            version: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentriesResponseBodyResultItemsDentry = GetDentriesResponseBodyResultItemsDentry;
class GetDentriesResponseBodyResultItems extends $tea.Model {
    static names() {
        return {
            dentry: 'dentry',
            dentryId: 'dentryId',
            errorCode: 'errorCode',
            spaceId: 'spaceId',
            success: 'success',
        };
    }
    static types() {
        return {
            dentry: GetDentriesResponseBodyResultItemsDentry,
            dentryId: 'string',
            errorCode: 'string',
            spaceId: 'string',
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentriesResponseBodyResultItems = GetDentriesResponseBodyResultItems;
class GetDentryRequestOption extends $tea.Model {
    static names() {
        return {
            appIdsForAppProperties: 'appIdsForAppProperties',
            withThumbnail: 'withThumbnail',
        };
    }
    static types() {
        return {
            appIdsForAppProperties: { 'type': 'array', 'itemType': 'string' },
            withThumbnail: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentryRequestOption = GetDentryRequestOption;
class GetDentryResponseBodyDentryProperties extends $tea.Model {
    static names() {
        return {
            readOnly: 'readOnly',
        };
    }
    static types() {
        return {
            readOnly: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentryResponseBodyDentryProperties = GetDentryResponseBodyDentryProperties;
class GetDentryResponseBodyDentryThumbnail 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.GetDentryResponseBodyDentryThumbnail = GetDentryResponseBodyDentryThumbnail;
class GetDentryResponseBodyDentry extends $tea.Model {
    static names() {
        return {
            appProperties: 'appProperties',
            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 } },
            createTime: 'string',
            creatorId: 'string',
            extension: 'string',
            id: 'string',
            modifiedTime: 'string',
            modifierId: 'string',
            name: 'string',
            parentId: 'string',
            partitionType: 'string',
            path: 'string',
            properties: GetDentryResponseBodyDentryProperties,
            size: 'number',
            spaceId: 'string',
            status: 'string',
            storageDriver: 'string',
            thumbnail: GetDentryResponseBodyDentryThumbnail,
            type: 'string',
            uuid: 'string',
            version: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentryResponseBodyDentry = GetDentryResponseBodyDentry;
class GetDentryThumbnailsResponseBodyResultItemsThumbnail 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.GetDentryThumbnailsResponseBodyResultItemsThumbnail = GetDentryThumbnailsResponseBodyResultItemsThumbnail;
class GetDentryThumbnailsResponseBodyResultItems extends $tea.Model {
    static names() {
        return {
            dentryId: 'dentryId',
            errorCode: 'errorCode',
            spaceId: 'spaceId',
            success: 'success',
            thumbnail: 'thumbnail',
        };
    }
    static types() {
        return {
            dentryId: 'string',
            errorCode: 'string',
            spaceId: 'string',
            success: 'boolean',
            thumbnail: GetDentryThumbnailsResponseBodyResultItemsThumbnail,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetDentryThumbnailsResponseBodyResultItems = GetDentryThumbnailsResponseBodyResultItems;
class GetFileDownloadInfoRequestOption extends $tea.Model {
    static names() {
        return {
            preferIntranet: 'preferIntranet',
            version: 'version',
        };
    }
    static types() {
        return {
            preferIntranet: 'boolean',
            version: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetFileDownloadInfoRequestOption = GetFileDownloadInfoRequestOption;
class GetFileDownloadInfoResponseBodyHeaderSignatureInfo 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.GetFileDownloadInfoResponseBodyHeaderSignatureInfo = GetFileDownloadInfoResponseBodyHeaderSignatureInfo;
class GetSpaceResponseBodySpace extends $tea.Model {
    static names() {
        return {
            corpId: 'corpId',
            createTime: 'createTime',
            modifiedTime: 'modifiedTime',
            spaceId: 'spaceId',
        };
    }
    static types() {
        return {
            corpId: 'string',
            createTime: 'string',
            modifiedTime: 'string',
            spaceId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSpaceResponseBodySpace = GetSpaceResponseBodySpace;
class ListAllDentriesRequestOption extends $tea.Model {
    static names() {
        return {
            maxResults: 'maxResults',
            nextToken: 'nextToken',
            order: 'order',
            withThumbnail: 'withThumbnail',
        };
    }
    static types() {
        return {
            maxResults: 'number',
            nextToken: 'string',
            order: 'string',
            withThumbnail: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListAllDentriesRequestOption = ListAllDentriesRequestOption;
class ListAllDentriesResponseBodyDentriesProperties extends $tea.Model {
    static names() {
        return {
            readOnly: 'readOnly',
        };
    }
    static types() {
        return {
            readOnly: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListAllDentriesResponseBodyDentriesProperties = ListAllDentriesResponseBodyDentriesProperties;
class ListAllDentriesResponseBodyDentriesThumbnail 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.ListAllDentriesResponseBodyDentriesThumbnail = ListAllDentriesResponseBodyDentriesThumbnail;
class ListAllDentriesResponseBodyDentries extends $tea.Model {
    static names() {
        return {
            appProperties: 'appProperties',
            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': DentriesAppPropertiesValue } },
            createTime: 'string',
            creatorId: 'string',
            extension: 'string',
            id: 'string',
            modifiedTime: 'string',
            modifierId: 'string',
            name: 'string',
            parentId: 'string',
            partitionType: 'string',
            path: 'string',
            properties: ListAllDentriesResponseBodyDentriesProperties,
            size: 'number',
            spaceId: 'string',
            status: 'string',
            storageDriver: 'string',
            thumbnail: ListAllDentriesResponseBodyDentriesThumbnail,
            type: 'string',
            uuid: 'string',
            version: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListAllDentriesResponseBodyDentries = ListAllDentriesResponseBodyDentries;
class ListDentriesResponseBodyDentriesProperties extends $tea.Model {
    static names() {
        return {
            readOnly: 'readOnly',
        };
    }
    static types() {
        return {
            readOnly: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDentriesResponseBodyDentriesProperties = ListDentriesResponseBodyDentriesProperties;
class ListDentriesResponseBodyDentriesThumbnail 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.ListDentriesResponseBodyDentriesThumbnail = ListDentriesResponseBodyDentriesThumbnail;
class ListDentriesResponseBodyDentries extends $tea.Model {
    static names() {
        return {
            appProperties: 'appProperties',
            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': DentriesAppPropertiesValue } },
            createTime: 'string',
            creatorId: 'string',
            extension: 'string',
            id: 'string',
            modifiedTime: 'string',
            modifierId: 'string',
            name: 'string',
            parentId: 'string',
            partitionType: 'string',
            path: 'string',
            properties: ListDentriesResponseBodyDentriesProperties,
            size: 'number',
            spaceId: 'string',
            status: 'string',
            storageDriver: 'string',
            thumbnail: ListDentriesResponseBodyDentriesThumbnail,
            type: 'string',
            uuid: 'string',
            version: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListDentriesResponseBodyDentries = ListDentriesResponseBodyDentries;
class ListExpiredRequestOption extends $tea.Model {
    static names() {
        return {
            maxResults: 'maxResults',
            nextToken: 'nextToken',
        };
    }
    static types() {
        return {
            maxResults: 'number',
            nextToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListExpiredRequestOption = ListExpiredRequestOption;
class ListExpiredResponseBodyFiles extends $tea.Model {
    static names() {
        return {
            conversationId: 'conversationId',
            createTime: 'createTime',
            creatorId: 'creatorId',
            extension: 'extension',
            id: 'id',
            modifiedTime: 'modifiedTime',
            modifierId: 'modifierId',
            name: 'name',
            parentId: 'parentId',
            path: 'path',
            size: 'size',
            spaceId: 'spaceId',
            status: 'status',
            type: 'type',
            uuid: 'uuid',
            version: 'version',
        };
    }
    static types() {
        return {
            conversationId: 'string',
            createTime: 'string',
            creatorId: 'string',
            extension: 'string',
            id: 'string',
            modifiedTime: 'string',
            modifierId: 'string',
            name: 'string',
            parentId: 'string',
            path: 'string',
            size: 'number',
            spaceId: 'string',
            status: 'string',
            type: 'string',
            uuid: 'string',
            version: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListExpiredResponseBodyFiles = ListExpiredResponseBodyFiles;
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 - GetDentriesRequest
     * @param headers - GetDentriesHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetDentriesResponse
     */
    async getDentriesWithOptions(spaceId, 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.dentryIds)) {
            body["dentryIds"] = request.dentryIds;
        }
        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: "GetDentries",
            version: "snsStorage_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/snsStorage/spaces/${spaceId}/dentries/batchQuery`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetDentriesResponse({}));
    }
    /**
     * 三方个人应用批量获取文件或文件夹信息
     *
     * @param request - GetDentriesRequest
     * @returns GetDentriesResponse
     */
    async getDentries(spaceId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetDentriesHeaders({});
        return await this.getDentriesWithOptions(spaceId, request, headers, runtime);
    }
    /**
     * 三方个人应用获取文件(夹)信息
     *
     * @param request - GetDentryRequest
     * @param headers - GetDentryHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetDentryResponse
     */
    async getDentryWithOptions(spaceId, dentryId, 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: "GetDentry",
            version: "snsStorage_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/snsStorage/spaces/${spaceId}/dentries/${dentryId}/query`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetDentryResponse({}));
    }
    /**
     * 三方个人应用获取文件(夹)信息
     *
     * @param request - GetDentryRequest
     * @returns GetDentryResponse
     */
    async getDentry(spaceId, dentryId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetDentryHeaders({});
        return await this.getDentryWithOptions(spaceId, dentryId, request, headers, runtime);
    }
    /**
     * 三方个人应用批量获取文件缩略图
     *
     * @param request - GetDentryThumbnailsRequest
     * @param headers - GetDentryThumbnailsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetDentryThumbnailsResponse
     */
    async getDentryThumbnailsWithOptions(spaceId, 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.dentryIds)) {
            body["dentryIds"] = request.dentryIds;
        }
        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: "GetDentryThumbnails",
            version: "snsStorage_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/snsStorage/spaces/${spaceId}/thumbnails/query`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetDentryThumbnailsResponse({}));
    }
    /**
     * 三方个人应用批量获取文件缩略图
     *
     * @param request - GetDentryThumbnailsRequest
     * @returns GetDentryThumbnailsResponse
     */
    async getDentryThumbnails(spaceId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetDentryThumbnailsHeaders({});
        return await this.getDentryThumbnailsWithOptions(spaceId, request, headers, runtime);
    }
    /**
     * 三方个人应用获取文件下载信息
     *
     * @param request - GetFileDownloadInfoRequest
     * @param headers - GetFileDownloadInfoHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetFileDownloadInfoResponse
     */
    async getFileDownloadInfoWithOptions(spaceId, dentryId, 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: "GetFileDownloadInfo",
            version: "snsStorage_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/snsStorage/spaces/${spaceId}/dentries/${dentryId}/downloadInfos/query`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetFileDownloadInfoResponse({}));
    }
    /**
     * 三方个人应用获取文件下载信息
     *
     * @param request - GetFileDownloadInfoRequest
     * @returns GetFileDownloadInfoResponse
     */
    async getFileDownloadInfo(spaceId, dentryId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetFileDownloadInfoHeaders({});
        return await this.getFileDownloadInfoWithOptions(spaceId, dentryId, request, headers, runtime);
    }
    /**
     * 三方个人应用获取IM会话存储空间信息
     *
     * @param request - GetSpaceRequest
     * @param headers - GetSpaceHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetSpaceResponse
     */
    async getSpaceWithOptions(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.openConversationId)) {
            body["openConversationId"] = request.openConversationId;
        }
        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: "GetSpace",
            version: "snsStorage_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/snsStorage/conversations/spaces/query`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetSpaceResponse({}));
    }
    /**
     * 三方个人应用获取IM会话存储空间信息
     *
     * @param request - GetSpaceRequest
     * @returns GetSpaceResponse
     */
    async getSpace(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetSpaceHeaders({});
        return await this.getSpaceWithOptions(request, headers, runtime);
    }
    /**
     * 三方个人应用获取全部文件或文件夹列表
     *
     * @param request - ListAllDentriesRequest
     * @param headers - ListAllDentriesHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListAllDentriesResponse
     */
    async listAllDentriesWithOptions(spaceId, 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: "ListAllDentries",
            version: "snsStorage_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/snsStorage/spaces/${spaceId}/dentries/listAll`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListAllDentriesResponse({}));
    }
    /**
     * 三方个人应用获取全部文件或文件夹列表
     *
     * @param request - ListAllDentriesRequest
     * @returns ListAllDentriesResponse
     */
    async listAllDentries(spaceId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListAllDentriesHeaders({});
        return await this.listAllDentriesWithOptions(spaceId, request, headers, runtime);
    }
    /**
     * 三方个人应用获取文件列表
     *
     * @param request - ListDentriesRequest
     * @param headers - ListDentriesHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListDentriesResponse
     */
    async listDentriesWithOptions(spaceId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.maxResults)) {
            query["maxResults"] = request.maxResults;
        }
        if (!tea_util_1.default.isUnset(request.nextToken)) {
            query["nextToken"] = request.nextToken;
        }
        if (!tea_util_1.default.isUnset(request.order)) {
            query["order"] = request.order;
        }
        if (!tea_util_1.default.isUnset(request.orderBy)) {
            query["orderBy"] = request.orderBy;
        }
        if (!tea_util_1.default.isUnset(request.parentId)) {
            query["parentId"] = request.parentId;
        }
        if (!tea_util_1.default.isUnset(request.unionId)) {
            query["unionId"] = request.unionId;
        }
        if (!tea_util_1.default.isUnset(request.withThumbnail)) {
            query["withThumbnail"] = request.withThumbnail;
        }
        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: "ListDentries",
            version: "snsStorage_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/snsStorage/spaces/${spaceId}/dentries`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListDentriesResponse({}));
    }
    /**
     * 三方个人应用获取文件列表
     *
     * @param request - ListDentriesRequest
     * @returns ListDentriesResponse
     */
    async listDentries(spaceId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListDentriesHeaders({});
        return await this.listDentriesWithOptions(spaceId, request, headers, runtime);
    }
    /**
     * 获取会话过期文件列表
     *
     * @param request - ListExpiredRequest
     * @param headers - ListExpiredHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListExpiredResponse
     */
    async listExpiredWithOptions(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.openConversationId)) {
            body["openConversationId"] = request.openConversationId;
        }
        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: "ListExpired",
            version: "snsStorage_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/snsStorage/conversations/expiredFileLists/query`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListExpiredResponse({}));
    }
    /**
     * 获取会话过期文件列表
     *
     * @param request - ListExpiredRequest
     * @returns ListExpiredResponse
     */
    async listExpired(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListExpiredHeaders({});
        return await this.listExpiredWithOptions(request, headers, runtime);
    }
    /**
     * 三方个人应用订阅文件变更事件
     *
     * @param request - SubscribeEventRequest
     * @param headers - SubscribeEventHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns SubscribeEventResponse
     */
    async subscribeEventWithOptions(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.scope)) {
            body["scope"] = request.scope;
        }
        if (!tea_util_1.default.isUnset(request.scopeId)) {
            body["scopeId"] = request.scopeId;
        }
        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: "SubscribeEvent",
            version: "snsStorage_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/snsStorage/events/subscribe`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new SubscribeEventResponse({}));
    }
    /**
     * 三方个人应用订阅文件变更事件
     *
     * @param request - SubscribeEventRequest
     * @returns SubscribeEventResponse
     */
    async subscribeEvent(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new SubscribeEventHeaders({});
        return await this.subscribeEventWithOptions(request, headers, runtime);
    }
    /**
     * 三方个人应用取消订阅文件变更事件
     *
     * @param request - UnsubscribeEventRequest
     * @param headers - UnsubscribeEventHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns UnsubscribeEventResponse
     */
    async unsubscribeEventWithOptions(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.scope)) {
            body["scope"] = request.scope;
        }
        if (!tea_util_1.default.isUnset(request.scopeId)) {
            body["scopeId"] = request.scopeId;
        }
        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: "UnsubscribeEvent",
            version: "snsStorage_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/snsStorage/events/unsubscribe`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new UnsubscribeEventResponse({}));
    }
    /**
     * 三方个人应用取消订阅文件变更事件
     *
     * @param request - UnsubscribeEventRequest
     * @returns UnsubscribeEventResponse
     */
    async unsubscribeEvent(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new UnsubscribeEventHeaders({});
        return await this.unsubscribeEventWithOptions(request, headers, runtime);
    }
}
exports.default = Client;
//# sourceMappingURL=client.js.map