tencentcloud-sdk-nodejs-intl-en
Version:
1,395 lines (1,186 loc) • 2.19 MB
JavaScript
/*
* Copyright (c) 2018 Tencent. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
const AbstractModel = require("../../common/abstract_model");
/**
* ProcessMedia request structure.
* @class
*/
class ProcessMediaRequest extends AbstractModel {
constructor(){
super();
/**
* <p>Media file ID, the globally unique identifier of the file in VOD, is assigned by the VOD backend after a successful upload. You can get this field in the <a href="https://www.tencentcloud.com/document/product/266/33950">video upload completion event notification</a> or the <a href="https://console.cloud.tencent.com/vod/media">VOD console</a>.<br>You must provide one of FileId and MediaStoragePath.</p>
* @type {string || null}
*/
this.FileId = null;
/**
* <p>Storage path of the media.<br>Only sub-applications in <a href="https://www.tencentcloud.com/document/product/266/126825?from_cn_redirect=1">FileID + Path mode</a> can initiate task through MediaStoragePath.<br>Either FileId or MediaStoragePath must be provided.</p>
* @type {string || null}
*/
this.MediaStoragePath = null;
/**
* <p><b>Video-on-demand (VOD) <a href="https://www.tencentcloud.com/document/product/266/33987">application</a> ID. Customers who activate on-demand services from December 25, 2023 must fill this field with the app ID to access resources in on-demand applications (whether default or newly created application).</b></p>
* @type {number || null}
*/
this.SubAppId = null;
/**
* <p>Parameters for the video processing type task.</p>
* @type {MediaProcessTaskInput || null}
*/
this.MediaProcessTask = null;
/**
* <p>Audio and video content review type task parameters.<br><font color="red">* Not recommended for use</font>. It is recommended to use <a href="https://www.tencentcloud.com/document/api/266/80283?from_cn_redirect=1">ReviewAudioVideo</a> or <a href="https://www.tencentcloud.com/document/api/266/73217?from_cn_redirect=1">ReviewImage</a>.</p>
* @type {AiContentReviewTaskInput || null}
*/
this.AiContentReviewTask = null;
/**
* <p>Parameters for the audio and video content analysis task.</p>
* @type {AiAnalysisTaskInput || null}
*/
this.AiAnalysisTask = null;
/**
* <p>Parameters for the audio/video content recognition task.</p>
* @type {AiRecognitionTaskInput || null}
*/
this.AiRecognitionTask = null;
/**
* <p>Priority of the task flow. The higher the value, the higher the priority. The value ranges from -10 to 10. If this is not specified, it represents 0.</p>
* @type {number || null}
*/
this.TasksPriority = null;
/**
* <p>Task flow status change notification mode. Valid values are Finish, Change, and None. If this is not specified, the default value is Finish.</p>
* @type {string || null}
*/
this.TasksNotifyMode = null;
/**
* <p>Source context. This is used to pass user request information. The task status change callback returns the value of this field. The maximum length is 1000 characters.</p>
* @type {string || null}
*/
this.SessionContext = null;
/**
* <p>Identifier for deduplication. If a request with the same identifier has been sent within the past three days, an error is returned for the current request. The maximum length is 50 characters. If this is not specified or left empty, deduplication is not performed.</p>
* @type {string || null}
*/
this.SessionId = null;
/**
* <p>Reserved field, used when special purpose.</p>
* @type {string || null}
*/
this.ExtInfo = null;
/**
* <p>Valid when FileID is empty. Pull the Url to generate new media assets and generate a new FileID. The media processing product will be affiliated with the new media assets.</p><p>Note: Storage fees will occur for new media assets.</p>
* @type {string || null}
*/
this.Url = null;
/**
* <p>The media processing transcoding result is output as standalone media assets. Enabling this option will output the product as standalone media assets and generate a brand-new FileID. Currently only support outputting TranscodeTask transcoding tasks as standalone media assets.</p><p>Enumeration value:</p><ul><li>ON: Enable</li><li>OFF: Disable</li></ul><p>Default value: OFF</p><p>Note: New media assets will incur storage fees. This option does not currently support enabling for video opening/closing credits and traceable watermarks in transcoding tasks.</p>
* @type {string || null}
*/
this.OutputAsIndependentMedia = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.FileId = 'FileId' in params ? params.FileId : null;
this.MediaStoragePath = 'MediaStoragePath' in params ? params.MediaStoragePath : null;
this.SubAppId = 'SubAppId' in params ? params.SubAppId : null;
if (params.MediaProcessTask) {
let obj = new MediaProcessTaskInput();
obj.deserialize(params.MediaProcessTask)
this.MediaProcessTask = obj;
}
if (params.AiContentReviewTask) {
let obj = new AiContentReviewTaskInput();
obj.deserialize(params.AiContentReviewTask)
this.AiContentReviewTask = obj;
}
if (params.AiAnalysisTask) {
let obj = new AiAnalysisTaskInput();
obj.deserialize(params.AiAnalysisTask)
this.AiAnalysisTask = obj;
}
if (params.AiRecognitionTask) {
let obj = new AiRecognitionTaskInput();
obj.deserialize(params.AiRecognitionTask)
this.AiRecognitionTask = obj;
}
this.TasksPriority = 'TasksPriority' in params ? params.TasksPriority : null;
this.TasksNotifyMode = 'TasksNotifyMode' in params ? params.TasksNotifyMode : null;
this.SessionContext = 'SessionContext' in params ? params.SessionContext : null;
this.SessionId = 'SessionId' in params ? params.SessionId : null;
this.ExtInfo = 'ExtInfo' in params ? params.ExtInfo : null;
this.Url = 'Url' in params ? params.Url : null;
this.OutputAsIndependentMedia = 'OutputAsIndependentMedia' in params ? params.OutputAsIndependentMedia : null;
}
}
/**
* Canvas information. When a video is composed, if the source material (video or image) cannot fill the output video window, the background will be drawn with the set canvas.
* @class
*/
class Canvas extends AbstractModel {
constructor(){
super();
/**
* Background color. Valid values:
<li>Black: black background</li>
<li>White: white background</li>
Default value: Black.
* @type {string || null}
*/
this.Color = null;
/**
* Canvas width, that is, the width of the output video, value range: 0~3840, unit: px.
Default value: 0, which means the video width is the same as the first video clip of the first video track.
* @type {number || null}
*/
this.Width = null;
/**
* Canvas height, that is, the height (or long side) of the output video, value range: 0~3840, unit: px.
Default value: 0, which means the video height is consistent with the first video clip of the first video track.
* @type {number || null}
*/
this.Height = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Color = 'Color' in params ? params.Color : null;
this.Width = 'Width' in params ? params.Width : null;
this.Height = 'Height' in params ? params.Height : null;
}
}
/**
* ModifySampleSnapshotTemplate response structure.
* @class
*/
class ModifySampleSnapshotTemplateResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Output media file configuration for AIGC video task.
* @class
*/
class AigcVideoOutputConfig extends AbstractModel {
constructor(){
super();
/**
* <p>Storage mode</p><p>Enumeration value:</p><ul><li>Temporary: Temporary storage. The generated video file will not be stored in VOD. You can obtain the temporary access URL from event notification. The valid period is 7 days.</li><li>Permanent: Permanent storage. The generated video file will be stored in VOD. You can obtain the FileId from event notification.</li></ul><p>Default value: Temporary</p>
* @type {string || null}
*/
this.StorageMode = null;
/**
* <p>Output media file name, up to 64 characters. Default filename is specified by the system.</p>
* @type {string || null}
*/
this.MediaName = null;
/**
* <p>Category ID, used to categorize and manage media. You can create a category and obtain the category ID via the <a href="/document/product/266/7812">create category</a> API.</p><li>Default value: 0, indicate other categories.</li>
* @type {number || null}
*/
this.ClassId = null;
/**
* <p>The expiry date of the output file. The file will be deleted longer than this time. It defaults to no expiration, format according to ISO 8601 standard. For details, see <a href="https://www.tencentcloud.com/document/product/266/11732?from_cn_redirect=1#I">ISO date format description</a>.</p>
* @type {string || null}
*/
this.ExpireTime = null;
/**
* <p>Duration of the generated video, unit: seconds.</p><li>When ModelName is Kling, optional values are 3-15, default is 5.</li><li>When ModelName is Hailuo, optional values are 6 and 10, default is 6.</li><li>When ModelName is Vidu, specify 1-10.</li><li>When ModelName is GV, optional value is 8, default is 8.</li><li>When ModelName is OS, optional values are 4, 8, and 12, default is 8.</li><li>When ModelName is PixVerse, specify 1-15, default is 5.</li>
* @type {number || null}
*/
this.Duration = null;
/**
* <p>Resolution of the generated video.</p><li>When ModelName is Kling, available values are 720P and 1080P, default is 720P;</li><li>When ModelName is Hailuo, available values are 768P and 1080P, default is 768P;</li><li>When ModelName is Vidu, available values are 720P and 1080P, default is 720P;</li><li>When ModelName is GV, available values are 720P and 1080P, default is 720P;</li><li>When ModelName is OS, available value is 720P;</li><li>When ModelName is PixVerse, available values are 540p, 720p, 1080p, 2k, and 4k, default is 720p;</li>
* @type {string || null}
*/
this.Resolution = null;
/**
* <p>Specify the aspect ratio of the generated video.</p><li>When ModelName is Kling, for text-to-video, the optional values are 16:9, 9:16, and 1:1, with a default value of 16:9.</li><li>When ModelName is Vidu, for text-to-video and reference image-to-video, the optional values are 16:9, 9:16, 4:3, 3:4, and 1:1. Only version q2 supports 4:3 and 3:4.</li><li>When ModelName is GV, the optional values are 16:9 and 9:16, with a default value of 16:9.</li><li>When ModelName is OS, for text-to-video, the optional values are 16:9 and 9:16, with a default value of 16:9.</li><li>When ModelName is Hailuo, this parameter is not currently supported.</li><li>When ModelName is PixVerse, the optional values are 16:9, 4:3, 1:1, 3:4, 9:16, 2:3, 3:2, and 21:9.</li>
* @type {string || null}
*/
this.AspectRatio = null;
/**
* <p>Whether to generate audio. Supported models include GV, OS, Vidu, Jimeng, and Kling.</p><p>Enumeration value:</p><ul><li>Enabled: Enable</li><li>Disabled: Disable</li></ul><p>Default value: Disabled</p>
* @type {string || null}
*/
this.AudioGeneration = null;
/**
* <p>Whether to allow figure or human face generation. Valid values: <li>AllowAdult: Allow adult generation;</li> <li>Disallowed: Forbid including figure or human face in the image;</li></p>
* @type {string || null}
*/
this.PersonGeneration = null;
/**
* <p>Whether to enable compliance check for input content. Valid values: <li>Enabled: Enable;</li> <li>Disabled: Disable;</li></p>
* @type {string || null}
*/
this.InputComplianceCheck = null;
/**
* <p>Whether to enable compliance check for output content. Valid values: <li>Enabled: Enable;</li> <li>Disabled: Disable;</li></p>
* @type {string || null}
*/
this.OutputComplianceCheck = null;
/**
* <p>Whether to enable video enhancement. Valid values: <li>Enabled: Turn on;</li> <li>Disabled: Turn off;</li><br>Description:</p><ol><li>For selected resolution exceeding the resolution the model can generate, enhancement is enabled by default.</li><li>For resolutions the model can directly output, you can also proactively select the model to directly output low-resolution and use enhancement to obtain the specified resolution.</li></ol>
* @type {string || null}
*/
this.EnhanceSwitch = null;
/**
* <p>Whether peak shaving is enabled. Valid values: <li>Enabled: Enable;</li> <li>Disabled: Disable;</li></p>
* @type {string || null}
*/
this.OffPeak = null;
/**
* <p>Whether to enable vidu intelligent frame interpolation. Valid values: <li>Enabled: Enable;</li> <li>Disabled: Disable;</li></p>
* @type {string || null}
*/
this.FrameInterpolate = null;
/**
* <p>Indicates whether to enable the icon watermark. Valid values: <li>Enabled: Enable;</li> <li>Disabled: Disable;</li><br>Currently supported models include Vidu. Other models are not supported.</p>
* @type {string || null}
*/
this.LogoAdd = null;
/**
* <p>Whether to add background music to the generated video.</p><p>Enumeration value:</p><ul><li>Enabled: The system will automatically select suitable music from the preset BGM library and add it.</li><li>Disabled: Do not add BGM.</li></ul><p>Default value: Disabled</p>
* @type {string || null}
*/
this.EnableBGM = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.StorageMode = 'StorageMode' in params ? params.StorageMode : null;
this.MediaName = 'MediaName' in params ? params.MediaName : null;
this.ClassId = 'ClassId' in params ? params.ClassId : null;
this.ExpireTime = 'ExpireTime' in params ? params.ExpireTime : null;
this.Duration = 'Duration' in params ? params.Duration : null;
this.Resolution = 'Resolution' in params ? params.Resolution : null;
this.AspectRatio = 'AspectRatio' in params ? params.AspectRatio : null;
this.AudioGeneration = 'AudioGeneration' in params ? params.AudioGeneration : null;
this.PersonGeneration = 'PersonGeneration' in params ? params.PersonGeneration : null;
this.InputComplianceCheck = 'InputComplianceCheck' in params ? params.InputComplianceCheck : null;
this.OutputComplianceCheck = 'OutputComplianceCheck' in params ? params.OutputComplianceCheck : null;
this.EnhanceSwitch = 'EnhanceSwitch' in params ? params.EnhanceSwitch : null;
this.OffPeak = 'OffPeak' in params ? params.OffPeak : null;
this.FrameInterpolate = 'FrameInterpolate' in params ? params.FrameInterpolate : null;
this.LogoAdd = 'LogoAdd' in params ? params.LogoAdd : null;
this.EnableBGM = 'EnableBGM' in params ? params.EnableBGM : null;
}
}
/**
* CreateAigcVideoRedrawTask request structure.
* @class
*/
class CreateAigcVideoRedrawTaskRequest extends AbstractModel {
constructor(){
super();
/**
* <p><b>Video-on-demand (VOD) <a href="https://www.tencentcloud.com/document/product/266/14574?from_cn_redirect=1">application</a> ID. Customers who activate on-demand services from December 25, 2023 must fill this field with the app ID when accessing resources in on-demand applications (whether default or newly created application).</b></p>
* @type {number || null}
*/
this.SubAppId = null;
/**
* <p>File information of the input video for the AIGC video conversion task. The input video duration should be less than 90 seconds, and the size should be within 2GB.</p>
* @type {AigcVideoRedrawTaskInputFileInfo || null}
*/
this.FileInfo = null;
/**
* <p>Parameters for the AIGC video conversion task.</p>
* @type {AigcVideoRedrawTaskInfo || null}
*/
this.TaskInfo = null;
/**
* <p>Output media file configuration for the AIGC video conversion task.</p>
* @type {AigcVideoRedrawOutputConfig || null}
*/
this.OutputConfig = null;
/**
* <p>Identifier for deduplication. If a request with the same identifier has been sent within the past three days, an error is returned for the current request. The maximum length is 50 characters. If this is not specified or left empty, deduplication is not performed.</p>
* @type {string || null}
*/
this.SessionId = null;
/**
* <p>Source context. This is used to pass through user request information. The audio and video quality revival complete callback returns the value of this field. The maximum length is 1000 characters.</p>
* @type {string || null}
*/
this.SessionContext = null;
/**
* <p>Task priority. The higher the value, the higher the priority. The value ranges from -10 to 10. If this is not specified, it represents 0.</p>
* @type {number || null}
*/
this.TasksPriority = null;
/**
* <p>Reserved field, used when special purpose.</p>
* @type {string || null}
*/
this.ExtInfo = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SubAppId = 'SubAppId' in params ? params.SubAppId : null;
if (params.FileInfo) {
let obj = new AigcVideoRedrawTaskInputFileInfo();
obj.deserialize(params.FileInfo)
this.FileInfo = obj;
}
if (params.TaskInfo) {
let obj = new AigcVideoRedrawTaskInfo();
obj.deserialize(params.TaskInfo)
this.TaskInfo = obj;
}
if (params.OutputConfig) {
let obj = new AigcVideoRedrawOutputConfig();
obj.deserialize(params.OutputConfig)
this.OutputConfig = obj;
}
this.SessionId = 'SessionId' in params ? params.SessionId : null;
this.SessionContext = 'SessionContext' in params ? params.SessionContext : null;
this.TasksPriority = 'TasksPriority' in params ? params.TasksPriority : null;
this.ExtInfo = 'ExtInfo' in params ? params.ExtInfo : null;
}
}
/**
* Image encoding format parameters.
* @class
*/
class ImageSceneAigcEncodeConfig extends AbstractModel {
constructor(){
super();
/**
* Image format. Valid values: JPEG and PNG. Defaults to the original image format. Animation is not supported.
* @type {string || null}
*/
this.Format = null;
/**
* Relative image quality. Value ranges from 1 to 100. The numeric value is based on the original image quality and defaults to the original image quality.
* @type {number || null}
*/
this.Quality = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Format = 'Format' in params ? params.Format : null;
this.Quality = 'Quality' in params ? params.Quality : null;
}
}
/**
* Screencapturing output information (v2017)
* @class
*/
class SnapshotByTimeOffset2017 extends AbstractModel {
constructor(){
super();
/**
* Error code
<li>0: success;</li>
<li>Other values: failure.</li>
Note: this field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.ErrCode = null;
/**
* Specific time point of screenshot in milliseconds.
Note: this field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.TimeOffset = null;
/**
* Address of output screenshot file.
Note: this field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Url = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ErrCode = 'ErrCode' in params ? params.ErrCode : null;
this.TimeOffset = 'TimeOffset' in params ? params.TimeOffset : null;
this.Url = 'Url' in params ? params.Url : null;
}
}
/**
* CreateStorageRegion request structure.
* @class
*/
class CreateStorageRegionRequest extends AbstractModel {
constructor(){
super();
/**
* <p>The pending storage region must be a supported region.</p><p>For reference: <a href="https://www.tencentcloud.com/document/product/266/9760?from_cn_redirect=1">Supported region list</a></p>
* @type {string || null}
*/
this.StorageRegion = null;
/**
* <p><b>Video-on-demand (VOD) <a href="https://www.tencentcloud.com/document/product/266/33987">application</a> ID. Customers who activate on-demand services from December 25, 2023 must fill this field with the app ID to access resources in on-demand applications (whether default or newly created application).</b></p>
* @type {number || null}
*/
this.SubAppId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.StorageRegion = 'StorageRegion' in params ? params.StorageRegion : null;
this.SubAppId = 'SubAppId' in params ? params.SubAppId : null;
}
}
/**
* Full speech recognition segment.
* @class
*/
class AiRecognitionTaskAsrFullTextSegmentItem extends AbstractModel {
constructor(){
super();
/**
* Confidence of recognized segment. Value range: 0-100.
* @type {number || null}
*/
this.Confidence = null;
/**
* Start time offset of recognized segment in seconds.
* @type {number || null}
*/
this.StartTimeOffset = null;
/**
* End time offset of recognition segment in seconds.
* @type {number || null}
*/
this.EndTimeOffset = null;
/**
* Recognized text.
* @type {string || null}
*/
this.Text = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Confidence = 'Confidence' in params ? params.Confidence : null;
this.StartTimeOffset = 'StartTimeOffset' in params ? params.StartTimeOffset : null;
this.EndTimeOffset = 'EndTimeOffset' in params ? params.EndTimeOffset : null;
this.Text = 'Text' in params ? params.Text : null;
}
}
/**
* The information of a task to get file attributes.
* @class
*/
class DescribeFileAttributesTask extends AbstractModel {
constructor(){
super();
/**
* The task ID.
* @type {string || null}
*/
this.TaskId = null;
/**
* The task status. Valid values: PROCESSING, SUCCESS, FAIL.
* @type {string || null}
*/
this.Status = null;
/**
* The error code. `0` indicates the task is successful. Other values indicate that the task failed.
<li>`40000`: Invalid input parameter.</li>
<li>`60000`: Source file error (e.g., video data is corrupted).</li>
<li>`70000`: Internal server error. Please try again.</li>
* @type {number || null}
*/
this.ErrCode = null;
/**
* The error code. An empty string indicates the task is successful; other values indicate that the task failed. For details, see [Video processing error codes](https://intl.cloud.tencent.com/document/product/266/39145?lang=en&pg=#video-processing).
* @type {string || null}
*/
this.ErrCodeExt = null;
/**
* The error message.
* @type {string || null}
*/
this.Message = null;
/**
* The task progress. Value range: 0-100.
* @type {number || null}
*/
this.Progress = null;
/**
* The file ID
* @type {string || null}
*/
this.FileId = null;
/**
* The output of the task to get file attributes.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {DescribeFileAttributesTaskOutput || null}
*/
this.Output = null;
/**
* The session ID, which is used for de-duplication. If there was a request with the same session ID in the last seven days, an error will be returned for the current request. The session ID can contain up to 50 characters. If you do not pass this parameter or pass in an empty string, duplicate sessions will not be identified.
* @type {string || null}
*/
this.SessionId = null;
/**
* The source context, which is used to pass through user request information. The `ProcedureStateChanged` callback will return the value of this parameter. It can contain up to 1,000 characters.
* @type {string || null}
*/
this.SessionContext = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.Status = 'Status' in params ? params.Status : null;
this.ErrCode = 'ErrCode' in params ? params.ErrCode : null;
this.ErrCodeExt = 'ErrCodeExt' in params ? params.ErrCodeExt : null;
this.Message = 'Message' in params ? params.Message : null;
this.Progress = 'Progress' in params ? params.Progress : null;
this.FileId = 'FileId' in params ? params.FileId : null;
if (params.Output) {
let obj = new DescribeFileAttributesTaskOutput();
obj.deserialize(params.Output)
this.Output = obj;
}
this.SessionId = 'SessionId' in params ? params.SessionId : null;
this.SessionContext = 'SessionContext' in params ? params.SessionContext : null;
}
}
/**
* ExtractBlindWatermark request structure.
* @class
*/
class ExtractBlindWatermarkRequest extends AbstractModel {
constructor(){
super();
/**
* Digital watermark type. Valid values: <li>blind-basic: basic copyright digital watermark;</li> <li>blind-trace: trace the source ab sequence watermark.</li>
* @type {string || null}
*/
this.Type = null;
/**
* File input information for the Media Processing Service (MPS) task.
* @type {ExtractBlindWatermarkInputInfo || null}
*/
this.InputInfo = null;
/**
* VOD application ID for watermarking. Note that the SubAppId must be in line with the one used during watermarking to extract the watermark, whether importing FILEID or URL.
* @type {number || null}
*/
this.SubAppId = null;
/**
* Configuration of the digital watermark extraction task.
* @type {ExtractBlindWatermarkTaskConfig || null}
*/
this.ExtractBlindWatermarkConfig = null;
/**
* Identify source context, used for passing through user request information. The value of this field will be returned in the ExtractBlindWatermarkComplete callback and task flow status change callback, with a maximum length of 1000 characters.
* @type {string || null}
*/
this.SessionContext = null;
/**
* An identification code for task deduplication. If there has been a request with the same identification code within the past 3 days, an error will be returned for the current request. The maximum length is 50 characters. Leaving it blank or with an empty string indicates no deduplication.
* @type {string || null}
*/
this.SessionId = null;
/**
* Task priority. The higher the value, the higher the priority. The value ranges from -10 to 10. If left blank, it represents 0.
* @type {number || null}
*/
this.TasksPriority = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Type = 'Type' in params ? params.Type : null;
if (params.InputInfo) {
let obj = new ExtractBlindWatermarkInputInfo();
obj.deserialize(params.InputInfo)
this.InputInfo = obj;
}
this.SubAppId = 'SubAppId' in params ? params.SubAppId : null;
if (params.ExtractBlindWatermarkConfig) {
let obj = new ExtractBlindWatermarkTaskConfig();
obj.deserialize(params.ExtractBlindWatermarkConfig)
this.ExtractBlindWatermarkConfig = obj;
}
this.SessionContext = 'SessionContext' in params ? params.SessionContext : null;
this.SessionId = 'SessionId' in params ? params.SessionId : null;
this.TasksPriority = 'TasksPriority' in params ? params.TasksPriority : null;
}
}
/**
* The input of a moderation task.
* @class
*/
class ReviewAudioVideoTaskInput extends AbstractModel {
constructor(){
super();
/**
* The ID of the media file.
* @type {string || null}
*/
this.FileId = null;
/**
* The moderation template ID.
* @type {number || null}
*/
this.Definition = null;
/**
* The type of moderated content. Valid values:
<li>`Media`: The original audio/video.</li>
<li>`Cover`: Thumbnails.</li>
* @type {Array.<string> || null}
*/
this.ReviewContents = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.FileId = 'FileId' in params ? params.FileId : null;
this.Definition = 'Definition' in params ? params.Definition : null;
this.ReviewContents = 'ReviewContents' in params ? params.ReviewContents : null;
}
}
/**
* DescribeAllClass request structure.
* @class
*/
class DescribeAllClassRequest extends AbstractModel {
constructor(){
super();
/**
* <b>On-demand [application](https://www.tencentcloud.com/document/product/266/14574?from_cn_redirect=1) ID. Customers who activate on-demand services from December 25, 2023 must fill this field with the app ID when accessing resources in on-demand applications (whether default or newly created).</b>
* @type {number || null}
*/
this.SubAppId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SubAppId = 'SubAppId' in params ? params.SubAppId : null;
}
}
/**
* Output of the AIGC image generation task.
* @class
*/
class AigcImageTaskOutput extends AbstractModel {
constructor(){
super();
/**
* Output file information of the AIGC image generation task.
* @type {Array.<AigcImageTaskOutputFileInfo> || null}
*/
this.FileInfos = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.FileInfos) {
this.FileInfos = new Array();
for (let z in params.FileInfos) {
let obj = new AigcImageTaskOutputFileInfo();
obj.deserialize(params.FileInfos[z]);
this.FileInfos.push(obj);
}
}
}
}
/**
* CreateAigcVideoRedrawTask response structure.
* @class
*/
class CreateAigcVideoRedrawTaskResponse extends AbstractModel {
constructor(){
super();
/**
* <p>Task ID.</p>
* @type {string || null}
*/
this.TaskId = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeRoundPlays request structure.
* @class
*/
class DescribeRoundPlaysRequest extends AbstractModel {
constructor(){
super();
/**
* <B>VOD [subapplication](https://intl.cloud.tencent.com/document/product/266/14574?from_cn_redirect=1) id. starting from december 25, 2023, if you want to access resources in the vod application (whether it is the default application or a newly created application), you must enter the application id in this field.</b>.
* @type {number || null}
*/
this.SubAppId = null;
/**
* Filter criteria: playlist identifier, array length limit: 100.
* @type {Array.<string> || null}
*/
this.RoundPlayIds = null;
/**
* Filter criteria: playlist status, optional values: <li>enabled: startup status;</li> <li>disabled: stopped status.</li>.
* @type {string || null}
*/
this.Status = null;
/**
* Filter criteria: playlist creation time.
* @type {TimeRange || null}
*/
this.CreateTime = null;
/**
* Filter criteria: playlist update time.
* @type {TimeRange || null}
*/
this.UpdateTime = null;
/**
* Scrolling identifier which is used for pulling in batches. if a single request cannot pull all the data entries, the API will return `scrolltoken`, and if the next request carries it, the next pull will start from the next entry.
* @type {string || null}
*/
this.ScrollToken = null;
/**
* Pagination offset, default value: 0. this field is obsolete. please use the `scrolltoken` parameter for batch queries.
* @type {number || null}
*/
this.Offset = null;
/**
* Number of returned entries. default value: 10. maximum value: 100.
* @type {number || null}
*/
this.Limit = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SubAppId = 'SubAppId' in params ? params.SubAppId : null;
this.RoundPlayIds = 'RoundPlayIds' in params ? params.RoundPlayIds : null;
this.Status = 'Status' in params ? params.Status : null;
if (params.CreateTime) {
let obj = new TimeRange();
obj.deserialize(params.CreateTime)
this.CreateTime = obj;
}
if (params.UpdateTime) {
let obj = new TimeRange();
obj.deserialize(params.UpdateTime)
this.UpdateTime = obj;
}
this.ScrollToken = 'ScrollToken' in params ? params.ScrollToken : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
}
}
/**
* Moderation details.
* @class
*/
class ReviewInfo extends AbstractModel {
constructor(){
super();
/**
* The moderation template ID.
* @type {number || null}
*/
this.Definition = null;
/**
* The suggestion. Valid values:
<li>pass</li>
<li>review</li>
<li>block</li>
* @type {string || null}
*/
this.Suggestion = null;
/**
* The moderation type in the format of `Form.Label`. This parameter is valid if `Suggestion` is `review` or `block`.
`Form` indicates the type of inappropriate content detected. Valid values:
<li>`Image` (people or icons in images)</li>
<li>`OCR` (text in images)</li>
<li>`ASR` (speech)</li>
<li>`Voice`</li>
`Label` indicates the violation label. Valid values:
<li>`Porn` (pornographic content)</li>
<li>`Terror` (terrorist content)</li>
<li>`Polity` (politically sensitive content)</li>
<li>`Ad` (advertisement)</li>
<li>`Illegal` (illegal content)</li>
<li>`Abuse`</li>
<li>`Moan`</li>
* @type {Array.<string> || null}
*/
this.TypeSet = null;
/**
* The moderation time in [ISO date format](https://intl.cloud.tencent.com/document/product/266/11732?from_cn_redirect=1#I).
* @type {string || null}
*/
this.ReviewTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Definition = 'Definition' in params ? params.Definition : null;
this.Suggestion = 'Suggestion' in params ? params.Suggestion : null;
this.TypeSet = 'TypeSet' in params ? params.TypeSet : null;
this.ReviewTime = 'ReviewTime' in params ? params.ReviewTime : null;
}
}
/**
* Input type of intelligent categorization task
* @class
*/
class AiAnalysisTaskClassificationInput extends AbstractModel {
constructor(){
super();
/**
* Intelligent video categorization template ID.
* @type {number || null}
*/
this.Definition = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Definition = 'Definition' in params ? params.Definition : null;
}
}
/**
* Input parameter of SVG watermarking template
* @class
*/
class SvgWatermarkInput extends AbstractModel {
constructor(){
super();
/**
* Watermark width, which supports six formats of px, %, W%, H%, S%, and L%:
<li>If the string ends in px, the `Width` of the watermark will be in px; for example, `100px` means that `Width` is 100 px; if `0px` is entered
and `Height` is not `0px`, the watermark width will be proportionally scaled based on the source SVG image; if `0px` is entered for both `Width` and `Height`, the watermark width will be the width of the source SVG image;</li>
<li>If the string ends in `W%`, the `Width` of the watermark will be the specified percentage of the video width; for example, `10W%` means that `Width` is 10% of the video width;</li>
<li>If the string ends in `H%`, the `Width` of the watermark will be the specified percentage of the video height; for example, `10H%` means that `Width` is 10% of the video height;</li>
<li>If the string ends in `S%`, the `Width` of the watermark will be the specified percentage of the short side of the video; for example, `10S%` means that `Width` is 10% of the short side of the video;</li>
<li>If the string ends in `L%`, the `Width` of the watermark will be the specified percentage of the long side of the video; for example, `10L%` means that `Width` is 10% of the long side of the video;</li>
<li>If the string ends in %, the meaning is the same as `W%`.</li>
Default value: 10W%.
* @type {string || null}
*/
this.Width = null;
/**
* Watermark height, which supports six formats of px, %, W%, H%, S%, and L%:
<li>If the string ends in px, the `Height` of the watermark will be in px; for example, `100px` means that `Height` is 100 px; if `0px` is entered
and `Width` is not `0px`, the watermark height will be proportionally scaled based on the source SVG image; if `0px` is entered for both `Width` and `Height`, the watermark height will be the height of the source SVG image;</li>
<li>If the string ends in `W%`, the `Height` of the watermark will be the specified percentage of the video width; for example, `10W%` means that `Height` is 10% of the video width;</li>
<li>If the string ends in `H%`, the `Height` of the watermark will be the specified percentage of the video height; for example, `10H%` means that `Height` is 10% of the video height;</li>
<li>If the string ends in `S%`, the `Height` of the watermark will be the specified percentage of the short side of the video; for example, `10S%` means that `Height` is 10% of the short side of the video;</li>
<li>If the string ends in `L%`, the `Height` of the watermark will be the specified percentage of the long side of the video; for example, `10L%` means that `Height` is 10% of the long side of the video;</li>
<li>If the string ends in %, the meaning is the same as `H%`.</li>
Default value: 0 px.
* @type {string || null}
*/
this.Height = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Width = 'Width' in params ? params.Width : null;
this.Height = 'Height' in params ? params.Height : null;
}
}
/**
* CreateTranscodeTemplate request structure.
* @class
*/
class CreateTranscodeTemplateRequest extends AbstractModel {
constructor(){
super();
/**
* <p>Container format. Valid values: mp4, flv, hls, mp3, flac, ogg, m4a, and wav. Among them, mp3, flac, ogg, m4a, and wav are for audio-only files.</p>
* @type {string || null}
*/
this.Container = null;
/**
* <p><b>Video-on-demand (VOD) <a href="https://www.tencentcloud.com/document/product/266/33987">application</a> ID. Customers who activate on-demand services from December 25, 2023 must fill this field with the app ID to access resources in on-demand applications (whether default or newly created application).</b></p>
* @type {number || null}
*/
this.SubAppId = null;
/**
* <p>Transcoding template name. The length cannot exceed 64 characters.</p>
* @type {string || null}
*/
this.Name = null;
/**
* <p>Template description, with a length limit of 256 characters.</p>
* @type {string || null}
*/
this.Comment = null;
/**
* <p>Whether to remove video data. Available values:</p><li>0: reserved</li><li>1: remove</li>Default value: 0.</p>
* @type {number || null}
*/
this.RemoveVideo = null;
/**
* <p>Remove audio data. Available values:</p><li>0: Reserved</li><li>1: Remove</li>Default value: 0.
* @type {number || null}
*/
this.RemoveAudio = null;
/**
* <p>Video stream configuration parameters. This field is required when RemoveVideo is 0.</p>
* @type {VideoTemplateInfo || null}
*/
this.VideoTemplate = null;
/**
* <p>Audio stream configuration parameters. This field is required when RemoveAudio is 0.</p>
* @type {AudioTemplateInfo || null}
*/
this.AudioTemplate = null;
/**
* <p>TSC transcoding parameter.</p>
* @type {TEHDConfig || null}
*/
this.TEHDConfig = null;
/**
* <p>Audio/Video enhancement configuration.</p>
* @type {EnhanceConfig || null}
*/
this.EnhanceConfig = null;
/**
* <p>Segment type, valid when Container is hls. Available values:</p><li>ts: ts slicing;</li><li>fmp4: fmp4 slicing.</li>Default value: ts.
* @type {string || null}
*/
this.SegmentType = null;
/**
* <p>Extended parameter.</p>
* @type {string || null}
*/
this.StdExtInfo = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Container = 'Container' in params ? params.Container : null;
this.SubAppId = 'SubAppId' in params ? params.SubAppId : null;
this.Name = 'Name' in params ? params.Name : null;
this.Comment = 'Comment' in params ? params.Comment : null;
this.RemoveVideo = 'RemoveVideo' in params ? params.RemoveVideo : null;
this.RemoveAudio = 'RemoveAudio' in params ? params.RemoveAudio : null;
if (params.VideoTemplate) {
let obj = new VideoTemplateInfo();
obj.deserialize(params.VideoTemplate)
this.VideoTemplate = obj;
}
if (params.AudioTemplate) {
let obj = new AudioTemplateInfo();
obj.deserialize(params.AudioTemplate)
this.AudioTemplate = obj;
}
if (params.TEHDConfig) {
let obj = new TEHDConfig();
obj.deserialize(params.TEHDConfig)
this.TEHDConfig = obj;
}
if (params.EnhanceConfig) {
let obj = new EnhanceConfig();
obj.deserialize(params.EnhanceConfig)
this.EnhanceConfig = obj;
}
this.SegmentType = 'SegmentType' in params ? params.SegmentType : null;
this.StdExtInfo = 'StdExtInfo' in params ? params.StdExtInfo : null;
}
}
/**
* Transition operation
* @class
*/
class TransitionOpertion extends AbstractModel {
constructor(){
super();
/**
* Transition type. Valid values:
<ul>
<li>Video image transition operation, which is used for transition with video image between two video segments:
<ul>
<li>ImageFadeInFadeOut: video image fade-in/fade-out.</li>
<li>BowTieHorizontal: horizontal bow.</li>
<li>BowTieVertical: vertical bow.</li>
<li>ButterflyWaveScrawler: waggling.</li>
<li>Cannabisleaf: maple leaf.</li>
<li> Circle: curved circling.</li>
<li>CircleCrop: circle gathering.</li>
<li>Circleopen: elliptic gathering.</li>
<li>Crosswarp: horizontal warping.</li>
<li>Cube: cube.</li>
<li>DoomScreenTransition: curtain.</li>
<li>Doorway: doorway.</li>
<li>Dreamy: wave.</li>
<li>DreamyZoom: horizontal gathering.</li>
<li>FilmBurn: evening glow.</li>
<li>GlitchMemories: joggling.</li>
<li>Heart: heart.</li>
<li>InvertedPageCurl: page turning.</li>
<li>Luma: corroding.</li>
<li>Mosaic: grid.</li>
<li>Pinwheel: pinwheel.</li>
<li>PolarFunction: elliptic diffusing.</li>
<li>PolkaDotsCurtain: curved diffusing.</li>
<li>Radial: radar scan.</li>
<li>RotateScaleFade: vertical rotating.</li>
<li>Squeeze: vertical gathering.</li>
<li>Swap: zooming in.</li>
<li>Swirl: swirling.</li>
<li>UndulatingBurnOutSwirl: water spreading.</li>
<li>Windowblinds: blinds.</li>
<li>WipeDown: collapsing down.</li>
<li>WipeLeft: collapsing to the left.</li>
<li>WipeRight: collapsing to the right.</li>
<li>WipeUp: collapsing up.</li>
<li>ZoomInCircles: ripples.</li>
</ul>
</li>
<li>Audio transition operation, which is used for transition between two audio segments:
<ul>
<li>AudioFadeInFadeOut: audio fade-in/fade-out.</li>
</ul>
</li>
</ul>
* @type {string || null}
*/
this.Type = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Type = 'Type' in params ? params.Type : null;
}
}
/**
* Audio segment information of audio track.
* @class
*/
class AudioTrackItem extends AbstractModel {
constructor(){
super();
/**
* Source of media material for audio segment, which can be:
<li>ID of VOD media files</li>
<li>Download URL of other media files</li>
Note: when a download URL of other media files is used as the material source and access control (such as hotlink protection) is enabled, the URL needs to carry access control parameters (such as hotlink protection signature).
* @type {string || null}
*/
this.SourceMedia = null;
/**
* Start time of audio se