google-api-client 0.30.9 → 0.30.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (251) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +89 -0
  3. data/api_names.yaml +1 -0
  4. data/generated/google/apis/abusiveexperiencereport_v1.rb +1 -1
  5. data/generated/google/apis/abusiveexperiencereport_v1/classes.rb +18 -7
  6. data/generated/google/apis/abusiveexperiencereport_v1/service.rb +5 -10
  7. data/generated/google/apis/adexperiencereport_v1.rb +1 -1
  8. data/generated/google/apis/adexperiencereport_v1/classes.rb +24 -12
  9. data/generated/google/apis/adexperiencereport_v1/service.rb +6 -9
  10. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  11. data/generated/google/apis/analyticsreporting_v4/classes.rb +3 -0
  12. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  13. data/generated/google/apis/androidmanagement_v1/classes.rb +62 -9
  14. data/generated/google/apis/androidmanagement_v1/representations.rb +19 -0
  15. data/generated/google/apis/bigquery_v2.rb +1 -1
  16. data/generated/google/apis/bigquery_v2/classes.rb +32 -9
  17. data/generated/google/apis/bigquery_v2/representations.rb +5 -0
  18. data/generated/google/apis/bigquery_v2/service.rb +1 -1
  19. data/generated/google/apis/bigqueryconnection_v1beta1.rb +37 -0
  20. data/generated/google/apis/bigqueryconnection_v1beta1/classes.rb +645 -0
  21. data/generated/google/apis/bigqueryconnection_v1beta1/representations.rb +263 -0
  22. data/generated/google/apis/bigqueryconnection_v1beta1/service.rb +378 -0
  23. data/generated/google/apis/bigtableadmin_v2.rb +1 -1
  24. data/generated/google/apis/bigtableadmin_v2/classes.rb +41 -16
  25. data/generated/google/apis/bigtableadmin_v2/representations.rb +15 -0
  26. data/generated/google/apis/binaryauthorization_v1.rb +35 -0
  27. data/generated/google/apis/binaryauthorization_v1/classes.rb +388 -0
  28. data/generated/google/apis/binaryauthorization_v1/representations.rb +167 -0
  29. data/generated/google/apis/binaryauthorization_v1/service.rb +313 -0
  30. data/generated/google/apis/binaryauthorization_v1beta1.rb +1 -1
  31. data/generated/google/apis/binaryauthorization_v1beta1/classes.rb +6 -1
  32. data/generated/google/apis/binaryauthorization_v1beta1/service.rb +10 -6
  33. data/generated/google/apis/calendar_v3.rb +1 -1
  34. data/generated/google/apis/calendar_v3/classes.rb +1 -1
  35. data/generated/google/apis/cloudasset_v1.rb +1 -1
  36. data/generated/google/apis/cloudasset_v1/classes.rb +52 -1
  37. data/generated/google/apis/cloudasset_v1/representations.rb +17 -0
  38. data/generated/google/apis/cloudasset_v1beta1.rb +1 -1
  39. data/generated/google/apis/cloudasset_v1beta1/classes.rb +6 -1
  40. data/generated/google/apis/cloudiot_v1.rb +1 -1
  41. data/generated/google/apis/cloudiot_v1/classes.rb +11 -4
  42. data/generated/google/apis/cloudkms_v1.rb +1 -1
  43. data/generated/google/apis/cloudkms_v1/classes.rb +0 -14
  44. data/generated/google/apis/cloudkms_v1/representations.rb +0 -2
  45. data/generated/google/apis/cloudkms_v1/service.rb +3 -3
  46. data/generated/google/apis/cloudprivatecatalogproducer_v1beta1.rb +1 -1
  47. data/generated/google/apis/cloudprivatecatalogproducer_v1beta1/classes.rb +6 -1
  48. data/generated/google/apis/cloudprivatecatalogproducer_v1beta1/service.rb +5 -3
  49. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  50. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +12 -8
  51. data/generated/google/apis/cloudresourcemanager_v1/service.rb +5 -1
  52. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  53. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +12 -8
  54. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +6 -2
  55. data/generated/google/apis/cloudresourcemanager_v2.rb +1 -1
  56. data/generated/google/apis/cloudresourcemanager_v2/classes.rb +11 -4
  57. data/generated/google/apis/cloudresourcemanager_v2beta1.rb +1 -1
  58. data/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb +11 -4
  59. data/generated/google/apis/cloudsearch_v1.rb +1 -1
  60. data/generated/google/apis/cloudsearch_v1/classes.rb +14 -3
  61. data/generated/google/apis/cloudsearch_v1/representations.rb +1 -0
  62. data/generated/google/apis/cloudsearch_v1/service.rb +3 -1
  63. data/generated/google/apis/cloudtasks_v2beta3.rb +1 -1
  64. data/generated/google/apis/cloudtasks_v2beta3/classes.rb +2 -2
  65. data/generated/google/apis/cloudtrace_v2.rb +1 -1
  66. data/generated/google/apis/cloudtrace_v2/classes.rb +8 -0
  67. data/generated/google/apis/cloudtrace_v2/representations.rb +1 -0
  68. data/generated/google/apis/commentanalyzer_v1alpha1.rb +1 -1
  69. data/generated/google/apis/commentanalyzer_v1alpha1/classes.rb +1 -0
  70. data/generated/google/apis/composer_v1.rb +1 -1
  71. data/generated/google/apis/composer_v1/classes.rb +17 -24
  72. data/generated/google/apis/composer_v1beta1.rb +1 -1
  73. data/generated/google/apis/composer_v1beta1/classes.rb +17 -24
  74. data/generated/google/apis/compute_alpha.rb +1 -1
  75. data/generated/google/apis/compute_alpha/classes.rb +1139 -284
  76. data/generated/google/apis/compute_alpha/representations.rb +304 -1
  77. data/generated/google/apis/compute_alpha/service.rb +935 -23
  78. data/generated/google/apis/compute_beta.rb +1 -1
  79. data/generated/google/apis/compute_beta/classes.rb +554 -98
  80. data/generated/google/apis/compute_beta/representations.rb +117 -0
  81. data/generated/google/apis/compute_beta/service.rb +63 -19
  82. data/generated/google/apis/compute_v1.rb +1 -1
  83. data/generated/google/apis/compute_v1/classes.rb +1187 -165
  84. data/generated/google/apis/compute_v1/representations.rb +402 -0
  85. data/generated/google/apis/compute_v1/service.rb +832 -12
  86. data/generated/google/apis/container_v1.rb +1 -1
  87. data/generated/google/apis/container_v1/classes.rb +36 -0
  88. data/generated/google/apis/container_v1/representations.rb +16 -0
  89. data/generated/google/apis/container_v1beta1.rb +1 -1
  90. data/generated/google/apis/container_v1beta1/classes.rb +153 -0
  91. data/generated/google/apis/container_v1beta1/representations.rb +77 -0
  92. data/generated/google/apis/content_v2.rb +1 -1
  93. data/generated/google/apis/content_v2/classes.rb +93 -2
  94. data/generated/google/apis/content_v2/representations.rb +37 -0
  95. data/generated/google/apis/content_v2_1.rb +1 -1
  96. data/generated/google/apis/content_v2_1/classes.rb +86 -2
  97. data/generated/google/apis/content_v2_1/representations.rb +36 -0
  98. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  99. data/generated/google/apis/dataflow_v1b3/classes.rb +21 -106
  100. data/generated/google/apis/dataflow_v1b3/representations.rb +3 -58
  101. data/generated/google/apis/dataflow_v1b3/service.rb +0 -327
  102. data/generated/google/apis/dataproc_v1.rb +1 -1
  103. data/generated/google/apis/dataproc_v1/classes.rb +7 -0
  104. data/generated/google/apis/dataproc_v1/representations.rb +1 -0
  105. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  106. data/generated/google/apis/dataproc_v1beta2/classes.rb +7 -0
  107. data/generated/google/apis/dataproc_v1beta2/representations.rb +1 -0
  108. data/generated/google/apis/datastore_v1.rb +1 -1
  109. data/generated/google/apis/datastore_v1/classes.rb +9 -75
  110. data/generated/google/apis/datastore_v1beta1.rb +1 -1
  111. data/generated/google/apis/datastore_v1beta1/classes.rb +9 -75
  112. data/generated/google/apis/dfareporting_v3_1.rb +1 -1
  113. data/generated/google/apis/dfareporting_v3_1/classes.rb +42 -302
  114. data/generated/google/apis/dfareporting_v3_1/representations.rb +8 -84
  115. data/generated/google/apis/dfareporting_v3_1/service.rb +5 -107
  116. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  117. data/generated/google/apis/dialogflow_v2beta1/classes.rb +118 -0
  118. data/generated/google/apis/dialogflow_v2beta1/representations.rb +70 -0
  119. data/generated/google/apis/dialogflow_v2beta1/service.rb +75 -0
  120. data/generated/google/apis/dlp_v2.rb +1 -1
  121. data/generated/google/apis/dlp_v2/classes.rb +42 -0
  122. data/generated/google/apis/dlp_v2/representations.rb +16 -0
  123. data/generated/google/apis/dlp_v2/service.rb +125 -1
  124. data/generated/google/apis/docs_v1.rb +1 -1
  125. data/generated/google/apis/docs_v1/classes.rb +128 -0
  126. data/generated/google/apis/docs_v1/representations.rb +49 -0
  127. data/generated/google/apis/{appstate_v1.rb → domainsrdap_v1.rb} +8 -11
  128. data/generated/google/apis/domainsrdap_v1/classes.rb +269 -0
  129. data/generated/google/apis/{appstate_v1 → domainsrdap_v1}/representations.rb +33 -22
  130. data/generated/google/apis/domainsrdap_v1/service.rb +350 -0
  131. data/generated/google/apis/drive_v2.rb +1 -1
  132. data/generated/google/apis/drive_v2/classes.rb +10 -1
  133. data/generated/google/apis/drive_v2/representations.rb +1 -0
  134. data/generated/google/apis/drive_v3.rb +1 -1
  135. data/generated/google/apis/drive_v3/classes.rb +10 -1
  136. data/generated/google/apis/drive_v3/representations.rb +1 -0
  137. data/generated/google/apis/driveactivity_v2.rb +1 -1
  138. data/generated/google/apis/firestore_v1.rb +1 -1
  139. data/generated/google/apis/firestore_v1/classes.rb +21 -130
  140. data/generated/google/apis/firestore_v1beta1.rb +1 -1
  141. data/generated/google/apis/firestore_v1beta1/classes.rb +16 -122
  142. data/generated/google/apis/firestore_v1beta2.rb +1 -1
  143. data/generated/google/apis/firestore_v1beta2/classes.rb +14 -83
  144. data/generated/google/apis/healthcare_v1alpha2.rb +1 -1
  145. data/generated/google/apis/healthcare_v1alpha2/classes.rb +94 -48
  146. data/generated/google/apis/healthcare_v1alpha2/representations.rb +16 -0
  147. data/generated/google/apis/healthcare_v1alpha2/service.rb +117 -75
  148. data/generated/google/apis/healthcare_v1beta1.rb +1 -1
  149. data/generated/google/apis/healthcare_v1beta1/classes.rb +56 -2
  150. data/generated/google/apis/healthcare_v1beta1/representations.rb +17 -0
  151. data/generated/google/apis/healthcare_v1beta1/service.rb +10 -5
  152. data/generated/google/apis/homegraph_v1.rb +31 -0
  153. data/generated/google/apis/homegraph_v1/classes.rb +692 -0
  154. data/generated/google/apis/homegraph_v1/representations.rb +323 -0
  155. data/generated/google/apis/homegraph_v1/service.rb +255 -0
  156. data/generated/google/apis/logging_v2.rb +1 -1
  157. data/generated/google/apis/logging_v2/classes.rb +8 -7
  158. data/generated/google/apis/logging_v2/service.rb +40 -35
  159. data/generated/google/apis/ml_v1.rb +1 -1
  160. data/generated/google/apis/monitoring_v3.rb +1 -1
  161. data/generated/google/apis/pagespeedonline_v5.rb +1 -1
  162. data/generated/google/apis/pubsub_v1.rb +1 -1
  163. data/generated/google/apis/pubsub_v1/classes.rb +6 -1
  164. data/generated/google/apis/pubsub_v1/service.rb +15 -9
  165. data/generated/google/apis/pubsub_v1beta2.rb +1 -1
  166. data/generated/google/apis/pubsub_v1beta2/classes.rb +6 -1
  167. data/generated/google/apis/pubsub_v1beta2/service.rb +10 -6
  168. data/generated/google/apis/run_v1alpha1.rb +1 -1
  169. data/generated/google/apis/run_v1alpha1/classes.rb +26 -6
  170. data/generated/google/apis/run_v1alpha1/representations.rb +1 -0
  171. data/generated/google/apis/run_v1alpha1/service.rb +5 -3
  172. data/generated/google/apis/runtimeconfig_v1beta1.rb +1 -1
  173. data/generated/google/apis/runtimeconfig_v1beta1/classes.rb +6 -1
  174. data/generated/google/apis/runtimeconfig_v1beta1/service.rb +5 -3
  175. data/generated/google/apis/script_v1.rb +1 -1
  176. data/generated/google/apis/script_v1/service.rb +6 -5
  177. data/generated/google/apis/securitycenter_v1.rb +1 -1
  178. data/generated/google/apis/securitycenter_v1/classes.rb +11 -4
  179. data/generated/google/apis/securitycenter_v1beta1.rb +1 -1
  180. data/generated/google/apis/securitycenter_v1beta1/classes.rb +11 -4
  181. data/generated/google/apis/servicebroker_v1.rb +1 -1
  182. data/generated/google/apis/servicebroker_v1/classes.rb +6 -1
  183. data/generated/google/apis/servicebroker_v1/service.rb +5 -3
  184. data/generated/google/apis/servicebroker_v1alpha1.rb +1 -1
  185. data/generated/google/apis/servicebroker_v1alpha1/classes.rb +6 -1
  186. data/generated/google/apis/servicebroker_v1alpha1/service.rb +5 -3
  187. data/generated/google/apis/servicebroker_v1beta1.rb +1 -1
  188. data/generated/google/apis/servicebroker_v1beta1/classes.rb +6 -1
  189. data/generated/google/apis/servicebroker_v1beta1/service.rb +5 -3
  190. data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
  191. data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +1 -4
  192. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  193. data/generated/google/apis/servicemanagement_v1/classes.rb +11 -4
  194. data/generated/google/apis/servicenetworking_v1.rb +1 -1
  195. data/generated/google/apis/servicenetworking_v1/classes.rb +1 -4
  196. data/generated/google/apis/servicenetworking_v1beta.rb +1 -1
  197. data/generated/google/apis/servicenetworking_v1beta/classes.rb +1 -4
  198. data/generated/google/apis/serviceusage_v1.rb +1 -1
  199. data/generated/google/apis/serviceusage_v1/classes.rb +30 -4
  200. data/generated/google/apis/serviceusage_v1/representations.rb +14 -0
  201. data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
  202. data/generated/google/apis/serviceusage_v1beta1/classes.rb +30 -4
  203. data/generated/google/apis/serviceusage_v1beta1/representations.rb +14 -0
  204. data/generated/google/apis/slides_v1.rb +1 -1
  205. data/generated/google/apis/slides_v1/classes.rb +1 -1
  206. data/generated/google/apis/speech_v1.rb +1 -1
  207. data/generated/google/apis/speech_v1/classes.rb +9 -7
  208. data/generated/google/apis/speech_v1p1beta1.rb +1 -1
  209. data/generated/google/apis/speech_v1p1beta1/classes.rb +17 -15
  210. data/generated/google/apis/speech_v2beta.rb +1 -1
  211. data/generated/google/apis/speech_v2beta/classes.rb +3 -3
  212. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  213. data/generated/google/apis/sqladmin_v1beta4/classes.rb +72 -0
  214. data/generated/google/apis/sqladmin_v1beta4/representations.rb +35 -0
  215. data/generated/google/apis/sqladmin_v1beta4/service.rb +2 -1
  216. data/generated/google/apis/storage_v1.rb +1 -1
  217. data/generated/google/apis/storage_v1/classes.rb +7 -1
  218. data/generated/google/apis/storage_v1/representations.rb +2 -2
  219. data/generated/google/apis/storage_v1/service.rb +6 -1
  220. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  221. data/generated/google/apis/storagetransfer_v1/service.rb +1 -9
  222. data/generated/google/apis/testing_v1.rb +1 -1
  223. data/generated/google/apis/testing_v1/classes.rb +19 -0
  224. data/generated/google/apis/testing_v1/representations.rb +3 -0
  225. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  226. data/generated/google/apis/toolresults_v1beta3/classes.rb +1 -0
  227. data/generated/google/apis/translate_v3beta1.rb +1 -1
  228. data/generated/google/apis/translate_v3beta1/classes.rb +33 -0
  229. data/generated/google/apis/translate_v3beta1/representations.rb +3 -0
  230. data/generated/google/apis/verifiedaccess_v1.rb +35 -0
  231. data/generated/google/apis/verifiedaccess_v1/classes.rb +174 -0
  232. data/generated/google/apis/verifiedaccess_v1/representations.rb +99 -0
  233. data/generated/google/apis/verifiedaccess_v1/service.rb +120 -0
  234. data/generated/google/apis/vision_v1.rb +1 -1
  235. data/generated/google/apis/vision_v1/classes.rb +204 -2375
  236. data/generated/google/apis/vision_v1/representations.rb +701 -1634
  237. data/generated/google/apis/vision_v1/service.rb +17 -17
  238. data/generated/google/apis/vision_v1p1beta1.rb +1 -1
  239. data/generated/google/apis/vision_v1p1beta1/classes.rb +135 -2306
  240. data/generated/google/apis/vision_v1p1beta1/representations.rb +768 -1701
  241. data/generated/google/apis/vision_v1p2beta1.rb +1 -1
  242. data/generated/google/apis/vision_v1p2beta1/classes.rb +326 -2161
  243. data/generated/google/apis/vision_v1p2beta1/representations.rb +897 -1710
  244. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  245. data/generated/google/apis/youtube_v3.rb +1 -1
  246. data/generated/google/apis/youtube_v3/classes.rb +8 -2
  247. data/generated/google/apis/youtube_v3/representations.rb +1 -0
  248. data/lib/google/apis/version.rb +1 -1
  249. metadata +22 -6
  250. data/generated/google/apis/appstate_v1/classes.rb +0 -154
  251. data/generated/google/apis/appstate_v1/service.rb +0 -249
