-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
shawnnqin
committed
Oct 8, 2021
1 parent
95b952a
commit fbef488
Showing
17 changed files
with
490 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
QCloudCSharpSDK/COSXML/Model/CI/GetAudioCensorJobRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
using System.Text; | ||
using COSXML.Common; | ||
using COSXML.Model.Object; | ||
using COSXML.Model.Tag; | ||
using COSXML.CosException; | ||
using COSXML.Utils; | ||
|
||
namespace COSXML.Model.CI | ||
{ | ||
/// <summary> | ||
/// 查询音频审核任务 | ||
/// <see href="https://cloud.tencent.com/document/product/436/54064"/> | ||
/// </summary> | ||
public sealed class GetAudioCensorJobRequest : CIRequest | ||
{ | ||
public GetAudioCensorJobRequest(string bucket, string JobId) | ||
: base(bucket) | ||
{ | ||
this.method = CosRequestMethod.GET; | ||
this.SetRequestPath("/audio/auditing/" + JobId); | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
QCloudCSharpSDK/COSXML/Model/CI/GetAudioCensorJobResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using System.IO; | ||
using System.Collections.Generic; | ||
using COSXML.Model.Tag; | ||
using COSXML.Transfer; | ||
|
||
namespace COSXML.Model.CI | ||
{ | ||
/// <summary> | ||
/// 查询音频审核结果 | ||
/// </summary> | ||
public sealed class GetAudioCensorJobResult : CosDataResult<AudioCensorResult> | ||
{ | ||
/// <summary> | ||
/// 音频审核结果 | ||
/// </summary> | ||
/// <value></value> | ||
public AudioCensorResult resultStruct { | ||
get {return _data; } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
QCloudCSharpSDK/COSXML/Model/CI/SubmitAudioCensorJobRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
using System.Text; | ||
using COSXML.Common; | ||
using COSXML.Model.Object; | ||
using COSXML.Model.Tag; | ||
using COSXML.CosException; | ||
using COSXML.Utils; | ||
|
||
namespace COSXML.Model.CI | ||
{ | ||
/// <summary> | ||
/// 提交音频审核任务 | ||
/// <see href="https://cloud.tencent.com/document/product/436/54063"/> | ||
/// </summary> | ||
public sealed class SubmitAudioCensorJobRequest : CIRequest | ||
{ | ||
public AudioCencorJobInfo audioCencorJobInfo; | ||
public SubmitAudioCensorJobRequest(string bucket) | ||
: base(bucket) | ||
{ | ||
audioCencorJobInfo = new AudioCencorJobInfo(); | ||
this.method = CosRequestMethod.POST; | ||
this.SetRequestPath("/audio/auditing"); | ||
this.SetRequestHeader("Content-Type", "application/xml"); | ||
audioCencorJobInfo.input = new AudioCencorJobInfo.Input(); | ||
audioCencorJobInfo.conf = new AudioCencorJobInfo.Conf(); | ||
} | ||
|
||
public void SetCensorObject(string key) | ||
{ | ||
audioCencorJobInfo.input.obj = key; | ||
} | ||
|
||
public void SetCensorUrl(string url) | ||
{ | ||
audioCencorJobInfo.input.url = url; | ||
} | ||
|
||
public void SetDetectType(string detectType) | ||
{ | ||
audioCencorJobInfo.conf.detectType = detectType; | ||
} | ||
|
||
public void SetCallback(string callbackUrl) | ||
{ | ||
audioCencorJobInfo.conf.callback = callbackUrl; | ||
} | ||
|
||
public void SetCallbackVersion(string callbackVersion) | ||
{ | ||
audioCencorJobInfo.conf.callbackVersion = callbackVersion; | ||
} | ||
|
||
public void SetBizType(string BizType) | ||
{ | ||
audioCencorJobInfo.conf.bizType = BizType; | ||
} | ||
|
||
public override Network.RequestBody GetRequestBody() | ||
{ | ||
return GetXmlRequestBody(audioCencorJobInfo); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Xml.Serialization; | ||
using System.Text; | ||
|
||
namespace COSXML.Model.Tag | ||
{ | ||
/// <summary> | ||
/// 音频审核请求body | ||
/// <see href="https://cloud.tencent.com/document/product/436/54063"/> | ||
/// </summary> | ||
[XmlRoot("Request")] | ||
public sealed class AudioCencorJobInfo | ||
{ | ||
[XmlElement("Input")] | ||
public Input input; | ||
|
||
[XmlElement("Conf")] | ||
public Conf conf; | ||
|
||
public string GetInfo() | ||
{ | ||
StringBuilder stringBuilder = new StringBuilder("{Request:\n"); | ||
|
||
stringBuilder.Append(input.GetInfo()).Append("\n"); | ||
|
||
stringBuilder.Append(conf.GetInfo()).Append("\n"); | ||
|
||
stringBuilder.Append("}"); | ||
|
||
return stringBuilder.ToString(); | ||
} | ||
|
||
public sealed class Input | ||
{ | ||
[XmlElement("Object")] | ||
public string obj; | ||
|
||
[XmlElement("Url")] | ||
public string url; | ||
|
||
public string GetInfo() | ||
{ | ||
StringBuilder stringBuilder = new StringBuilder("{Input:\n"); | ||
if (obj != null) | ||
{ | ||
stringBuilder.Append("Object:" + obj + "\n"); | ||
} | ||
if (url != null) | ||
{ | ||
stringBuilder.Append("Url:" + url + "\n"); | ||
} | ||
stringBuilder.Append("}"); | ||
return stringBuilder.ToString(); | ||
} | ||
} | ||
|
||
|
||
public sealed class Conf | ||
{ | ||
[XmlElement("DetectType")] | ||
public string detectType; | ||
|
||
[XmlElement("Callback")] | ||
public string callback; | ||
|
||
[XmlElement("CallbackVersion")] | ||
public string callbackVersion; | ||
|
||
[XmlElement("BizType")] | ||
public string bizType; | ||
|
||
public string GetInfo() | ||
{ | ||
StringBuilder stringBuilder = new StringBuilder("{Conf:\n"); | ||
|
||
stringBuilder.Append("DetectType:").Append(detectType).Append("\n"); | ||
if (callback != null) | ||
{ | ||
stringBuilder.Append("Callback:").Append(callback).Append("\n"); | ||
} | ||
if (callbackVersion != null) | ||
{ | ||
stringBuilder.Append("CallbackVersion:").Append(callbackVersion).Append("\n"); | ||
} | ||
if (bizType != null) | ||
{ | ||
stringBuilder.Append("BizType:").Append(bizType).Append("\n"); | ||
} | ||
stringBuilder.Append("}"); | ||
|
||
return stringBuilder.ToString(); | ||
} | ||
} | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.