"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.RecallMessageHeaders = exports.ReadMessageResponse = exports.ReadMessageRequest = exports.ReadMessageHeaders = exports.QueryBatchSendResultResponse = exports.QueryBatchSendResultResponseBody = exports.QueryBatchSendResultRequest = exports.QueryBatchSendResultHeaders = exports.ListGroupStaffMembersResponse = exports.ListGroupStaffMembersResponseBody = exports.ListGroupStaffMembersRequest = exports.ListGroupStaffMembersHeaders = exports.GetSpaceFileUrlResponse = exports.GetSpaceFileUrlResponseBody = exports.GetSpaceFileUrlRequest = exports.GetSpaceFileUrlHeaders = exports.GetMediaUrlsResponse = exports.GetMediaUrlsResponseBody = exports.GetMediaUrlsRequest = exports.GetMediaUrlsHeaders = exports.GetMediaUrlResponse = exports.GetMediaUrlResponseBody = exports.GetMediaUrlRequest = exports.GetMediaUrlHeaders = exports.GetConversationIdResponse = exports.GetConversationIdResponseBody = exports.GetConversationIdRequest = exports.GetConversationIdHeaders = exports.DismissGroupResponse = exports.DismissGroupRequest = exports.DismissGroupHeaders = exports.CreateTrustGroupResponse = exports.CreateTrustGroupResponseBody = exports.CreateTrustGroupRequest = exports.CreateTrustGroupHeaders = exports.CreateGroupResponse = exports.CreateGroupResponseBody = exports.CreateGroupRequest = exports.CreateGroupHeaders = exports.BatchSendResponse = exports.BatchSendResponseBody = exports.BatchSendRequest = exports.BatchSendHeaders = exports.AddProfileResponse = exports.AddProfileRequest = exports.AddProfileHeaders = exports.AddGroupMembersResponse = exports.AddGroupMembersResponseBody = exports.AddGroupMembersRequest = exports.AddGroupMembersHeaders = void 0;
exports.QueryBatchSendResultResponseBodyResults = exports.ListGroupStaffMembersResponseBodyMembers = exports.CreateTrustGroupRequestMembers = exports.AddGroupMembersRequestMembers = exports.UploadFileResponse = exports.UploadFileResponseBody = exports.UploadFileRequest = exports.UploadFileHeaders = exports.UpdateGroupOwnerResponse = exports.UpdateGroupOwnerResponseBody = exports.UpdateGroupOwnerRequest = exports.UpdateGroupOwnerHeaders = exports.UpdateGroupNameResponse = exports.UpdateGroupNameRequest = exports.UpdateGroupNameHeaders = exports.SendRobotMessageResponse = exports.SendRobotMessageResponseBody = exports.SendRobotMessageRequest = exports.SendRobotMessageHeaders = exports.SendMessageResponse = exports.SendMessageResponseBody = exports.SendMessageRequest = exports.SendMessageHeaders = exports.RemoveGroupMembersResponse = exports.RemoveGroupMembersRequest = exports.RemoveGroupMembersHeaders = exports.RecallMessageResponse = exports.RecallMessageRequest = 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 AddGroupMembersHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            operationSource: 'operationSource',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            operationSource: 'string',
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddGroupMembersHeaders = AddGroupMembersHeaders;
class AddGroupMembersRequest extends $tea.Model {
    static names() {
        return {
            conversationId: 'conversationId',
            members: 'members',
            operatorUid: 'operatorUid',
        };
    }
    static types() {
        return {
            conversationId: 'string',
            members: { 'type': 'array', 'itemType': AddGroupMembersRequestMembers },
            operatorUid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddGroupMembersRequest = AddGroupMembersRequest;
class AddGroupMembersResponseBody extends $tea.Model {
    static names() {
        return {
            memberUids: 'memberUids',
        };
    }
    static types() {
        return {
            memberUids: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddGroupMembersResponseBody = AddGroupMembersResponseBody;
class AddGroupMembersResponse 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: AddGroupMembersResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddGroupMembersResponse = AddGroupMembersResponse;
class AddProfileHeaders 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.AddProfileHeaders = AddProfileHeaders;
class AddProfileRequest extends $tea.Model {
    static names() {
        return {
            appUid: 'appUid',
            avatarMediaId: 'avatarMediaId',
            mobileNumber: 'mobileNumber',
            nick: 'nick',
        };
    }
    static types() {
        return {
            appUid: 'string',
            avatarMediaId: 'string',
            mobileNumber: 'string',
            nick: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddProfileRequest = AddProfileRequest;
class AddProfileResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddProfileResponse = AddProfileResponse;
class BatchSendHeaders 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.BatchSendHeaders = BatchSendHeaders;
class BatchSendRequest extends $tea.Model {
    static names() {
        return {
            appUids: 'appUids',
            content: 'content',
            conversationIds: 'conversationIds',
            userId: 'userId',
        };
    }
    static types() {
        return {
            appUids: { 'type': 'array', 'itemType': 'string' },
            content: 'string',
            conversationIds: { 'type': 'array', 'itemType': 'string' },
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchSendRequest = BatchSendRequest;
class BatchSendResponseBody extends $tea.Model {
    static names() {
        return {
            taskId: 'taskId',
        };
    }
    static types() {
        return {
            taskId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchSendResponseBody = BatchSendResponseBody;
class BatchSendResponse 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: BatchSendResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchSendResponse = BatchSendResponse;
class CreateGroupHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            operationSource: 'operationSource',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            operationSource: 'string',
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateGroupHeaders = CreateGroupHeaders;
class CreateGroupRequest extends $tea.Model {
    static names() {
        return {
            channel: 'channel',
            creatorUid: 'creatorUid',
            iconMediaId: 'iconMediaId',
            name: 'name',
            properties: 'properties',
            uuid: 'uuid',
        };
    }
    static types() {
        return {
            channel: 'string',
            creatorUid: 'string',
            iconMediaId: 'string',
            name: 'string',
            properties: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            uuid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateGroupRequest = CreateGroupRequest;
class CreateGroupResponseBody extends $tea.Model {
    static names() {
        return {
            chatId: 'chatId',
            conversationId: 'conversationId',
            createTime: 'createTime',
        };
    }
    static types() {
        return {
            chatId: 'string',
            conversationId: 'string',
            createTime: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateGroupResponseBody = CreateGroupResponseBody;
class CreateGroupResponse 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: CreateGroupResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateGroupResponse = CreateGroupResponse;
class CreateTrustGroupHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            operationSource: 'operationSource',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            operationSource: 'string',
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateTrustGroupHeaders = CreateTrustGroupHeaders;
class CreateTrustGroupRequest extends $tea.Model {
    static names() {
        return {
            channel: 'channel',
            iconMediaId: 'iconMediaId',
            members: 'members',
            name: 'name',
            properties: 'properties',
            systemMsg: 'systemMsg',
            uuid: 'uuid',
        };
    }
    static types() {
        return {
            channel: 'string',
            iconMediaId: 'string',
            members: { 'type': 'array', 'itemType': CreateTrustGroupRequestMembers },
            name: 'string',
            properties: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            systemMsg: 'string',
            uuid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateTrustGroupRequest = CreateTrustGroupRequest;
class CreateTrustGroupResponseBody extends $tea.Model {
    static names() {
        return {
            chatId: 'chatId',
            createTime: 'createTime',
            openConversationId: 'openConversationId',
        };
    }
    static types() {
        return {
            chatId: 'string',
            createTime: 'number',
            openConversationId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateTrustGroupResponseBody = CreateTrustGroupResponseBody;
class CreateTrustGroupResponse 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: CreateTrustGroupResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateTrustGroupResponse = CreateTrustGroupResponse;
class DismissGroupHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            operationSource: 'operationSource',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            operationSource: 'string',
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DismissGroupHeaders = DismissGroupHeaders;
class DismissGroupRequest extends $tea.Model {
    static names() {
        return {
            conversationId: 'conversationId',
            operatorUid: 'operatorUid',
        };
    }
    static types() {
        return {
            conversationId: 'string',
            operatorUid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DismissGroupRequest = DismissGroupRequest;
class DismissGroupResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DismissGroupResponse = DismissGroupResponse;
class GetConversationIdHeaders 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.GetConversationIdHeaders = GetConversationIdHeaders;
class GetConversationIdRequest extends $tea.Model {
    static names() {
        return {
            appUid: 'appUid',
            userId: 'userId',
        };
    }
    static types() {
        return {
            appUid: 'string',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetConversationIdRequest = GetConversationIdRequest;
class GetConversationIdResponseBody extends $tea.Model {
    static names() {
        return {
            conversationId: 'conversationId',
        };
    }
    static types() {
        return {
            conversationId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetConversationIdResponseBody = GetConversationIdResponseBody;
class GetConversationIdResponse 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: GetConversationIdResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetConversationIdResponse = GetConversationIdResponse;
class GetMediaUrlHeaders 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.GetMediaUrlHeaders = GetMediaUrlHeaders;
class GetMediaUrlRequest extends $tea.Model {
    static names() {
        return {
            mediaId: 'mediaId',
            urlExpireTime: 'urlExpireTime',
        };
    }
    static types() {
        return {
            mediaId: 'string',
            urlExpireTime: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetMediaUrlRequest = GetMediaUrlRequest;
class GetMediaUrlResponseBody extends $tea.Model {
    static names() {
        return {
            url: 'url',
        };
    }
    static types() {
        return {
            url: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetMediaUrlResponseBody = GetMediaUrlResponseBody;
class GetMediaUrlResponse 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: GetMediaUrlResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetMediaUrlResponse = GetMediaUrlResponse;
class GetMediaUrlsHeaders 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.GetMediaUrlsHeaders = GetMediaUrlsHeaders;
class GetMediaUrlsRequest extends $tea.Model {
    static names() {
        return {
            mediaIds: 'mediaIds',
            urlExpireTime: 'urlExpireTime',
        };
    }
    static types() {
        return {
            mediaIds: { 'type': 'array', 'itemType': 'string' },
            urlExpireTime: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetMediaUrlsRequest = GetMediaUrlsRequest;
class GetMediaUrlsResponseBody extends $tea.Model {
    static names() {
        return {
            urls: 'urls',
        };
    }
    static types() {
        return {
            urls: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetMediaUrlsResponseBody = GetMediaUrlsResponseBody;
class GetMediaUrlsResponse 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: GetMediaUrlsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetMediaUrlsResponse = GetMediaUrlsResponse;
class GetSpaceFileUrlHeaders 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.GetSpaceFileUrlHeaders = GetSpaceFileUrlHeaders;
class GetSpaceFileUrlRequest extends $tea.Model {
    static names() {
        return {
            fileId: 'fileId',
            senderUid: 'senderUid',
            spaceId: 'spaceId',
        };
    }
    static types() {
        return {
            fileId: 'string',
            senderUid: 'string',
            spaceId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSpaceFileUrlRequest = GetSpaceFileUrlRequest;
class GetSpaceFileUrlResponseBody extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            internalResourceUrl: 'internalResourceUrl',
            resourceUrl: 'resourceUrl',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
            internalResourceUrl: 'string',
            resourceUrl: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSpaceFileUrlResponseBody = GetSpaceFileUrlResponseBody;
class GetSpaceFileUrlResponse 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: GetSpaceFileUrlResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSpaceFileUrlResponse = GetSpaceFileUrlResponse;
class ListGroupStaffMembersHeaders 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.ListGroupStaffMembersHeaders = ListGroupStaffMembersHeaders;
class ListGroupStaffMembersRequest extends $tea.Model {
    static names() {
        return {
            conversationId: 'conversationId',
        };
    }
    static types() {
        return {
            conversationId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListGroupStaffMembersRequest = ListGroupStaffMembersRequest;
class ListGroupStaffMembersResponseBody extends $tea.Model {
    static names() {
        return {
            members: 'members',
        };
    }
    static types() {
        return {
            members: { 'type': 'array', 'itemType': ListGroupStaffMembersResponseBodyMembers },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListGroupStaffMembersResponseBody = ListGroupStaffMembersResponseBody;
class ListGroupStaffMembersResponse 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: ListGroupStaffMembersResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListGroupStaffMembersResponse = ListGroupStaffMembersResponse;
class QueryBatchSendResultHeaders 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.QueryBatchSendResultHeaders = QueryBatchSendResultHeaders;
class QueryBatchSendResultRequest extends $tea.Model {
    static names() {
        return {
            senderUserId: 'senderUserId',
            taskId: 'taskId',
        };
    }
    static types() {
        return {
            senderUserId: 'string',
            taskId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryBatchSendResultRequest = QueryBatchSendResultRequest;
class QueryBatchSendResultResponseBody extends $tea.Model {
    static names() {
        return {
            results: 'results',
            status: 'status',
        };
    }
    static types() {
        return {
            results: { 'type': 'array', 'itemType': QueryBatchSendResultResponseBodyResults },
            status: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryBatchSendResultResponseBody = QueryBatchSendResultResponseBody;
class QueryBatchSendResultResponse 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: QueryBatchSendResultResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryBatchSendResultResponse = QueryBatchSendResultResponse;
class ReadMessageHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            operationSource: 'operationSource',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            operationSource: 'string',
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ReadMessageHeaders = ReadMessageHeaders;
class ReadMessageRequest extends $tea.Model {
    static names() {
        return {
            messageId: 'messageId',
            operatorUid: 'operatorUid',
        };
    }
    static types() {
        return {
            messageId: 'string',
            operatorUid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ReadMessageRequest = ReadMessageRequest;
class ReadMessageResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ReadMessageResponse = ReadMessageResponse;
class RecallMessageHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            operationSource: 'operationSource',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            operationSource: 'string',
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RecallMessageHeaders = RecallMessageHeaders;
class RecallMessageRequest extends $tea.Model {
    static names() {
        return {
            messageId: 'messageId',
            operatorUid: 'operatorUid',
            type: 'type',
        };
    }
    static types() {
        return {
            messageId: 'string',
            operatorUid: 'string',
            type: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RecallMessageRequest = RecallMessageRequest;
class RecallMessageResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RecallMessageResponse = RecallMessageResponse;
class RemoveGroupMembersHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            operationSource: 'operationSource',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            operationSource: 'string',
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RemoveGroupMembersHeaders = RemoveGroupMembersHeaders;
class RemoveGroupMembersRequest extends $tea.Model {
    static names() {
        return {
            conversationId: 'conversationId',
            memberUids: 'memberUids',
            operatorUid: 'operatorUid',
        };
    }
    static types() {
        return {
            conversationId: 'string',
            memberUids: { 'type': 'array', 'itemType': 'string' },
            operatorUid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RemoveGroupMembersRequest = RemoveGroupMembersRequest;
class RemoveGroupMembersResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RemoveGroupMembersResponse = RemoveGroupMembersResponse;
class SendMessageHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            operationSource: 'operationSource',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            operationSource: 'string',
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SendMessageHeaders = SendMessageHeaders;
class SendMessageRequest extends $tea.Model {
    static names() {
        return {
            content: 'content',
            conversationId: 'conversationId',
            createTime: 'createTime',
            receiverUid: 'receiverUid',
            senderUid: 'senderUid',
            uuid: 'uuid',
        };
    }
    static types() {
        return {
            content: 'string',
            conversationId: 'string',
            createTime: 'number',
            receiverUid: 'string',
            senderUid: 'string',
            uuid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SendMessageRequest = SendMessageRequest;
class SendMessageResponseBody extends $tea.Model {
    static names() {
        return {
            createTime: 'createTime',
            messageId: 'messageId',
            msgId: 'msgId',
        };
    }
    static types() {
        return {
            createTime: 'number',
            messageId: 'string',
            msgId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SendMessageResponseBody = SendMessageResponseBody;
class SendMessageResponse 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: SendMessageResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SendMessageResponse = SendMessageResponse;
class SendRobotMessageHeaders 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.SendRobotMessageHeaders = SendRobotMessageHeaders;
class SendRobotMessageRequest extends $tea.Model {
    static names() {
        return {
            atAll: 'atAll',
            atAppUids: 'atAppUids',
            atMobiles: 'atMobiles',
            atUnionIds: 'atUnionIds',
            atUsers: 'atUsers',
            channel: 'channel',
            msgMediaIdParamMap: 'msgMediaIdParamMap',
            msgParamMap: 'msgParamMap',
            msgTemplateId: 'msgTemplateId',
            receiverAppUids: 'receiverAppUids',
            receiverMobiles: 'receiverMobiles',
            receiverUnionIds: 'receiverUnionIds',
            receiverUserIds: 'receiverUserIds',
            robotCode: 'robotCode',
            targetOpenConversationId: 'targetOpenConversationId',
        };
    }
    static types() {
        return {
            atAll: 'boolean',
            atAppUids: { 'type': 'array', 'itemType': 'string' },
            atMobiles: { 'type': 'array', 'itemType': 'string' },
            atUnionIds: { 'type': 'array', 'itemType': 'string' },
            atUsers: { 'type': 'array', 'itemType': 'string' },
            channel: 'string',
            msgMediaIdParamMap: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
            msgParamMap: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
            msgTemplateId: 'string',
            receiverAppUids: { 'type': 'array', 'itemType': 'string' },
            receiverMobiles: { 'type': 'array', 'itemType': 'string' },
            receiverUnionIds: { 'type': 'array', 'itemType': 'string' },
            receiverUserIds: { 'type': 'array', 'itemType': 'string' },
            robotCode: 'string',
            targetOpenConversationId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SendRobotMessageRequest = SendRobotMessageRequest;
class SendRobotMessageResponseBody extends $tea.Model {
    static names() {
        return {
            openMsgId: 'openMsgId',
        };
    }
    static types() {
        return {
            openMsgId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SendRobotMessageResponseBody = SendRobotMessageResponseBody;
class SendRobotMessageResponse 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: SendRobotMessageResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.SendRobotMessageResponse = SendRobotMessageResponse;
class UpdateGroupNameHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            operationSource: 'operationSource',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            operationSource: 'string',
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateGroupNameHeaders = UpdateGroupNameHeaders;
class UpdateGroupNameRequest extends $tea.Model {
    static names() {
        return {
            conversationId: 'conversationId',
            name: 'name',
            operatorUid: 'operatorUid',
        };
    }
    static types() {
        return {
            conversationId: 'string',
            name: 'string',
            operatorUid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateGroupNameRequest = UpdateGroupNameRequest;
class UpdateGroupNameResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateGroupNameResponse = UpdateGroupNameResponse;
class UpdateGroupOwnerHeaders 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.UpdateGroupOwnerHeaders = UpdateGroupOwnerHeaders;
class UpdateGroupOwnerRequest extends $tea.Model {
    static names() {
        return {
            conversationId: 'conversationId',
            operatorUid: 'operatorUid',
            ownerUid: 'ownerUid',
        };
    }
    static types() {
        return {
            conversationId: 'string',
            operatorUid: 'string',
            ownerUid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateGroupOwnerRequest = UpdateGroupOwnerRequest;
class UpdateGroupOwnerResponseBody extends $tea.Model {
    static names() {
        return {
            result: 'result',
        };
    }
    static types() {
        return {
            result: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateGroupOwnerResponseBody = UpdateGroupOwnerResponseBody;
class UpdateGroupOwnerResponse 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: UpdateGroupOwnerResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateGroupOwnerResponse = UpdateGroupOwnerResponse;
class UploadFileHeaders 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.UploadFileHeaders = UploadFileHeaders;
class UploadFileRequest extends $tea.Model {
    static names() {
        return {
            fileName: 'fileName',
            fileType: 'fileType',
            fileUrl: 'fileUrl',
            senderUid: 'senderUid',
        };
    }
    static types() {
        return {
            fileName: 'string',
            fileType: 'string',
            fileUrl: 'string',
            senderUid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UploadFileRequest = UploadFileRequest;
class UploadFileResponseBody extends $tea.Model {
    static names() {
        return {
            mediaId: 'mediaId',
        };
    }
    static types() {
        return {
            mediaId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UploadFileResponseBody = UploadFileResponseBody;
class UploadFileResponse 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: UploadFileResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UploadFileResponse = UploadFileResponse;
class AddGroupMembersRequestMembers extends $tea.Model {
    static names() {
        return {
            nick: 'nick',
            uid: 'uid',
        };
    }
    static types() {
        return {
            nick: 'string',
            uid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddGroupMembersRequestMembers = AddGroupMembersRequestMembers;
class CreateTrustGroupRequestMembers extends $tea.Model {
    static names() {
        return {
            nick: 'nick',
            uid: 'uid',
        };
    }
    static types() {
        return {
            nick: 'string',
            uid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateTrustGroupRequestMembers = CreateTrustGroupRequestMembers;
class ListGroupStaffMembersResponseBodyMembers extends $tea.Model {
    static names() {
        return {
            nick: 'nick',
            uid: 'uid',
        };
    }
    static types() {
        return {
            nick: 'string',
            uid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListGroupStaffMembersResponseBodyMembers = ListGroupStaffMembersResponseBodyMembers;
class QueryBatchSendResultResponseBodyResults extends $tea.Model {
    static names() {
        return {
            appUid: 'appUid',
            conversationId: 'conversationId',
            errorCode: 'errorCode',
            errorMessage: 'errorMessage',
            msgId: 'msgId',
        };
    }
    static types() {
        return {
            appUid: 'string',
            conversationId: 'string',
            errorCode: 'string',
            errorMessage: 'string',
            msgId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryBatchSendResultResponseBodyResults = QueryBatchSendResultResponseBodyResults;
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 - AddGroupMembersRequest
     * @param headers - AddGroupMembersHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns AddGroupMembersResponse
     */
    async addGroupMembersWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.conversationId)) {
            body["conversationId"] = request.conversationId;
        }
        if (!tea_util_1.default.isUnset(request.members)) {
            body["members"] = request.members;
        }
        if (!tea_util_1.default.isUnset(request.operatorUid)) {
            body["operatorUid"] = request.operatorUid;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.operationSource)) {
            realHeaders["operationSource"] = tea_util_1.default.toJSONString(headers.operationSource);
        }
        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: "AddGroupMembers",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/groups/members/batchAdd`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new AddGroupMembersResponse({}));
    }
    /**
     * 添加群成员
     *
     * @param request - AddGroupMembersRequest
     * @returns AddGroupMembersResponse
     */
    async addGroupMembers(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new AddGroupMembersHeaders({});
        return await this.addGroupMembersWithOptions(request, headers, runtime);
    }
    /**
     * 外部用户导入profile
     *
     * @param request - AddProfileRequest
     * @param headers - AddProfileHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns AddProfileResponse
     */
    async addProfileWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.appUid)) {
            body["appUid"] = request.appUid;
        }
        if (!tea_util_1.default.isUnset(request.avatarMediaId)) {
            body["avatarMediaId"] = request.avatarMediaId;
        }
        if (!tea_util_1.default.isUnset(request.mobileNumber)) {
            body["mobileNumber"] = request.mobileNumber;
        }
        if (!tea_util_1.default.isUnset(request.nick)) {
            body["nick"] = request.nick;
        }
        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: "AddProfile",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/users/profiles`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "none",
        });
        return $tea.cast(await this.execute(params, req, runtime), new AddProfileResponse({}));
    }
    /**
     * 外部用户导入profile
     *
     * @param request - AddProfileRequest
     * @returns AddProfileResponse
     */
    async addProfile(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new AddProfileHeaders({});
        return await this.addProfileWithOptions(request, headers, runtime);
    }
    /**
     * 消息批量接口
     *
     * @param request - BatchSendRequest
     * @param headers - BatchSendHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns BatchSendResponse
     */
    async batchSendWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.appUids)) {
            body["appUids"] = request.appUids;
        }
        if (!tea_util_1.default.isUnset(request.content)) {
            body["content"] = request.content;
        }
        if (!tea_util_1.default.isUnset(request.conversationIds)) {
            body["conversationIds"] = request.conversationIds;
        }
        if (!tea_util_1.default.isUnset(request.userId)) {
            body["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,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "BatchSend",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/messages/batchSend`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new BatchSendResponse({}));
    }
    /**
     * 消息批量接口
     *
     * @param request - BatchSendRequest
     * @returns BatchSendResponse
     */
    async batchSend(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new BatchSendHeaders({});
        return await this.batchSendWithOptions(request, headers, runtime);
    }
    /**
     * 创建群
     *
     * @param request - CreateGroupRequest
     * @param headers - CreateGroupHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns CreateGroupResponse
     */
    async createGroupWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.channel)) {
            body["channel"] = request.channel;
        }
        if (!tea_util_1.default.isUnset(request.creatorUid)) {
            body["creatorUid"] = request.creatorUid;
        }
        if (!tea_util_1.default.isUnset(request.iconMediaId)) {
            body["iconMediaId"] = request.iconMediaId;
        }
        if (!tea_util_1.default.isUnset(request.name)) {
            body["name"] = request.name;
        }
        if (!tea_util_1.default.isUnset(request.properties)) {
            body["properties"] = request.properties;
        }
        if (!tea_util_1.default.isUnset(request.uuid)) {
            body["uuid"] = request.uuid;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.operationSource)) {
            realHeaders["operationSource"] = tea_util_1.default.toJSONString(headers.operationSource);
        }
        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: "CreateGroup",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/groups`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new CreateGroupResponse({}));
    }
    /**
     * 创建群
     *
     * @param request - CreateGroupRequest
     * @returns CreateGroupResponse
     */
    async createGroup(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new CreateGroupHeaders({});
        return await this.createGroupWithOptions(request, headers, runtime);
    }
    /**
     * 创建托管账号为群主的群
     *
     * @param request - CreateTrustGroupRequest
     * @param headers - CreateTrustGroupHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns CreateTrustGroupResponse
     */
    async createTrustGroupWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.channel)) {
            body["channel"] = request.channel;
        }
        if (!tea_util_1.default.isUnset(request.iconMediaId)) {
            body["iconMediaId"] = request.iconMediaId;
        }
        if (!tea_util_1.default.isUnset(request.members)) {
            body["members"] = request.members;
        }
        if (!tea_util_1.default.isUnset(request.name)) {
            body["name"] = request.name;
        }
        if (!tea_util_1.default.isUnset(request.properties)) {
            body["properties"] = request.properties;
        }
        if (!tea_util_1.default.isUnset(request.systemMsg)) {
            body["systemMsg"] = request.systemMsg;
        }
        if (!tea_util_1.default.isUnset(request.uuid)) {
            body["uuid"] = request.uuid;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.operationSource)) {
            realHeaders["operationSource"] = tea_util_1.default.toJSONString(headers.operationSource);
        }
        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: "CreateTrustGroup",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/groups/trusts`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new CreateTrustGroupResponse({}));
    }
    /**
     * 创建托管账号为群主的群
     *
     * @param request - CreateTrustGroupRequest
     * @returns CreateTrustGroupResponse
     */
    async createTrustGroup(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new CreateTrustGroupHeaders({});
        return await this.createTrustGroupWithOptions(request, headers, runtime);
    }
    /**
     * 解散群
     *
     * @param request - DismissGroupRequest
     * @param headers - DismissGroupHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns DismissGroupResponse
     */
    async dismissGroupWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.conversationId)) {
            body["conversationId"] = request.conversationId;
        }
        if (!tea_util_1.default.isUnset(request.operatorUid)) {
            body["operatorUid"] = request.operatorUid;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.operationSource)) {
            realHeaders["operationSource"] = tea_util_1.default.toJSONString(headers.operationSource);
        }
        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: "DismissGroup",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/groups/dismiss`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new DismissGroupResponse({}));
    }
    /**
     * 解散群
     *
     * @param request - DismissGroupRequest
     * @returns DismissGroupResponse
     */
    async dismissGroup(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new DismissGroupHeaders({});
        return await this.dismissGroupWithOptions(request, headers, runtime);
    }
    /**
     * 生成单聊会话Id
     *
     * @param request - GetConversationIdRequest
     * @param headers - GetConversationIdHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetConversationIdResponse
     */
    async getConversationIdWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.appUid)) {
            body["appUid"] = request.appUid;
        }
        if (!tea_util_1.default.isUnset(request.userId)) {
            body["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,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "GetConversationId",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/conversations`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetConversationIdResponse({}));
    }
    /**
     * 生成单聊会话Id
     *
     * @param request - GetConversationIdRequest
     * @returns GetConversationIdResponse
     */
    async getConversationId(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetConversationIdHeaders({});
        return await this.getConversationIdWithOptions(request, headers, runtime);
    }
    /**
     * 多媒体文件下载
     *
     * @param request - GetMediaUrlRequest
     * @param headers - GetMediaUrlHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetMediaUrlResponse
     */
    async getMediaUrlWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.mediaId)) {
            body["mediaId"] = request.mediaId;
        }
        if (!tea_util_1.default.isUnset(request.urlExpireTime)) {
            body["urlExpireTime"] = request.urlExpireTime;
        }
        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: "GetMediaUrl",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/medium/urls`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetMediaUrlResponse({}));
    }
    /**
     * 多媒体文件下载
     *
     * @param request - GetMediaUrlRequest
     * @returns GetMediaUrlResponse
     */
    async getMediaUrl(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetMediaUrlHeaders({});
        return await this.getMediaUrlWithOptions(request, headers, runtime);
    }
    /**
     * 多媒体文件批量下载
     *
     * @param request - GetMediaUrlsRequest
     * @param headers - GetMediaUrlsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetMediaUrlsResponse
     */
    async getMediaUrlsWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.mediaIds)) {
            body["mediaIds"] = request.mediaIds;
        }
        if (!tea_util_1.default.isUnset(request.urlExpireTime)) {
            body["urlExpireTime"] = request.urlExpireTime;
        }
        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: "GetMediaUrls",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/mediaUrls/query`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetMediaUrlsResponse({}));
    }
    /**
     * 多媒体文件批量下载
     *
     * @param request - GetMediaUrlsRequest
     * @returns GetMediaUrlsResponse
     */
    async getMediaUrls(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetMediaUrlsHeaders({});
        return await this.getMediaUrlsWithOptions(request, headers, runtime);
    }
    /**
     * 获取钉盘文件下载信息
     *
     * @param request - GetSpaceFileUrlRequest
     * @param headers - GetSpaceFileUrlHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetSpaceFileUrlResponse
     */
    async getSpaceFileUrlWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.fileId)) {
            query["fileId"] = request.fileId;
        }
        if (!tea_util_1.default.isUnset(request.senderUid)) {
            query["senderUid"] = request.senderUid;
        }
        if (!tea_util_1.default.isUnset(request.spaceId)) {
            query["spaceId"] = request.spaceId;
        }
        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: "GetSpaceFileUrl",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/spaces/files/urls`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetSpaceFileUrlResponse({}));
    }
    /**
     * 获取钉盘文件下载信息
     *
     * @param request - GetSpaceFileUrlRequest
     * @returns GetSpaceFileUrlResponse
     */
    async getSpaceFileUrl(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetSpaceFileUrlHeaders({});
        return await this.getSpaceFileUrlWithOptions(request, headers, runtime);
    }
    /**
     * 获取企业员工类型的群成员
     *
     * @param request - ListGroupStaffMembersRequest
     * @param headers - ListGroupStaffMembersHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListGroupStaffMembersResponse
     */
    async listGroupStaffMembersWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.conversationId)) {
            body["conversationId"] = request.conversationId;
        }
        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: "ListGroupStaffMembers",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/groups/staffMemers/query`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListGroupStaffMembersResponse({}));
    }
    /**
     * 获取企业员工类型的群成员
     *
     * @param request - ListGroupStaffMembersRequest
     * @returns ListGroupStaffMembersResponse
     */
    async listGroupStaffMembers(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListGroupStaffMembersHeaders({});
        return await this.listGroupStaffMembersWithOptions(request, headers, runtime);
    }
    /**
     * 查询batchSend结果
     *
     * @param request - QueryBatchSendResultRequest
     * @param headers - QueryBatchSendResultHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns QueryBatchSendResultResponse
     */
    async queryBatchSendResultWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.senderUserId)) {
            query["senderUserId"] = request.senderUserId;
        }
        if (!tea_util_1.default.isUnset(request.taskId)) {
            query["taskId"] = request.taskId;
        }
        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: "QueryBatchSendResult",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/messages/batchSendResults`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new QueryBatchSendResultResponse({}));
    }
    /**
     * 查询batchSend结果
     *
     * @param request - QueryBatchSendResultRequest
     * @returns QueryBatchSendResultResponse
     */
    async queryBatchSendResult(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new QueryBatchSendResultHeaders({});
        return await this.queryBatchSendResultWithOptions(request, headers, runtime);
    }
    /**
     * 消息已读
     *
     * @param request - ReadMessageRequest
     * @param headers - ReadMessageHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ReadMessageResponse
     */
    async readMessageWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.messageId)) {
            body["messageId"] = request.messageId;
        }
        if (!tea_util_1.default.isUnset(request.operatorUid)) {
            body["operatorUid"] = request.operatorUid;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.operationSource)) {
            realHeaders["operationSource"] = tea_util_1.default.toJSONString(headers.operationSource);
        }
        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: "ReadMessage",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/messages/read`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "none",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ReadMessageResponse({}));
    }
    /**
     * 消息已读
     *
     * @param request - ReadMessageRequest
     * @returns ReadMessageResponse
     */
    async readMessage(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ReadMessageHeaders({});
        return await this.readMessageWithOptions(request, headers, runtime);
    }
    /**
     * 消息撤回
     *
     * @param request - RecallMessageRequest
     * @param headers - RecallMessageHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns RecallMessageResponse
     */
    async recallMessageWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.messageId)) {
            body["messageId"] = request.messageId;
        }
        if (!tea_util_1.default.isUnset(request.operatorUid)) {
            body["operatorUid"] = request.operatorUid;
        }
        if (!tea_util_1.default.isUnset(request.type)) {
            body["type"] = request.type;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.operationSource)) {
            realHeaders["operationSource"] = tea_util_1.default.toJSONString(headers.operationSource);
        }
        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: "RecallMessage",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/messages/recall`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "none",
        });
        return $tea.cast(await this.execute(params, req, runtime), new RecallMessageResponse({}));
    }
    /**
     * 消息撤回
     *
     * @param request - RecallMessageRequest
     * @returns RecallMessageResponse
     */
    async recallMessage(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new RecallMessageHeaders({});
        return await this.recallMessageWithOptions(request, headers, runtime);
    }
    /**
     * 移除群成员
     *
     * @param request - RemoveGroupMembersRequest
     * @param headers - RemoveGroupMembersHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns RemoveGroupMembersResponse
     */
    async removeGroupMembersWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.conversationId)) {
            body["conversationId"] = request.conversationId;
        }
        if (!tea_util_1.default.isUnset(request.memberUids)) {
            body["memberUids"] = request.memberUids;
        }
        if (!tea_util_1.default.isUnset(request.operatorUid)) {
            body["operatorUid"] = request.operatorUid;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.operationSource)) {
            realHeaders["operationSource"] = tea_util_1.default.toJSONString(headers.operationSource);
        }
        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: "RemoveGroupMembers",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/groups/members/batchRemove`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new RemoveGroupMembersResponse({}));
    }
    /**
     * 移除群成员
     *
     * @param request - RemoveGroupMembersRequest
     * @returns RemoveGroupMembersResponse
     */
    async removeGroupMembers(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new RemoveGroupMembersHeaders({});
        return await this.removeGroupMembersWithOptions(request, headers, runtime);
    }
    /**
     * 消息发送
     *
     * @param request - SendMessageRequest
     * @param headers - SendMessageHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns SendMessageResponse
     */
    async sendMessageWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.content)) {
            body["content"] = request.content;
        }
        if (!tea_util_1.default.isUnset(request.conversationId)) {
            body["conversationId"] = request.conversationId;
        }
        if (!tea_util_1.default.isUnset(request.createTime)) {
            body["createTime"] = request.createTime;
        }
        if (!tea_util_1.default.isUnset(request.receiverUid)) {
            body["receiverUid"] = request.receiverUid;
        }
        if (!tea_util_1.default.isUnset(request.senderUid)) {
            body["senderUid"] = request.senderUid;
        }
        if (!tea_util_1.default.isUnset(request.uuid)) {
            body["uuid"] = request.uuid;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.operationSource)) {
            realHeaders["operationSource"] = tea_util_1.default.toJSONString(headers.operationSource);
        }
        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: "SendMessage",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/messages/send`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new SendMessageResponse({}));
    }
    /**
     * 消息发送
     *
     * @param request - SendMessageRequest
     * @returns SendMessageResponse
     */
    async sendMessage(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new SendMessageHeaders({});
        return await this.sendMessageWithOptions(request, headers, runtime);
    }
    /**
     * 通过群模板机器人发送消息
     *
     * @param request - SendRobotMessageRequest
     * @param headers - SendRobotMessageHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns SendRobotMessageResponse
     */
    async sendRobotMessageWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.atAll)) {
            body["atAll"] = request.atAll;
        }
        if (!tea_util_1.default.isUnset(request.atAppUids)) {
            body["atAppUids"] = request.atAppUids;
        }
        if (!tea_util_1.default.isUnset(request.atMobiles)) {
            body["atMobiles"] = request.atMobiles;
        }
        if (!tea_util_1.default.isUnset(request.atUnionIds)) {
            body["atUnionIds"] = request.atUnionIds;
        }
        if (!tea_util_1.default.isUnset(request.atUsers)) {
            body["atUsers"] = request.atUsers;
        }
        if (!tea_util_1.default.isUnset(request.channel)) {
            body["channel"] = request.channel;
        }
        if (!tea_util_1.default.isUnset(request.msgMediaIdParamMap)) {
            body["msgMediaIdParamMap"] = request.msgMediaIdParamMap;
        }
        if (!tea_util_1.default.isUnset(request.msgParamMap)) {
            body["msgParamMap"] = request.msgParamMap;
        }
        if (!tea_util_1.default.isUnset(request.msgTemplateId)) {
            body["msgTemplateId"] = request.msgTemplateId;
        }
        if (!tea_util_1.default.isUnset(request.receiverAppUids)) {
            body["receiverAppUids"] = request.receiverAppUids;
        }
        if (!tea_util_1.default.isUnset(request.receiverMobiles)) {
            body["receiverMobiles"] = request.receiverMobiles;
        }
        if (!tea_util_1.default.isUnset(request.receiverUnionIds)) {
            body["receiverUnionIds"] = request.receiverUnionIds;
        }
        if (!tea_util_1.default.isUnset(request.receiverUserIds)) {
            body["receiverUserIds"] = request.receiverUserIds;
        }
        if (!tea_util_1.default.isUnset(request.robotCode)) {
            body["robotCode"] = request.robotCode;
        }
        if (!tea_util_1.default.isUnset(request.targetOpenConversationId)) {
            body["targetOpenConversationId"] = request.targetOpenConversationId;
        }
        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: "SendRobotMessage",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/robots/messages/send`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new SendRobotMessageResponse({}));
    }
    /**
     * 通过群模板机器人发送消息
     *
     * @param request - SendRobotMessageRequest
     * @returns SendRobotMessageResponse
     */
    async sendRobotMessage(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new SendRobotMessageHeaders({});
        return await this.sendRobotMessageWithOptions(request, headers, runtime);
    }
    /**
     * 修改群名称
     *
     * @param request - UpdateGroupNameRequest
     * @param headers - UpdateGroupNameHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns UpdateGroupNameResponse
     */
    async updateGroupNameWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.conversationId)) {
            body["conversationId"] = request.conversationId;
        }
        if (!tea_util_1.default.isUnset(request.name)) {
            body["name"] = request.name;
        }
        if (!tea_util_1.default.isUnset(request.operatorUid)) {
            body["operatorUid"] = request.operatorUid;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.operationSource)) {
            realHeaders["operationSource"] = tea_util_1.default.toJSONString(headers.operationSource);
        }
        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: "UpdateGroupName",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/groups/names`,
            method: "PUT",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new UpdateGroupNameResponse({}));
    }
    /**
     * 修改群名称
     *
     * @param request - UpdateGroupNameRequest
     * @returns UpdateGroupNameResponse
     */
    async updateGroupName(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new UpdateGroupNameHeaders({});
        return await this.updateGroupNameWithOptions(request, headers, runtime);
    }
    /**
     * 转让群主
     *
     * @param request - UpdateGroupOwnerRequest
     * @param headers - UpdateGroupOwnerHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns UpdateGroupOwnerResponse
     */
    async updateGroupOwnerWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.conversationId)) {
            body["conversationId"] = request.conversationId;
        }
        if (!tea_util_1.default.isUnset(request.operatorUid)) {
            body["operatorUid"] = request.operatorUid;
        }
        if (!tea_util_1.default.isUnset(request.ownerUid)) {
            body["ownerUid"] = request.ownerUid;
        }
        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: "UpdateGroupOwner",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/groups/owners`,
            method: "PUT",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new UpdateGroupOwnerResponse({}));
    }
    /**
     * 转让群主
     *
     * @param request - UpdateGroupOwnerRequest
     * @returns UpdateGroupOwnerResponse
     */
    async updateGroupOwner(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new UpdateGroupOwnerHeaders({});
        return await this.updateGroupOwnerWithOptions(request, headers, runtime);
    }
    /**
     * 互联互通上传文件
     *
     * @param request - UploadFileRequest
     * @param headers - UploadFileHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns UploadFileResponse
     */
    async uploadFileWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.fileName)) {
            body["fileName"] = request.fileName;
        }
        if (!tea_util_1.default.isUnset(request.fileType)) {
            body["fileType"] = request.fileType;
        }
        if (!tea_util_1.default.isUnset(request.fileUrl)) {
            body["fileUrl"] = request.fileUrl;
        }
        if (!tea_util_1.default.isUnset(request.senderUid)) {
            body["senderUid"] = request.senderUid;
        }
        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: "UploadFile",
            version: "impaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/impaas/interconnections/files/upload`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new UploadFileResponse({}));
    }
    /**
     * 互联互通上传文件
     *
     * @param request - UploadFileRequest
     * @returns UploadFileResponse
     */
    async uploadFile(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new UploadFileHeaders({});
        return await this.uploadFileWithOptions(request, headers, runtime);
    }
}
exports.default = Client;
//# sourceMappingURL=client.js.map