@@ -27,7 +27,7 @@ module Google
27
27
  # @see https://cloud.google.com/vision/
28
28
  module VisionV1p2beta1
29
29
  VERSION = 'V1p2beta1'
30
- REVISION = '20190809'
30
+ REVISION = '20190907'
31
31
 
32
32
  # View and manage your data across Google Cloud Platform services
33
33
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -27,6 +27,16 @@ module Google
27
27
  class AnnotateFileResponse
28
28
  include Google::Apis::Core::Hashable
29
29
 
30
+ # The `Status` type defines a logical error model that is suitable for
31
+ # different programming environments, including REST APIs and RPC APIs. It is
32
+ # used by [gRPC](https://github.com/grpc). Each `Status` message contains
33
+ # three pieces of data: error code, error message, and error details.
34
+ # You can find out more about this error model and how to work with it in the
35
+ # [API Design Guide](https://cloud.google.com/apis/design/errors).
36
+ # Corresponds to the JSON property `error`
37
+ # @return [Google::Apis::VisionV1p2beta1::Status]
38
+ attr_accessor :error
39
+
30
40
  # The desired input location and metadata.
31
41
  # Corresponds to the JSON property `inputConfig`
32
42
  # @return [Google::Apis::VisionV1p2beta1::InputConfig]
@@ -49,6 +59,7 @@ module Google
49
59
 
50
60
  # Update properties of this object
51
61
  def update!(**args)
62
+ @error = args[:error] if args.key?(:error)
52
63
  @input_config = args[:input_config] if args.key?(:input_config)
53
64
  @responses = args[:responses] if args.key?(:responses)
54
65
  @total_pages = args[:total_pages] if args.key?(:total_pages)
@@ -1004,6 +1015,16 @@ module Google
1004
1015
  class GoogleCloudVisionV1p1beta1AnnotateFileResponse
1005
1016
  include Google::Apis::Core::Hashable
1006
1017
 
1018
+ # The `Status` type defines a logical error model that is suitable for
1019
+ # different programming environments, including REST APIs and RPC APIs. It is
1020
+ # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1021
+ # three pieces of data: error code, error message, and error details.
1022
+ # You can find out more about this error model and how to work with it in the
1023
+ # [API Design Guide](https://cloud.google.com/apis/design/errors).
1024
+ # Corresponds to the JSON property `error`
1025
+ # @return [Google::Apis::VisionV1p2beta1::Status]
1026
+ attr_accessor :error
1027
+
1007
1028
  # The desired input location and metadata.
1008
1029
  # Corresponds to the JSON property `inputConfig`
1009
1030
  # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p1beta1InputConfig]
@@ -1026,6 +1047,7 @@ module Google
1026
1047
 
1027
1048
  # Update properties of this object
1028
1049
  def update!(**args)
1050
+ @error = args[:error] if args.key?(:error)
1029
1051
  @input_config = args[:input_config] if args.key?(:input_config)
1030
1052
  @responses = args[:responses] if args.key?(:responses)
1031
1053
  @total_pages = args[:total_pages] if args.key?(:total_pages)
@@ -2111,11 +2133,11 @@ module Google
2111
2133
  # @return [String]
2112
2134
  attr_accessor :name
2113
2135
 
2114
- # The category for the product identified by the reference image. This should
2136
+ # Immutable. The category for the product identified by the reference image.
2137
+ # This should
2115
2138
  # be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
2116
2139
  # "homegoods", "apparel", and "toys" are still supported, but these should
2117
2140
  # not be used for new products.
2118
- # This field is immutable.
2119
2141
  # Corresponds to the JSON property `productCategory`
2120
2142
  # @return [String]
2121
2143
  attr_accessor :product_category
@@ -2221,6 +2243,11 @@ module Google
2221
2243
  # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p1beta1BoundingPoly]
2222
2244
  attr_accessor :bounding_poly
2223
2245
 
2246
+ # List of generic predictions for the object in the bounding box.
2247
+ # Corresponds to the JSON property `objectAnnotations`
2248
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation>]
2249
+ attr_accessor :object_annotations
2250
+
2224
2251
  # List of results, one for each product match.
2225
2252
  # Corresponds to the JSON property `results`
2226
2253
  # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p1beta1ProductSearchResultsResult>]
@@ -2233,10 +2260,50 @@ module Google
2233
2260
  # Update properties of this object
2234
2261
  def update!(**args)
2235
2262
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
2263
+ @object_annotations = args[:object_annotations] if args.key?(:object_annotations)
2236
2264
  @results = args[:results] if args.key?(:results)
2237
2265
  end
2238
2266
  end
2239
2267
 
2268
+ # Prediction for what the object in the bounding box is.
2269
+ class GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation
2270
+ include Google::Apis::Core::Hashable
2271
+
2272
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
2273
+ # information, see
2274
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
2275
+ # Corresponds to the JSON property `languageCode`
2276
+ # @return [String]
2277
+ attr_accessor :language_code
2278
+
2279
+ # Object ID that should align with EntityAnnotation mid.
2280
+ # Corresponds to the JSON property `mid`
2281
+ # @return [String]
2282
+ attr_accessor :mid
2283
+
2284
+ # Object name, expressed in its `language_code` language.
2285
+ # Corresponds to the JSON property `name`
2286
+ # @return [String]
2287
+ attr_accessor :name
2288
+
2289
+ # Score of the result. Range [0, 1].
2290
+ # Corresponds to the JSON property `score`
2291
+ # @return [Float]
2292
+ attr_accessor :score
2293
+
2294
+ def initialize(**args)
2295
+ update!(**args)
2296
+ end
2297
+
2298
+ # Update properties of this object
2299
+ def update!(**args)
2300
+ @language_code = args[:language_code] if args.key?(:language_code)
2301
+ @mid = args[:mid] if args.key?(:mid)
2302
+ @name = args[:name] if args.key?(:name)
2303
+ @score = args[:score] if args.key?(:score)
2304
+ end
2305
+ end
2306
+
2240
2307
  # Information about a product.
2241
2308
  class GoogleCloudVisionV1p1beta1ProductSearchResultsResult
2242
2309
  include Google::Apis::Core::Hashable
@@ -2798,6 +2865,16 @@ module Google
2798
2865
  class GoogleCloudVisionV1p2beta1AnnotateFileResponse
2799
2866
  include Google::Apis::Core::Hashable
2800
2867
 
2868
+ # The `Status` type defines a logical error model that is suitable for
2869
+ # different programming environments, including REST APIs and RPC APIs. It is
2870
+ # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2871
+ # three pieces of data: error code, error message, and error details.
2872
+ # You can find out more about this error model and how to work with it in the
2873
+ # [API Design Guide](https://cloud.google.com/apis/design/errors).
2874
+ # Corresponds to the JSON property `error`
2875
+ # @return [Google::Apis::VisionV1p2beta1::Status]
2876
+ attr_accessor :error
2877
+
2801
2878
  # The desired input location and metadata.
2802
2879
  # Corresponds to the JSON property `inputConfig`
2803
2880
  # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1InputConfig]
@@ -2820,6 +2897,7 @@ module Google
2820
2897
 
2821
2898
  # Update properties of this object
2822
2899
  def update!(**args)
2900
+ @error = args[:error] if args.key?(:error)
2823
2901
  @input_config = args[:input_config] if args.key?(:input_config)
2824
2902
  @responses = args[:responses] if args.key?(:responses)
2825
2903
  @total_pages = args[:total_pages] if args.key?(:total_pages)
@@ -3043,7 +3121,7 @@ module Google
3043
3121
  # @return [String]
3044
3122
  attr_accessor :parent
3045
3123
 
3046
- # Individual async file annotation requests for this batch.
3124
+ # Required. Individual async file annotation requests for this batch.
3047
3125
  # Corresponds to the JSON property `requests`
3048
3126
  # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest>]
3049
3127
  attr_accessor :requests
@@ -3100,7 +3178,7 @@ module Google
3100
3178
  # @return [String]
3101
3179
  attr_accessor :parent
3102
3180
 
3103
- # Individual image annotation requests for this batch.
3181
+ # Required. Individual image annotation requests for this batch.
3104
3182
  # Corresponds to the JSON property `requests`
3105
3183
  # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest>]
3106
3184
  attr_accessor :requests
@@ -3133,7 +3211,7 @@ module Google
3133
3211
  # @return [String]
3134
3212
  attr_accessor :parent
3135
3213
 
3136
- # The list of file annotation requests. Right now we support only one
3214
+ # Required. The list of file annotation requests. Right now we support only one
3137
3215
  # AnnotateFileRequest in BatchAnnotateFilesRequest.
3138
3216
  # Corresponds to the JSON property `requests`
3139
3217
  # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateFileRequest>]
@@ -3186,7 +3264,7 @@ module Google
3186
3264
  # @return [String]
3187
3265
  attr_accessor :parent
3188
3266
 
3189
- # Individual image annotation requests for this batch.
3267
+ # Required. Individual image annotation requests for this batch.
3190
3268
  # Corresponds to the JSON property `requests`
3191
3269
  # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest>]
3192
3270
  attr_accessor :requests
@@ -4362,11 +4440,11 @@ module Google
4362
4440
  # @return [String]
4363
4441
  attr_accessor :name
4364
4442
 
4365
- # The category for the product identified by the reference image. This should
4443
+ # Immutable. The category for the product identified by the reference image.
4444
+ # This should
4366
4445
  # be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
4367
4446
  # "homegoods", "apparel", and "toys" are still supported, but these should
4368
4447
  # not be used for new products.
4369
- # This field is immutable.
4370
4448
  # Corresponds to the JSON property `productCategory`
4371
4449
  # @return [String]
4372
4450
  attr_accessor :product_category
@@ -4523,6 +4601,11 @@ module Google
4523
4601
  # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
4524
4602
  attr_accessor :bounding_poly
4525
4603
 
4604
+ # List of generic predictions for the object in the bounding box.
4605
+ # Corresponds to the JSON property `objectAnnotations`
4606
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation>]
4607
+ attr_accessor :object_annotations
4608
+
4526
4609
  # List of results, one for each product match.
4527
4610
  # Corresponds to the JSON property `results`
4528
4611
  # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ProductSearchResultsResult>]
@@ -4535,10 +4618,50 @@ module Google
4535
4618
  # Update properties of this object
4536
4619
  def update!(**args)
4537
4620
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
4621
+ @object_annotations = args[:object_annotations] if args.key?(:object_annotations)
4538
4622
  @results = args[:results] if args.key?(:results)
4539
4623
  end
4540
4624
  end
4541
4625
 
4626
+ # Prediction for what the object in the bounding box is.
4627
+ class GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation
4628
+ include Google::Apis::Core::Hashable
4629
+
4630
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
4631
+ # information, see
4632
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
4633
+ # Corresponds to the JSON property `languageCode`
4634
+ # @return [String]
4635
+ attr_accessor :language_code
4636
+
4637
+ # Object ID that should align with EntityAnnotation mid.
4638
+ # Corresponds to the JSON property `mid`
4639
+ # @return [String]
4640
+ attr_accessor :mid
4641
+
4642
+ # Object name, expressed in its `language_code` language.
4643
+ # Corresponds to the JSON property `name`
4644
+ # @return [String]
4645
+ attr_accessor :name
4646
+
4647
+ # Score of the result. Range [0, 1].
4648
+ # Corresponds to the JSON property `score`
4649
+ # @return [Float]
4650
+ attr_accessor :score
4651
+
4652
+ def initialize(**args)
4653
+ update!(**args)
4654
+ end
4655
+
4656
+ # Update properties of this object
4657
+ def update!(**args)
4658
+ @language_code = args[:language_code] if args.key?(:language_code)
4659
+ @mid = args[:mid] if args.key?(:mid)
4660
+ @name = args[:name] if args.key?(:name)
4661
+ @score = args[:score] if args.key?(:score)
4662
+ end
4663
+ end
4664
+
4542
4665
  # Information about a product.
4543
4666
  class GoogleCloudVisionV1p2beta1ProductSearchResultsResult
4544
4667
  include Google::Apis::Core::Hashable
@@ -5074,6 +5197,16 @@ module Google
5074
5197
  class GoogleCloudVisionV1p3beta1AnnotateFileResponse
5075
5198
  include Google::Apis::Core::Hashable
5076
5199
 
5200
+ # The `Status` type defines a logical error model that is suitable for
5201
+ # different programming environments, including REST APIs and RPC APIs. It is
5202
+ # used by [gRPC](https://github.com/grpc). Each `Status` message contains
5203
+ # three pieces of data: error code, error message, and error details.
5204
+ # You can find out more about this error model and how to work with it in the
5205
+ # [API Design Guide](https://cloud.google.com/apis/design/errors).
5206
+ # Corresponds to the JSON property `error`
5207
+ # @return [Google::Apis::VisionV1p2beta1::Status]
5208
+ attr_accessor :error
5209
+
5077
5210
  # The desired input location and metadata.
5078
5211
  # Corresponds to the JSON property `inputConfig`
5079
5212
  # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p3beta1InputConfig]
@@ -5096,6 +5229,7 @@ module Google
5096
5229
 
5097
5230
  # Update properties of this object
5098
5231
  def update!(**args)
5232
+ @error = args[:error] if args.key?(:error)
5099
5233
  @input_config = args[:input_config] if args.key?(:input_config)
5100
5234
  @responses = args[:responses] if args.key?(:responses)
5101
5235
  @total_pages = args[:total_pages] if args.key?(:total_pages)
@@ -6247,11 +6381,11 @@ module Google
6247
6381
  # @return [String]
6248
6382
  attr_accessor :name
6249
6383
 
6250
- # The category for the product identified by the reference image. This should
6384
+ # Immutable. The category for the product identified by the reference image.
6385
+ # This should
6251
6386
  # be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
