"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.GetTaskFromShanhuiDocResponseBodyResult = exports.GetTaskFromShanhuiDocResponseBodyResultItems = exports.GetTaskFromShanhuiDocResponseBodyResultItemsExecutorList = exports.GetShanhuiByShanhuiKeyResponseBodyResult = exports.GetShanhuiByShanhuiKeyResponseBodyResultTopics = exports.GetShanhuiByCalendarResponseBodyResult = exports.GetShanhuiByCalendarResponseBodyResultTopics = exports.GetTaskFromShanhuiDocResponse = exports.GetTaskFromShanhuiDocResponseBody = exports.GetTaskFromShanhuiDocRequest = exports.GetTaskFromShanhuiDocHeaders = exports.GetShanhuiByShanhuiKeyResponse = exports.GetShanhuiByShanhuiKeyResponseBody = exports.GetShanhuiByShanhuiKeyHeaders = exports.GetShanhuiByCalendarResponse = exports.GetShanhuiByCalendarResponseBody = exports.GetShanhuiByCalendarRequest = exports.GetShanhuiByCalendarHeaders = exports.ExportShanhuiToDocResponse = exports.ExportShanhuiToDocResponseBody = exports.ExportShanhuiToDocRequest = exports.ExportShanhuiToDocHeaders = exports.CreateFlashMeetingResponse = exports.CreateFlashMeetingResponseBody = exports.CreateFlashMeetingRequest = exports.CreateFlashMeetingHeaders = 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 CreateFlashMeetingHeaders 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.CreateFlashMeetingHeaders = CreateFlashMeetingHeaders;
class CreateFlashMeetingRequest extends $tea.Model {
    static names() {
        return {
            creator: 'creator',
            eventId: 'eventId',
            title: 'title',
        };
    }
    static types() {
        return {
            creator: 'string',
            eventId: 'string',
            title: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFlashMeetingRequest = CreateFlashMeetingRequest;
class CreateFlashMeetingResponseBody extends $tea.Model {
    static names() {
        return {
            endTime: 'endTime',
            flashMeetingKey: 'flashMeetingKey',
            startTime: 'startTime',
            title: 'title',
            url: 'url',
        };
    }
    static types() {
        return {
            endTime: 'number',
            flashMeetingKey: 'string',
            startTime: 'number',
            title: 'string',
            url: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFlashMeetingResponseBody = CreateFlashMeetingResponseBody;
class CreateFlashMeetingResponse 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: CreateFlashMeetingResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFlashMeetingResponse = CreateFlashMeetingResponse;
class ExportShanhuiToDocHeaders 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.ExportShanhuiToDocHeaders = ExportShanhuiToDocHeaders;
class ExportShanhuiToDocRequest extends $tea.Model {
    static names() {
        return {
            contentEnums: 'contentEnums',
            parentNodeKey: 'parentNodeKey',
            shanhuiKey: 'shanhuiKey',
            userId: 'userId',
            workspaceKey: 'workspaceKey',
        };
    }
    static types() {
        return {
            contentEnums: { 'type': 'array', 'itemType': 'string' },
            parentNodeKey: 'string',
            shanhuiKey: 'string',
            userId: 'string',
            workspaceKey: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ExportShanhuiToDocRequest = ExportShanhuiToDocRequest;
class ExportShanhuiToDocResponseBody extends $tea.Model {
    static names() {
        return {
            result: 'result',
            success: 'success',
        };
    }
    static types() {
        return {
            result: 'string',
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ExportShanhuiToDocResponseBody = ExportShanhuiToDocResponseBody;
class ExportShanhuiToDocResponse 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: ExportShanhuiToDocResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ExportShanhuiToDocResponse = ExportShanhuiToDocResponse;
class GetShanhuiByCalendarHeaders 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.GetShanhuiByCalendarHeaders = GetShanhuiByCalendarHeaders;
class GetShanhuiByCalendarRequest extends $tea.Model {
    static names() {
        return {
            eventId: 'eventId',
            userId: 'userId',
        };
    }
    static types() {
        return {
            eventId: 'string',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetShanhuiByCalendarRequest = GetShanhuiByCalendarRequest;
class GetShanhuiByCalendarResponseBody extends $tea.Model {
    static names() {
        return {
            result: 'result',
            success: 'success',
        };
    }
    static types() {
        return {
            result: GetShanhuiByCalendarResponseBodyResult,
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetShanhuiByCalendarResponseBody = GetShanhuiByCalendarResponseBody;
class GetShanhuiByCalendarResponse 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: GetShanhuiByCalendarResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetShanhuiByCalendarResponse = GetShanhuiByCalendarResponse;
class GetShanhuiByShanhuiKeyHeaders 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.GetShanhuiByShanhuiKeyHeaders = GetShanhuiByShanhuiKeyHeaders;
class GetShanhuiByShanhuiKeyResponseBody extends $tea.Model {
    static names() {
        return {
            result: 'result',
            success: 'success',
        };
    }
    static types() {
        return {
            result: GetShanhuiByShanhuiKeyResponseBodyResult,
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetShanhuiByShanhuiKeyResponseBody = GetShanhuiByShanhuiKeyResponseBody;
class GetShanhuiByShanhuiKeyResponse 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: GetShanhuiByShanhuiKeyResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetShanhuiByShanhuiKeyResponse = GetShanhuiByShanhuiKeyResponse;
class GetTaskFromShanhuiDocHeaders 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.GetTaskFromShanhuiDocHeaders = GetTaskFromShanhuiDocHeaders;
class GetTaskFromShanhuiDocRequest extends $tea.Model {
    static names() {
        return {
            docKey: 'docKey',
            maxResults: 'maxResults',
            nextToken: 'nextToken',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            docKey: 'string',
            maxResults: 'number',
            nextToken: 'number',
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetTaskFromShanhuiDocRequest = GetTaskFromShanhuiDocRequest;
class GetTaskFromShanhuiDocResponseBody extends $tea.Model {
    static names() {
        return {
            result: 'result',
            success: 'success',
        };
    }
    static types() {
        return {
            result: GetTaskFromShanhuiDocResponseBodyResult,
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetTaskFromShanhuiDocResponseBody = GetTaskFromShanhuiDocResponseBody;
class GetTaskFromShanhuiDocResponse 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: GetTaskFromShanhuiDocResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetTaskFromShanhuiDocResponse = GetTaskFromShanhuiDocResponse;
class GetShanhuiByCalendarResponseBodyResultTopics extends $tea.Model {
    static names() {
        return {
            docKey: 'docKey',
            title: 'title',
        };
    }
    static types() {
        return {
            docKey: 'string',
            title: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetShanhuiByCalendarResponseBodyResultTopics = GetShanhuiByCalendarResponseBodyResultTopics;
class GetShanhuiByCalendarResponseBodyResult extends $tea.Model {
    static names() {
        return {
            endTime: 'endTime',
            flashmeetingKey: 'flashmeetingKey',
            hasSummary: 'hasSummary',
            startTime: 'startTime',
            summaryDocKey: 'summaryDocKey',
            title: 'title',
            topics: 'topics',
        };
    }
    static types() {
        return {
            endTime: 'number',
            flashmeetingKey: 'string',
            hasSummary: 'boolean',
            startTime: 'number',
            summaryDocKey: 'string',
            title: 'string',
            topics: { 'type': 'array', 'itemType': GetShanhuiByCalendarResponseBodyResultTopics },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetShanhuiByCalendarResponseBodyResult = GetShanhuiByCalendarResponseBodyResult;
class GetShanhuiByShanhuiKeyResponseBodyResultTopics extends $tea.Model {
    static names() {
        return {
            docKey: 'docKey',
            title: 'title',
        };
    }
    static types() {
        return {
            docKey: 'string',
            title: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetShanhuiByShanhuiKeyResponseBodyResultTopics = GetShanhuiByShanhuiKeyResponseBodyResultTopics;
class GetShanhuiByShanhuiKeyResponseBodyResult extends $tea.Model {
    static names() {
        return {
            endTime: 'endTime',
            eventId: 'eventId',
            flashmeetingKey: 'flashmeetingKey',
            hasSummary: 'hasSummary',
            startTime: 'startTime',
            summaryDocKey: 'summaryDocKey',
            title: 'title',
            topics: 'topics',
        };
    }
    static types() {
        return {
            endTime: 'number',
            eventId: 'string',
            flashmeetingKey: 'string',
            hasSummary: 'boolean',
            startTime: 'number',
            summaryDocKey: 'string',
            title: 'string',
            topics: { 'type': 'array', 'itemType': GetShanhuiByShanhuiKeyResponseBodyResultTopics },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetShanhuiByShanhuiKeyResponseBodyResult = GetShanhuiByShanhuiKeyResponseBodyResult;
class GetTaskFromShanhuiDocResponseBodyResultItemsExecutorList extends $tea.Model {
    static names() {
        return {
            executorId: 'executorId',
            statusStage: 'statusStage',
            subTaskKey: 'subTaskKey',
        };
    }
    static types() {
        return {
            executorId: 'string',
            statusStage: 'number',
            subTaskKey: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetTaskFromShanhuiDocResponseBodyResultItemsExecutorList = GetTaskFromShanhuiDocResponseBodyResultItemsExecutorList;
class GetTaskFromShanhuiDocResponseBodyResultItems extends $tea.Model {
    static names() {
        return {
            createTime: 'createTime',
            creatorId: 'creatorId',
            deadline: 'deadline',
            deleted: 'deleted',
            executorList: 'executorList',
            priority: 'priority',
            taskKey: 'taskKey',
            taskStatus: 'taskStatus',
            taskType: 'taskType',
            title: 'title',
            updateTime: 'updateTime',
        };
    }
    static types() {
        return {
            createTime: 'number',
            creatorId: 'string',
            deadline: 'number',
            deleted: 'boolean',
            executorList: { 'type': 'array', 'itemType': GetTaskFromShanhuiDocResponseBodyResultItemsExecutorList },
            priority: 'number',
            taskKey: 'string',
            taskStatus: 'string',
            taskType: 'string',
            title: 'string',
            updateTime: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetTaskFromShanhuiDocResponseBodyResultItems = GetTaskFromShanhuiDocResponseBodyResultItems;
class GetTaskFromShanhuiDocResponseBodyResult extends $tea.Model {
    static names() {
        return {
            hasMore: 'hasMore',
            items: 'items',
            nextToken: 'nextToken',
            total: 'total',
        };
    }
    static types() {
        return {
            hasMore: 'boolean',
            items: { 'type': 'array', 'itemType': GetTaskFromShanhuiDocResponseBodyResultItems },
            nextToken: 'string',
            total: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetTaskFromShanhuiDocResponseBodyResult = GetTaskFromShanhuiDocResponseBodyResult;
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 - CreateFlashMeetingRequest
     * @param headers - CreateFlashMeetingHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns CreateFlashMeetingResponse
     */
    async createFlashMeetingWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.creator)) {
            body["creator"] = request.creator;
        }
        if (!tea_util_1.default.isUnset(request.eventId)) {
            body["eventId"] = request.eventId;
        }
        if (!tea_util_1.default.isUnset(request.title)) {
            body["title"] = request.title;
        }
        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: "CreateFlashMeeting",
            version: "flashmeeting_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/flashmeeting/meetings`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new CreateFlashMeetingResponse({}));
    }
    /**
     * 创建钉闪会并绑定日程
     *
     * @param request - CreateFlashMeetingRequest
     * @returns CreateFlashMeetingResponse
     */
    async createFlashMeeting(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new CreateFlashMeetingHeaders({});
        return await this.createFlashMeetingWithOptions(request, headers, runtime);
    }
    /**
     * 将闪会导出到文档
     *
     * @param request - ExportShanhuiToDocRequest
     * @param headers - ExportShanhuiToDocHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ExportShanhuiToDocResponse
     */
    async exportShanhuiToDocWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.contentEnums)) {
            body["contentEnums"] = request.contentEnums;
        }
        if (!tea_util_1.default.isUnset(request.parentNodeKey)) {
            body["parentNodeKey"] = request.parentNodeKey;
        }
        if (!tea_util_1.default.isUnset(request.shanhuiKey)) {
            body["shanhuiKey"] = request.shanhuiKey;
        }
        if (!tea_util_1.default.isUnset(request.userId)) {
            body["userId"] = request.userId;
        }
        if (!tea_util_1.default.isUnset(request.workspaceKey)) {
            body["workspaceKey"] = request.workspaceKey;
        }
        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: "ExportShanhuiToDoc",
            version: "flashmeeting_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/flashmeeting/meetings/export`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ExportShanhuiToDocResponse({}));
    }
    /**
     * 将闪会导出到文档
     *
     * @param request - ExportShanhuiToDocRequest
     * @returns ExportShanhuiToDocResponse
     */
    async exportShanhuiToDoc(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ExportShanhuiToDocHeaders({});
        return await this.exportShanhuiToDocWithOptions(request, headers, runtime);
    }
    /**
     * 根据日程获取闪会的信息
     *
     * @param request - GetShanhuiByCalendarRequest
     * @param headers - GetShanhuiByCalendarHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetShanhuiByCalendarResponse
     */
    async getShanhuiByCalendarWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.eventId)) {
            query["eventId"] = request.eventId;
        }
        if (!tea_util_1.default.isUnset(request.userId)) {
            query["userId"] = request.userId;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
        });
        let params = new $OpenApi.Params({
            action: "GetShanhuiByCalendar",
            version: "flashmeeting_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/flashmeeting/calendars/meeting`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetShanhuiByCalendarResponse({}));
    }
    /**
     * 根据日程获取闪会的信息
     *
     * @param request - GetShanhuiByCalendarRequest
     * @returns GetShanhuiByCalendarResponse
     */
    async getShanhuiByCalendar(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetShanhuiByCalendarHeaders({});
        return await this.getShanhuiByCalendarWithOptions(request, headers, runtime);
    }
    /**
     * 根据闪会key来闪会的信息，包含关联的日程、会议时间、议题等
     *
     * @param headers - GetShanhuiByShanhuiKeyHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetShanhuiByShanhuiKeyResponse
     */
    async getShanhuiByShanhuiKeyWithOptions(flashmeetingKey, headers, runtime) {
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
        });
        let params = new $OpenApi.Params({
            action: "GetShanhuiByShanhuiKey",
            version: "flashmeeting_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/flashmeeting/meetings/keys/${flashmeetingKey}/infos`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetShanhuiByShanhuiKeyResponse({}));
    }
    /**
     * 根据闪会key来闪会的信息，包含关联的日程、会议时间、议题等
     * @returns GetShanhuiByShanhuiKeyResponse
     */
    async getShanhuiByShanhuiKey(flashmeetingKey) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetShanhuiByShanhuiKeyHeaders({});
        return await this.getShanhuiByShanhuiKeyWithOptions(flashmeetingKey, headers, runtime);
    }
    /**
     * 根据闪会文档id获取待办任务
     *
     * @param request - GetTaskFromShanhuiDocRequest
     * @param headers - GetTaskFromShanhuiDocHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetTaskFromShanhuiDocResponse
     */
    async getTaskFromShanhuiDocWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.docKey)) {
            query["docKey"] = request.docKey;
        }
        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.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: "GetTaskFromShanhuiDoc",
            version: "flashmeeting_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/flashmeeting/meetings/tasks`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetTaskFromShanhuiDocResponse({}));
    }
    /**
     * 根据闪会文档id获取待办任务
     *
     * @param request - GetTaskFromShanhuiDocRequest
     * @returns GetTaskFromShanhuiDocResponse
     */
    async getTaskFromShanhuiDoc(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetTaskFromShanhuiDocHeaders({});
        return await this.getTaskFromShanhuiDocWithOptions(request, headers, runtime);
    }
}
exports.default = Client;
//# sourceMappingURL=client.js.map