"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.GetRecordsHeaders = exports.GetRecordResponse = exports.GetRecordResponseBody = exports.GetRecordRequest = exports.GetRecordHeaders = exports.GetAllSheetsResponse = exports.GetAllSheetsResponseBody = exports.GetAllSheetsRequest = exports.GetAllSheetsHeaders = exports.GetAllFieldsResponse = exports.GetAllFieldsResponseBody = exports.GetAllFieldsRequest = exports.GetAllFieldsHeaders = exports.DeleteSheetResponse = exports.DeleteSheetResponseBody = exports.DeleteSheetRequest = exports.DeleteSheetHeaders = exports.DeleteRoleResponse = exports.DeleteRoleResponseBody = exports.DeleteRoleRequest = exports.DeleteRoleHeaders = exports.DeleteRecordsResponse = exports.DeleteRecordsResponseBody = exports.DeleteRecordsRequest = exports.DeleteRecordsHeaders = exports.DeleteFieldResponse = exports.DeleteFieldResponseBody = exports.DeleteFieldRequest = exports.DeleteFieldHeaders = exports.CreateSheetResponse = exports.CreateSheetResponseBody = exports.CreateSheetRequest = exports.CreateSheetHeaders = exports.CreateRoleResponse = exports.CreateRoleResponseBody = exports.CreateRoleRequest = exports.CreateRoleHeaders = exports.CreateFieldResponse = exports.CreateFieldResponseBody = exports.CreateFieldRequest = exports.CreateFieldHeaders = exports.ChangeSwitchResponse = exports.ChangeSwitchResponseBody = exports.ChangeSwitchRequest = exports.ChangeSwitchHeaders = exports.AddRoleMemberResponse = exports.AddRoleMemberResponseBody = exports.AddRoleMemberRequest = exports.AddRoleMemberHeaders = exports.ToRoleMemberDTOMapValue = void 0;
exports.UpdateSheetResponseBody = exports.UpdateSheetRequest = exports.UpdateSheetHeaders = exports.UpdateRoleResponse = exports.UpdateRoleResponseBody = exports.UpdateRoleRequest = exports.UpdateRoleHeaders = exports.UpdateRecordsResponse = exports.UpdateRecordsResponseBody = exports.UpdateRecordsRequest = exports.UpdateRecordsHeaders = exports.UpdateFieldResponse = exports.UpdateFieldResponseBody = exports.UpdateFieldRequest = exports.UpdateFieldHeaders = exports.RebuildRoleMembersResponse = exports.RebuildRoleMembersResponseBody = exports.RebuildRoleMembersRequest = exports.RebuildRoleMembersHeaders = exports.QueryDocAllRolesResponse = exports.QueryDocAllRolesResponseBody = exports.QueryDocAllRolesRequest = exports.QueryDocAllRolesHeaders = exports.PrepareSetRichTextResponse = exports.PrepareSetRichTextResponseBody = exports.PrepareSetRichTextRequest = exports.PrepareSetRichTextHeaders = exports.ListRecordsResponse = exports.ListRecordsResponseBody = exports.ListRecordsRequest = exports.ListRecordsHeaders = exports.InsertRecordsResponse = exports.InsertRecordsResponseBody = exports.InsertRecordsRequest = exports.InsertRecordsHeaders = exports.GetUserDocRolesResponse = exports.GetUserDocRolesResponseBody = exports.GetUserDocRolesRequest = exports.GetUserDocRolesHeaders = exports.GetSwitchResponse = exports.GetSwitchResponseBody = exports.GetSwitchRequest = exports.GetSwitchHeaders = exports.GetSheetResponse = exports.GetSheetResponseBody = exports.GetSheetRequest = exports.GetSheetHeaders = exports.GetRecordsResponse = exports.GetRecordsResponseBody = exports.GetRecordsRequest = void 0;
exports.UpdateRoleResponseBodySubRoles = exports.UpdateRoleRequestSubRoles = exports.UpdateRecordsResponseBodyValue = exports.UpdateRecordsRequestRecords = exports.RebuildRoleMembersRequestDefaultRoleDTO = exports.QueryDocAllRolesResponseBodyDefaultRole = exports.QueryDocAllRolesResponseBodyAllRoles = exports.QueryDocAllRolesResponseBodyAllRolesRole = exports.QueryDocAllRolesResponseBodyAllRolesRoleSubRoles = exports.QueryDocAllRolesResponseBodyAllRolesMembers = exports.PrepareSetRichTextResponseBodyUploadInfos = exports.ListRecordsResponseBodyRecords = exports.ListRecordsResponseBodyRecordsLastModifiedBy = exports.ListRecordsResponseBodyRecordsCreatedBy = exports.ListRecordsRequestFilter = exports.ListRecordsRequestFilterConditions = exports.InsertRecordsResponseBodyValue = exports.InsertRecordsRequestRecords = exports.GetUserDocRolesResponseBodyRoles = exports.GetUserDocRolesResponseBodyRolesSubRoles = exports.GetRecordsResponseBodyRecords = exports.GetRecordsResponseBodyRecordsLastModifiedBy = exports.GetRecordsResponseBodyRecordsCreatedBy = exports.GetRecordResponseBodyLastModifiedBy = exports.GetRecordResponseBodyCreatedBy = exports.GetAllSheetsResponseBodyValue = exports.GetAllFieldsResponseBodyValue = exports.CreateSheetRequestFields = exports.CreateRoleResponseBodySubRoles = exports.CreateRoleRequestSubRoles = exports.AddRoleMemberRequestRoleMemberList = exports.UpdateSheetResponse = 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 ToRoleMemberDTOMapValue extends $tea.Model {
    static names() {
        return {
            memberId: 'memberId',
            memberType: 'memberType',
            memberIdBelongOrgId: 'memberIdBelongOrgId',
            avatar: 'avatar',
            name: 'name',
        };
    }
    static types() {
        return {
            memberId: 'string',
            memberType: 'string',
            memberIdBelongOrgId: 'number',
            avatar: 'string',
            name: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ToRoleMemberDTOMapValue = ToRoleMemberDTOMapValue;
class AddRoleMemberHeaders 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.AddRoleMemberHeaders = AddRoleMemberHeaders;
class AddRoleMemberRequest extends $tea.Model {
    static names() {
        return {
            roleMemberList: 'roleMemberList',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            roleMemberList: { 'type': 'array', 'itemType': AddRoleMemberRequestRoleMemberList },
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddRoleMemberRequest = AddRoleMemberRequest;
class AddRoleMemberResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddRoleMemberResponseBody = AddRoleMemberResponseBody;
class AddRoleMemberResponse 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: AddRoleMemberResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddRoleMemberResponse = AddRoleMemberResponse;
class ChangeSwitchHeaders 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.ChangeSwitchHeaders = ChangeSwitchHeaders;
class ChangeSwitchRequest extends $tea.Model {
    static names() {
        return {
            value: 'value',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            value: 'boolean',
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ChangeSwitchRequest = ChangeSwitchRequest;
class ChangeSwitchResponseBody extends $tea.Model {
    static names() {
        return {
            enabled: 'enabled',
        };
    }
    static types() {
        return {
            enabled: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ChangeSwitchResponseBody = ChangeSwitchResponseBody;
class ChangeSwitchResponse 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: ChangeSwitchResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ChangeSwitchResponse = ChangeSwitchResponse;
class CreateFieldHeaders 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.CreateFieldHeaders = CreateFieldHeaders;
class CreateFieldRequest extends $tea.Model {
    static names() {
        return {
            name: 'name',
            property: 'property',
            type: 'type',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            name: 'string',
            property: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
            type: 'string',
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFieldRequest = CreateFieldRequest;
class CreateFieldResponseBody extends $tea.Model {
    static names() {
        return {
            id: 'id',
            name: 'name',
            property: 'property',
            type: 'type',
        };
    }
    static types() {
        return {
            id: 'string',
            name: 'string',
            property: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
            type: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFieldResponseBody = CreateFieldResponseBody;
class CreateFieldResponse 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: CreateFieldResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFieldResponse = CreateFieldResponse;
class CreateRoleHeaders 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.CreateRoleHeaders = CreateRoleHeaders;
class CreateRoleRequest extends $tea.Model {
    static names() {
        return {
            flowType: 'flowType',
            id: 'id',
            name: 'name',
            roleType: 'roleType',
            subRoles: 'subRoles',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            flowType: 'string',
            id: 'number',
            name: 'string',
            roleType: 'string',
            subRoles: { 'type': 'array', 'itemType': CreateRoleRequestSubRoles },
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateRoleRequest = CreateRoleRequest;
class CreateRoleResponseBody extends $tea.Model {
    static names() {
        return {
            flowType: 'flowType',
            id: 'id',
            name: 'name',
            roleType: 'roleType',
            subRoles: 'subRoles',
        };
    }
    static types() {
        return {
            flowType: 'string',
            id: 'number',
            name: 'string',
            roleType: 'string',
            subRoles: { 'type': 'array', 'itemType': CreateRoleResponseBodySubRoles },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateRoleResponseBody = CreateRoleResponseBody;
class CreateRoleResponse 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: CreateRoleResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateRoleResponse = CreateRoleResponse;
class CreateSheetHeaders 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.CreateSheetHeaders = CreateSheetHeaders;
class CreateSheetRequest extends $tea.Model {
    static names() {
        return {
            fields: 'fields',
            name: 'name',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            fields: { 'type': 'array', 'itemType': CreateSheetRequestFields },
            name: 'string',
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateSheetRequest = CreateSheetRequest;
class CreateSheetResponseBody extends $tea.Model {
    static names() {
        return {
            id: 'id',
            name: 'name',
        };
    }
    static types() {
        return {
            id: 'string',
            name: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateSheetResponseBody = CreateSheetResponseBody;
class CreateSheetResponse 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: CreateSheetResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateSheetResponse = CreateSheetResponse;
class DeleteFieldHeaders 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.DeleteFieldHeaders = DeleteFieldHeaders;
class DeleteFieldRequest extends $tea.Model {
    static names() {
        return {
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteFieldRequest = DeleteFieldRequest;
class DeleteFieldResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteFieldResponseBody = DeleteFieldResponseBody;
class DeleteFieldResponse 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: DeleteFieldResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteFieldResponse = DeleteFieldResponse;
class DeleteRecordsHeaders 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.DeleteRecordsHeaders = DeleteRecordsHeaders;
class DeleteRecordsRequest extends $tea.Model {
    static names() {
        return {
            recordIds: 'recordIds',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            recordIds: { 'type': 'array', 'itemType': 'string' },
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteRecordsRequest = DeleteRecordsRequest;
class DeleteRecordsResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteRecordsResponseBody = DeleteRecordsResponseBody;
class DeleteRecordsResponse 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: DeleteRecordsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteRecordsResponse = DeleteRecordsResponse;
class DeleteRoleHeaders 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.DeleteRoleHeaders = DeleteRoleHeaders;
class DeleteRoleRequest extends $tea.Model {
    static names() {
        return {
            roleId: 'roleId',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            roleId: 'number',
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteRoleRequest = DeleteRoleRequest;
class DeleteRoleResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteRoleResponseBody = DeleteRoleResponseBody;
class DeleteRoleResponse 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: DeleteRoleResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteRoleResponse = DeleteRoleResponse;
class DeleteSheetHeaders 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.DeleteSheetHeaders = DeleteSheetHeaders;
class DeleteSheetRequest extends $tea.Model {
    static names() {
        return {
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteSheetRequest = DeleteSheetRequest;
class DeleteSheetResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteSheetResponseBody = DeleteSheetResponseBody;
class DeleteSheetResponse 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: DeleteSheetResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteSheetResponse = DeleteSheetResponse;
class GetAllFieldsHeaders 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.GetAllFieldsHeaders = GetAllFieldsHeaders;
class GetAllFieldsRequest extends $tea.Model {
    static names() {
        return {
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetAllFieldsRequest = GetAllFieldsRequest;
class GetAllFieldsResponseBody extends $tea.Model {
    static names() {
        return {
            value: 'value',
        };
    }
    static types() {
        return {
            value: { 'type': 'array', 'itemType': GetAllFieldsResponseBodyValue },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetAllFieldsResponseBody = GetAllFieldsResponseBody;
class GetAllFieldsResponse 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: GetAllFieldsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetAllFieldsResponse = GetAllFieldsResponse;
class GetAllSheetsHeaders 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.GetAllSheetsHeaders = GetAllSheetsHeaders;
class GetAllSheetsRequest extends $tea.Model {
    static names() {
        return {
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetAllSheetsRequest = GetAllSheetsRequest;
class GetAllSheetsResponseBody extends $tea.Model {
    static names() {
        return {
            value: 'value',
        };
    }
    static types() {
        return {
            value: { 'type': 'array', 'itemType': GetAllSheetsResponseBodyValue },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetAllSheetsResponseBody = GetAllSheetsResponseBody;
class GetAllSheetsResponse 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: GetAllSheetsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetAllSheetsResponse = GetAllSheetsResponse;
class GetRecordHeaders 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.GetRecordHeaders = GetRecordHeaders;
class GetRecordRequest extends $tea.Model {
    static names() {
        return {
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetRecordRequest = GetRecordRequest;
class GetRecordResponseBody extends $tea.Model {
    static names() {
        return {
            createdBy: 'createdBy',
            createdTime: 'createdTime',
            fields: 'fields',
            id: 'id',
            lastModifiedBy: 'lastModifiedBy',
            lastModifiedTime: 'lastModifiedTime',
        };
    }
    static types() {
        return {
            createdBy: GetRecordResponseBodyCreatedBy,
            createdTime: 'number',
            fields: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
            id: 'string',
            lastModifiedBy: GetRecordResponseBodyLastModifiedBy,
            lastModifiedTime: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetRecordResponseBody = GetRecordResponseBody;
class GetRecordResponse 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: GetRecordResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetRecordResponse = GetRecordResponse;
class GetRecordsHeaders 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.GetRecordsHeaders = GetRecordsHeaders;
class GetRecordsRequest extends $tea.Model {
    static names() {
        return {
            maxResults: 'maxResults',
            nextToken: 'nextToken',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            maxResults: 'number',
            nextToken: 'string',
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetRecordsRequest = GetRecordsRequest;
class GetRecordsResponseBody extends $tea.Model {
    static names() {
        return {
            hasMore: 'hasMore',
            nextToken: 'nextToken',
            records: 'records',
        };
    }
    static types() {
        return {
            hasMore: 'boolean',
            nextToken: 'string',
            records: { 'type': 'array', 'itemType': GetRecordsResponseBodyRecords },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetRecordsResponseBody = GetRecordsResponseBody;
class GetRecordsResponse 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: GetRecordsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetRecordsResponse = GetRecordsResponse;
class GetSheetHeaders 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.GetSheetHeaders = GetSheetHeaders;
class GetSheetRequest extends $tea.Model {
    static names() {
        return {
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSheetRequest = GetSheetRequest;
class GetSheetResponseBody extends $tea.Model {
    static names() {
        return {
            id: 'id',
            name: 'name',
        };
    }
    static types() {
        return {
            id: 'string',
            name: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSheetResponseBody = GetSheetResponseBody;
class GetSheetResponse 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: GetSheetResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSheetResponse = GetSheetResponse;
class GetSwitchHeaders 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.GetSwitchHeaders = GetSwitchHeaders;
class GetSwitchRequest extends $tea.Model {
    static names() {
        return {
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSwitchRequest = GetSwitchRequest;
class GetSwitchResponseBody extends $tea.Model {
    static names() {
        return {
            enabled: 'enabled',
        };
    }
    static types() {
        return {
            enabled: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSwitchResponseBody = GetSwitchResponseBody;
class GetSwitchResponse 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: GetSwitchResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetSwitchResponse = GetSwitchResponse;
class GetUserDocRolesHeaders 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.GetUserDocRolesHeaders = GetUserDocRolesHeaders;
class GetUserDocRolesRequest extends $tea.Model {
    static names() {
        return {
            operatorId: 'operatorId',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            operatorId: 'string',
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserDocRolesRequest = GetUserDocRolesRequest;
class GetUserDocRolesResponseBody extends $tea.Model {
    static names() {
        return {
            enabled: 'enabled',
            roles: 'roles',
        };
    }
    static types() {
        return {
            enabled: 'boolean',
            roles: { 'type': 'array', 'itemType': GetUserDocRolesResponseBodyRoles },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserDocRolesResponseBody = GetUserDocRolesResponseBody;
class GetUserDocRolesResponse 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: GetUserDocRolesResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserDocRolesResponse = GetUserDocRolesResponse;
class InsertRecordsHeaders 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.InsertRecordsHeaders = InsertRecordsHeaders;
class InsertRecordsRequest extends $tea.Model {
    static names() {
        return {
            records: 'records',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            records: { 'type': 'array', 'itemType': InsertRecordsRequestRecords },
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.InsertRecordsRequest = InsertRecordsRequest;
class InsertRecordsResponseBody extends $tea.Model {
    static names() {
        return {
            value: 'value',
        };
    }
    static types() {
        return {
            value: { 'type': 'array', 'itemType': InsertRecordsResponseBodyValue },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.InsertRecordsResponseBody = InsertRecordsResponseBody;
class InsertRecordsResponse 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: InsertRecordsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.InsertRecordsResponse = InsertRecordsResponse;
class ListRecordsHeaders 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.ListRecordsHeaders = ListRecordsHeaders;
class ListRecordsRequest extends $tea.Model {
    static names() {
        return {
            calcFields: 'calcFields',
            filter: 'filter',
            maxResults: 'maxResults',
            nextToken: 'nextToken',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            calcFields: 'boolean',
            filter: ListRecordsRequestFilter,
            maxResults: 'number',
            nextToken: 'string',
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListRecordsRequest = ListRecordsRequest;
class ListRecordsResponseBody extends $tea.Model {
    static names() {
        return {
            hasMore: 'hasMore',
            nextToken: 'nextToken',
            records: 'records',
        };
    }
    static types() {
        return {
            hasMore: 'boolean',
            nextToken: 'string',
            records: { 'type': 'array', 'itemType': ListRecordsResponseBodyRecords },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListRecordsResponseBody = ListRecordsResponseBody;
class ListRecordsResponse 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: ListRecordsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListRecordsResponse = ListRecordsResponse;
class PrepareSetRichTextHeaders 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.PrepareSetRichTextHeaders = PrepareSetRichTextHeaders;
class PrepareSetRichTextRequest extends $tea.Model {
    static names() {
        return {
            markdown: 'markdown',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            markdown: 'string',
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.PrepareSetRichTextRequest = PrepareSetRichTextRequest;
class PrepareSetRichTextResponseBody extends $tea.Model {
    static names() {
        return {
            markdown: 'markdown',
            uploadInfos: 'uploadInfos',
        };
    }
    static types() {
        return {
            markdown: 'string',
            uploadInfos: { 'type': 'array', 'itemType': PrepareSetRichTextResponseBodyUploadInfos },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.PrepareSetRichTextResponseBody = PrepareSetRichTextResponseBody;
class PrepareSetRichTextResponse 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: PrepareSetRichTextResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.PrepareSetRichTextResponse = PrepareSetRichTextResponse;
class QueryDocAllRolesHeaders 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.QueryDocAllRolesHeaders = QueryDocAllRolesHeaders;
class QueryDocAllRolesRequest extends $tea.Model {
    static names() {
        return {
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryDocAllRolesRequest = QueryDocAllRolesRequest;
class QueryDocAllRolesResponseBody extends $tea.Model {
    static names() {
        return {
            allRoles: 'allRoles',
            defaultRole: 'defaultRole',
            enabled: 'enabled',
            systemRoles: 'systemRoles',
        };
    }
    static types() {
        return {
            allRoles: { 'type': 'array', 'itemType': QueryDocAllRolesResponseBodyAllRoles },
            defaultRole: QueryDocAllRolesResponseBodyDefaultRole,
            enabled: 'boolean',
            systemRoles: { 'type': 'array', 'itemType': 'number' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryDocAllRolesResponseBody = QueryDocAllRolesResponseBody;
class QueryDocAllRolesResponse 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: QueryDocAllRolesResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryDocAllRolesResponse = QueryDocAllRolesResponse;
class RebuildRoleMembersHeaders 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.RebuildRoleMembersHeaders = RebuildRoleMembersHeaders;
class RebuildRoleMembersRequest extends $tea.Model {
    static names() {
        return {
            defaultRoleDTO: 'defaultRoleDTO',
            toRoleMemberDTOMap: 'toRoleMemberDTOMap',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            defaultRoleDTO: RebuildRoleMembersRequestDefaultRoleDTO,
            toRoleMemberDTOMap: { 'type': 'map', 'keyType': 'string', 'valueType': { 'type': 'array', 'itemType': ToRoleMemberDTOMapValue } },
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RebuildRoleMembersRequest = RebuildRoleMembersRequest;
class RebuildRoleMembersResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RebuildRoleMembersResponseBody = RebuildRoleMembersResponseBody;
class RebuildRoleMembersResponse 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: RebuildRoleMembersResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RebuildRoleMembersResponse = RebuildRoleMembersResponse;
class UpdateFieldHeaders 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.UpdateFieldHeaders = UpdateFieldHeaders;
class UpdateFieldRequest extends $tea.Model {
    static names() {
        return {
            name: 'name',
            property: 'property',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            name: 'string',
            property: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateFieldRequest = UpdateFieldRequest;
class UpdateFieldResponseBody extends $tea.Model {
    static names() {
        return {
            id: 'id',
        };
    }
    static types() {
        return {
            id: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateFieldResponseBody = UpdateFieldResponseBody;
class UpdateFieldResponse 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: UpdateFieldResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateFieldResponse = UpdateFieldResponse;
class UpdateRecordsHeaders 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.UpdateRecordsHeaders = UpdateRecordsHeaders;
class UpdateRecordsRequest extends $tea.Model {
    static names() {
        return {
            records: 'records',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            records: { 'type': 'array', 'itemType': UpdateRecordsRequestRecords },
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateRecordsRequest = UpdateRecordsRequest;
class UpdateRecordsResponseBody extends $tea.Model {
    static names() {
        return {
            value: 'value',
        };
    }
    static types() {
        return {
            value: { 'type': 'array', 'itemType': UpdateRecordsResponseBodyValue },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateRecordsResponseBody = UpdateRecordsResponseBody;
class UpdateRecordsResponse 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: UpdateRecordsResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateRecordsResponse = UpdateRecordsResponse;
class UpdateRoleHeaders 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.UpdateRoleHeaders = UpdateRoleHeaders;
class UpdateRoleRequest extends $tea.Model {
    static names() {
        return {
            flowType: 'flowType',
            id: 'id',
            name: 'name',
            roleType: 'roleType',
            subRoles: 'subRoles',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            flowType: 'string',
            id: 'number',
            name: 'string',
            roleType: 'string',
            subRoles: { 'type': 'array', 'itemType': UpdateRoleRequestSubRoles },
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateRoleRequest = UpdateRoleRequest;
class UpdateRoleResponseBody extends $tea.Model {
    static names() {
        return {
            flowType: 'flowType',
            id: 'id',
            name: 'name',
            roleType: 'roleType',
            subRoles: 'subRoles',
        };
    }
    static types() {
        return {
            flowType: 'string',
            id: 'number',
            name: 'string',
            roleType: 'string',
            subRoles: { 'type': 'array', 'itemType': UpdateRoleResponseBodySubRoles },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateRoleResponseBody = UpdateRoleResponseBody;
class UpdateRoleResponse 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: UpdateRoleResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateRoleResponse = UpdateRoleResponse;
class UpdateSheetHeaders 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.UpdateSheetHeaders = UpdateSheetHeaders;
class UpdateSheetRequest extends $tea.Model {
    static names() {
        return {
            name: 'name',
            operatorId: 'operatorId',
        };
    }
    static types() {
        return {
            name: 'string',
            operatorId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateSheetRequest = UpdateSheetRequest;
class UpdateSheetResponseBody extends $tea.Model {
    static names() {
        return {
            id: 'id',
            name: 'name',
        };
    }
    static types() {
        return {
            id: 'string',
            name: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateSheetResponseBody = UpdateSheetResponseBody;
class UpdateSheetResponse 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: UpdateSheetResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateSheetResponse = UpdateSheetResponse;
class AddRoleMemberRequestRoleMemberList extends $tea.Model {
    static names() {
        return {
            memberId: 'memberId',
            memberIdBelongOrgId: 'memberIdBelongOrgId',
            memberType: 'memberType',
            roleId: 'roleId',
        };
    }
    static types() {
        return {
            memberId: 'string',
            memberIdBelongOrgId: 'number',
            memberType: 'string',
            roleId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.AddRoleMemberRequestRoleMemberList = AddRoleMemberRequestRoleMemberList;
class CreateRoleRequestSubRoles extends $tea.Model {
    static names() {
        return {
            authLevel: 'authLevel',
            bizType: 'bizType',
            config: 'config',
            gmtCreate: 'gmtCreate',
            id: 'id',
        };
    }
    static types() {
        return {
            authLevel: 'number',
            bizType: 'number',
            config: 'string',
            gmtCreate: 'number',
            id: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateRoleRequestSubRoles = CreateRoleRequestSubRoles;
class CreateRoleResponseBodySubRoles extends $tea.Model {
    static names() {
        return {
            authLevel: 'authLevel',
            bizType: 'bizType',
            config: 'config',
            gmtCreate: 'gmtCreate',
            id: 'id',
        };
    }
    static types() {
        return {
            authLevel: 'number',
            bizType: 'number',
            config: 'string',
            gmtCreate: 'number',
            id: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateRoleResponseBodySubRoles = CreateRoleResponseBodySubRoles;
class CreateSheetRequestFields extends $tea.Model {
    static names() {
        return {
            name: 'name',
            property: 'property',
            type: 'type',
        };
    }
    static types() {
        return {
            name: 'string',
            property: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
            type: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateSheetRequestFields = CreateSheetRequestFields;
class GetAllFieldsResponseBodyValue extends $tea.Model {
    static names() {
        return {
            id: 'id',
            name: 'name',
            property: 'property',
            type: 'type',
        };
    }
    static types() {
        return {
            id: 'string',
            name: 'string',
            property: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
            type: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetAllFieldsResponseBodyValue = GetAllFieldsResponseBodyValue;
class GetAllSheetsResponseBodyValue extends $tea.Model {
    static names() {
        return {
            id: 'id',
            name: 'name',
        };
    }
    static types() {
        return {
            id: 'string',
            name: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetAllSheetsResponseBodyValue = GetAllSheetsResponseBodyValue;
class GetRecordResponseBodyCreatedBy extends $tea.Model {
    static names() {
        return {
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetRecordResponseBodyCreatedBy = GetRecordResponseBodyCreatedBy;
class GetRecordResponseBodyLastModifiedBy extends $tea.Model {
    static names() {
        return {
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetRecordResponseBodyLastModifiedBy = GetRecordResponseBodyLastModifiedBy;
class GetRecordsResponseBodyRecordsCreatedBy extends $tea.Model {
    static names() {
        return {
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetRecordsResponseBodyRecordsCreatedBy = GetRecordsResponseBodyRecordsCreatedBy;
class GetRecordsResponseBodyRecordsLastModifiedBy extends $tea.Model {
    static names() {
        return {
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetRecordsResponseBodyRecordsLastModifiedBy = GetRecordsResponseBodyRecordsLastModifiedBy;
class GetRecordsResponseBodyRecords extends $tea.Model {
    static names() {
        return {
            createdBy: 'createdBy',
            createdTime: 'createdTime',
            fields: 'fields',
            id: 'id',
            lastModifiedBy: 'lastModifiedBy',
            lastModifiedTime: 'lastModifiedTime',
        };
    }
    static types() {
        return {
            createdBy: GetRecordsResponseBodyRecordsCreatedBy,
            createdTime: 'number',
            fields: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
            id: 'string',
            lastModifiedBy: GetRecordsResponseBodyRecordsLastModifiedBy,
            lastModifiedTime: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetRecordsResponseBodyRecords = GetRecordsResponseBodyRecords;
class GetUserDocRolesResponseBodyRolesSubRoles extends $tea.Model {
    static names() {
        return {
            authLevel: 'authLevel',
            bizType: 'bizType',
            config: 'config',
            gmtCreate: 'gmtCreate',
            id: 'id',
        };
    }
    static types() {
        return {
            authLevel: 'number',
            bizType: 'number',
            config: 'string',
            gmtCreate: 'number',
            id: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserDocRolesResponseBodyRolesSubRoles = GetUserDocRolesResponseBodyRolesSubRoles;
class GetUserDocRolesResponseBodyRoles extends $tea.Model {
    static names() {
        return {
            flowType: 'flowType',
            id: 'id',
            name: 'name',
            roleType: 'roleType',
            subRoles: 'subRoles',
        };
    }
    static types() {
        return {
            flowType: 'string',
            id: 'number',
            name: 'string',
            roleType: 'string',
            subRoles: { 'type': 'array', 'itemType': GetUserDocRolesResponseBodyRolesSubRoles },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetUserDocRolesResponseBodyRoles = GetUserDocRolesResponseBodyRoles;
class InsertRecordsRequestRecords extends $tea.Model {
    static names() {
        return {
            fields: 'fields',
        };
    }
    static types() {
        return {
            fields: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.InsertRecordsRequestRecords = InsertRecordsRequestRecords;
class InsertRecordsResponseBodyValue extends $tea.Model {
    static names() {
        return {
            id: 'id',
        };
    }
    static types() {
        return {
            id: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.InsertRecordsResponseBodyValue = InsertRecordsResponseBodyValue;
class ListRecordsRequestFilterConditions extends $tea.Model {
    static names() {
        return {
            field: 'field',
            operator: 'operator',
            value: 'value',
        };
    }
    static types() {
        return {
            field: 'string',
            operator: 'string',
            value: { 'type': 'array', 'itemType': 'any' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListRecordsRequestFilterConditions = ListRecordsRequestFilterConditions;
class ListRecordsRequestFilter extends $tea.Model {
    static names() {
        return {
            combination: 'combination',
            conditions: 'conditions',
        };
    }
    static types() {
        return {
            combination: 'string',
            conditions: { 'type': 'array', 'itemType': ListRecordsRequestFilterConditions },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListRecordsRequestFilter = ListRecordsRequestFilter;
class ListRecordsResponseBodyRecordsCreatedBy extends $tea.Model {
    static names() {
        return {
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListRecordsResponseBodyRecordsCreatedBy = ListRecordsResponseBodyRecordsCreatedBy;
class ListRecordsResponseBodyRecordsLastModifiedBy extends $tea.Model {
    static names() {
        return {
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListRecordsResponseBodyRecordsLastModifiedBy = ListRecordsResponseBodyRecordsLastModifiedBy;
class ListRecordsResponseBodyRecords extends $tea.Model {
    static names() {
        return {
            createdBy: 'createdBy',
            createdTime: 'createdTime',
            fields: 'fields',
            id: 'id',
            lastModifiedBy: 'lastModifiedBy',
            lastModifiedTime: 'lastModifiedTime',
        };
    }
    static types() {
        return {
            createdBy: ListRecordsResponseBodyRecordsCreatedBy,
            createdTime: 'number',
            fields: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
            id: 'string',
            lastModifiedBy: ListRecordsResponseBodyRecordsLastModifiedBy,
            lastModifiedTime: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListRecordsResponseBodyRecords = ListRecordsResponseBodyRecords;
class PrepareSetRichTextResponseBodyUploadInfos extends $tea.Model {
    static names() {
        return {
            resourceId: 'resourceId',
            resourceUrl: 'resourceUrl',
            uploadUrl: 'uploadUrl',
        };
    }
    static types() {
        return {
            resourceId: 'string',
            resourceUrl: 'string',
            uploadUrl: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.PrepareSetRichTextResponseBodyUploadInfos = PrepareSetRichTextResponseBodyUploadInfos;
class QueryDocAllRolesResponseBodyAllRolesMembers extends $tea.Model {
    static names() {
        return {
            avatar: 'avatar',
            memberId: 'memberId',
            memberIdBelongOrgId: 'memberIdBelongOrgId',
            memberType: 'memberType',
            name: 'name',
        };
    }
    static types() {
        return {
            avatar: 'string',
            memberId: 'string',
            memberIdBelongOrgId: 'number',
            memberType: 'string',
            name: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryDocAllRolesResponseBodyAllRolesMembers = QueryDocAllRolesResponseBodyAllRolesMembers;
class QueryDocAllRolesResponseBodyAllRolesRoleSubRoles extends $tea.Model {
    static names() {
        return {
            authLevel: 'authLevel',
            bizType: 'bizType',
            config: 'config',
            gmtCreate: 'gmtCreate',
            id: 'id',
        };
    }
    static types() {
        return {
            authLevel: 'number',
            bizType: 'number',
            config: 'string',
            gmtCreate: 'number',
            id: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryDocAllRolesResponseBodyAllRolesRoleSubRoles = QueryDocAllRolesResponseBodyAllRolesRoleSubRoles;
class QueryDocAllRolesResponseBodyAllRolesRole extends $tea.Model {
    static names() {
        return {
            flowType: 'flowType',
            id: 'id',
            name: 'name',
            roleType: 'roleType',
            subRoles: 'subRoles',
        };
    }
    static types() {
        return {
            flowType: 'string',
            id: 'number',
            name: 'string',
            roleType: 'string',
            subRoles: { 'type': 'array', 'itemType': QueryDocAllRolesResponseBodyAllRolesRoleSubRoles },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryDocAllRolesResponseBodyAllRolesRole = QueryDocAllRolesResponseBodyAllRolesRole;
class QueryDocAllRolesResponseBodyAllRoles extends $tea.Model {
    static names() {
        return {
            members: 'members',
            role: 'role',
        };
    }
    static types() {
        return {
            members: { 'type': 'array', 'itemType': QueryDocAllRolesResponseBodyAllRolesMembers },
            role: QueryDocAllRolesResponseBodyAllRolesRole,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryDocAllRolesResponseBodyAllRoles = QueryDocAllRolesResponseBodyAllRoles;
class QueryDocAllRolesResponseBodyDefaultRole extends $tea.Model {
    static names() {
        return {
            mode: 'mode',
            roleId: 'roleId',
        };
    }
    static types() {
        return {
            mode: 'number',
            roleId: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryDocAllRolesResponseBodyDefaultRole = QueryDocAllRolesResponseBodyDefaultRole;
class RebuildRoleMembersRequestDefaultRoleDTO extends $tea.Model {
    static names() {
        return {
            mode: 'mode',
            roleId: 'roleId',
        };
    }
    static types() {
        return {
            mode: 'number',
            roleId: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RebuildRoleMembersRequestDefaultRoleDTO = RebuildRoleMembersRequestDefaultRoleDTO;
class UpdateRecordsRequestRecords extends $tea.Model {
    static names() {
        return {
            fields: 'fields',
            id: 'id',
        };
    }
    static types() {
        return {
            fields: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
            id: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateRecordsRequestRecords = UpdateRecordsRequestRecords;
class UpdateRecordsResponseBodyValue extends $tea.Model {
    static names() {
        return {
            id: 'id',
        };
    }
    static types() {
        return {
            id: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateRecordsResponseBodyValue = UpdateRecordsResponseBodyValue;
class UpdateRoleRequestSubRoles extends $tea.Model {
    static names() {
        return {
            authLevel: 'authLevel',
            bizType: 'bizType',
            config: 'config',
            gmtCreate: 'gmtCreate',
            id: 'id',
        };
    }
    static types() {
        return {
            authLevel: 'number',
            bizType: 'number',
            config: 'string',
            gmtCreate: 'number',
            id: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateRoleRequestSubRoles = UpdateRoleRequestSubRoles;
class UpdateRoleResponseBodySubRoles extends $tea.Model {
    static names() {
        return {
            authLevel: 'authLevel',
            bizType: 'bizType',
            config: 'config',
            gmtCreate: 'gmtCreate',
            id: 'id',
        };
    }
    static types() {
        return {
            authLevel: 'number',
            bizType: 'number',
            config: 'string',
            gmtCreate: 'number',
            id: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UpdateRoleResponseBodySubRoles = UpdateRoleResponseBodySubRoles;
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 - AddRoleMemberRequest
     * @param headers - AddRoleMemberHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns AddRoleMemberResponse
     */
    async addRoleMemberWithOptions(baseId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.roleMemberList)) {
            body["roleMemberList"] = request.roleMemberList;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "AddRoleMember",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/auth/role/member/${baseId}`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new AddRoleMemberResponse({}));
    }
    /**
     * 添加角色成员
     *
     * @param request - AddRoleMemberRequest
     * @returns AddRoleMemberResponse
     */
    async addRoleMember(baseId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new AddRoleMemberHeaders({});
        return await this.addRoleMemberWithOptions(baseId, request, headers, runtime);
    }
    /**
     * 修改高级权限设置开关
     *
     * @param request - ChangeSwitchRequest
     * @param headers - ChangeSwitchHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ChangeSwitchResponse
     */
    async changeSwitchWithOptions(baseId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.value)) {
            body["value"] = request.value;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "ChangeSwitch",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/auth/${baseId}`,
            method: "PUT",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ChangeSwitchResponse({}));
    }
    /**
     * 修改高级权限设置开关
     *
     * @param request - ChangeSwitchRequest
     * @returns ChangeSwitchResponse
     */
    async changeSwitch(baseId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ChangeSwitchHeaders({});
        return await this.changeSwitchWithOptions(baseId, request, headers, runtime);
    }
    /**
     * 新增数据表字段
     *
     * @param request - CreateFieldRequest
     * @param headers - CreateFieldHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns CreateFieldResponse
     */
    async createFieldWithOptions(baseId, sheetIdOrName, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.name)) {
            body["name"] = request.name;
        }
        if (!tea_util_1.default.isUnset(request.property)) {
            body["property"] = request.property;
        }
        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.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "CreateField",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets/${sheetIdOrName}/fields`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new CreateFieldResponse({}));
    }
    /**
     * 新增数据表字段
     *
     * @param request - CreateFieldRequest
     * @returns CreateFieldResponse
     */
    async createField(baseId, sheetIdOrName, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new CreateFieldHeaders({});
        return await this.createFieldWithOptions(baseId, sheetIdOrName, request, headers, runtime);
    }
    /**
     * 创建角色
     *
     * @param request - CreateRoleRequest
     * @param headers - CreateRoleHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns CreateRoleResponse
     */
    async createRoleWithOptions(baseId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.flowType)) {
            body["flowType"] = request.flowType;
        }
        if (!tea_util_1.default.isUnset(request.id)) {
            body["id"] = request.id;
        }
        if (!tea_util_1.default.isUnset(request.name)) {
            body["name"] = request.name;
        }
        if (!tea_util_1.default.isUnset(request.roleType)) {
            body["roleType"] = request.roleType;
        }
        if (!tea_util_1.default.isUnset(request.subRoles)) {
            body["subRoles"] = request.subRoles;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "CreateRole",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/auth/role/${baseId}`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new CreateRoleResponse({}));
    }
    /**
     * 创建角色
     *
     * @param request - CreateRoleRequest
     * @returns CreateRoleResponse
     */
    async createRole(baseId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new CreateRoleHeaders({});
        return await this.createRoleWithOptions(baseId, request, headers, runtime);
    }
    /**
     * 创建数据表
     *
     * @param request - CreateSheetRequest
     * @param headers - CreateSheetHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns CreateSheetResponse
     */
    async createSheetWithOptions(baseId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.fields)) {
            body["fields"] = request.fields;
        }
        if (!tea_util_1.default.isUnset(request.name)) {
            body["name"] = request.name;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "CreateSheet",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new CreateSheetResponse({}));
    }
    /**
     * 创建数据表
     *
     * @param request - CreateSheetRequest
     * @returns CreateSheetResponse
     */
    async createSheet(baseId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new CreateSheetHeaders({});
        return await this.createSheetWithOptions(baseId, request, headers, runtime);
    }
    /**
     * 删除数据表字段
     *
     * @param request - DeleteFieldRequest
     * @param headers - DeleteFieldHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns DeleteFieldResponse
     */
    async deleteFieldWithOptions(baseId, sheetIdOrName, fieldIdOrName, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
        });
        let params = new $OpenApi.Params({
            action: "DeleteField",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets/${sheetIdOrName}/fields/${fieldIdOrName}`,
            method: "DELETE",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new DeleteFieldResponse({}));
    }
    /**
     * 删除数据表字段
     *
     * @param request - DeleteFieldRequest
     * @returns DeleteFieldResponse
     */
    async deleteField(baseId, sheetIdOrName, fieldIdOrName, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new DeleteFieldHeaders({});
        return await this.deleteFieldWithOptions(baseId, sheetIdOrName, fieldIdOrName, request, headers, runtime);
    }
    /**
     * 删除数据表多行记录
     *
     * @param request - DeleteRecordsRequest
     * @param headers - DeleteRecordsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns DeleteRecordsResponse
     */
    async deleteRecordsWithOptions(baseId, sheetIdOrName, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.recordIds)) {
            body["recordIds"] = request.recordIds;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "DeleteRecords",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets/${sheetIdOrName}/records/delete`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new DeleteRecordsResponse({}));
    }
    /**
     * 删除数据表多行记录
     *
     * @param request - DeleteRecordsRequest
     * @returns DeleteRecordsResponse
     */
    async deleteRecords(baseId, sheetIdOrName, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new DeleteRecordsHeaders({});
        return await this.deleteRecordsWithOptions(baseId, sheetIdOrName, request, headers, runtime);
    }
    /**
     * 删除角色
     *
     * @param request - DeleteRoleRequest
     * @param headers - DeleteRoleHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns DeleteRoleResponse
     */
    async deleteRoleWithOptions(baseId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.roleId)) {
            body["roleId"] = request.roleId;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "DeleteRole",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/auth/role/${baseId}`,
            method: "DELETE",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new DeleteRoleResponse({}));
    }
    /**
     * 删除角色
     *
     * @param request - DeleteRoleRequest
     * @returns DeleteRoleResponse
     */
    async deleteRole(baseId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new DeleteRoleHeaders({});
        return await this.deleteRoleWithOptions(baseId, request, headers, runtime);
    }
    /**
     * 删除数据表
     *
     * @param request - DeleteSheetRequest
     * @param headers - DeleteSheetHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns DeleteSheetResponse
     */
    async deleteSheetWithOptions(baseId, sheetIdOrName, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
        });
        let params = new $OpenApi.Params({
            action: "DeleteSheet",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets/${sheetIdOrName}`,
            method: "DELETE",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new DeleteSheetResponse({}));
    }
    /**
     * 删除数据表
     *
     * @param request - DeleteSheetRequest
     * @returns DeleteSheetResponse
     */
    async deleteSheet(baseId, sheetIdOrName, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new DeleteSheetHeaders({});
        return await this.deleteSheetWithOptions(baseId, sheetIdOrName, request, headers, runtime);
    }
    /**
     * 获取所有字段
     *
     * @param request - GetAllFieldsRequest
     * @param headers - GetAllFieldsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetAllFieldsResponse
     */
    async getAllFieldsWithOptions(baseId, sheetIdOrName, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
        });
        let params = new $OpenApi.Params({
            action: "GetAllFields",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets/${sheetIdOrName}/fields`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetAllFieldsResponse({}));
    }
    /**
     * 获取所有字段
     *
     * @param request - GetAllFieldsRequest
     * @returns GetAllFieldsResponse
     */
    async getAllFields(baseId, sheetIdOrName, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetAllFieldsHeaders({});
        return await this.getAllFieldsWithOptions(baseId, sheetIdOrName, request, headers, runtime);
    }
    /**
     * 获取所有数据表
     *
     * @param request - GetAllSheetsRequest
     * @param headers - GetAllSheetsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetAllSheetsResponse
     */
    async getAllSheetsWithOptions(baseId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
        });
        let params = new $OpenApi.Params({
            action: "GetAllSheets",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetAllSheetsResponse({}));
    }
    /**
     * 获取所有数据表
     *
     * @param request - GetAllSheetsRequest
     * @returns GetAllSheetsResponse
     */
    async getAllSheets(baseId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetAllSheetsHeaders({});
        return await this.getAllSheetsWithOptions(baseId, request, headers, runtime);
    }
    /**
     * 获取记录
     *
     * @param request - GetRecordRequest
     * @param headers - GetRecordHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetRecordResponse
     */
    async getRecordWithOptions(baseId, sheetIdOrName, recordId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
        });
        let params = new $OpenApi.Params({
            action: "GetRecord",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets/${sheetIdOrName}/records/${recordId}`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetRecordResponse({}));
    }
    /**
     * 获取记录
     *
     * @param request - GetRecordRequest
     * @returns GetRecordResponse
     */
    async getRecord(baseId, sheetIdOrName, recordId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetRecordHeaders({});
        return await this.getRecordWithOptions(baseId, sheetIdOrName, recordId, request, headers, runtime);
    }
    /**
     * 获取多行记录
     *
     * @param request - GetRecordsRequest
     * @param headers - GetRecordsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetRecordsResponse
     */
    async getRecordsWithOptions(baseId, sheetIdOrName, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.maxResults)) {
            query["maxResults"] = request.maxResults;
        }
        if (!tea_util_1.default.isUnset(request.nextToken)) {
            query["nextToken"] = request.nextToken;
        }
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
        });
        let params = new $OpenApi.Params({
            action: "GetRecords",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets/${sheetIdOrName}/records`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetRecordsResponse({}));
    }
    /**
     * 获取多行记录
     *
     * @param request - GetRecordsRequest
     * @returns GetRecordsResponse
     */
    async getRecords(baseId, sheetIdOrName, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetRecordsHeaders({});
        return await this.getRecordsWithOptions(baseId, sheetIdOrName, request, headers, runtime);
    }
    /**
     * 获取数据表
     *
     * @param request - GetSheetRequest
     * @param headers - GetSheetHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetSheetResponse
     */
    async getSheetWithOptions(baseId, sheetIdOrName, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
        });
        let params = new $OpenApi.Params({
            action: "GetSheet",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets/${sheetIdOrName}`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetSheetResponse({}));
    }
    /**
     * 获取数据表
     *
     * @param request - GetSheetRequest
     * @returns GetSheetResponse
     */
    async getSheet(baseId, sheetIdOrName, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetSheetHeaders({});
        return await this.getSheetWithOptions(baseId, sheetIdOrName, request, headers, runtime);
    }
    /**
     * 获取高级权限设置开关
     *
     * @param request - GetSwitchRequest
     * @param headers - GetSwitchHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetSwitchResponse
     */
    async getSwitchWithOptions(baseId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
        });
        let params = new $OpenApi.Params({
            action: "GetSwitch",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/auth/${baseId}`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetSwitchResponse({}));
    }
    /**
     * 获取高级权限设置开关
     *
     * @param request - GetSwitchRequest
     * @returns GetSwitchResponse
     */
    async getSwitch(baseId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetSwitchHeaders({});
        return await this.getSwitchWithOptions(baseId, request, headers, runtime);
    }
    /**
     * 获取指定用户的高级权限角色配置列表
     *
     * @param request - GetUserDocRolesRequest
     * @param headers - GetUserDocRolesHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetUserDocRolesResponse
     */
    async getUserDocRolesWithOptions(baseId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        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: "GetUserDocRoles",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/auth/role/${baseId}`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetUserDocRolesResponse({}));
    }
    /**
     * 获取指定用户的高级权限角色配置列表
     *
     * @param request - GetUserDocRolesRequest
     * @returns GetUserDocRolesResponse
     */
    async getUserDocRoles(baseId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetUserDocRolesHeaders({});
        return await this.getUserDocRolesWithOptions(baseId, request, headers, runtime);
    }
    /**
     * 新增记录
     *
     * @param request - InsertRecordsRequest
     * @param headers - InsertRecordsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns InsertRecordsResponse
     */
    async insertRecordsWithOptions(baseId, sheetIdOrName, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.records)) {
            body["records"] = request.records;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "InsertRecords",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets/${sheetIdOrName}/records`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new InsertRecordsResponse({}));
    }
    /**
     * 新增记录
     *
     * @param request - InsertRecordsRequest
     * @returns InsertRecordsResponse
     */
    async insertRecords(baseId, sheetIdOrName, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new InsertRecordsHeaders({});
        return await this.insertRecordsWithOptions(baseId, sheetIdOrName, request, headers, runtime);
    }
    /**
     * 列出多行记录
     *
     * @param request - ListRecordsRequest
     * @param headers - ListRecordsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListRecordsResponse
     */
    async listRecordsWithOptions(baseId, sheetIdOrName, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.calcFields)) {
            body["calcFields"] = request.calcFields;
        }
        if (!tea_util_1.default.isUnset(request.filter)) {
            body["filter"] = request.filter;
        }
        if (!tea_util_1.default.isUnset(request.maxResults)) {
            body["maxResults"] = request.maxResults;
        }
        if (!tea_util_1.default.isUnset(request.nextToken)) {
            body["nextToken"] = request.nextToken;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "ListRecords",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets/${sheetIdOrName}/records/list`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListRecordsResponse({}));
    }
    /**
     * 列出多行记录
     *
     * @param request - ListRecordsRequest
     * @returns ListRecordsResponse
     */
    async listRecords(baseId, sheetIdOrName, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListRecordsHeaders({});
        return await this.listRecordsWithOptions(baseId, sheetIdOrName, request, headers, runtime);
    }
    /**
     * 富文本值预处理
     *
     * @param request - PrepareSetRichTextRequest
     * @param headers - PrepareSetRichTextHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns PrepareSetRichTextResponse
     */
    async prepareSetRichTextWithOptions(baseId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.markdown)) {
            body["markdown"] = request.markdown;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "PrepareSetRichText",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/prepareSetRichText`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new PrepareSetRichTextResponse({}));
    }
    /**
     * 富文本值预处理
     *
     * @param request - PrepareSetRichTextRequest
     * @returns PrepareSetRichTextResponse
     */
    async prepareSetRichText(baseId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new PrepareSetRichTextHeaders({});
        return await this.prepareSetRichTextWithOptions(baseId, request, headers, runtime);
    }
    /**
     * 查询文档所有角色和角色成员
     *
     * @param request - QueryDocAllRolesRequest
     * @param headers - QueryDocAllRolesHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns QueryDocAllRolesResponse
     */
    async queryDocAllRolesWithOptions(baseId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
        });
        let params = new $OpenApi.Params({
            action: "QueryDocAllRoles",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/auth/role/member/${baseId}`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new QueryDocAllRolesResponse({}));
    }
    /**
     * 查询文档所有角色和角色成员
     *
     * @param request - QueryDocAllRolesRequest
     * @returns QueryDocAllRolesResponse
     */
    async queryDocAllRoles(baseId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new QueryDocAllRolesHeaders({});
        return await this.queryDocAllRolesWithOptions(baseId, request, headers, runtime);
    }
    /**
     * 重建角色成员
     *
     * @param request - RebuildRoleMembersRequest
     * @param headers - RebuildRoleMembersHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns RebuildRoleMembersResponse
     */
    async rebuildRoleMembersWithOptions(baseId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.defaultRoleDTO)) {
            body["defaultRoleDTO"] = request.defaultRoleDTO;
        }
        if (!tea_util_1.default.isUnset(request.toRoleMemberDTOMap)) {
            body["toRoleMemberDTOMap"] = request.toRoleMemberDTOMap;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "RebuildRoleMembers",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/auth/role/member/${baseId}`,
            method: "PUT",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new RebuildRoleMembersResponse({}));
    }
    /**
     * 重建角色成员
     *
     * @param request - RebuildRoleMembersRequest
     * @returns RebuildRoleMembersResponse
     */
    async rebuildRoleMembers(baseId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new RebuildRoleMembersHeaders({});
        return await this.rebuildRoleMembersWithOptions(baseId, request, headers, runtime);
    }
    /**
     * 更新数据表字段
     *
     * @param request - UpdateFieldRequest
     * @param headers - UpdateFieldHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns UpdateFieldResponse
     */
    async updateFieldWithOptions(baseId, sheetIdOrName, fieldIdOrName, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.name)) {
            body["name"] = request.name;
        }
        if (!tea_util_1.default.isUnset(request.property)) {
            body["property"] = request.property;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "UpdateField",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets/${sheetIdOrName}/fields/${fieldIdOrName}`,
            method: "PUT",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new UpdateFieldResponse({}));
    }
    /**
     * 更新数据表字段
     *
     * @param request - UpdateFieldRequest
     * @returns UpdateFieldResponse
     */
    async updateField(baseId, sheetIdOrName, fieldIdOrName, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new UpdateFieldHeaders({});
        return await this.updateFieldWithOptions(baseId, sheetIdOrName, fieldIdOrName, request, headers, runtime);
    }
    /**
     * 更新数据表多行记录
     *
     * @param request - UpdateRecordsRequest
     * @param headers - UpdateRecordsHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns UpdateRecordsResponse
     */
    async updateRecordsWithOptions(baseId, sheetIdOrName, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.records)) {
            body["records"] = request.records;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "UpdateRecords",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets/${sheetIdOrName}/records`,
            method: "PUT",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new UpdateRecordsResponse({}));
    }
    /**
     * 更新数据表多行记录
     *
     * @param request - UpdateRecordsRequest
     * @returns UpdateRecordsResponse
     */
    async updateRecords(baseId, sheetIdOrName, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new UpdateRecordsHeaders({});
        return await this.updateRecordsWithOptions(baseId, sheetIdOrName, request, headers, runtime);
    }
    /**
     * 更新角色
     *
     * @param request - UpdateRoleRequest
     * @param headers - UpdateRoleHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns UpdateRoleResponse
     */
    async updateRoleWithOptions(baseId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.flowType)) {
            body["flowType"] = request.flowType;
        }
        if (!tea_util_1.default.isUnset(request.id)) {
            body["id"] = request.id;
        }
        if (!tea_util_1.default.isUnset(request.name)) {
            body["name"] = request.name;
        }
        if (!tea_util_1.default.isUnset(request.roleType)) {
            body["roleType"] = request.roleType;
        }
        if (!tea_util_1.default.isUnset(request.subRoles)) {
            body["subRoles"] = request.subRoles;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "UpdateRole",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/auth/role/${baseId}`,
            method: "PUT",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new UpdateRoleResponse({}));
    }
    /**
     * 更新角色
     *
     * @param request - UpdateRoleRequest
     * @returns UpdateRoleResponse
     */
    async updateRole(baseId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new UpdateRoleHeaders({});
        return await this.updateRoleWithOptions(baseId, request, headers, runtime);
    }
    /**
     * 更新数据表
     *
     * @param request - UpdateSheetRequest
     * @param headers - UpdateSheetHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns UpdateSheetResponse
     */
    async updateSheetWithOptions(baseId, sheetIdOrName, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.operatorId)) {
            query["operatorId"] = request.operatorId;
        }
        let body = {};
        if (!tea_util_1.default.isUnset(request.name)) {
            body["name"] = request.name;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "UpdateSheet",
            version: "notable_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/notable/bases/${baseId}/sheets/${sheetIdOrName}`,
            method: "PUT",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new UpdateSheetResponse({}));
    }
    /**
     * 更新数据表
     *
     * @param request - UpdateSheetRequest
     * @returns UpdateSheetResponse
     */
    async updateSheet(baseId, sheetIdOrName, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new UpdateSheetHeaders({});
        return await this.updateSheetWithOptions(baseId, sheetIdOrName, request, headers, runtime);
    }
}
exports.default = Client;
//# sourceMappingURL=client.js.map