6252
6387
  # "homegoods", "apparel", and "toys" are still supported, but these should
6253
6388
  # not be used for new products.
6254
- # This field is immutable.
6255
6389
  # Corresponds to the JSON property `productCategory`
6256
6390
  # @return [String]
6257
6391
  attr_accessor :product_category
@@ -6357,6 +6491,11 @@ module Google
6357
6491
  # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p3beta1BoundingPoly]
6358
6492
  attr_accessor :bounding_poly
6359
6493
 
6494
+ # List of generic predictions for the object in the bounding box.
6495
+ # Corresponds to the JSON property `objectAnnotations`
6496
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation>]
6497
+ attr_accessor :object_annotations
6498
+
6360
6499
  # List of results, one for each product match.
6361
6500
  # Corresponds to the JSON property `results`
6362
6501
  # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p3beta1ProductSearchResultsResult>]
@@ -6369,10 +6508,50 @@ module Google
6369
6508
  # Update properties of this object
6370
6509
  def update!(**args)
6371
6510
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
6511
+ @object_annotations = args[:object_annotations] if args.key?(:object_annotations)
6372
6512
  @results = args[:results] if args.key?(:results)
6373
6513
  end
6374
6514
  end
6375
6515
 
6516
+ # Prediction for what the object in the bounding box is.
6517
+ class GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation
6518
+ include Google::Apis::Core::Hashable
6519
+
6520
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
6521
+ # information, see
6522
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
6523
+ # Corresponds to the JSON property `languageCode`
6524
+ # @return [String]
6525
+ attr_accessor :language_code
6526
+
6527
+ # Object ID that should align with EntityAnnotation mid.
6528
+ # Corresponds to the JSON property `mid`
6529
+ # @return [String]
6530
+ attr_accessor :mid
6531
+
6532
+ # Object name, expressed in its `language_code` language.
6533
+ # Corresponds to the JSON property `name`
6534
+ # @return [String]
6535
+ attr_accessor :name
6536
+
6537
+ # Score of the result. Range [0, 1].
6538
+ # Corresponds to the JSON property `score`
6539
+ # @return [Float]
6540
+ attr_accessor :score
6541
+
6542
+ def initialize(**args)
6543
+ update!(**args)
6544
+ end
6545
+
6546
+ # Update properties of this object
6547
+ def update!(**args)
6548
+ @language_code = args[:language_code] if args.key?(:language_code)
6549
+ @mid = args[:mid] if args.key?(:mid)
6550
+ @name = args[:name] if args.key?(:name)
6551
+ @score = args[:score] if args.key?(:score)
6552
+ end
6553
+ end
6554
+
6376
6555
  # Information about a product.
6377
6556
  class GoogleCloudVisionV1p3beta1ProductSearchResultsResult
6378
6557
  include Google::Apis::Core::Hashable
@@ -6442,8 +6621,9 @@ module Google
6442
6621
  class GoogleCloudVisionV1p3beta1ReferenceImage
6443
6622
  include Google::Apis::Core::Hashable
6444
6623
 
6445
- # Bounding polygons around the areas of interest in the reference image.
6446
- # Optional. If this field is empty, the system will try to detect regions of
6624
+ # Optional. Bounding polygons around the areas of interest in the reference
6625
+ # image.
6626
+ # If this field is empty, the system will try to detect regions of
6447
6627
  # interest. At most 10 bounding polygons will be used.
6448
6628
  # The provided shape is converted into a non-rotated rectangle. Once
6449
6629
  # converted, the small edge of the rectangle must be greater than or equal
@@ -6462,9 +6642,8 @@ module Google
6462
6642
  # @return [String]
6463
6643
  attr_accessor :name
6464
6644
 
6465
- # The Google Cloud Storage URI of the reference image.
6645
+ # Required. The Google Cloud Storage URI of the reference image.
6466
6646
  # The URI must start with `gs://`.
6467
- # Required.
6468
6647
  # Corresponds to the JSON property `uri`
6469
6648
  # @return [String]
6470
6649
  attr_accessor :uri
@@ -6932,6 +7111,16 @@ module Google
6932
7111
  class GoogleCloudVisionV1p4beta1AnnotateFileResponse
6933
7112
  include Google::Apis::Core::Hashable
6934
7113
 
7114
+ # The `Status` type defines a logical error model that is suitable for
7115
+ # different programming environments, including REST APIs and RPC APIs. It is
7116
+ # used by [gRPC](https://github.com/grpc). Each `Status` message contains
7117
+ # three pieces of data: error code, error message, and error details.
7118
+ # You can find out more about this error model and how to work with it in the
7119
+ # [API Design Guide](https://cloud.google.com/apis/design/errors).
7120
+ # Corresponds to the JSON property `error`
7121
+ # @return [Google::Apis::VisionV1p2beta1::Status]
7122
+ attr_accessor :error
7123
+
6935
7124
  # The desired input location and metadata.
6936
7125
  # Corresponds to the JSON property `inputConfig`
6937
7126
  # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p4beta1InputConfig]
@@ -6954,6 +7143,7 @@ module Google
6954
7143
 
6955
7144
  # Update properties of this object
6956
7145
  def update!(**args)
7146
+ @error = args[:error] if args.key?(:error)
6957
7147
  @input_config = args[:input_config] if args.key?(:input_config)
6958
7148
  @responses = args[:responses] if args.key?(:responses)
6959
7149
  @total_pages = args[:total_pages] if args.key?(:total_pages)
@@ -8178,11 +8368,11 @@ module Google
8178
8368
  # @return [String]
8179
8369
  attr_accessor :name
8180
8370
 
8181
- # The category for the product identified by the reference image. This should
8371
+ # Immutable. The category for the product identified by the reference image.
8372
+ # This should
8182
8373
  # be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
8183
8374
  # "homegoods", "apparel", and "toys" are still supported, but these should
8184
8375
  # not be used for new products.
8185
- # This field is immutable.
8186
8376
  # Corresponds to the JSON property `productCategory`
8187
8377
  # @return [String]
8188
8378
  attr_accessor :product_category
@@ -8288,6 +8478,11 @@ module Google
8288
8478
  # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p4beta1BoundingPoly]
8289
8479
  attr_accessor :bounding_poly
8290
8480
 
8481
+ # List of generic predictions for the object in the bounding box.
8482
+ # Corresponds to the JSON property `objectAnnotations`
8483
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation>]
8484
+ attr_accessor :object_annotations
8485
+
8291
8486
  # List of results, one for each product match.
8292
8487
  # Corresponds to the JSON property `results`
8293
8488
  # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p4beta1ProductSearchResultsResult>]
@@ -8300,10 +8495,50 @@ module Google
8300
8495
  # Update properties of this object
8301
8496
  def update!(**args)
8302
8497
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
8498
+ @object_annotations = args[:object_annotations] if args.key?(:object_annotations)
8303
8499
  @results = args[:results] if args.key?(:results)
8304
8500
  end
8305
8501
  end
8306
8502
 
8503
+ # Prediction for what the object in the bounding box is.
8504
+ class GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation
8505
+ include Google::Apis::Core::Hashable
8506
+
8507
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
8508
+ # information, see
8509
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
8510
+ # Corresponds to the JSON property `languageCode`
8511
+ # @return [String]
8512
+ attr_accessor :language_code
8513
+
8514
+ # Object ID that should align with EntityAnnotation mid.
8515
+ # Corresponds to the JSON property `mid`
8516
+ # @return [String]
8517
+ attr_accessor :mid
8518
+
8519
+ # Object name, expressed in its `language_code` language.
8520
+ # Corresponds to the JSON property `name`
8521
+ # @return [String]
8522
+ attr_accessor :name
8523
+
8524
+ # Score of the result. Range [0, 1].
8525
+ # Corresponds to the JSON property `score`
8526
+ # @return [Float]
8527
+ attr_accessor :score
8528
+
8529
+ def initialize(**args)
8530
+ update!(**args)
8531
+ end
8532
+
8533
+ # Update properties of this object
8534
+ def update!(**args)
8535
+ @language_code = args[:language_code] if args.key?(:language_code)
8536
+ @mid = args[:mid] if args.key?(:mid)
8537
+ @name = args[:name] if args.key?(:name)
8538
+ @score = args[:score] if args.key?(:score)
8539
+ end
8540
+ end
8541
+
8307
8542
  # Information about a product.
8308
8543
  class GoogleCloudVisionV1p4beta1ProductSearchResultsResult
8309
8544
  include Google::Apis::Core::Hashable
@@ -8405,8 +8640,9 @@ module Google
8405
8640
  class GoogleCloudVisionV1p4beta1ReferenceImage
8406
8641
  include Google::Apis::Core::Hashable
8407
8642
 
8408
- # Bounding polygons around the areas of interest in the reference image.
8409
- # Optional. If this field is empty, the system will try to detect regions of
8643
+ # Optional. Bounding polygons around the areas of interest in the reference
8644
+ # image.
8645
+ # If this field is empty, the system will try to detect regions of
8410
8646
  # interest. At most 10 bounding polygons will be used.
8411
8647
  # The provided shape is converted into a non-rotated rectangle. Once
8412
8648
  # converted, the small edge of the rectangle must be greater than or equal
@@ -8425,9 +8661,8 @@ module Google
8425
8661
  # @return [String]
8426
8662
  attr_accessor :name
8427
8663
 
8428
- # The Google Cloud Storage URI of the reference image.
8664
+ # Required. The Google Cloud Storage URI of the reference image.
8429
8665
  # The URI must start with `gs://`.
8430
- # Required.
8431
8666
  # Corresponds to the JSON property `uri`
8432
8667
  # @return [String]
8433
8668
  attr_accessor :uri
@@ -8932,26 +9167,25 @@ module Google
8932
9167
  end
8933
9168
  end
8934
9169
 
8935
- # Response to a single file annotation request. A file may contain one or more
8936
- # images, which individually have their own responses.
8937
- class GoogleCloudVisionV1p5beta1AnnotateFileResponse
9170
+ # Information about the products similar to a single product in a query
9171
+ # image.
9172
+ class GroupedResult
8938
9173
  include Google::Apis::Core::Hashable
8939
9174
 
8940
- # The desired input location and metadata.
8941
- # Corresponds to the JSON property `inputConfig`
8942
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1InputConfig]
8943
- attr_accessor :input_config
9175
+ # A bounding polygon for the detected image annotation.
9176
+ # Corresponds to the JSON property `boundingPoly`
9177
+ # @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
9178
+ attr_accessor :bounding_poly
8944
9179
 
8945
- # Individual responses to images found within the file. This field will be
8946
- # empty if the `error` field is set.
8947
- # Corresponds to the JSON property `responses`
8948
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1AnnotateImageResponse>]
8949
- attr_accessor :responses
9180
+ # List of generic predictions for the object in the bounding box.
9181
+ # Corresponds to the JSON property `objectAnnotations`
9182
+ # @return [Array<Google::Apis::VisionV1p2beta1::ObjectAnnotation>]
9183
+ attr_accessor :object_annotations
8950
9184
 
8951
- # This field gives the total number of pages in the file.
8952
- # Corresponds to the JSON property `totalPages`
8953
- # @return [Fixnum]
8954
- attr_accessor :total_pages
9185
+ # List of results, one for each product match.
9186
+ # Corresponds to the JSON property `results`
9187
+ # @return [Array<Google::Apis::VisionV1p2beta1::Result>]
9188
+ attr_accessor :results
8955
9189
 
8956
9190
  def initialize(**args)
8957
9191
  update!(**args)
@@ -8959,2130 +9193,22 @@ module Google
8959
9193
 
8960
9194
  # Update properties of this object
8961
9195
  def update!(**args)
8962
- @input_config = args[:input_config] if args.key?(:input_config)
8963
- @responses = args[:responses] if args.key?(:responses)
8964
- @total_pages = args[:total_pages] if args.key?(:total_pages)
9196
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
9197
+ @object_annotations = args[:object_annotations] if args.key?(:object_annotations)
9198
+ @results = args[:results] if args.key?(:results)
8965
9199
  end
8966
9200
  end
8967
9201
 
8968
- # Response to an image annotation request.
8969
- class GoogleCloudVisionV1p5beta1AnnotateImageResponse
9202
+ # If an image was produced from a file (e.g. a PDF), this message gives
9203
+ # information about the source of that image.
9204
+ class ImageAnnotationContext
8970
9205
  include Google::Apis::Core::Hashable
8971
9206
 
