PicOperationUploadResult.cs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. using System.Collections.Generic;
  2. using System.Xml.Serialization;
  3. namespace COSXML.Model.Tag
  4. {
  5. /// <summary>
  6. /// 图片处理结果
  7. /// </summary>
  8. [XmlRoot("UploadResult")]
  9. public sealed class PicOperationUploadResult
  10. {
  11. /// <summary>
  12. /// 原图信息
  13. /// </summary>
  14. [XmlElement("OriginalInfo")]
  15. public OriginalInfo originalInfo;
  16. /// <summary>
  17. /// 图片处理结果
  18. /// </summary>
  19. [XmlElement("ProcessResults")]
  20. public ProcessResults processResults;
  21. /// <summary>
  22. /// 原图信息
  23. /// </summary>
  24. public sealed class OriginalInfo
  25. {
  26. /// <summary>
  27. /// 对象健
  28. /// </summary>
  29. [XmlElement]
  30. public string Key;
  31. /// <summary>
  32. /// 图片路径
  33. /// </summary>
  34. [XmlElement]
  35. public string Location;
  36. /// <summary>
  37. /// 图片 Etag
  38. /// </summary>
  39. [XmlElement]
  40. public string ETag;
  41. /// <summary>
  42. /// 原图图片信息
  43. /// </summary>
  44. [XmlElement("ImageInfo")]
  45. public ImageInfo imageInfo;
  46. }
  47. /// <summary>
  48. /// 原图图片信息
  49. /// </summary>
  50. public sealed class ImageInfo
  51. {
  52. /// <summary>
  53. /// 格式
  54. /// </summary>
  55. [XmlElement]
  56. public string Format;
  57. /// <summary>
  58. /// 宽度
  59. /// </summary>
  60. [XmlElement]
  61. public int Width;
  62. /// <summary>
  63. /// 高度
  64. /// </summary>
  65. [XmlElement]
  66. public int Height;
  67. /// <summary>
  68. /// 图片质量
  69. /// </summary>
  70. [XmlElement]
  71. public int Quality;
  72. /// <summary>
  73. /// 图片主色调
  74. /// </summary>
  75. [XmlElement]
  76. public string Ave;
  77. /// <summary>
  78. /// 图片旋转角度
  79. /// </summary>
  80. [XmlElement]
  81. public int Orientation;
  82. }
  83. /// <summary>
  84. /// 图片处理结果
  85. /// </summary>
  86. public sealed class ProcessResults
  87. {
  88. /// <summary>
  89. /// 图片处理结果
  90. /// </summary>
  91. [XmlElement("Object")]
  92. public List<ProcessResult> results;
  93. public ProcessResults()
  94. {
  95. results = new List<ProcessResult>();
  96. }
  97. }
  98. /// <summary>
  99. /// 单个图片处理结果
  100. /// </summary>
  101. public sealed class ProcessResult
  102. {
  103. /// <summary>
  104. /// 文件对象键
  105. /// </summary>
  106. [XmlElement]
  107. public string Key;
  108. /// <summary>
  109. /// 图片路径
  110. /// </summary>
  111. [XmlElement]
  112. public string Location;
  113. /// <summary>
  114. /// 图片格式
  115. /// </summary>
  116. [XmlElement]
  117. public string Format;
  118. /// <summary>
  119. /// 图片宽度
  120. /// </summary>
  121. [XmlElement]
  122. public int Width;
  123. /// <summary>
  124. /// 图片高度
  125. /// </summary>
  126. [XmlElement]
  127. public int Height;
  128. /// <summary>
  129. /// 图片大小
  130. /// </summary>
  131. [XmlElement]
  132. public int Size;
  133. /// <summary>
  134. /// 图片质量
  135. /// </summary>
  136. [XmlElement]
  137. public int Quality;
  138. /// <summary>
  139. /// 图片 Etag
  140. /// </summary>
  141. [XmlElement]
  142. public string ETag;
  143. /// <summary>
  144. /// 盲水印时表示提取到全盲水印的可信度
  145. /// </summary>
  146. [XmlElement]
  147. public int WatermarkStatus;
  148. /// <summary>
  149. /// 二维码时表示二维码识别结果
  150. /// </summary>
  151. [XmlElement]
  152. public int CodeStatus;
  153. /// <summary>
  154. /// 二维码表示二维码识别结果
  155. /// </summary>
  156. [XmlElement]
  157. public QRcodeInfo QRcodeInfo;
  158. }
  159. /// <summary>
  160. /// 二维码识别结果
  161. /// </summary>
  162. public sealed class QRcodeInfo
  163. {
  164. /// <summary>
  165. /// 文件对象键
  166. /// </summary>
  167. [XmlElement]
  168. public string CodeUrl;
  169. /// <summary>
  170. /// 图片路径
  171. /// </summary>
  172. [XmlElement]
  173. public CodeLocation CodeLocation;
  174. }
  175. /// <summary>
  176. /// 二维码识别结果
  177. /// </summary>
  178. public sealed class CodeLocation
  179. {
  180. /// <summary>
  181. /// 文件对象键
  182. /// </summary>
  183. [XmlElement]
  184. public List<string> Point;
  185. }
  186. }
  187. }