ImgesResponse.cs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. using Newtonsoft.Json;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace KdanCommon.GoogleCloud.Data.Vision
  8. {
  9. public partial class ImagesResponse
  10. {
  11. [JsonProperty("responses")]
  12. public ImageResponse[] Responses { get; set; }
  13. }
  14. public partial class ImageResponse
  15. {
  16. [JsonProperty("textAnnotations")]
  17. public TextAnnotation[] TextAnnotations { get; set; }
  18. [JsonProperty("fullTextAnnotation")]
  19. public FullTextAnnotation FullTextAnnotation { get; set; }
  20. }
  21. public partial class FullTextAnnotation
  22. {
  23. [JsonProperty("pages")]
  24. public Page[] Pages { get; set; }
  25. [JsonProperty("text")]
  26. public string Text { get; set; }
  27. }
  28. public partial class Page
  29. {
  30. [JsonProperty("property")]
  31. public WordProperty Property { get; set; }
  32. [JsonProperty("width")]
  33. public long Width { get; set; }
  34. [JsonProperty("height")]
  35. public long Height { get; set; }
  36. [JsonProperty("blocks")]
  37. public Block[] Blocks { get; set; }
  38. }
  39. public partial class Block
  40. {
  41. [JsonProperty("boundingBox")]
  42. public Bounding BoundingBox { get; set; }
  43. [JsonProperty("paragraphs")]
  44. public Paragraph[] Paragraphs { get; set; }
  45. [JsonProperty("blockType")]
  46. public string BlockType { get; set; }
  47. }
  48. public partial class Bounding
  49. {
  50. [JsonProperty("vertices")]
  51. public Vertex[] Vertices { get; set; }
  52. }
  53. public partial class Vertex
  54. {
  55. [JsonProperty("x")]
  56. public long X { get; set; }
  57. [JsonProperty("y")]
  58. public long Y { get; set; }
  59. }
  60. public partial class Paragraph
  61. {
  62. [JsonProperty("boundingBox")]
  63. public Bounding BoundingBox { get; set; }
  64. [JsonProperty("words")]
  65. public Word[] Words { get; set; }
  66. }
  67. public partial class Word
  68. {
  69. [JsonProperty("boundingBox")]
  70. public Bounding BoundingBox { get; set; }
  71. [JsonProperty("symbols")]
  72. public Symbol[] Symbols { get; set; }
  73. [JsonProperty("property", NullValueHandling = NullValueHandling.Ignore)]
  74. public WordProperty Property { get; set; }
  75. }
  76. public partial class WordProperty
  77. {
  78. [JsonProperty("detectedLanguages")]
  79. public DetectedLanguage[] DetectedLanguages { get; set; }
  80. }
  81. public partial class DetectedLanguage
  82. {
  83. [JsonProperty("languageCode")]
  84. public string LanguageCode { get; set; }
  85. [JsonProperty("confidence")]
  86. public double Confidence { get; set; }
  87. }
  88. public partial class Symbol
  89. {
  90. [JsonProperty("boundingBox")]
  91. public Bounding BoundingBox { get; set; }
  92. [JsonProperty("text")]
  93. public string Text { get; set; }
  94. [JsonProperty("property", NullValueHandling = NullValueHandling.Ignore)]
  95. public SymbolProperty Property { get; set; }
  96. }
  97. public partial class SymbolProperty
  98. {
  99. [JsonProperty("detectedBreak")]
  100. public DetectedBreak DetectedBreak { get; set; }
  101. }
  102. public partial class DetectedBreak
  103. {
  104. [JsonProperty("type")]
  105. public string Type { get; set; }
  106. }
  107. public partial class TextAnnotation
  108. {
  109. [JsonProperty("locale", NullValueHandling = NullValueHandling.Ignore)]
  110. public string Locale { get; set; }
  111. [JsonProperty("description")]
  112. public string Description { get; set; }
  113. [JsonProperty("boundingPoly")]
  114. public Bounding BoundingPoly { get; set; }
  115. }
  116. }