VideoCensorJobInfo.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Xml.Serialization;
  4. using System.Text;
  5. namespace COSXML.Model.Tag
  6. {
  7. /// <summary>
  8. /// 视频审核
  9. /// <see href="https://cloud.tencent.com/document/product/436/7733"/>
  10. /// </summary>
  11. [XmlRoot("Request")]
  12. public sealed class VideoCencorJobInfo
  13. {
  14. [XmlElement("Input")]
  15. public Input input;
  16. [XmlElement("Conf")]
  17. public Conf conf;
  18. public string GetInfo()
  19. {
  20. StringBuilder stringBuilder = new StringBuilder("{Request:\n");
  21. stringBuilder.Append(input.GetInfo()).Append("\n");
  22. stringBuilder.Append(conf.GetInfo()).Append("\n");
  23. stringBuilder.Append("}");
  24. return stringBuilder.ToString();
  25. }
  26. public sealed class Input
  27. {
  28. [XmlElement("Object")]
  29. public string obj;
  30. public string GetInfo()
  31. {
  32. StringBuilder stringBuilder = new StringBuilder("{Input:\n");
  33. stringBuilder.Append("Object:" + obj + "\n");
  34. stringBuilder.Append("}");
  35. return stringBuilder.ToString();
  36. }
  37. }
  38. public sealed class Conf
  39. {
  40. [XmlElement("DetectType")]
  41. public string detectType;
  42. [XmlElement("Snapshot")]
  43. public Snapshot snapshot;
  44. [XmlElement("Callback")]
  45. public string callback;
  46. [XmlElement("CallbackVersion")]
  47. public string callbackVersion;
  48. [XmlElement("BizType")]
  49. public string bizType;
  50. [XmlElement("DetectContent")]
  51. public string detectContent;
  52. public string GetInfo()
  53. {
  54. StringBuilder stringBuilder = new StringBuilder("{Conf:\n");
  55. stringBuilder.Append("DetectType:").Append(detectType).Append("\n");
  56. stringBuilder.Append("Snapshot:").Append(snapshot.GetInfo()).Append("\n");
  57. if (detectContent != null)
  58. {
  59. stringBuilder.Append("DetectContent:").Append(detectContent).Append("\n");
  60. }
  61. if (callback != null)
  62. {
  63. stringBuilder.Append("Callback:").Append(callback).Append("\n");
  64. }
  65. if (callbackVersion != null)
  66. {
  67. stringBuilder.Append("CallbackVersion:").Append(callbackVersion).Append("\n");
  68. }
  69. if (bizType != null)
  70. {
  71. stringBuilder.Append("BizType:").Append(bizType).Append("\n");
  72. }
  73. stringBuilder.Append("}");
  74. return stringBuilder.ToString();
  75. }
  76. }
  77. public sealed class Snapshot
  78. {
  79. [XmlElement("Mode")]
  80. public string mode = "";
  81. [XmlElement("Count")]
  82. public string count = "";
  83. [XmlElement("TimeInterval")]
  84. public string timeInterval = "";
  85. public string GetInfo()
  86. {
  87. StringBuilder stringBuilder = new StringBuilder("{Snapshot:\n");
  88. if (mode != null)
  89. {
  90. stringBuilder.Append("Mode:").Append(mode).Append("\n");
  91. }
  92. if (count != null)
  93. {
  94. stringBuilder.Append("Count:").Append(count).Append("\n");
  95. }
  96. if (timeInterval != null)
  97. {
  98. stringBuilder.Append("TimeInterval:").Append(timeInterval).Append("\n");
  99. }
  100. stringBuilder.Append("}");
  101. return stringBuilder.ToString();
  102. }
  103. }
  104. }
  105. }