8972
- # If an image was produced from a file (e.g. a PDF), this message gives
8973
- # information about the source of that image.
8974
- # Corresponds to the JSON property `context`
8975
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1ImageAnnotationContext]
8976
- attr_accessor :context
8977
-
8978
- # Set of crop hints that are used to generate new crops when serving images.
8979
- # Corresponds to the JSON property `cropHintsAnnotation`
8980
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1CropHintsAnnotation]
8981
- attr_accessor :crop_hints_annotation
8982
-
8983
- # The `Status` type defines a logical error model that is suitable for
8984
- # different programming environments, including REST APIs and RPC APIs. It is
8985
- # used by [gRPC](https://github.com/grpc). Each `Status` message contains
8986
- # three pieces of data: error code, error message, and error details.
8987
- # You can find out more about this error model and how to work with it in the
8988
- # [API Design Guide](https://cloud.google.com/apis/design/errors).
8989
- # Corresponds to the JSON property `error`
8990
- # @return [Google::Apis::VisionV1p2beta1::Status]
8991
- attr_accessor :error
8992
-
8993
- # If present, face detection has completed successfully.
8994
- # Corresponds to the JSON property `faceAnnotations`
8995
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1FaceAnnotation>]
8996
- attr_accessor :face_annotations
8997
-
8998
- # TextAnnotation contains a structured representation of OCR extracted text.
8999
- # The hierarchy of an OCR extracted text structure is like this:
9000
- # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
9001
- # Each structural component, starting from Page, may further have their own
9002
- # properties. Properties describe detected languages, breaks etc.. Please refer
9003
- # to the TextAnnotation.TextProperty message definition below for more
9004
- # detail.
9005
- # Corresponds to the JSON property `fullTextAnnotation`
9006
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1TextAnnotation]
9007
- attr_accessor :full_text_annotation
9008
-
9009
- # Stores image properties, such as dominant colors.
9010
- # Corresponds to the JSON property `imagePropertiesAnnotation`
9011
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1ImageProperties]
9012
- attr_accessor :image_properties_annotation
9013
-
9014
- # If present, label detection has completed successfully.
9015
- # Corresponds to the JSON property `labelAnnotations`
9016
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1EntityAnnotation>]
9017
- attr_accessor :label_annotations
9018
-
9019
- # If present, landmark detection has completed successfully.
9020
- # Corresponds to the JSON property `landmarkAnnotations`
9021
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1EntityAnnotation>]
9022
- attr_accessor :landmark_annotations
9023
-
9024
- # If present, localized object detection has completed successfully.
9025
- # This will be sorted descending by confidence score.
9026
- # Corresponds to the JSON property `localizedObjectAnnotations`
9027
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1LocalizedObjectAnnotation>]
9028
- attr_accessor :localized_object_annotations
9029
-
9030
- # If present, logo detection has completed successfully.
9031
- # Corresponds to the JSON property `logoAnnotations`
9032
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1EntityAnnotation>]
9033
- attr_accessor :logo_annotations
9034
-
9035
- # Results for a product search request.
9036
- # Corresponds to the JSON property `productSearchResults`
9037
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1ProductSearchResults]
9038
- attr_accessor :product_search_results
9039
-
9040
- # Set of features pertaining to the image, computed by computer vision
9041
- # methods over safe-search verticals (for example, adult, spoof, medical,
9042
- # violence).
9043
- # Corresponds to the JSON property `safeSearchAnnotation`
9044
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1SafeSearchAnnotation]
9045
- attr_accessor :safe_search_annotation
9046
-
9047
- # If present, text (OCR) detection has completed successfully.
9048
- # Corresponds to the JSON property `textAnnotations`
9049
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1EntityAnnotation>]
9050
- attr_accessor :text_annotations
9051
-
9052
- # Relevant information for the image from the Internet.
9053
- # Corresponds to the JSON property `webDetection`
9054
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1WebDetection]
9055
- attr_accessor :web_detection
9056
-
9057
- def initialize(**args)
9058
- update!(**args)
9059
- end
9060
-
9061
- # Update properties of this object
9062
- def update!(**args)
9063
- @context = args[:context] if args.key?(:context)
9064
- @crop_hints_annotation = args[:crop_hints_annotation] if args.key?(:crop_hints_annotation)
9065
- @error = args[:error] if args.key?(:error)
9066
- @face_annotations = args[:face_annotations] if args.key?(:face_annotations)
9067
- @full_text_annotation = args[:full_text_annotation] if args.key?(:full_text_annotation)
9068
- @image_properties_annotation = args[:image_properties_annotation] if args.key?(:image_properties_annotation)
9069
- @label_annotations = args[:label_annotations] if args.key?(:label_annotations)
9070
- @landmark_annotations = args[:landmark_annotations] if args.key?(:landmark_annotations)
9071
- @localized_object_annotations = args[:localized_object_annotations] if args.key?(:localized_object_annotations)
9072
- @logo_annotations = args[:logo_annotations] if args.key?(:logo_annotations)
9073
- @product_search_results = args[:product_search_results] if args.key?(:product_search_results)
9074
- @safe_search_annotation = args[:safe_search_annotation] if args.key?(:safe_search_annotation)
9075
- @text_annotations = args[:text_annotations] if args.key?(:text_annotations)
9076
- @web_detection = args[:web_detection] if args.key?(:web_detection)
9077
- end
9078
- end
9079
-
9080
- # The response for a single offline file annotation request.
9081
- class GoogleCloudVisionV1p5beta1AsyncAnnotateFileResponse
9082
- include Google::Apis::Core::Hashable
9083
-
9084
- # The desired output location and metadata.
9085
- # Corresponds to the JSON property `outputConfig`
9086
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1OutputConfig]
9087
- attr_accessor :output_config
9088
-
9089
- def initialize(**args)
9090
- update!(**args)
9091
- end
9092
-
9093
- # Update properties of this object
9094
- def update!(**args)
9095
- @output_config = args[:output_config] if args.key?(:output_config)
9096
- end
9097
- end
9098
-
9099
- # Response to an async batch file annotation request.
9100
- class GoogleCloudVisionV1p5beta1AsyncBatchAnnotateFilesResponse
9101
- include Google::Apis::Core::Hashable
9102
-
9103
- # The list of file annotation responses, one for each request in
9104
- # AsyncBatchAnnotateFilesRequest.
9105
- # Corresponds to the JSON property `responses`
9106
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1AsyncAnnotateFileResponse>]
9107
- attr_accessor :responses
9108
-
9109
- def initialize(**args)
9110
- update!(**args)
9111
- end
9112
-
9113
- # Update properties of this object
9114
- def update!(**args)
9115
- @responses = args[:responses] if args.key?(:responses)
9116
- end
9117
- end
9118
-
9119
- # Response to an async batch image annotation request.
9120
- class GoogleCloudVisionV1p5beta1AsyncBatchAnnotateImagesResponse
9121
- include Google::Apis::Core::Hashable
9122
-
9123
- # The desired output location and metadata.
9124
- # Corresponds to the JSON property `outputConfig`
9125
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1OutputConfig]
9126
- attr_accessor :output_config
9127
-
9128
- def initialize(**args)
9129
- update!(**args)
9130
- end
9131
-
9132
- # Update properties of this object
9133
- def update!(**args)
9134
- @output_config = args[:output_config] if args.key?(:output_config)
9135
- end
9136
- end
9137
-
9138
- # A list of file annotation responses.
9139
- class GoogleCloudVisionV1p5beta1BatchAnnotateFilesResponse
9140
- include Google::Apis::Core::Hashable
9141
-
9142
- # The list of file annotation responses, each response corresponding to each
9143
- # AnnotateFileRequest in BatchAnnotateFilesRequest.
9144
- # Corresponds to the JSON property `responses`
9145
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1AnnotateFileResponse>]
9146
- attr_accessor :responses
9147
-
9148
- def initialize(**args)
9149
- update!(**args)
9150
- end
9151
-
9152
- # Update properties of this object
9153
- def update!(**args)
9154
- @responses = args[:responses] if args.key?(:responses)
9155
- end
9156
- end
9157
-
9158
- # Metadata for the batch operations such as the current state.
9159
- # This is included in the `metadata` field of the `Operation` returned by the
9160
- # `GetOperation` call of the `google::longrunning::Operations` service.
9161
- class GoogleCloudVisionV1p5beta1BatchOperationMetadata
9162
- include Google::Apis::Core::Hashable
9163
-
9164
- # The time when the batch request is finished and
9165
- # google.longrunning.Operation.done is set to true.
9166
- # Corresponds to the JSON property `endTime`
9167
- # @return [String]
9168
- attr_accessor :end_time
9169
-
9170
- # The current state of the batch operation.
9171
- # Corresponds to the JSON property `state`
9172
- # @return [String]
9173
- attr_accessor :state
9174
-
9175
- # The time when the batch request was submitted to the server.
9176
- # Corresponds to the JSON property `submitTime`
9177
- # @return [String]
9178
- attr_accessor :submit_time
9179
-
9180
- def initialize(**args)
9181
- update!(**args)
9182
- end
9183
-
9184
- # Update properties of this object
9185
- def update!(**args)
9186
- @end_time = args[:end_time] if args.key?(:end_time)
9187
- @state = args[:state] if args.key?(:state)
9188
- @submit_time = args[:submit_time] if args.key?(:submit_time)
9189
- end
9190
- end
9191
-
9192
- # Logical element on the page.
9193
- class GoogleCloudVisionV1p5beta1Block
9194
- include Google::Apis::Core::Hashable
9195
-
9196
- # Detected block type (text, image etc) for this block.
9197
- # Corresponds to the JSON property `blockType`
9198
- # @return [String]
9199
- attr_accessor :block_type
9200
-
9201
- # A bounding polygon for the detected image annotation.
9202
- # Corresponds to the JSON property `boundingBox`
9203
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1BoundingPoly]
9204
- attr_accessor :bounding_box
9205
-
9206
- # Confidence of the OCR results on the block. Range [0, 1].
9207
- # Corresponds to the JSON property `confidence`
9208
- # @return [Float]
9209
- attr_accessor :confidence
9210
-
9211
- # Proto for a key value pair.
9212
- # Corresponds to the JSON property `keyValuePair`
9213
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1KeyValuePair]
9214
- attr_accessor :key_value_pair
9215
-
9216
- # All UTF-8 text detected in this block. This field is by default not
9217
- # returned unless specified in TextDetectionParams.block_filter or
9218
- # DocumentParsingParams.block_filter.
9219
- # Corresponds to the JSON property `mergedText`
9220
- # @return [String]
9221
- attr_accessor :merged_text
9222
-
9223
- # List of paragraphs in this block (if this blocks is of type text).
9224
- # Corresponds to the JSON property `paragraphs`
9225
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1Paragraph>]
9226
- attr_accessor :paragraphs
9227
-
9228
- # Additional information detected on the structural component.
9229
- # Corresponds to the JSON property `property`
9230
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1TextAnnotationTextProperty]
9231
- attr_accessor :property
9232
-
9233
- # A table representation similar to HTML table structure.
9234
- # Corresponds to the JSON property `table`
9235
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1Table]
9236
- attr_accessor :table
9237
-
9238
- def initialize(**args)
9239
- update!(**args)
9240
- end
9241
-
9242
- # Update properties of this object
9243
- def update!(**args)
9244
- @block_type = args[:block_type] if args.key?(:block_type)
9245
- @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
9246
- @confidence = args[:confidence] if args.key?(:confidence)
9247
- @key_value_pair = args[:key_value_pair] if args.key?(:key_value_pair)
9248
- @merged_text = args[:merged_text] if args.key?(:merged_text)
9249
- @paragraphs = args[:paragraphs] if args.key?(:paragraphs)
9250
- @property = args[:property] if args.key?(:property)
9251
- @table = args[:table] if args.key?(:table)
9252
- end
9253
- end
9254
-
9255
- # A bounding polygon for the detected image annotation.
9256
- class GoogleCloudVisionV1p5beta1BoundingPoly
9257
- include Google::Apis::Core::Hashable
9258
-
9259
- # The bounding polygon normalized vertices.
9260
- # Corresponds to the JSON property `normalizedVertices`
9261
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1NormalizedVertex>]
9262
- attr_accessor :normalized_vertices
9263
-
9264
- # The bounding polygon vertices.
9265
- # Corresponds to the JSON property `vertices`
9266
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1Vertex>]
9267
- attr_accessor :vertices
9268
-
9269
- def initialize(**args)
9270
- update!(**args)
9271
- end
9272
-
9273
- # Update properties of this object
9274
- def update!(**args)
9275
- @normalized_vertices = args[:normalized_vertices] if args.key?(:normalized_vertices)
9276
- @vertices = args[:vertices] if args.key?(:vertices)
9277
- end
9278
- end
9279
-
9280
- # Color information consists of RGB channels, score, and the fraction of
9281
- # the image that the color occupies in the image.
9282
- class GoogleCloudVisionV1p5beta1ColorInfo
9283
- include Google::Apis::Core::Hashable
9284
-
9285
- # Represents a color in the RGBA color space. This representation is designed
9286
- # for simplicity of conversion to/from color representations in various
9287
- # languages over compactness; for example, the fields of this representation
9288
- # can be trivially provided to the constructor of "java.awt.Color" in Java; it
9289
- # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
9290
- # method in iOS; and, with just a little work, it can be easily formatted into
9291
- # a CSS "rgba()" string in JavaScript, as well.
9292
- # Note: this proto does not carry information about the absolute color space
9293
- # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
9294
- # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
9295
- # space.
9296
- # Example (Java):
9297
- # import com.google.type.Color;
9298
- # // ...
9299
- # public static java.awt.Color fromProto(Color protocolor) `
9300
- # float alpha = protocolor.hasAlpha()
9301
- # ? protocolor.getAlpha().getValue()
9302
- # : 1.0;
9303
- # return new java.awt.Color(
9304
- # protocolor.getRed(),
9305
- # protocolor.getGreen(),
9306
- # protocolor.getBlue(),
9307
- # alpha);
9308
- # `
9309
- # public static Color toProto(java.awt.Color color) `
9310
- # float red = (float) color.getRed();
9311
- # float green = (float) color.getGreen();
9312
- # float blue = (float) color.getBlue();
9313
- # float denominator = 255.0;
9314
- # Color.Builder resultBuilder =
9315
- # Color
9316
- # .newBuilder()
9317
- # .setRed(red / denominator)
9318
- # .setGreen(green / denominator)
9319
- # .setBlue(blue / denominator);
9320
- # int alpha = color.getAlpha();
9321
- # if (alpha != 255) `
9322
- # result.setAlpha(
9323
- # FloatValue
9324
- # .newBuilder()
9325
- # .setValue(((float) alpha) / denominator)
9326
- # .build());
9327
- # `
9328
- # return resultBuilder.build();
9329
- # `
9330
- # // ...
9331
- # Example (iOS / Obj-C):
9332
- # // ...
9333
- # static UIColor* fromProto(Color* protocolor) `
9334
- # float red = [protocolor red];
9335
- # float green = [protocolor green];
9336
- # float blue = [protocolor blue];
9337
- # FloatValue* alpha_wrapper = [protocolor alpha];
9338
- # float alpha = 1.0;
9339
- # if (alpha_wrapper != nil) `
9340
- # alpha = [alpha_wrapper value];
9341
- # `
9342
- # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
9343
- # `
9344
- # static Color* toProto(UIColor* color) `
9345
- # CGFloat red, green, blue, alpha;
9346
- # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
9347
- # return nil;
9348
- # `
9349
- # Color* result = [[Color alloc] init];
9350
- # [result setRed:red];
9351
- # [result setGreen:green];
9352
- # [result setBlue:blue];
9353
- # if (alpha <= 0.9999) `
9354
- # [result setAlpha:floatWrapperWithValue(alpha)];
9355
- # `
9356
- # [result autorelease];
9357
- # return result;
9358
- # `
9359
- # // ...
9360
- # Example (JavaScript):
9361
- # // ...
9362
- # var protoToCssColor = function(rgb_color) `
9363
- # var redFrac = rgb_color.red || 0.0;
9364
- # var greenFrac = rgb_color.green || 0.0;
9365
- # var blueFrac = rgb_color.blue || 0.0;
9366
- # var red = Math.floor(redFrac * 255);
9367
- # var green = Math.floor(greenFrac * 255);
9368
- # var blue = Math.floor(blueFrac * 255);
9369
- # if (!('alpha' in rgb_color)) `
9370
- # return rgbToCssColor_(red, green, blue);
9371
- # `
9372
- # var alphaFrac = rgb_color.alpha.value || 0.0;
9373
- # var rgbParams = [red, green, blue].join(',');
9374
- # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
9375
- # `;
9376
- # var rgbToCssColor_ = function(red, green, blue) `
9377
- # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
9378
- # var hexString = rgbNumber.toString(16);
9379
- # var missingZeros = 6 - hexString.length;
9380
- # var resultBuilder = ['#'];
9381
- # for (var i = 0; i < missingZeros; i++) `
9382
- # resultBuilder.push('0');
9383
- # `
9384
- # resultBuilder.push(hexString);
9385
- # return resultBuilder.join('');
9386
- # `;
9387
- # // ...
9388
- # Corresponds to the JSON property `color`
9389
- # @return [Google::Apis::VisionV1p2beta1::Color]
9390
- attr_accessor :color
9391
-
9392
- # The fraction of pixels the color occupies in the image.
9393
- # Value in range [0, 1].
9394
- # Corresponds to the JSON property `pixelFraction`
9395
- # @return [Float]
9396
- attr_accessor :pixel_fraction
9397
-
9398
- # Image-specific score for this color. Value in range [0, 1].
9399
- # Corresponds to the JSON property `score`
9400
- # @return [Float]
9401
- attr_accessor :score
9402
-
9403
- def initialize(**args)
9404
- update!(**args)
9405
- end
9406
-
9407
- # Update properties of this object
9408
- def update!(**args)
9409
- @color = args[:color] if args.key?(:color)
9410
- @pixel_fraction = args[:pixel_fraction] if args.key?(:pixel_fraction)
9411
- @score = args[:score] if args.key?(:score)
9412
- end
9413
- end
9414
-
9415
- # Single crop hint that is used to generate a new crop when serving an image.
9416
- class GoogleCloudVisionV1p5beta1CropHint
9417
- include Google::Apis::Core::Hashable
9418
-
9419
- # A bounding polygon for the detected image annotation.
9420
- # Corresponds to the JSON property `boundingPoly`
9421
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1BoundingPoly]
9422
- attr_accessor :bounding_poly
9423
-
9424
- # Confidence of this being a salient region. Range [0, 1].
9425
- # Corresponds to the JSON property `confidence`
9426
- # @return [Float]
9427
- attr_accessor :confidence
9428
-
9429
- # Fraction of importance of this salient region with respect to the original
9430
- # image.
9431
- # Corresponds to the JSON property `importanceFraction`
9432
- # @return [Float]
9433
- attr_accessor :importance_fraction
9434
-
9435
- def initialize(**args)
9436
- update!(**args)
9437
- end
9438
-
9439
- # Update properties of this object
9440
- def update!(**args)
9441
- @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
9442
- @confidence = args[:confidence] if args.key?(:confidence)
9443
- @importance_fraction = args[:importance_fraction] if args.key?(:importance_fraction)
9444
- end
9445
- end
9446
-
9447
- # Set of crop hints that are used to generate new crops when serving images.
9448
- class GoogleCloudVisionV1p5beta1CropHintsAnnotation
9449
- include Google::Apis::Core::Hashable
9450
-
9451
- # Crop hint results.
9452
- # Corresponds to the JSON property `cropHints`
9453
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1CropHint>]
9454
- attr_accessor :crop_hints
9455
-
9456
- def initialize(**args)
9457
- update!(**args)
9458
- end
9459
-
9460
- # Update properties of this object
9461
- def update!(**args)
9462
- @crop_hints = args[:crop_hints] if args.key?(:crop_hints)
9463
- end
9464
- end
9465
-
9466
- # Set of dominant colors and their corresponding scores.
9467
- class GoogleCloudVisionV1p5beta1DominantColorsAnnotation
9468
- include Google::Apis::Core::Hashable
9469
-
9470
- # RGB color values with their score and pixel fraction.
9471
- # Corresponds to the JSON property `colors`
9472
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1ColorInfo>]
9473
- attr_accessor :colors
9474
-
9475
- def initialize(**args)
9476
- update!(**args)
9477
- end
9478
-
9479
- # Update properties of this object
9480
- def update!(**args)
9481
- @colors = args[:colors] if args.key?(:colors)
9482
- end
9483
- end
9484
-
9485
- # Set of detected entity features.
9486
- class GoogleCloudVisionV1p5beta1EntityAnnotation
9487
- include Google::Apis::Core::Hashable
9488
-
9489
- # A bounding polygon for the detected image annotation.
9490
- # Corresponds to the JSON property `boundingPoly`
9491
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1BoundingPoly]
9492
- attr_accessor :bounding_poly
9493
-
9494
- # **Deprecated. Use `score` instead.**
9495
- # The accuracy of the entity detection in an image.
9496
- # For example, for an image in which the "Eiffel Tower" entity is detected,
9497
- # this field represents the confidence that there is a tower in the query
9498
- # image. Range [0, 1].
9499
- # Corresponds to the JSON property `confidence`
9500
- # @return [Float]
9501
- attr_accessor :confidence
9502
-
9503
- # Entity textual description, expressed in its `locale` language.
9504
- # Corresponds to the JSON property `description`
9505
- # @return [String]
9506
- attr_accessor :description
9507
-
9508
- # The language code for the locale in which the entity textual
9509
- # `description` is expressed.
9510
- # Corresponds to the JSON property `locale`
9511
- # @return [String]
9512
- attr_accessor :locale
9513
-
9514
- # The location information for the detected entity. Multiple
9515
- # `LocationInfo` elements can be present because one location may
9516
- # indicate the location of the scene in the image, and another location
9517
- # may indicate the location of the place where the image was taken.
9518
- # Location information is usually present for landmarks.
9519
- # Corresponds to the JSON property `locations`
9520
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1LocationInfo>]
9521
- attr_accessor :locations
9522
-
9523
- # Opaque entity ID. Some IDs may be available in
9524
- # [Google Knowledge Graph Search
9525
- # API](https://developers.google.com/knowledge-graph/).
9526
- # Corresponds to the JSON property `mid`
9527
- # @return [String]
9528
- attr_accessor :mid
9529
-
9530
- # Some entities may have optional user-supplied `Property` (name/value)
9531
- # fields, such a score or string that qualifies the entity.
9532
- # Corresponds to the JSON property `properties`
9533
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1Property>]
9534
- attr_accessor :properties
9535
-
9536
- # Overall score of the result. Range [0, 1].
9537
- # Corresponds to the JSON property `score`
9538
- # @return [Float]
9539
- attr_accessor :score
9540
-
9541
- # The relevancy of the ICA (Image Content Annotation) label to the
9542
- # image. For example, the relevancy of "tower" is likely higher to an image
9543
- # containing the detected "Eiffel Tower" than to an image containing a
9544
- # detected distant towering building, even though the confidence that
9545
- # there is a tower in each image may be the same. Range [0, 1].
9546
- # Corresponds to the JSON property `topicality`
9547
- # @return [Float]
9548
- attr_accessor :topicality
9549
-
9550
- def initialize(**args)
9551
- update!(**args)
9552
- end
9553
-
9554
- # Update properties of this object
9555
- def update!(**args)
9556
- @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
9557
- @confidence = args[:confidence] if args.key?(:confidence)
9558
- @description = args[:description] if args.key?(:description)
9559
- @locale = args[:locale] if args.key?(:locale)
9560
- @locations = args[:locations] if args.key?(:locations)
9561
- @mid = args[:mid] if args.key?(:mid)
9562
- @properties = args[:properties] if args.key?(:properties)
9563
- @score = args[:score] if args.key?(:score)
9564
- @topicality = args[:topicality] if args.key?(:topicality)
9565
- end
9566
- end
9567
-
9568
- # A face annotation object contains the results of face detection.
9569
- class GoogleCloudVisionV1p5beta1FaceAnnotation
9570
- include Google::Apis::Core::Hashable
9571
-
9572
- # Anger likelihood.
9573
- # Corresponds to the JSON property `angerLikelihood`
9574
- # @return [String]
9575
- attr_accessor :anger_likelihood
9576
-
9577
- # Blurred likelihood.
9578
- # Corresponds to the JSON property `blurredLikelihood`
9579
- # @return [String]
9580
- attr_accessor :blurred_likelihood
9581
-
9582
- # A bounding polygon for the detected image annotation.
9583
- # Corresponds to the JSON property `boundingPoly`
9584
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1BoundingPoly]
9585
- attr_accessor :bounding_poly
9586
-
9587
- # Detection confidence. Range [0, 1].
9588
- # Corresponds to the JSON property `detectionConfidence`
9589
- # @return [Float]
9590
- attr_accessor :detection_confidence
9591
-
9592
- # A bounding polygon for the detected image annotation.
9593
- # Corresponds to the JSON property `fdBoundingPoly`
9594
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1BoundingPoly]
9595
- attr_accessor :fd_bounding_poly
9596
-
9597
- # Headwear likelihood.
9598
- # Corresponds to the JSON property `headwearLikelihood`
9599
- # @return [String]
9600
- attr_accessor :headwear_likelihood
9601
-
9602
- # Joy likelihood.
9603
- # Corresponds to the JSON property `joyLikelihood`
9604
- # @return [String]
9605
- attr_accessor :joy_likelihood
9606
-
9607
- # Face landmarking confidence. Range [0, 1].
9608
- # Corresponds to the JSON property `landmarkingConfidence`
9609
- # @return [Float]
9610
- attr_accessor :landmarking_confidence
9611
-
9612
- # Detected face landmarks.
9613
- # Corresponds to the JSON property `landmarks`
9614
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1FaceAnnotationLandmark>]
9615
- attr_accessor :landmarks
9616
-
9617
- # Yaw angle, which indicates the leftward/rightward angle that the face is
9618
- # pointing relative to the vertical plane perpendicular to the image. Range
9619
- # [-180,180].
9620
- # Corresponds to the JSON property `panAngle`
9621
- # @return [Float]
9622
- attr_accessor :pan_angle
9623
-
9624
- # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
9625
- # of the face relative to the image vertical about the axis perpendicular to
9626
- # the face. Range [-180,180].
9627
- # Corresponds to the JSON property `rollAngle`
9628
- # @return [Float]
9629
- attr_accessor :roll_angle
9630
-
9631
- # Sorrow likelihood.
9632
- # Corresponds to the JSON property `sorrowLikelihood`
9633
- # @return [String]
9634
- attr_accessor :sorrow_likelihood
9635
-
9636
- # Surprise likelihood.
9637
- # Corresponds to the JSON property `surpriseLikelihood`
9638
- # @return [String]
9639
- attr_accessor :surprise_likelihood
9640
-
9641
- # Pitch angle, which indicates the upwards/downwards angle that the face is
9642
- # pointing relative to the image's horizontal plane. Range [-180,180].
9643
- # Corresponds to the JSON property `tiltAngle`
9644
- # @return [Float]
9645
- attr_accessor :tilt_angle
9646
-
9647
- # Under-exposed likelihood.
9648
- # Corresponds to the JSON property `underExposedLikelihood`
9649
- # @return [String]
9650
- attr_accessor :under_exposed_likelihood
9651
-
9652
- def initialize(**args)
9653
- update!(**args)
9654
- end
9655
-
9656
- # Update properties of this object
9657
- def update!(**args)
9658
- @anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood)
9659
- @blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood)
9660
- @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
9661
- @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence)
9662
- @fd_bounding_poly = args[:fd_bounding_poly] if args.key?(:fd_bounding_poly)
9663
- @headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood)
9664
- @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood)
9665
- @landmarking_confidence = args[:landmarking_confidence] if args.key?(:landmarking_confidence)
9666
- @landmarks = args[:landmarks] if args.key?(:landmarks)
9667
- @pan_angle = args[:pan_angle] if args.key?(:pan_angle)
9668
- @roll_angle = args[:roll_angle] if args.key?(:roll_angle)
9669
- @sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood)
9670
- @surprise_likelihood = args[:surprise_likelihood] if args.key?(:surprise_likelihood)
9671
- @tilt_angle = args[:tilt_angle] if args.key?(:tilt_angle)
9672
- @under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood)
9673
- end
9674
- end
9675
-
9676
- # A face-specific landmark (for example, a face feature).
9677
- class GoogleCloudVisionV1p5beta1FaceAnnotationLandmark
9678
- include Google::Apis::Core::Hashable
9679
-
9680
- # A 3D position in the image, used primarily for Face detection landmarks.
9681
- # A valid Position must have both x and y coordinates.
9682
- # The position coordinates are in the same scale as the original image.
9683
- # Corresponds to the JSON property `position`
9684
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1Position]
9685
- attr_accessor :position
9686
-
9687
- # Face landmark type.
9688
- # Corresponds to the JSON property `type`
9689
- # @return [String]
9690
- attr_accessor :type
9691
-
9692
- def initialize(**args)
9693
- update!(**args)
9694
- end
9695
-
9696
- # Update properties of this object
9697
- def update!(**args)
9698
- @position = args[:position] if args.key?(:position)
9699
- @type = args[:type] if args.key?(:type)
9700
- end
9701
- end
9702
-
9703
- # The Google Cloud Storage location where the output will be written to.
9704
- class GoogleCloudVisionV1p5beta1GcsDestination
9705
- include Google::Apis::Core::Hashable
9706
-
9707
- # Google Cloud Storage URI prefix where the results will be stored. Results
9708
- # will be in JSON format and preceded by its corresponding input URI prefix.
9709
- # This field can either represent a gcs file prefix or gcs directory. In
9710
- # either case, the uri should be unique because in order to get all of the
9711
- # output files, you will need to do a wildcard gcs search on the uri prefix
9712
- # you provide.
9713
- # Examples:
9714
- # * File Prefix: gs://bucket-name/here/filenameprefix The output files
9715
- # will be created in gs://bucket-name/here/ and the names of the
9716
- # output files will begin with "filenameprefix".
9717
- # * Directory Prefix: gs://bucket-name/some/location/ The output files
9718
- # will be created in gs://bucket-name/some/location/ and the names of the
9719
- # output files could be anything because there was no filename prefix
9720
- # specified.
9721
- # If multiple outputs, each response is still AnnotateFileResponse, each of
9722
- # which contains some subset of the full list of AnnotateImageResponse.
9723
- # Multiple outputs can happen if, for example, the output JSON is too large
9724
- # and overflows into multiple sharded files.
9725
- # Corresponds to the JSON property `uri`
9726
- # @return [String]
9727
- attr_accessor :uri
9728
-
9729
- def initialize(**args)
9730
- update!(**args)
9731
- end
9732
-
9733
- # Update properties of this object
9734
- def update!(**args)
9735
- @uri = args[:uri] if args.key?(:uri)
9736
- end
9737
- end
9738
-
9739
- # The Google Cloud Storage location where the input will be read from.
9740
- class GoogleCloudVisionV1p5beta1GcsSource
9741
- include Google::Apis::Core::Hashable
9742
-
9743
- # Google Cloud Storage URI for the input file. This must only be a
9744
- # Google Cloud Storage object. Wildcards are not currently supported.
9745
- # Corresponds to the JSON property `uri`
9746
- # @return [String]
9747
- attr_accessor :uri
9748
-
9749
- def initialize(**args)
9750
- update!(**args)
9751
- end
9752
-
9753
- # Update properties of this object
9754
- def update!(**args)
9755
- @uri = args[:uri] if args.key?(:uri)
9756
- end
9757
- end
9758
-
9759
- # If an image was produced from a file (e.g. a PDF), this message gives
9760
- # information about the source of that image.
9761
- class GoogleCloudVisionV1p5beta1ImageAnnotationContext
9762
- include Google::Apis::Core::Hashable
9763
-
9764
- # If the file was a PDF or TIFF, this field gives the page number within
9765
- # the file used to produce the image.
9766
- # Corresponds to the JSON property `pageNumber`
9767
- # @return [Fixnum]
9768
- attr_accessor :page_number
9769
-
9770
- # The URI of the file used to produce the image.
9771
- # Corresponds to the JSON property `uri`
9772
- # @return [String]
9773
- attr_accessor :uri
9774
-
9775
- def initialize(**args)
9776
- update!(**args)
9777
- end
9778
-
9779
- # Update properties of this object
9780
- def update!(**args)
9781
- @page_number = args[:page_number] if args.key?(:page_number)
9782
- @uri = args[:uri] if args.key?(:uri)
9783
- end
9784
- end
9785
-
9786
- # Stores image properties, such as dominant colors.
9787
- class GoogleCloudVisionV1p5beta1ImageProperties
9788
- include Google::Apis::Core::Hashable
9789
-
9790
- # Set of dominant colors and their corresponding scores.
9791
- # Corresponds to the JSON property `dominantColors`
9792
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1DominantColorsAnnotation]
9793
- attr_accessor :dominant_colors
9794
-
9795
- def initialize(**args)
9796
- update!(**args)
9797
- end
9798
-
9799
- # Update properties of this object
9800
- def update!(**args)
9801
- @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors)
9802
- end
9803
- end
9804
-
9805
- # Response message for the `ImportProductSets` method.
9806
- # This message is returned by the
9807
- # google.longrunning.Operations.GetOperation method in the returned
9808
- # google.longrunning.Operation.response field.
9809
- class GoogleCloudVisionV1p5beta1ImportProductSetsResponse
9810
- include Google::Apis::Core::Hashable
9811
-
9812
- # The list of reference_images that are imported successfully.
9813
- # Corresponds to the JSON property `referenceImages`
9814
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1ReferenceImage>]
9815
- attr_accessor :reference_images
9816
-
9817
- # The rpc status for each ImportProductSet request, including both successes
9818
- # and errors.
9819
- # The number of statuses here matches the number of lines in the csv file,
9820
- # and statuses[i] stores the success or failure status of processing the i-th
9821
- # line of the csv, starting from line 0.
9822
- # Corresponds to the JSON property `statuses`
9823
- # @return [Array<Google::Apis::VisionV1p2beta1::Status>]
9824
- attr_accessor :statuses
9825
-
9826
- def initialize(**args)
9827
- update!(**args)
9828
- end
9829
-
9830
- # Update properties of this object
9831
- def update!(**args)
9832
- @reference_images = args[:reference_images] if args.key?(:reference_images)
9833
- @statuses = args[:statuses] if args.key?(:statuses)
9834
- end
9835
- end
9836
-
9837
- # The desired input location and metadata.
9838
- class GoogleCloudVisionV1p5beta1InputConfig
9839
- include Google::Apis::Core::Hashable
9840
-
9841
- # File content, represented as a stream of bytes.
9842
- # Note: As with all `bytes` fields, protobuffers use a pure binary
9843
- # representation, whereas JSON representations use base64.
9844
- # Currently, this field only works for BatchAnnotateFiles requests. It does
9845
- # not work for AsyncBatchAnnotateFiles requests.
9846
- # Corresponds to the JSON property `content`
9847
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
9848
- # @return [String]
9849
- attr_accessor :content
9850
-
9851
- # The Google Cloud Storage location where the input will be read from.
9852
- # Corresponds to the JSON property `gcsSource`
9853
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1GcsSource]
9854
- attr_accessor :gcs_source
9855
-
9856
- # The type of the file. Currently only "application/pdf", "image/tiff" and
9857
- # "image/gif" are supported. Wildcards are not supported.
9858
- # Corresponds to the JSON property `mimeType`
9859
- # @return [String]
9860
- attr_accessor :mime_type
9861
-
9862
- def initialize(**args)
9863
- update!(**args)
9864
- end
9865
-
9866
- # Update properties of this object
9867
- def update!(**args)
9868
- @content = args[:content] if args.key?(:content)
9869
- @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
9870
- @mime_type = args[:mime_type] if args.key?(:mime_type)
9871
- end
9872
- end
9873
-
9874
- # Proto for a key value pair.
9875
- class GoogleCloudVisionV1p5beta1KeyValuePair
9876
- include Google::Apis::Core::Hashable
9877
-
9878
- # The key string value.
9879
- # Corresponds to the JSON property `key`
9880
- # @return [String]
9881
- attr_accessor :key
9882
-
9883
- # Logical element on the page.
9884
- # Corresponds to the JSON property `keyBlock`
9885
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1Block]
9886
- attr_accessor :key_block
9887
-
9888
- # Optional. The translation of key text if the text is not in English.
9889
- # Corresponds to the JSON property `normalizedKey`
9890
- # @return [String]
9891
- attr_accessor :normalized_key
9892
-
9893
- # Logical element on the page.
9894
- # Corresponds to the JSON property `valueBlock`
9895
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1Block]
9896
- attr_accessor :value_block
9897
-
9898
- # Type of the value. Valid strings are the following:
9899
- # "generic" - For generic text that is mapped to a value.
9900
- # "number" - for numeric types
9901
- # "id" - for generic identifiers.
9902
- # "currency" - for currency values.
9903
- # "date" - for dates.
9904
- # "time" - for time and duration values.
9905
- # "date_range" - for date ranges.
9906
- # "address" - for address values (can be long).
9907
- # "person" - for names of people or other personal identifiers.
9908
- # "phone" - for phone numbers.
9909
- # Corresponds to the JSON property `valueType`
9910
- # @return [String]
9911
- attr_accessor :value_type
9912
-
9913
- def initialize(**args)
9914
- update!(**args)
9915
- end
9916
-
9917
- # Update properties of this object
9918
- def update!(**args)
9919
- @key = args[:key] if args.key?(:key)
9920
- @key_block = args[:key_block] if args.key?(:key_block)
9921
- @normalized_key = args[:normalized_key] if args.key?(:normalized_key)
9922
- @value_block = args[:value_block] if args.key?(:value_block)
9923
- @value_type = args[:value_type] if args.key?(:value_type)
9924
- end
9925
- end
9926
-
9927
- # Set of detected objects with bounding boxes.
9928
- class GoogleCloudVisionV1p5beta1LocalizedObjectAnnotation
9929
- include Google::Apis::Core::Hashable
9930
-
9931
- # A bounding polygon for the detected image annotation.
9932
- # Corresponds to the JSON property `boundingPoly`
9933
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1BoundingPoly]
9934
- attr_accessor :bounding_poly
9935
-
9936
- # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
9937
- # information, see
9938
- # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
9939
- # Corresponds to the JSON property `languageCode`
9940
- # @return [String]
9941
- attr_accessor :language_code
9942
-
9943
- # Object ID that should align with EntityAnnotation mid.
9944
- # Corresponds to the JSON property `mid`
9945
- # @return [String]
9946
- attr_accessor :mid
9947
-
9948
- # Object name, expressed in its `language_code` language.
9949
- # Corresponds to the JSON property `name`
9950
- # @return [String]
9951
- attr_accessor :name
9952
-
9953
- # Score of the result. Range [0, 1].
9954
- # Corresponds to the JSON property `score`
9955
- # @return [Float]
9956
- attr_accessor :score
9957
-
9958
- def initialize(**args)
9959
- update!(**args)
9960
- end
9961
-
9962
- # Update properties of this object
9963
- def update!(**args)
9964
- @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
9965
- @language_code = args[:language_code] if args.key?(:language_code)
9966
- @mid = args[:mid] if args.key?(:mid)
9967
- @name = args[:name] if args.key?(:name)
9968
- @score = args[:score] if args.key?(:score)
9969
- end
9970
- end
9971
-
9972
- # Detected entity location information.
9973
- class GoogleCloudVisionV1p5beta1LocationInfo
9974
- include Google::Apis::Core::Hashable
9975
-
9976
- # An object representing a latitude/longitude pair. This is expressed as a pair
9977
- # of doubles representing degrees latitude and degrees longitude. Unless
9978
- # specified otherwise, this must conform to the
9979
- # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
9980
- # standard</a>. Values must be within normalized ranges.
9981
- # Corresponds to the JSON property `latLng`
9982
- # @return [Google::Apis::VisionV1p2beta1::LatLng]
9983
- attr_accessor :lat_lng
9984
-
9985
- def initialize(**args)
9986
- update!(**args)
9987
- end
9988
-
9989
- # Update properties of this object
9990
- def update!(**args)
9991
- @lat_lng = args[:lat_lng] if args.key?(:lat_lng)
9992
- end
9993
- end
9994
-
9995
- # A vertex represents a 2D point in the image.
9996
- # NOTE: the normalized vertex coordinates are relative to the original image
9997
- # and range from 0 to 1.
9998
- class GoogleCloudVisionV1p5beta1NormalizedVertex
9999
- include Google::Apis::Core::Hashable
10000
-
10001
- # X coordinate.
10002
- # Corresponds to the JSON property `x`
10003
- # @return [Float]
10004
- attr_accessor :x
10005
-
10006
- # Y coordinate.
10007
- # Corresponds to the JSON property `y`
10008
- # @return [Float]
10009
- attr_accessor :y
10010
-
10011
- def initialize(**args)
10012
- update!(**args)
10013
- end
10014
-
10015
- # Update properties of this object
10016
- def update!(**args)
10017
- @x = args[:x] if args.key?(:x)
10018
- @y = args[:y] if args.key?(:y)
10019
- end
10020
- end
10021
-
10022
- # Contains metadata for the BatchAnnotateImages operation.
10023
- class GoogleCloudVisionV1p5beta1OperationMetadata
10024
- include Google::Apis::Core::Hashable
10025
-
10026
- # The time when the batch request was received.
10027
- # Corresponds to the JSON property `createTime`
10028
- # @return [String]
10029
- attr_accessor :create_time
10030
-
10031
- # Current state of the batch operation.
10032
- # Corresponds to the JSON property `state`
10033
- # @return [String]
10034
- attr_accessor :state
10035
-
10036
- # The time when the operation result was last updated.
10037
- # Corresponds to the JSON property `updateTime`
10038
- # @return [String]
10039
- attr_accessor :update_time
10040
-
10041
- def initialize(**args)
10042
- update!(**args)
10043
- end
10044
-
10045
- # Update properties of this object
10046
- def update!(**args)
10047
- @create_time = args[:create_time] if args.key?(:create_time)
10048
- @state = args[:state] if args.key?(:state)
10049
- @update_time = args[:update_time] if args.key?(:update_time)
10050
- end
10051
- end
10052
-
10053
- # The desired output location and metadata.
10054
- class GoogleCloudVisionV1p5beta1OutputConfig
10055
- include Google::Apis::Core::Hashable
10056
-
10057
- # The max number of response protos to put into each output JSON file on
10058
- # Google Cloud Storage.
10059
- # The valid range is [1, 100]. If not specified, the default value is 20.
10060
- # For example, for one pdf file with 100 pages, 100 response protos will
10061
- # be generated. If `batch_size` = 20, then 5 json files each
10062
- # containing 20 response protos will be written under the prefix
10063
- # `gcs_destination`.`uri`.
10064
- # Currently, batch_size only applies to GcsDestination, with potential future
10065
- # support for other output configurations.
10066
- # Corresponds to the JSON property `batchSize`
10067
- # @return [Fixnum]
10068
- attr_accessor :batch_size
10069
-
10070
- # The Google Cloud Storage location where the output will be written to.
10071
- # Corresponds to the JSON property `gcsDestination`
10072
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1GcsDestination]
10073
- attr_accessor :gcs_destination
10074
-
10075
- def initialize(**args)
10076
- update!(**args)
10077
- end
10078
-
10079
- # Update properties of this object
10080
- def update!(**args)
10081
- @batch_size = args[:batch_size] if args.key?(:batch_size)
10082
- @gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
10083
- end
10084
- end
10085
-
10086
- # Detected page from OCR.
10087
- class GoogleCloudVisionV1p5beta1Page
10088
- include Google::Apis::Core::Hashable
10089
-
10090
- # List of blocks of text, images etc on this page.
10091
- # Corresponds to the JSON property `blocks`
10092
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1Block>]
10093
- attr_accessor :blocks
10094
-
10095
- # Confidence of the OCR results on the page. Range [0, 1].
10096
- # Corresponds to the JSON property `confidence`
10097
- # @return [Float]
10098
- attr_accessor :confidence
10099
-
10100
- # Page height. For PDFs the unit is points. For images (including
10101
- # TIFFs) the unit is pixels.
10102
- # Corresponds to the JSON property `height`
10103
- # @return [Fixnum]
10104
- attr_accessor :height
10105
-
10106
- # All UTF-8 text detected in this page. This field is by default not
10107
- # returned unless specified in TextDetectionParams.page_filter.
10108
- # Corresponds to the JSON property `mergedText`
10109
- # @return [String]
10110
- attr_accessor :merged_text
10111
-
10112
- # Additional information detected on the structural component.
10113
- # Corresponds to the JSON property `property`
10114
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1TextAnnotationTextProperty]
10115
- attr_accessor :property
10116
-
10117
- # Page width. For PDFs the unit is points. For images (including
10118
- # TIFFs) the unit is pixels.
10119
- # Corresponds to the JSON property `width`
10120
- # @return [Fixnum]
10121
- attr_accessor :width
10122
-
10123
- def initialize(**args)
10124
- update!(**args)
10125
- end
10126
-
10127
- # Update properties of this object
10128
- def update!(**args)
10129
- @blocks = args[:blocks] if args.key?(:blocks)
10130
- @confidence = args[:confidence] if args.key?(:confidence)
10131
- @height = args[:height] if args.key?(:height)
10132
- @merged_text = args[:merged_text] if args.key?(:merged_text)
10133
- @property = args[:property] if args.key?(:property)
10134
- @width = args[:width] if args.key?(:width)
10135
- end
10136
- end
10137
-
10138
- # Structural unit of text representing a number of words in certain order.
10139
- class GoogleCloudVisionV1p5beta1Paragraph
10140
- include Google::Apis::Core::Hashable
10141
-
10142
- # A bounding polygon for the detected image annotation.
10143
- # Corresponds to the JSON property `boundingBox`
10144
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1BoundingPoly]
10145
- attr_accessor :bounding_box
10146
-
10147
- # Confidence of the OCR results for the paragraph. Range [0, 1].
10148
- # Corresponds to the JSON property `confidence`
10149
- # @return [Float]
10150
- attr_accessor :confidence
10151
-
10152
- # All UTF-8 text detected in this paragraph. This field is by default not
10153
- # returned unless specified in TextDetectionParams.paragraph_filter.
10154
- # Corresponds to the JSON property `mergedText`
10155
- # @return [String]
10156
- attr_accessor :merged_text
10157
-
10158
- # Additional information detected on the structural component.
10159
- # Corresponds to the JSON property `property`
10160
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1TextAnnotationTextProperty]
10161
- attr_accessor :property
10162
-
10163
- # List of all words in this paragraph.
10164
- # Corresponds to the JSON property `words`
10165
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1Word>]
10166
- attr_accessor :words
10167
-
10168
- def initialize(**args)
10169
- update!(**args)
10170
- end
10171
-
10172
- # Update properties of this object
10173
- def update!(**args)
10174
- @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
10175
- @confidence = args[:confidence] if args.key?(:confidence)
10176
- @merged_text = args[:merged_text] if args.key?(:merged_text)
10177
- @property = args[:property] if args.key?(:property)
10178
- @words = args[:words] if args.key?(:words)
10179
- end
10180
- end
10181
-
10182
- # A 3D position in the image, used primarily for Face detection landmarks.
10183
- # A valid Position must have both x and y coordinates.
10184
- # The position coordinates are in the same scale as the original image.
10185
- class GoogleCloudVisionV1p5beta1Position
10186
- include Google::Apis::Core::Hashable
10187
-
10188
- # X coordinate.
10189
- # Corresponds to the JSON property `x`
10190
- # @return [Float]
10191
- attr_accessor :x
10192
-
10193
- # Y coordinate.
10194
- # Corresponds to the JSON property `y`
10195
- # @return [Float]
10196
- attr_accessor :y
10197
-
10198
- # Z coordinate (or depth).
10199
- # Corresponds to the JSON property `z`
10200
- # @return [Float]
10201
- attr_accessor :z
10202
-
10203
- def initialize(**args)
10204
- update!(**args)
10205
- end
10206
-
10207
- # Update properties of this object
10208
- def update!(**args)
10209
- @x = args[:x] if args.key?(:x)
10210
- @y = args[:y] if args.key?(:y)
10211
- @z = args[:z] if args.key?(:z)
10212
- end
10213
- end
10214
-
10215
- # A Product contains ReferenceImages.
10216
- class GoogleCloudVisionV1p5beta1Product
10217
- include Google::Apis::Core::Hashable
10218
-
10219
- # User-provided metadata to be stored with this product. Must be at most 4096
10220
- # characters long.
10221
- # Corresponds to the JSON property `description`
10222
- # @return [String]
10223
- attr_accessor :description
10224
-
10225
- # The user-provided name for this Product. Must not be empty. Must be at most
10226
- # 4096 characters long.
10227
- # Corresponds to the JSON property `displayName`
10228
- # @return [String]
10229
- attr_accessor :display_name
10230
-
10231
- # The resource name of the product.
10232
- # Format is:
10233
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
10234
- # This field is ignored when creating a product.
10235
- # Corresponds to the JSON property `name`
10236
- # @return [String]
10237
- attr_accessor :name
10238
-
10239
- # The category for the product identified by the reference image. This should
10240
- # be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
10241
- # "homegoods", "apparel", and "toys" are still supported, but these should
10242
- # not be used for new products.
10243
- # This field is immutable.
10244
- # Corresponds to the JSON property `productCategory`
10245
- # @return [String]
10246
- attr_accessor :product_category
10247
-
10248
- # Key-value pairs that can be attached to a product. At query time,
10249
- # constraints can be specified based on the product_labels.
10250
- # Note that integer values can be provided as strings, e.g. "1199". Only
10251
- # strings with integer values can match a range-based restriction which is
10252
- # to be supported soon.
10253
- # Multiple values can be assigned to the same key. One product may have up to
10254
- # 500 product_labels.
10255
- # Notice that the total number of distinct product_labels over all products
10256
- # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
10257
- # will refuse to work for that ProductSet.
10258
- # Corresponds to the JSON property `productLabels`
10259
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1ProductKeyValue>]
10260
- attr_accessor :product_labels
10261
-
10262
- def initialize(**args)
10263
- update!(**args)
10264
- end
10265
-
10266
- # Update properties of this object
10267
- def update!(**args)
10268
- @description = args[:description] if args.key?(:description)
10269
- @display_name = args[:display_name] if args.key?(:display_name)
10270
- @name = args[:name] if args.key?(:name)
10271
- @product_category = args[:product_category] if args.key?(:product_category)
10272
- @product_labels = args[:product_labels] if args.key?(:product_labels)
10273
- end
10274
- end
10275
-
10276
- # A product label represented as a key-value pair.
10277
- class GoogleCloudVisionV1p5beta1ProductKeyValue
10278
- include Google::Apis::Core::Hashable
10279
-
10280
- # The key of the label attached to the product. Cannot be empty and cannot
10281
- # exceed 128 bytes.
10282
- # Corresponds to the JSON property `key`
10283
- # @return [String]
10284
- attr_accessor :key
10285
-
10286
- # The value of the label attached to the product. Cannot be empty and
10287
- # cannot exceed 128 bytes.
10288
- # Corresponds to the JSON property `value`
10289
- # @return [String]
10290
- attr_accessor :value
10291
-
10292
- def initialize(**args)
10293
- update!(**args)
10294
- end
10295
-
10296
- # Update properties of this object
10297
- def update!(**args)
10298
- @key = args[:key] if args.key?(:key)
10299
- @value = args[:value] if args.key?(:value)
10300
- end
10301
- end
10302
-
10303
- # Results for a product search request.
10304
- class GoogleCloudVisionV1p5beta1ProductSearchResults
10305
- include Google::Apis::Core::Hashable
10306
-
10307
- # Timestamp of the index which provided these results. Products added to the
10308
- # product set and products removed from the product set after this time are
10309
- # not reflected in the current results.
10310
- # Corresponds to the JSON property `indexTime`
10311
- # @return [String]
10312
- attr_accessor :index_time
10313
-
10314
- # List of results grouped by products detected in the query image. Each entry
10315
- # corresponds to one bounding polygon in the query image, and contains the
10316
- # matching products specific to that region. There may be duplicate product
10317
- # matches in the union of all the per-product results.
10318
- # Corresponds to the JSON property `productGroupedResults`
10319
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1ProductSearchResultsGroupedResult>]
10320
- attr_accessor :product_grouped_results
10321
-
10322
- # List of results, one for each product match.
10323
- # Corresponds to the JSON property `results`
10324
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1ProductSearchResultsResult>]
10325
- attr_accessor :results
10326
-
10327
- def initialize(**args)
10328
- update!(**args)
10329
- end
10330
-
10331
- # Update properties of this object
10332
- def update!(**args)
10333
- @index_time = args[:index_time] if args.key?(:index_time)
10334
- @product_grouped_results = args[:product_grouped_results] if args.key?(:product_grouped_results)
10335
- @results = args[:results] if args.key?(:results)
10336
- end
10337
- end
10338
-
10339
- # Information about the products similar to a single product in a query
10340
- # image.
10341
- class GoogleCloudVisionV1p5beta1ProductSearchResultsGroupedResult
10342
- include Google::Apis::Core::Hashable
10343
-
10344
- # A bounding polygon for the detected image annotation.
10345
- # Corresponds to the JSON property `boundingPoly`
10346
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1BoundingPoly]
10347
- attr_accessor :bounding_poly
10348
-
10349
- # List of results, one for each product match.
10350
- # Corresponds to the JSON property `results`
10351
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1ProductSearchResultsResult>]
10352
- attr_accessor :results
10353
-
10354
- def initialize(**args)
10355
- update!(**args)
10356
- end
10357
-
10358
- # Update properties of this object
10359
- def update!(**args)
10360
- @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
10361
- @results = args[:results] if args.key?(:results)
10362
- end
10363
- end
10364
-
10365
- # Information about a product.
10366
- class GoogleCloudVisionV1p5beta1ProductSearchResultsResult
10367
- include Google::Apis::Core::Hashable
10368
-
10369
- # The resource name of the image from the product that is the closest match
10370
- # to the query.
10371
- # Corresponds to the JSON property `image`
10372
- # @return [String]
10373
- attr_accessor :image
10374
-
10375
- # A Product contains ReferenceImages.
10376
- # Corresponds to the JSON property `product`
10377
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1Product]
10378
- attr_accessor :product
10379
-
10380
- # A confidence level on the match, ranging from 0 (no confidence) to
10381
- # 1 (full confidence).
10382
- # Corresponds to the JSON property `score`
10383
- # @return [Float]
10384
- attr_accessor :score
10385
-
10386
- def initialize(**args)
10387
- update!(**args)
10388
- end
10389
-
10390
- # Update properties of this object
10391
- def update!(**args)
10392
- @image = args[:image] if args.key?(:image)
10393
- @product = args[:product] if args.key?(:product)
10394
- @score = args[:score] if args.key?(:score)
10395
- end
10396
- end
10397
-
10398
- # A `Property` consists of a user-supplied name/value pair.
10399
- class GoogleCloudVisionV1p5beta1Property
10400
- include Google::Apis::Core::Hashable
10401
-
10402
- # Name of the property.
10403
- # Corresponds to the JSON property `name`
10404
- # @return [String]
10405
- attr_accessor :name
10406
-
10407
- # Value of numeric properties.
10408
- # Corresponds to the JSON property `uint64Value`
10409
- # @return [Fixnum]
10410
- attr_accessor :uint64_value
10411
-
10412
- # Value of the property.
10413
- # Corresponds to the JSON property `value`
10414
- # @return [String]
10415
- attr_accessor :value
10416
-
10417
- def initialize(**args)
10418
- update!(**args)
10419
- end
10420
-
10421
- # Update properties of this object
10422
- def update!(**args)
10423
- @name = args[:name] if args.key?(:name)
10424
- @uint64_value = args[:uint64_value] if args.key?(:uint64_value)
10425
- @value = args[:value] if args.key?(:value)
10426
- end
10427
- end
10428
-
10429
- # A `ReferenceImage` represents a product image and its associated metadata,
10430
- # such as bounding boxes.
10431
- class GoogleCloudVisionV1p5beta1ReferenceImage
10432
- include Google::Apis::Core::Hashable
10433
-
10434
- # Bounding polygons around the areas of interest in the reference image.
10435
- # Optional. If this field is empty, the system will try to detect regions of
10436
- # interest. At most 10 bounding polygons will be used.
10437
- # The provided shape is converted into a non-rotated rectangle. Once
10438
- # converted, the small edge of the rectangle must be greater than or equal
10439
- # to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
10440
- # is not).
10441
- # Corresponds to the JSON property `boundingPolys`
10442
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1BoundingPoly>]
10443
- attr_accessor :bounding_polys
10444
-
10445
- # The resource name of the reference image.
10446
- # Format is:
10447
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/
10448
- # IMAGE_ID`.
10449
- # This field is ignored when creating a reference image.
10450
- # Corresponds to the JSON property `name`
10451
- # @return [String]
10452
- attr_accessor :name
10453
-
10454
- # The Google Cloud Storage URI of the reference image.
10455
- # The URI must start with `gs://`.
10456
- # Required.
10457
- # Corresponds to the JSON property `uri`
10458
- # @return [String]
10459
- attr_accessor :uri
10460
-
10461
- def initialize(**args)
10462
- update!(**args)
10463
- end
10464
-
10465
- # Update properties of this object
10466
- def update!(**args)
10467
- @bounding_polys = args[:bounding_polys] if args.key?(:bounding_polys)
10468
- @name = args[:name] if args.key?(:name)
10469
- @uri = args[:uri] if args.key?(:uri)
10470
- end
10471
- end
10472
-
10473
- # Set of features pertaining to the image, computed by computer vision
10474
- # methods over safe-search verticals (for example, adult, spoof, medical,
10475
- # violence).
10476
- class GoogleCloudVisionV1p5beta1SafeSearchAnnotation
10477
- include Google::Apis::Core::Hashable
10478
-
10479
- # Represents the adult content likelihood for the image. Adult content may
10480
- # contain elements such as nudity, pornographic images or cartoons, or
10481
- # sexual activities.
10482
- # Corresponds to the JSON property `adult`
10483
- # @return [String]
10484
- attr_accessor :adult
10485
-
10486
- # Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
10487
- # very confident.
10488
- # Corresponds to the JSON property `adultConfidence`
10489
- # @return [Float]
10490
- attr_accessor :adult_confidence
10491
-
10492
- # Likelihood that this is a medical image.
10493
- # Corresponds to the JSON property `medical`
10494
- # @return [String]
10495
- attr_accessor :medical
10496
-
10497
- # Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
10498
- # very confident.
10499
- # Corresponds to the JSON property `medicalConfidence`
10500
- # @return [Float]
10501
- attr_accessor :medical_confidence
10502
-
10503
- # Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
10504
- # confident.
10505
- # Corresponds to the JSON property `nsfwConfidence`
10506
- # @return [Float]
10507
- attr_accessor :nsfw_confidence
10508
-
10509
- # Likelihood that the request image contains racy content. Racy content may
10510
- # include (but is not limited to) skimpy or sheer clothing, strategically
10511
- # covered nudity, lewd or provocative poses, or close-ups of sensitive
10512
- # body areas.
10513
- # Corresponds to the JSON property `racy`
10514
- # @return [String]
10515
- attr_accessor :racy
10516
-
10517
- # Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
10518
- # confident.
10519
- # Corresponds to the JSON property `racyConfidence`
10520
- # @return [Float]
10521
- attr_accessor :racy_confidence
10522
-
10523
- # Spoof likelihood. The likelihood that an modification
10524
- # was made to the image's canonical version to make it appear
10525
- # funny or offensive.
10526
- # Corresponds to the JSON property `spoof`
10527
- # @return [String]
10528
- attr_accessor :spoof
10529
-
10530
- # Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
10531
- # very confident.
10532
- # Corresponds to the JSON property `spoofConfidence`
10533
- # @return [Float]
10534
- attr_accessor :spoof_confidence
10535
-
10536
- # Likelihood that this image contains violent content.
10537
- # Corresponds to the JSON property `violence`
10538
- # @return [String]
10539
- attr_accessor :violence
10540
-
10541
- # Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
10542
- # very confident.
10543
- # Corresponds to the JSON property `violenceConfidence`
10544
- # @return [Float]
10545
- attr_accessor :violence_confidence
10546
-
10547
- def initialize(**args)
10548
- update!(**args)
10549
- end
10550
-
10551
- # Update properties of this object
10552
- def update!(**args)
10553
- @adult = args[:adult] if args.key?(:adult)
10554
- @adult_confidence = args[:adult_confidence] if args.key?(:adult_confidence)
10555
- @medical = args[:medical] if args.key?(:medical)
10556
- @medical_confidence = args[:medical_confidence] if args.key?(:medical_confidence)
10557
- @nsfw_confidence = args[:nsfw_confidence] if args.key?(:nsfw_confidence)
10558
- @racy = args[:racy] if args.key?(:racy)
10559
- @racy_confidence = args[:racy_confidence] if args.key?(:racy_confidence)
10560
- @spoof = args[:spoof] if args.key?(:spoof)
10561
- @spoof_confidence = args[:spoof_confidence] if args.key?(:spoof_confidence)
10562
- @violence = args[:violence] if args.key?(:violence)
10563
- @violence_confidence = args[:violence_confidence] if args.key?(:violence_confidence)
10564
- end
10565
- end
10566
-
10567
- # A single symbol representation.
10568
- class GoogleCloudVisionV1p5beta1Symbol
10569
- include Google::Apis::Core::Hashable
10570
-
10571
- # A bounding polygon for the detected image annotation.
10572
- # Corresponds to the JSON property `boundingBox`
10573
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1BoundingPoly]
10574
- attr_accessor :bounding_box
10575
-
10576
- # Confidence of the OCR results for the symbol. Range [0, 1].
10577
- # Corresponds to the JSON property `confidence`
10578
- # @return [Float]
10579
- attr_accessor :confidence
10580
-
10581
- # Additional information detected on the structural component.
10582
- # Corresponds to the JSON property `property`
10583
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1TextAnnotationTextProperty]
10584
- attr_accessor :property
10585
-
10586
- # The actual UTF-8 representation of the symbol.
10587
- # Corresponds to the JSON property `text`
10588
- # @return [String]
10589
- attr_accessor :text
10590
-
10591
- def initialize(**args)
10592
- update!(**args)
10593
- end
10594
-
10595
- # Update properties of this object
10596
- def update!(**args)
10597
- @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
10598
- @confidence = args[:confidence] if args.key?(:confidence)
10599
- @property = args[:property] if args.key?(:property)
10600
- @text = args[:text] if args.key?(:text)
10601
- end
10602
- end
10603
-
10604
- # A table representation similar to HTML table structure.
10605
- class GoogleCloudVisionV1p5beta1Table
10606
- include Google::Apis::Core::Hashable
10607
-
10608
- # Body rows of the table
10609
- # Corresponds to the JSON property `bodyRows`
10610
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1TableTableRow>]
10611
- attr_accessor :body_rows
10612
-
10613
- # Header rows of the table
10614
- # Corresponds to the JSON property `headerRows`
10615
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1TableTableRow>]
10616
- attr_accessor :header_rows
10617
-
10618
- def initialize(**args)
10619
- update!(**args)
10620
- end
10621
-
10622
- # Update properties of this object
10623
- def update!(**args)
10624
- @body_rows = args[:body_rows] if args.key?(:body_rows)
10625
- @header_rows = args[:header_rows] if args.key?(:header_rows)
10626
- end
10627
- end
10628
-
10629
- # A cell representation inside of tables.
10630
- class GoogleCloudVisionV1p5beta1TableTableCell
10631
- include Google::Apis::Core::Hashable
10632
-
10633
- # How many columns this cell spans.
10634
- # Corresponds to the JSON property `colSpan`
10635
- # @return [Fixnum]
10636
- attr_accessor :col_span
10637
-
10638
- # How many rows this cell spans.
10639
- # Corresponds to the JSON property `rowSpan`
10640
- # @return [Fixnum]
10641
- attr_accessor :row_span
10642
-
10643
- # The merged text value of this cell, omitting any deeper structural
10644
- # information unlike `text_block`. This is useful for simple cells.
10645
- # Corresponds to the JSON property `text`
10646
- # @return [String]
10647
- attr_accessor :text
10648
-
10649
- # Logical element on the page.
10650
- # Corresponds to the JSON property `textBlock`
10651
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1Block]
10652
- attr_accessor :text_block
10653
-
10654
- def initialize(**args)
10655
- update!(**args)
10656
- end
10657
-
10658
- # Update properties of this object
10659
- def update!(**args)
10660
- @col_span = args[:col_span] if args.key?(:col_span)
10661
- @row_span = args[:row_span] if args.key?(:row_span)
10662
- @text = args[:text] if args.key?(:text)
10663
- @text_block = args[:text_block] if args.key?(:text_block)
10664
- end
10665
- end
10666
-
10667
- # A row of table cells.
10668
- class GoogleCloudVisionV1p5beta1TableTableRow
10669
- include Google::Apis::Core::Hashable
10670
-
10671
- # Cells that make up this row.
10672
- # Corresponds to the JSON property `cells`
10673
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1TableTableCell>]
10674
- attr_accessor :cells
10675
-
10676
- def initialize(**args)
10677
- update!(**args)
10678
- end
10679
-
10680
- # Update properties of this object
10681
- def update!(**args)
10682
- @cells = args[:cells] if args.key?(:cells)
10683
- end
10684
- end
10685
-
10686
- # TextAnnotation contains a structured representation of OCR extracted text.
10687
- # The hierarchy of an OCR extracted text structure is like this:
10688
- # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
10689
- # Each structural component, starting from Page, may further have their own
10690
- # properties. Properties describe detected languages, breaks etc.. Please refer
10691
- # to the TextAnnotation.TextProperty message definition below for more
10692
- # detail.
10693
- class GoogleCloudVisionV1p5beta1TextAnnotation
10694
- include Google::Apis::Core::Hashable
10695
-
10696
- # List of pages detected by OCR.
10697
- # Corresponds to the JSON property `pages`
10698
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1Page>]
10699
- attr_accessor :pages
10700
-
10701
- # UTF-8 text detected on the pages.
10702
- # Corresponds to the JSON property `text`
10703
- # @return [String]
10704
- attr_accessor :text
10705
-
10706
- def initialize(**args)
10707
- update!(**args)
10708
- end
10709
-
10710
- # Update properties of this object
10711
- def update!(**args)
10712
- @pages = args[:pages] if args.key?(:pages)
10713
- @text = args[:text] if args.key?(:text)
10714
- end
10715
- end
10716
-
10717
- # Detected start or end of a structural component.
10718
- class GoogleCloudVisionV1p5beta1TextAnnotationDetectedBreak
10719
- include Google::Apis::Core::Hashable
10720
-
10721
- # True if break prepends the element.
10722
- # Corresponds to the JSON property `isPrefix`
10723
- # @return [Boolean]
10724
- attr_accessor :is_prefix
10725
- alias_method :is_prefix?, :is_prefix
10726
-
10727
- # Detected break type.
10728
- # Corresponds to the JSON property `type`
10729
- # @return [String]
10730
- attr_accessor :type
10731
-
10732
- def initialize(**args)
10733
- update!(**args)
10734
- end
10735
-
10736
- # Update properties of this object
10737
- def update!(**args)
10738
- @is_prefix = args[:is_prefix] if args.key?(:is_prefix)
10739
- @type = args[:type] if args.key?(:type)
10740
- end
10741
- end
10742
-
10743
- # Detected language for a structural component.
10744
- class GoogleCloudVisionV1p5beta1TextAnnotationDetectedLanguage
10745
- include Google::Apis::Core::Hashable
10746
-
10747
- # Confidence of detected language. Range [0, 1].
10748
- # Corresponds to the JSON property `confidence`
10749
- # @return [Float]
10750
- attr_accessor :confidence
10751
-
10752
- # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
10753
- # information, see
10754
- # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
10755
- # Corresponds to the JSON property `languageCode`
10756
- # @return [String]
10757
- attr_accessor :language_code
10758
-
10759
- def initialize(**args)
10760
- update!(**args)
10761
- end
10762
-
10763
- # Update properties of this object
10764
- def update!(**args)
10765
- @confidence = args[:confidence] if args.key?(:confidence)
10766
- @language_code = args[:language_code] if args.key?(:language_code)
10767
- end
10768
- end
10769
-
10770
- # Additional information detected on the structural component.
10771
- class GoogleCloudVisionV1p5beta1TextAnnotationTextProperty
10772
- include Google::Apis::Core::Hashable
10773
-
10774
- # Detected start or end of a structural component.
10775
- # Corresponds to the JSON property `detectedBreak`
10776
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1TextAnnotationDetectedBreak]
10777
- attr_accessor :detected_break
10778
-
10779
- # A list of detected languages together with confidence.
10780
- # Corresponds to the JSON property `detectedLanguages`
10781
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1TextAnnotationDetectedLanguage>]
10782
- attr_accessor :detected_languages
10783
-
10784
- def initialize(**args)
10785
- update!(**args)
10786
- end
10787
-
10788
- # Update properties of this object
10789
- def update!(**args)
10790
- @detected_break = args[:detected_break] if args.key?(:detected_break)
10791
- @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
10792
- end
10793
- end
10794
-
10795
- # A vertex represents a 2D point in the image.
10796
- # NOTE: the vertex coordinates are in the same scale as the original image.
10797
- class GoogleCloudVisionV1p5beta1Vertex
10798
- include Google::Apis::Core::Hashable
10799
-
10800
- # X coordinate.
10801
- # Corresponds to the JSON property `x`
10802
- # @return [Fixnum]
10803
- attr_accessor :x
10804
-
10805
- # Y coordinate.
10806
- # Corresponds to the JSON property `y`
10807
- # @return [Fixnum]
10808
- attr_accessor :y
10809
-
10810
- def initialize(**args)
10811
- update!(**args)
10812
- end
10813
-
10814
- # Update properties of this object
10815
- def update!(**args)
10816
- @x = args[:x] if args.key?(:x)
10817
- @y = args[:y] if args.key?(:y)
10818
- end
10819
- end
10820
-
10821
- # Relevant information for the image from the Internet.
10822
- class GoogleCloudVisionV1p5beta1WebDetection
10823
- include Google::Apis::Core::Hashable
10824
-
10825
- # The service's best guess as to the topic of the request image.
10826
- # Inferred from similar images on the open web.
10827
- # Corresponds to the JSON property `bestGuessLabels`
10828
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1WebDetectionWebLabel>]
10829
- attr_accessor :best_guess_labels
10830
-
10831
- # Fully matching images from the Internet.
10832
- # Can include resized copies of the query image.
10833
- # Corresponds to the JSON property `fullMatchingImages`
10834
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1WebDetectionWebImage>]
10835
- attr_accessor :full_matching_images
10836
-
10837
- # Web pages containing the matching images from the Internet.
10838
- # Corresponds to the JSON property `pagesWithMatchingImages`
10839
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1WebDetectionWebPage>]
10840
- attr_accessor :pages_with_matching_images
10841
-
10842
- # Partial matching images from the Internet.
10843
- # Those images are similar enough to share some key-point features. For
10844
- # example an original image will likely have partial matching for its crops.
10845
- # Corresponds to the JSON property `partialMatchingImages`
10846
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1WebDetectionWebImage>]
10847
- attr_accessor :partial_matching_images
10848
-
10849
- # The visually similar image results.
10850
- # Corresponds to the JSON property `visuallySimilarImages`
10851
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1WebDetectionWebImage>]
10852
- attr_accessor :visually_similar_images
10853
-
10854
- # Deduced entities from similar images on the Internet.
10855
- # Corresponds to the JSON property `webEntities`
10856
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1WebDetectionWebEntity>]
10857
- attr_accessor :web_entities
10858
-
10859
- def initialize(**args)
10860
- update!(**args)
10861
- end
10862
-
10863
- # Update properties of this object
10864
- def update!(**args)
10865
- @best_guess_labels = args[:best_guess_labels] if args.key?(:best_guess_labels)
10866
- @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
10867
- @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images)
10868
- @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
10869
- @visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images)
10870
- @web_entities = args[:web_entities] if args.key?(:web_entities)
10871
- end
10872
- end
10873
-
10874
- # Entity deduced from similar images on the Internet.
10875
- class GoogleCloudVisionV1p5beta1WebDetectionWebEntity
10876
- include Google::Apis::Core::Hashable
10877
-
10878
- # Canonical description of the entity, in English.
10879
- # Corresponds to the JSON property `description`
10880
- # @return [String]
10881
- attr_accessor :description
10882
-
10883
- # Opaque entity ID.
10884
- # Corresponds to the JSON property `entityId`
10885
- # @return [String]
10886
- attr_accessor :entity_id
10887
-
10888
- # Overall relevancy score for the entity.
10889
- # Not normalized and not comparable across different image queries.
10890
- # Corresponds to the JSON property `score`
10891
- # @return [Float]
10892
- attr_accessor :score
10893
-
10894
- def initialize(**args)
10895
- update!(**args)
10896
- end
10897
-
10898
- # Update properties of this object
10899
- def update!(**args)
10900
- @description = args[:description] if args.key?(:description)
10901
- @entity_id = args[:entity_id] if args.key?(:entity_id)
10902
- @score = args[:score] if args.key?(:score)
10903
- end
10904
- end
10905
-
10906
- # Metadata for online images.
10907
- class GoogleCloudVisionV1p5beta1WebDetectionWebImage
10908
- include Google::Apis::Core::Hashable
10909
-
10910
- # (Deprecated) Overall relevancy score for the image.
10911
- # Corresponds to the JSON property `score`
10912
- # @return [Float]
10913
- attr_accessor :score
10914
-
10915
- # The result image URL.
10916
- # Corresponds to the JSON property `url`
10917
- # @return [String]
10918
- attr_accessor :url
10919
-
10920
- def initialize(**args)
10921
- update!(**args)
10922
- end
10923
-
10924
- # Update properties of this object
10925
- def update!(**args)
10926
- @score = args[:score] if args.key?(:score)
10927
- @url = args[:url] if args.key?(:url)
10928
- end
10929
- end
10930
-
10931
- # Label to provide extra metadata for the web detection.
10932
- class GoogleCloudVisionV1p5beta1WebDetectionWebLabel
10933
- include Google::Apis::Core::Hashable
10934
-
10935
- # Label for extra metadata.
10936
- # Corresponds to the JSON property `label`
10937
- # @return [String]
10938
- attr_accessor :label
10939
-
10940
- # The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
10941
- # For more information, see
10942
- # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
10943
- # Corresponds to the JSON property `languageCode`
10944
- # @return [String]
10945
- attr_accessor :language_code
10946
-
10947
- def initialize(**args)
10948
- update!(**args)
10949
- end
10950
-
10951
- # Update properties of this object
10952
- def update!(**args)
10953
- @label = args[:label] if args.key?(:label)
10954
- @language_code = args[:language_code] if args.key?(:language_code)
10955
- end
10956
- end
10957
-
10958
- # Metadata for web pages.
10959
- class GoogleCloudVisionV1p5beta1WebDetectionWebPage
10960
- include Google::Apis::Core::Hashable
10961
-
10962
- # Fully matching images on the page.
10963
- # Can include resized copies of the query image.
10964
- # Corresponds to the JSON property `fullMatchingImages`
10965
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1WebDetectionWebImage>]
10966
- attr_accessor :full_matching_images
10967
-
10968
- # Title for the web page, may contain HTML markups.
10969
- # Corresponds to the JSON property `pageTitle`
10970
- # @return [String]
10971
- attr_accessor :page_title
10972
-
10973
- # Partial matching images on the page.
10974
- # Those images are similar enough to share some key-point features. For
10975
- # example an original image will likely have partial matching for its
10976
- # crops.
10977
- # Corresponds to the JSON property `partialMatchingImages`
10978
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1WebDetectionWebImage>]
10979
- attr_accessor :partial_matching_images
10980
-
10981
- # (Deprecated) Overall relevancy score for the web page.
10982
- # Corresponds to the JSON property `score`
10983
- # @return [Float]
10984
- attr_accessor :score
10985
-
10986
- # The result web page URL.
10987
- # Corresponds to the JSON property `url`
10988
- # @return [String]
10989
- attr_accessor :url
10990
-
10991
- def initialize(**args)
10992
- update!(**args)
10993
- end
10994
-
10995
- # Update properties of this object
10996
- def update!(**args)
10997
- @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
10998
- @page_title = args[:page_title] if args.key?(:page_title)
10999
- @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
11000
- @score = args[:score] if args.key?(:score)
11001
- @url = args[:url] if args.key?(:url)
11002
- end
11003
- end
11004
-
11005
- # A word representation.
11006
- class GoogleCloudVisionV1p5beta1Word
11007
- include Google::Apis::Core::Hashable
11008
-
11009
- # A bounding polygon for the detected image annotation.
11010
- # Corresponds to the JSON property `boundingBox`
11011
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1BoundingPoly]
11012
- attr_accessor :bounding_box
11013
-
11014
- # Confidence of the OCR results for the word. Range [0, 1].
11015
- # Corresponds to the JSON property `confidence`
11016
- # @return [Float]
11017
- attr_accessor :confidence
11018
-
11019
- # All UTF-8 text detected in this word. This field is by default not
11020
- # returned unless specified in TextDetectionParams.word_filter.
11021
- # Corresponds to the JSON property `mergedText`
11022
- # @return [String]
11023
- attr_accessor :merged_text
11024
-
11025
- # Additional information detected on the structural component.
11026
- # Corresponds to the JSON property `property`
11027
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1TextAnnotationTextProperty]
11028
- attr_accessor :property
11029
-
11030
- # List of symbols in the word.
11031
- # The order of the symbols follows the natural reading order.
11032
- # Corresponds to the JSON property `symbols`
11033
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p5beta1Symbol>]
11034
- attr_accessor :symbols
11035
-
11036
- def initialize(**args)
11037
- update!(**args)
11038
- end
11039
-
11040
- # Update properties of this object
11041
- def update!(**args)
11042
- @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
11043
- @confidence = args[:confidence] if args.key?(:confidence)
11044
- @merged_text = args[:merged_text] if args.key?(:merged_text)
11045
- @property = args[:property] if args.key?(:property)
11046
- @symbols = args[:symbols] if args.key?(:symbols)
11047
- end
11048
- end
11049
-
11050
- # Information about the products similar to a single product in a query
11051
- # image.
11052
- class GroupedResult
11053
- include Google::Apis::Core::Hashable
11054
-
11055
- # A bounding polygon for the detected image annotation.
11056
- # Corresponds to the JSON property `boundingPoly`
11057
- # @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
11058
- attr_accessor :bounding_poly
11059
-
11060
- # List of results, one for each product match.
11061
- # Corresponds to the JSON property `results`
11062
- # @return [Array<Google::Apis::VisionV1p2beta1::Result>]
11063
- attr_accessor :results
11064
-
11065
- def initialize(**args)
11066
- update!(**args)
11067
- end
11068
-
11069
- # Update properties of this object
11070
- def update!(**args)
11071
- @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
11072
- @results = args[:results] if args.key?(:results)
11073
- end
11074
- end
11075
-
11076
- # If an image was produced from a file (e.g. a PDF), this message gives
11077
- # information about the source of that image.
11078
- class ImageAnnotationContext
11079
- include Google::Apis::Core::Hashable
11080
-
11081
- # If the file was a PDF or TIFF, this field gives the page number within
11082
- # the file used to produce the image.
11083
- # Corresponds to the JSON property `pageNumber`
11084
- # @return [Fixnum]
11085
- attr_accessor :page_number
9207
+ # If the file was a PDF or TIFF, this field gives the page number within
9208
+ # the file used to produce the image.
9209
+ # Corresponds to the JSON property `pageNumber`
9210
+ # @return [Fixnum]
9211
+ attr_accessor :page_number
11086
9212
 
