"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.UploadVideosResponseBodyResult = exports.UploadVideosRequestBody = exports.PageFeedResponseBodyFeedList = exports.ListItemUserDataResponseBodyStudyInfos = exports.GetFeedResponseBodyFeedItem = exports.DeleteVideosResponseBodyResult = exports.CreateFeedRequestFeedInfo = exports.CreateFeedRequestFeedInfoRecommends = exports.CreateFeedRequestFeedInfoMediaContents = exports.CreateFeedRequestCourseInfo = exports.CreateFeedRequestCourseInfoPayInfo = exports.CreateFeedRequestCourseInfoPayInfoDiscountInfo = exports.CreateFeedRequestCourseInfoPayInfoCsUserInfo = exports.CreateFeedRequestCourseInfoLectorUserInfo = exports.UploadVideosResponse = exports.UploadVideosResponseBody = exports.UploadVideosRequest = exports.UploadVideosHeaders = exports.PageFeedResponse = exports.PageFeedResponseBody = exports.PageFeedRequest = exports.PageFeedHeaders = exports.ListItemUserDataResponse = exports.ListItemUserDataResponseBody = exports.ListItemUserDataRequest = exports.ListItemUserDataHeaders = exports.GetMediaCerficateResponse = exports.GetMediaCerficateResponseBody = exports.GetMediaCerficateRequest = exports.GetMediaCerficateHeaders = exports.GetFeedResponse = exports.GetFeedResponseBody = exports.GetFeedRequest = exports.GetFeedHeaders = exports.DeleteVideosResponse = exports.DeleteVideosResponseBody = exports.DeleteVideosRequest = exports.DeleteVideosHeaders = exports.CreateFeedResponse = exports.CreateFeedResponseBody = exports.CreateFeedRequest = exports.CreateFeedHeaders = 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 CreateFeedHeaders 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.CreateFeedHeaders = CreateFeedHeaders;
class CreateFeedRequest extends $tea.Model {
    static names() {
        return {
            courseInfo: 'courseInfo',
            createUserId: 'createUserId',
            feedInfo: 'feedInfo',
        };
    }
    static types() {
        return {
            courseInfo: CreateFeedRequestCourseInfo,
            createUserId: 'string',
            feedInfo: CreateFeedRequestFeedInfo,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFeedRequest = CreateFeedRequest;
class CreateFeedResponseBody extends $tea.Model {
    static names() {
        return {
            feedId: 'feedId',
        };
    }
    static types() {
        return {
            feedId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFeedResponseBody = CreateFeedResponseBody;
class CreateFeedResponse 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: CreateFeedResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFeedResponse = CreateFeedResponse;
class DeleteVideosHeaders 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.DeleteVideosHeaders = DeleteVideosHeaders;
class DeleteVideosRequest extends $tea.Model {
    static names() {
        return {
            body: 'body',
        };
    }
    static types() {
        return {
            body: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteVideosRequest = DeleteVideosRequest;
class DeleteVideosResponseBody extends $tea.Model {
    static names() {
        return {
            result: 'result',
            success: 'success',
        };
    }
    static types() {
        return {
            result: DeleteVideosResponseBodyResult,
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteVideosResponseBody = DeleteVideosResponseBody;
class DeleteVideosResponse 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: DeleteVideosResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteVideosResponse = DeleteVideosResponse;
class GetFeedHeaders 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.GetFeedHeaders = GetFeedHeaders;
class GetFeedRequest extends $tea.Model {
    static names() {
        return {
            mcnId: 'mcnId',
        };
    }
    static types() {
        return {
            mcnId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetFeedRequest = GetFeedRequest;
class GetFeedResponseBody extends $tea.Model {
    static names() {
        return {
            feedId: 'feedId',
            feedItem: 'feedItem',
        };
    }
    static types() {
        return {
            feedId: 'string',
            feedItem: { 'type': 'array', 'itemType': GetFeedResponseBodyFeedItem },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetFeedResponseBody = GetFeedResponseBody;
class GetFeedResponse 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: GetFeedResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetFeedResponse = GetFeedResponse;
class GetMediaCerficateHeaders 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.GetMediaCerficateHeaders = GetMediaCerficateHeaders;
class GetMediaCerficateRequest extends $tea.Model {
    static names() {
        return {
            fileName: 'fileName',
            mcnId: 'mcnId',
            mediaId: 'mediaId',
            mediaIntroduction: 'mediaIntroduction',
            mediaTitle: 'mediaTitle',
            thumbUrl: 'thumbUrl',
            userId: 'userId',
        };
    }
    static types() {
        return {
            fileName: 'string',
            mcnId: 'string',
            mediaId: 'string',
            mediaIntroduction: 'string',
            mediaTitle: 'string',
            thumbUrl: 'string',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetMediaCerficateRequest = GetMediaCerficateRequest;
class GetMediaCerficateResponseBody extends $tea.Model {
    static names() {
        return {
            mediaId: 'mediaId',
            ossAccessKeyId: 'ossAccessKeyId',
            ossAccessKeySecret: 'ossAccessKeySecret',
            ossBucketName: 'ossBucketName',
            ossEndpoint: 'ossEndpoint',
            ossExpiration: 'ossExpiration',
            ossFileName: 'ossFileName',
            ossSecurityToken: 'ossSecurityToken',
        };
    }
    static types() {
        return {
            mediaId: 'string',
            ossAccessKeyId: 'string',
            ossAccessKeySecret: 'string',
            ossBucketName: 'string',
            ossEndpoint: 'string',
            ossExpiration: 'string',
            ossFileName: 'string',
            ossSecurityToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetMediaCerficateResponseBody = GetMediaCerficateResponseBody;
class GetMediaCerficateResponse 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: GetMediaCerficateResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetMediaCerficateResponse = GetMediaCerficateResponse;
class ListItemUserDataHeaders 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.ListItemUserDataHeaders = ListItemUserDataHeaders;
class ListItemUserDataRequest extends $tea.Model {
    static names() {
        return {
            body: 'body',
        };
    }
    static types() {
        return {
            body: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListItemUserDataRequest = ListItemUserDataRequest;
class ListItemUserDataResponseBody extends $tea.Model {
    static names() {
        return {
            studyInfos: 'studyInfos',
        };
    }
    static types() {
        return {
            studyInfos: { 'type': 'array', 'itemType': ListItemUserDataResponseBodyStudyInfos },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListItemUserDataResponseBody = ListItemUserDataResponseBody;
class ListItemUserDataResponse 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: ListItemUserDataResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListItemUserDataResponse = ListItemUserDataResponse;
class PageFeedHeaders 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.PageFeedHeaders = PageFeedHeaders;
class PageFeedRequest extends $tea.Model {
    static names() {
        return {
            body: 'body',
            maxResults: 'maxResults',
            mcnId: 'mcnId',
            nextToken: 'nextToken',
        };
    }
    static types() {
        return {
            body: { 'type': 'array', 'itemType': 'string' },
            maxResults: 'number',
            mcnId: 'string',
            nextToken: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.PageFeedRequest = PageFeedRequest;
class PageFeedResponseBody extends $tea.Model {
    static names() {
        return {
            feedList: 'feedList',
            hasNext: 'hasNext',
            nextCursor: 'nextCursor',
        };
    }
    static types() {
        return {
            feedList: { 'type': 'array', 'itemType': PageFeedResponseBodyFeedList },
            hasNext: 'boolean',
            nextCursor: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.PageFeedResponseBody = PageFeedResponseBody;
class PageFeedResponse 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: PageFeedResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.PageFeedResponse = PageFeedResponse;
class UploadVideosHeaders 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.UploadVideosHeaders = UploadVideosHeaders;
class UploadVideosRequest extends $tea.Model {
    static names() {
        return {
            body: 'body',
        };
    }
    static types() {
        return {
            body: { 'type': 'array', 'itemType': UploadVideosRequestBody },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UploadVideosRequest = UploadVideosRequest;
class UploadVideosResponseBody extends $tea.Model {
    static names() {
        return {
            result: 'result',
            success: 'success',
        };
    }
    static types() {
        return {
            result: UploadVideosResponseBodyResult,
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UploadVideosResponseBody = UploadVideosResponseBody;
class UploadVideosResponse 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: UploadVideosResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UploadVideosResponse = UploadVideosResponse;
class CreateFeedRequestCourseInfoLectorUserInfo extends $tea.Model {
    static names() {
        return {
            avatar: 'avatar',
            name: 'name',
            userId: 'userId',
        };
    }
    static types() {
        return {
            avatar: 'string',
            name: 'string',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFeedRequestCourseInfoLectorUserInfo = CreateFeedRequestCourseInfoLectorUserInfo;
class CreateFeedRequestCourseInfoPayInfoCsUserInfo extends $tea.Model {
    static names() {
        return {
            avatar: 'avatar',
            name: 'name',
            userId: 'userId',
        };
    }
    static types() {
        return {
            avatar: 'string',
            name: 'string',
            userId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFeedRequestCourseInfoPayInfoCsUserInfo = CreateFeedRequestCourseInfoPayInfoCsUserInfo;
class CreateFeedRequestCourseInfoPayInfoDiscountInfo extends $tea.Model {
    static names() {
        return {
            endTimeMillis: 'endTimeMillis',
            price: 'price',
            startTimeMillis: 'startTimeMillis',
        };
    }
    static types() {
        return {
            endTimeMillis: 'number',
            price: 'number',
            startTimeMillis: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFeedRequestCourseInfoPayInfoDiscountInfo = CreateFeedRequestCourseInfoPayInfoDiscountInfo;
class CreateFeedRequestCourseInfoPayInfo extends $tea.Model {
    static names() {
        return {
            csUserInfo: 'csUserInfo',
            discountInfo: 'discountInfo',
            price: 'price',
        };
    }
    static types() {
        return {
            csUserInfo: CreateFeedRequestCourseInfoPayInfoCsUserInfo,
            discountInfo: CreateFeedRequestCourseInfoPayInfoDiscountInfo,
            price: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFeedRequestCourseInfoPayInfo = CreateFeedRequestCourseInfoPayInfo;
class CreateFeedRequestCourseInfo extends $tea.Model {
    static names() {
        return {
            lectorUserInfo: 'lectorUserInfo',
            payInfo: 'payInfo',
            studyGroupName: 'studyGroupName',
        };
    }
    static types() {
        return {
            lectorUserInfo: CreateFeedRequestCourseInfoLectorUserInfo,
            payInfo: CreateFeedRequestCourseInfoPayInfo,
            studyGroupName: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFeedRequestCourseInfo = CreateFeedRequestCourseInfo;
class CreateFeedRequestFeedInfoMediaContents extends $tea.Model {
    static names() {
        return {
            mediaId: 'mediaId',
            title: 'title',
            type: 'type',
        };
    }
    static types() {
        return {
            mediaId: 'string',
            title: 'string',
            type: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFeedRequestFeedInfoMediaContents = CreateFeedRequestFeedInfoMediaContents;
class CreateFeedRequestFeedInfoRecommends extends $tea.Model {
    static names() {
        return {
            objectId: 'objectId',
            type: 'type',
        };
    }
    static types() {
        return {
            objectId: 'string',
            type: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFeedRequestFeedInfoRecommends = CreateFeedRequestFeedInfoRecommends;
class CreateFeedRequestFeedInfo extends $tea.Model {
    static names() {
        return {
            actionType: 'actionType',
            belongsTo: 'belongsTo',
            feedCategory: 'feedCategory',
            feedId: 'feedId',
            feedTag: 'feedTag',
            feedType: 'feedType',
            industryId: 'industryId',
            introduction: 'introduction',
            introductionPicUrl: 'introductionPicUrl',
            mcnId: 'mcnId',
            mediaContents: 'mediaContents',
            recommends: 'recommends',
            thumbUrl: 'thumbUrl',
            title: 'title',
        };
    }
    static types() {
        return {
            actionType: 'number',
            belongsTo: 'number',
            feedCategory: 'number',
            feedId: 'string',
            feedTag: 'string',
            feedType: 'number',
            industryId: 'number',
            introduction: 'string',
            introductionPicUrl: 'string',
            mcnId: 'string',
            mediaContents: { 'type': 'array', 'itemType': CreateFeedRequestFeedInfoMediaContents },
            recommends: { 'type': 'array', 'itemType': CreateFeedRequestFeedInfoRecommends },
            thumbUrl: 'string',
            title: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.CreateFeedRequestFeedInfo = CreateFeedRequestFeedInfo;
class DeleteVideosResponseBodyResult extends $tea.Model {
    static names() {
        return {
            failed: 'failed',
            success: 'success',
            total: 'total',
        };
    }
    static types() {
        return {
            failed: { 'type': 'array', 'itemType': 'string' },
            success: 'number',
            total: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DeleteVideosResponseBodyResult = DeleteVideosResponseBodyResult;
class GetFeedResponseBodyFeedItem extends $tea.Model {
    static names() {
        return {
            durationMillis: 'durationMillis',
            feedContentType: 'feedContentType',
            itemId: 'itemId',
            title: 'title',
            url: 'url',
        };
    }
    static types() {
        return {
            durationMillis: 'number',
            feedContentType: 'number',
            itemId: 'string',
            title: 'string',
            url: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetFeedResponseBodyFeedItem = GetFeedResponseBodyFeedItem;
class ListItemUserDataResponseBodyStudyInfos extends $tea.Model {
    static names() {
        return {
            durationMillis: 'durationMillis',
            uid: 'uid',
        };
    }
    static types() {
        return {
            durationMillis: 'number',
            uid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ListItemUserDataResponseBodyStudyInfos = ListItemUserDataResponseBodyStudyInfos;
class PageFeedResponseBodyFeedList extends $tea.Model {
    static names() {
        return {
            feedCategory: 'feedCategory',
            feedId: 'feedId',
            feedType: 'feedType',
            name: 'name',
            thumbUrl: 'thumbUrl',
            url: 'url',
        };
    }
    static types() {
        return {
            feedCategory: 'string',
            feedId: 'string',
            feedType: 'number',
            name: 'string',
            thumbUrl: 'string',
            url: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.PageFeedResponseBodyFeedList = PageFeedResponseBodyFeedList;
class UploadVideosRequestBody extends $tea.Model {
    static names() {
        return {
            authorIconUrl: 'authorIconUrl',
            authorId: 'authorId',
            authorName: 'authorName',
            coverUrl: 'coverUrl',
            jumpIconUrl: 'jumpIconUrl',
            jumpTitle: 'jumpTitle',
            jumpUrl: 'jumpUrl',
            videoDuration: 'videoDuration',
            videoHeight: 'videoHeight',
            videoId: 'videoId',
            videoTitle: 'videoTitle',
            videoWidth: 'videoWidth',
            webpUrl: 'webpUrl',
        };
    }
    static types() {
        return {
            authorIconUrl: 'string',
            authorId: 'string',
            authorName: 'string',
            coverUrl: 'string',
            jumpIconUrl: 'string',
            jumpTitle: 'string',
            jumpUrl: 'string',
            videoDuration: 'string',
            videoHeight: 'string',
            videoId: 'string',
            videoTitle: 'string',
            videoWidth: 'string',
            webpUrl: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UploadVideosRequestBody = UploadVideosRequestBody;
class UploadVideosResponseBodyResult extends $tea.Model {
    static names() {
        return {
            failed: 'failed',
            hasUploaded: 'hasUploaded',
            success: 'success',
            total: 'total',
        };
    }
    static types() {
        return {
            failed: { 'type': 'array', 'itemType': 'string' },
            hasUploaded: 'number',
            success: 'number',
            total: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.UploadVideosResponseBodyResult = UploadVideosResponseBodyResult;
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 - CreateFeedRequest
     * @param headers - CreateFeedHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns CreateFeedResponse
     */
    async createFeedWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.courseInfo)) {
            body["courseInfo"] = request.courseInfo;
        }
        if (!tea_util_1.default.isUnset(request.createUserId)) {
            body["createUserId"] = request.createUserId;
        }
        if (!tea_util_1.default.isUnset(request.feedInfo)) {
            body["feedInfo"] = request.feedInfo;
        }
        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: "CreateFeed",
            version: "content_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/content/feeds`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new CreateFeedResponse({}));
    }
    /**
     * 创建内容
     *
     * @param request - CreateFeedRequest
     * @returns CreateFeedResponse
     */
    async createFeed(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new CreateFeedHeaders({});
        return await this.createFeedWithOptions(request, headers, runtime);
    }
    /**
     * 点众下架视频接口
     *
     * @param request - DeleteVideosRequest
     * @param headers - DeleteVideosHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns DeleteVideosResponse
     */
    async deleteVideosWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        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: request.body,
        });
        let params = new $OpenApi.Params({
            action: "DeleteVideos",
            version: "content_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/content/dian/videos/remove`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new DeleteVideosResponse({}));
    }
    /**
     * 点众下架视频接口
     *
     * @param request - DeleteVideosRequest
     * @returns DeleteVideosResponse
     */
    async deleteVideos(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new DeleteVideosHeaders({});
        return await this.deleteVideosWithOptions(request, headers, runtime);
    }
    /**
     * 获取feed的详细信息，包括子课程的信息
     *
     * @param request - GetFeedRequest
     * @param headers - GetFeedHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetFeedResponse
     */
    async getFeedWithOptions(feedId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.mcnId)) {
            query["mcnId"] = request.mcnId;
        }
        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: "GetFeed",
            version: "content_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/content/feeds/${feedId}`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetFeedResponse({}));
    }
    /**
     * 获取feed的详细信息，包括子课程的信息
     *
     * @param request - GetFeedRequest
     * @returns GetFeedResponse
     */
    async getFeed(feedId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetFeedHeaders({});
        return await this.getFeedWithOptions(feedId, request, headers, runtime);
    }
    /**
     * 获取oss上传凭证
     *
     * @param request - GetMediaCerficateRequest
     * @param headers - GetMediaCerficateHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetMediaCerficateResponse
     */
    async getMediaCerficateWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.fileName)) {
            query["fileName"] = request.fileName;
        }
        if (!tea_util_1.default.isUnset(request.mcnId)) {
            query["mcnId"] = request.mcnId;
        }
        if (!tea_util_1.default.isUnset(request.mediaId)) {
            query["mediaId"] = request.mediaId;
        }
        if (!tea_util_1.default.isUnset(request.mediaIntroduction)) {
            query["mediaIntroduction"] = request.mediaIntroduction;
        }
        if (!tea_util_1.default.isUnset(request.mediaTitle)) {
            query["mediaTitle"] = request.mediaTitle;
        }
        if (!tea_util_1.default.isUnset(request.thumbUrl)) {
            query["thumbUrl"] = request.thumbUrl;
        }
        if (!tea_util_1.default.isUnset(request.userId)) {
            query["userId"] = request.userId;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
        });
        let params = new $OpenApi.Params({
            action: "GetMediaCerficate",
            version: "content_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/content/media/cerficates`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetMediaCerficateResponse({}));
    }
    /**
     * 获取oss上传凭证
     *
     * @param request - GetMediaCerficateRequest
     * @returns GetMediaCerficateResponse
     */
    async getMediaCerficate(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetMediaCerficateHeaders({});
        return await this.getMediaCerficateWithOptions(request, headers, runtime);
    }
    /**
     * 展示机构内观看内容的统计信息
     *
     * @param request - ListItemUserDataRequest
     * @param headers - ListItemUserDataHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ListItemUserDataResponse
     */
    async listItemUserDataWithOptions(itemId, request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        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: request.body,
        });
        let params = new $OpenApi.Params({
            action: "ListItemUserData",
            version: "content_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/content/feeds/items/${itemId}/userStatistics/query`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ListItemUserDataResponse({}));
    }
    /**
     * 展示机构内观看内容的统计信息
     *
     * @param request - ListItemUserDataRequest
     * @returns ListItemUserDataResponse
     */
    async listItemUserData(itemId, request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ListItemUserDataHeaders({});
        return await this.listItemUserDataWithOptions(itemId, request, headers, runtime);
    }
    /**
     * 获取机构下课程列表
     *
     * @param request - PageFeedRequest
     * @param headers - PageFeedHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns PageFeedResponse
     */
    async pageFeedWithOptions(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.mcnId)) {
            query["mcnId"] = request.mcnId;
        }
        if (!tea_util_1.default.isUnset(request.nextToken)) {
            query["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: request.body,
        });
        let params = new $OpenApi.Params({
            action: "PageFeed",
            version: "content_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/content/feeds/query`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "json",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new PageFeedResponse({}));
    }
    /**
     * 获取机构下课程列表
     *
     * @param request - PageFeedRequest
     * @returns PageFeedResponse
     */
    async pageFeed(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new PageFeedHeaders({});
        return await this.pageFeedWithOptions(request, headers, runtime);
    }
    /**
     * 点众上传视频信息
     *
     * @param request - UploadVideosRequest
     * @param headers - UploadVideosHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns UploadVideosResponse
     */
    async uploadVideosWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        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: tea_util_1.default.toArray(request.body),
        });
        let params = new $OpenApi.Params({
            action: "UploadVideos",
            version: "content_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/content/dian/videos/upload`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new UploadVideosResponse({}));
    }
    /**
     * 点众上传视频信息
     *
     * @param request - UploadVideosRequest
     * @returns UploadVideosResponse
     */
    async uploadVideos(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new UploadVideosHeaders({});
        return await this.uploadVideosWithOptions(request, headers, runtime);
    }
}
exports.default = Client;
//# sourceMappingURL=client.js.map