"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.RecallAuditTemplateResponseBodyRecallResult = exports.QueryTemplateCategorysResponseBodyCategoryList = exports.BatchUpdateTemplateResponseBodyUpdateResultList = exports.BatchUpdateTemplateRequestTemplateList = exports.BatchQueryByTemplateKeyResponseBodyTemplateList = exports.BatchCreateTemplateResponseBodyCreateResultList = exports.BatchCreateTemplateRequestTemplateList = exports.RecallAuditTemplateResponse = exports.RecallAuditTemplateResponseBody = exports.RecallAuditTemplateRequest = exports.RecallAuditTemplateHeaders = exports.QueryTemplateCategorysResponse = exports.QueryTemplateCategorysResponseBody = exports.QueryTemplateCategorysHeaders = exports.QueryRoleTagListResponse = exports.QueryRoleTagListResponseBody = exports.QueryRoleTagListHeaders = exports.QueryIndustryTagListResponse = exports.QueryIndustryTagListResponseBody = exports.QueryIndustryTagListHeaders = exports.BatchUpdateTemplateResponse = exports.BatchUpdateTemplateResponseBody = exports.BatchUpdateTemplateRequest = exports.BatchUpdateTemplateHeaders = exports.BatchQueryByTemplateKeyResponse = exports.BatchQueryByTemplateKeyResponseBody = exports.BatchQueryByTemplateKeyRequest = exports.BatchQueryByTemplateKeyHeaders = exports.BatchCreateTemplateResponse = exports.BatchCreateTemplateResponseBody = exports.BatchCreateTemplateRequest = exports.BatchCreateTemplateHeaders = 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 BatchCreateTemplateHeaders 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.BatchCreateTemplateHeaders = BatchCreateTemplateHeaders;
class BatchCreateTemplateRequest extends $tea.Model {
    static names() {
        return {
            templateList: 'templateList',
        };
    }
    static types() {
        return {
            templateList: { 'type': 'array', 'itemType': BatchCreateTemplateRequestTemplateList },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchCreateTemplateRequest = BatchCreateTemplateRequest;
class BatchCreateTemplateResponseBody extends $tea.Model {
    static names() {
        return {
            createResultList: 'createResultList',
        };
    }
    static types() {
        return {
            createResultList: { 'type': 'array', 'itemType': BatchCreateTemplateResponseBodyCreateResultList },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchCreateTemplateResponseBody = BatchCreateTemplateResponseBody;
class BatchCreateTemplateResponse 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: BatchCreateTemplateResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchCreateTemplateResponse = BatchCreateTemplateResponse;
class BatchQueryByTemplateKeyHeaders 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.BatchQueryByTemplateKeyHeaders = BatchQueryByTemplateKeyHeaders;
class BatchQueryByTemplateKeyRequest extends $tea.Model {
    static names() {
        return {
            templateKeys: 'templateKeys',
        };
    }
    static types() {
        return {
            templateKeys: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchQueryByTemplateKeyRequest = BatchQueryByTemplateKeyRequest;
class BatchQueryByTemplateKeyResponseBody extends $tea.Model {
    static names() {
        return {
            templateList: 'templateList',
        };
    }
    static types() {
        return {
            templateList: { 'type': 'array', 'itemType': BatchQueryByTemplateKeyResponseBodyTemplateList },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchQueryByTemplateKeyResponseBody = BatchQueryByTemplateKeyResponseBody;
class BatchQueryByTemplateKeyResponse 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: BatchQueryByTemplateKeyResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchQueryByTemplateKeyResponse = BatchQueryByTemplateKeyResponse;
class BatchUpdateTemplateHeaders 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.BatchUpdateTemplateHeaders = BatchUpdateTemplateHeaders;
class BatchUpdateTemplateRequest extends $tea.Model {
    static names() {
        return {
            templateList: 'templateList',
        };
    }
    static types() {
        return {
            templateList: { 'type': 'array', 'itemType': BatchUpdateTemplateRequestTemplateList },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchUpdateTemplateRequest = BatchUpdateTemplateRequest;
class BatchUpdateTemplateResponseBody extends $tea.Model {
    static names() {
        return {
            updateResultList: 'updateResultList',
        };
    }
    static types() {
        return {
            updateResultList: { 'type': 'array', 'itemType': BatchUpdateTemplateResponseBodyUpdateResultList },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchUpdateTemplateResponseBody = BatchUpdateTemplateResponseBody;
class BatchUpdateTemplateResponse 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: BatchUpdateTemplateResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchUpdateTemplateResponse = BatchUpdateTemplateResponse;
class QueryIndustryTagListHeaders 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.QueryIndustryTagListHeaders = QueryIndustryTagListHeaders;
class QueryIndustryTagListResponseBody extends $tea.Model {
    static names() {
        return {
            industryList: 'industryList',
        };
    }
    static types() {
        return {
            industryList: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryIndustryTagListResponseBody = QueryIndustryTagListResponseBody;
class QueryIndustryTagListResponse 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: QueryIndustryTagListResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryIndustryTagListResponse = QueryIndustryTagListResponse;
class QueryRoleTagListHeaders 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.QueryRoleTagListHeaders = QueryRoleTagListHeaders;
class QueryRoleTagListResponseBody extends $tea.Model {
    static names() {
        return {
            roleList: 'roleList',
        };
    }
    static types() {
        return {
            roleList: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryRoleTagListResponseBody = QueryRoleTagListResponseBody;
class QueryRoleTagListResponse 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: QueryRoleTagListResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryRoleTagListResponse = QueryRoleTagListResponse;
class QueryTemplateCategorysHeaders 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.QueryTemplateCategorysHeaders = QueryTemplateCategorysHeaders;
class QueryTemplateCategorysResponseBody extends $tea.Model {
    static names() {
        return {
            categoryList: 'categoryList',
            total: 'total',
        };
    }
    static types() {
        return {
            categoryList: { 'type': 'array', 'itemType': QueryTemplateCategorysResponseBodyCategoryList },
            total: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryTemplateCategorysResponseBody = QueryTemplateCategorysResponseBody;
class QueryTemplateCategorysResponse 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: QueryTemplateCategorysResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryTemplateCategorysResponse = QueryTemplateCategorysResponse;
class RecallAuditTemplateHeaders 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.RecallAuditTemplateHeaders = RecallAuditTemplateHeaders;
class RecallAuditTemplateRequest extends $tea.Model {
    static names() {
        return {
            templateKeys: 'templateKeys',
        };
    }
    static types() {
        return {
            templateKeys: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RecallAuditTemplateRequest = RecallAuditTemplateRequest;
class RecallAuditTemplateResponseBody extends $tea.Model {
    static names() {
        return {
            recallResult: 'recallResult',
        };
    }
    static types() {
        return {
            recallResult: { 'type': 'array', 'itemType': RecallAuditTemplateResponseBodyRecallResult },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RecallAuditTemplateResponseBody = RecallAuditTemplateResponseBody;
class RecallAuditTemplateResponse 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: RecallAuditTemplateResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RecallAuditTemplateResponse = RecallAuditTemplateResponse;
class BatchCreateTemplateRequestTemplateList extends $tea.Model {
    static names() {
        return {
            adaptEnv: 'adaptEnv',
            appDesc: 'appDesc',
            appIcon: 'appIcon',
            caseVideoList: 'caseVideoList',
            categoryCode: 'categoryCode',
            coverImgList: 'coverImgList',
            expUrl: 'expUrl',
            industryLabelList: 'industryLabelList',
            installTimes: 'installTimes',
            mobilePreviewMediaList: 'mobilePreviewMediaList',
            name: 'name',
            previewMediaList: 'previewMediaList',
            providerName: 'providerName',
            roleLabelList: 'roleLabelList',
            simpleDesc: 'simpleDesc',
            templateKey: 'templateKey',
            useCasesMediaList: 'useCasesMediaList',
        };
    }
    static types() {
        return {
            adaptEnv: { 'type': 'array', 'itemType': 'string' },
            appDesc: 'string',
            appIcon: 'string',
            caseVideoList: { 'type': 'array', 'itemType': 'string' },
            categoryCode: 'string',
            coverImgList: { 'type': 'array', 'itemType': 'string' },
            expUrl: 'string',
            industryLabelList: { 'type': 'array', 'itemType': 'string' },
            installTimes: 'number',
            mobilePreviewMediaList: { 'type': 'array', 'itemType': 'string' },
            name: 'string',
            previewMediaList: { 'type': 'array', 'itemType': 'string' },
            providerName: 'string',
            roleLabelList: { 'type': 'array', 'itemType': 'string' },
            simpleDesc: 'string',
            templateKey: 'string',
            useCasesMediaList: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchCreateTemplateRequestTemplateList = BatchCreateTemplateRequestTemplateList;
class BatchCreateTemplateResponseBodyCreateResultList extends $tea.Model {
    static names() {
        return {
            templateKey: 'templateKey',
            value: 'value',
        };
    }
    static types() {
        return {
            templateKey: 'string',
            value: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchCreateTemplateResponseBodyCreateResultList = BatchCreateTemplateResponseBodyCreateResultList;
class BatchQueryByTemplateKeyResponseBodyTemplateList extends $tea.Model {
    static names() {
        return {
            adaptEnv: 'adaptEnv',
            appDesc: 'appDesc',
            appIcon: 'appIcon',
            caseVideoList: 'caseVideoList',
            category: 'category',
            coverImgList: 'coverImgList',
            expUrl: 'expUrl',
            industryLabelList: 'industryLabelList',
            installTimes: 'installTimes',
            mobilePreviewMediaList: 'mobilePreviewMediaList',
            name: 'name',
            previewMediaList: 'previewMediaList',
            providerName: 'providerName',
            roleLabelList: 'roleLabelList',
            simpleDesc: 'simpleDesc',
            templateKey: 'templateKey',
            useCasesMediaList: 'useCasesMediaList',
        };
    }
    static types() {
        return {
            adaptEnv: { 'type': 'array', 'itemType': 'string' },
            appDesc: 'string',
            appIcon: 'string',
            caseVideoList: { 'type': 'array', 'itemType': 'string' },
            category: 'string',
            coverImgList: { 'type': 'array', 'itemType': 'string' },
            expUrl: 'string',
            industryLabelList: { 'type': 'array', 'itemType': 'string' },
            installTimes: 'number',
            mobilePreviewMediaList: { 'type': 'array', 'itemType': 'string' },
            name: 'string',
            previewMediaList: { 'type': 'array', 'itemType': 'string' },
            providerName: 'string',
            roleLabelList: { 'type': 'array', 'itemType': 'string' },
            simpleDesc: 'string',
            templateKey: 'string',
            useCasesMediaList: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchQueryByTemplateKeyResponseBodyTemplateList = BatchQueryByTemplateKeyResponseBodyTemplateList;
class BatchUpdateTemplateRequestTemplateList extends $tea.Model {
    static names() {
        return {
            adaptEnv: 'adaptEnv',
            appDesc: 'appDesc',
            appIcon: 'appIcon',
            caseVideoList: 'caseVideoList',
            categoryCode: 'categoryCode',
            coverImgList: 'coverImgList',
            expUrl: 'expUrl',
            industryLabelList: 'industryLabelList',
            mobilePreviewMediaList: 'mobilePreviewMediaList',
            name: 'name',
            previewMediaList: 'previewMediaList',
            providerName: 'providerName',
            roleLabelList: 'roleLabelList',
            simpleDesc: 'simpleDesc',
            templateKey: 'templateKey',
            useCasesMediaList: 'useCasesMediaList',
        };
    }
    static types() {
        return {
            adaptEnv: { 'type': 'array', 'itemType': 'string' },
            appDesc: 'string',
            appIcon: 'string',
            caseVideoList: { 'type': 'array', 'itemType': 'string' },
            categoryCode: 'string',
            coverImgList: { 'type': 'array', 'itemType': 'string' },
            expUrl: 'string',
            industryLabelList: { 'type': 'array', 'itemType': 'string' },
            mobilePreviewMediaList: { 'type': 'array', 'itemType': 'string' },
            name: 'string',
            previewMediaList: { 'type': 'array', 'itemType': 'string' },
            providerName: 'string',
            roleLabelList: { 'type': 'array', 'itemType': 'string' },
            simpleDesc: 'string',
            templateKey: 'string',
            useCasesMediaList: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchUpdateTemplateRequestTemplateList = BatchUpdateTemplateRequestTemplateList;
class BatchUpdateTemplateResponseBodyUpdateResultList extends $tea.Model {
    static names() {
        return {
            templateKey: 'templateKey',
            value: 'value',
        };
    }
    static types() {
        return {
            templateKey: 'string',
            value: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.BatchUpdateTemplateResponseBodyUpdateResultList = BatchUpdateTemplateResponseBodyUpdateResultList;
class QueryTemplateCategorysResponseBodyCategoryList extends $tea.Model {
    static names() {
        return {
            code: 'code',
            name: 'name',
        };
    }
    static types() {
        return {
            code: 'string',
            name: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryTemplateCategorysResponseBodyCategoryList = QueryTemplateCategorysResponseBodyCategoryList;
class RecallAuditTemplateResponseBodyRecallResult extends $tea.Model {
    static names() {
        return {
            templateKey: 'templateKey',
            value: 'value',
        };
    }
    static types() {
        return {
            templateKey: 'string',
            value: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.RecallAuditTemplateResponseBodyRecallResult = RecallAuditTemplateResponseBodyRecallResult;
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 - BatchCreateTemplateRequest
     * @param headers - BatchCreateTemplateHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns BatchCreateTemplateResponse
     */
    async batchCreateTemplateWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.templateList)) {
            body["templateList"] = request.templateList;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "BatchCreateTemplate",
            version: "apaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/apaas/templates`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new BatchCreateTemplateResponse({}));
    }
    /**
     * 批量创建模板
     *
     * @param request - BatchCreateTemplateRequest
     * @returns BatchCreateTemplateResponse
     */
    async batchCreateTemplate(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new BatchCreateTemplateHeaders({});
        return await this.batchCreateTemplateWithOptions(request, headers, runtime);
    }
    /**
     * 批量查询模板
     *
     * @param request - BatchQueryByTemplateKeyRequest
     * @param headers - BatchQueryByTemplateKeyHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns BatchQueryByTemplateKeyResponse
     */
    async batchQueryByTemplateKeyWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.templateKeys)) {
            body["templateKeys"] = request.templateKeys;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "BatchQueryByTemplateKey",
            version: "apaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/apaas/templates/query`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new BatchQueryByTemplateKeyResponse({}));
    }
    /**
     * 批量查询模板
     *
     * @param request - BatchQueryByTemplateKeyRequest
     * @returns BatchQueryByTemplateKeyResponse
     */
    async batchQueryByTemplateKey(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new BatchQueryByTemplateKeyHeaders({});
        return await this.batchQueryByTemplateKeyWithOptions(request, headers, runtime);
    }
    /**
     * 批量修改模板
     *
     * @param request - BatchUpdateTemplateRequest
     * @param headers - BatchUpdateTemplateHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns BatchUpdateTemplateResponse
     */
    async batchUpdateTemplateWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.templateList)) {
            body["templateList"] = request.templateList;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "BatchUpdateTemplate",
            version: "apaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/apaas/templates`,
            method: "PUT",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new BatchUpdateTemplateResponse({}));
    }
    /**
     * 批量修改模板
     *
     * @param request - BatchUpdateTemplateRequest
     * @returns BatchUpdateTemplateResponse
     */
    async batchUpdateTemplate(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new BatchUpdateTemplateHeaders({});
        return await this.batchUpdateTemplateWithOptions(request, headers, runtime);
    }
    /**
     * 查询行业标签
     *
     * @param headers - QueryIndustryTagListHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns QueryIndustryTagListResponse
     */
    async queryIndustryTagListWithOptions(headers, runtime) {
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
        });
        let params = new $OpenApi.Params({
            action: "QueryIndustryTagList",
            version: "apaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/apaas/templates/industries`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new QueryIndustryTagListResponse({}));
    }
    /**
     * 查询行业标签
     * @returns QueryIndustryTagListResponse
     */
    async queryIndustryTagList() {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new QueryIndustryTagListHeaders({});
        return await this.queryIndustryTagListWithOptions(headers, runtime);
    }
    /**
     * 查询角色
     *
     * @param headers - QueryRoleTagListHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns QueryRoleTagListResponse
     */
    async queryRoleTagListWithOptions(headers, runtime) {
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
        });
        let params = new $OpenApi.Params({
            action: "QueryRoleTagList",
            version: "apaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/apaas/templates/roles`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new QueryRoleTagListResponse({}));
    }
    /**
     * 查询角色
     * @returns QueryRoleTagListResponse
     */
    async queryRoleTagList() {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new QueryRoleTagListHeaders({});
        return await this.queryRoleTagListWithOptions(headers, runtime);
    }
    /**
     * 查询模板分类
     *
     * @param headers - QueryTemplateCategorysHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns QueryTemplateCategorysResponse
     */
    async queryTemplateCategorysWithOptions(headers, runtime) {
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
        });
        let params = new $OpenApi.Params({
            action: "QueryTemplateCategorys",
            version: "apaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/apaas/templates/categories`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new QueryTemplateCategorysResponse({}));
    }
    /**
     * 查询模板分类
     * @returns QueryTemplateCategorysResponse
     */
    async queryTemplateCategorys() {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new QueryTemplateCategorysHeaders({});
        return await this.queryTemplateCategorysWithOptions(headers, runtime);
    }
    /**
     * 撤回模板审核
     *
     * @param request - RecallAuditTemplateRequest
     * @param headers - RecallAuditTemplateHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns RecallAuditTemplateResponse
     */
    async recallAuditTemplateWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.templateKeys)) {
            body["templateKeys"] = request.templateKeys;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "RecallAuditTemplate",
            version: "apaas_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/apaas/templates/audits/recall`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new RecallAuditTemplateResponse({}));
    }
    /**
     * 撤回模板审核
     *
     * @param request - RecallAuditTemplateRequest
     * @returns RecallAuditTemplateResponse
     */
    async recallAuditTemplate(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new RecallAuditTemplateHeaders({});
        return await this.recallAuditTemplateWithOptions(request, headers, runtime);
    }
}
exports.default = Client;
//# sourceMappingURL=client.js.map