11087
9213
  # The URI of the file used to produce the image.
11088
9214
  # Corresponds to the JSON property `uri`
@@ -11366,6 +9492,45 @@ module Google
11366
9492
  end
11367
9493
  end
11368
9494
 
9495
+ # Prediction for what the object in the bounding box is.
9496
+ class ObjectAnnotation
9497
+ include Google::Apis::Core::Hashable
9498
+
9499
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
9500
+ # information, see
9501
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
9502
+ # Corresponds to the JSON property `languageCode`
9503
+ # @return [String]
9504
+ attr_accessor :language_code
9505
+
9506
+ # Object ID that should align with EntityAnnotation mid.
9507
+ # Corresponds to the JSON property `mid`
9508
+ # @return [String]
9509
+ attr_accessor :mid
9510
+
9511
+ # Object name, expressed in its `language_code` language.
9512
+ # Corresponds to the JSON property `name`
9513
+ # @return [String]
9514
+ attr_accessor :name
9515
+
9516
+ # Score of the result. Range [0, 1].
9517
+ # Corresponds to the JSON property `score`
9518
+ # @return [Float]
9519
+ attr_accessor :score
9520
+
9521
+ def initialize(**args)
9522
+ update!(**args)
9523
+ end
9524
+
9525
+ # Update properties of this object
9526
+ def update!(**args)
9527
+ @language_code = args[:language_code] if args.key?(:language_code)
9528
+ @mid = args[:mid] if args.key?(:mid)
9529
+ @name = args[:name] if args.key?(:name)
9530
+ @score = args[:score] if args.key?(:score)
9531
+ end
9532
+ end
9533
+
11369
9534
  # This resource represents a long-running operation that is the result of a
