DocumentCensorJobInfo.cs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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/59381"/>
  10. /// </summary>
  11. [XmlRoot("Request")]
  12. public sealed class DocumentCensorJobInfo
  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("Url")]
  29. public string url;
  30. [XmlElement("Type")]
  31. public string type;
  32. public string GetInfo()
  33. {
  34. StringBuilder stringBuilder = new StringBuilder("{Input:\n");
  35. stringBuilder.Append("Url:" + url + "\n");
  36. if (type != null)
  37. {
  38. stringBuilder.Append("Type:" + type + "\n");
  39. }
  40. stringBuilder.Append("}");
  41. return stringBuilder.ToString();
  42. }
  43. }
  44. public sealed class Conf
  45. {
  46. [XmlElement("DetectType")]
  47. public string detectType;
  48. [XmlElement("Callback")]
  49. public string callback;
  50. [XmlElement("BizType")]
  51. public string bizType;
  52. public string GetInfo()
  53. {
  54. StringBuilder stringBuilder = new StringBuilder("{Conf:\n");
  55. stringBuilder.Append("DetectType:").Append(detectType).Append("\n");
  56. if (callback != null)
  57. {
  58. stringBuilder.Append("Callback:").Append(callback).Append("\n");
  59. }
  60. if (bizType != null)
  61. {
  62. stringBuilder.Append("BizType:").Append(bizType).Append("\n");
  63. }
  64. stringBuilder.Append("}");
  65. return stringBuilder.ToString();
  66. }
  67. }
  68. }
  69. }