AudioCensorJobInfo.cs 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. /// 音频审核请求body
  9. /// <see href="https://cloud.tencent.com/document/product/436/54063"/>
  10. /// </summary>
  11. [XmlRoot("Request")]
  12. public sealed class AudioCencorJobInfo
  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. [XmlElement("Url")]
  31. public string url;
  32. public string GetInfo()
  33. {
  34. StringBuilder stringBuilder = new StringBuilder("{Input:\n");
  35. if (obj != null)
  36. {
  37. stringBuilder.Append("Object:" + obj + "\n");
  38. }
  39. if (url != null)
  40. {
  41. stringBuilder.Append("Url:" + url + "\n");
  42. }
  43. stringBuilder.Append("}");
  44. return stringBuilder.ToString();
  45. }
  46. }
  47. public sealed class Conf
  48. {
  49. [XmlElement("DetectType")]
  50. public string detectType;
  51. [XmlElement("Callback")]
  52. public string callback;
  53. [XmlElement("CallbackVersion")]
  54. public string callbackVersion;
  55. [XmlElement("BizType")]
  56. public string bizType;
  57. public string GetInfo()
  58. {
  59. StringBuilder stringBuilder = new StringBuilder("{Conf:\n");
  60. stringBuilder.Append("DetectType:").Append(detectType).Append("\n");
  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. }
  78. }