11370
9535
  # network API call.
11371
9536
  class Operation
@@ -11633,11 +9798,11 @@ module Google
11633
9798
  # @return [String]
11634
9799
  attr_accessor :name
11635
9800
 
11636
- # The category for the product identified by the reference image. This should
9801
+ # Immutable. The category for the product identified by the reference image.
9802
+ # This should
11637
9803
  # be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
11638
9804
  # "homegoods", "apparel", and "toys" are still supported, but these should
11639
9805
  # not be used for new products.
11640
- # This field is immutable.
11641
9806
  # Corresponds to the JSON property `productCategory`
11642
9807
  # @return [String]
11643
9808
  attr_accessor :product_category
@@ -11742,8 +9907,9 @@ module Google
11742
9907
  class ReferenceImage
11743
9908
  include Google::Apis::Core::Hashable
11744
9909
 
11745
- # Bounding polygons around the areas of interest in the reference image.
11746
- # Optional. If this field is empty, the system will try to detect regions of
9910
+ # Optional. Bounding polygons around the areas of interest in the reference
9911
+ # image.
9912
+ # If this field is empty, the system will try to detect regions of
11747
9913
  # interest. At most 10 bounding polygons will be used.
11748
9914
  # The provided shape is converted into a non-rotated rectangle. Once
11749
9915
  # converted, the small edge of the rectangle must be greater than or equal
@@ -11762,9 +9928,8 @@ module Google
11762
9928
  # @return [String]
11763
9929
  attr_accessor :name
11764
9930
 
11765
- # The Google Cloud Storage URI of the reference image.
9931
+ # Required. The Google Cloud Storage URI of the reference image.
11766
9932
  # The URI must start with `gs://`.
11767
- # Required.
11768
9933
  # Corresponds to the JSON property `uri`
11769
9934
  # @return [String]
11770
9935
  attr_accessor :uri