google-api-client 0.10.3 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (385) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +12 -18
  3. data/CHANGELOG.md +22 -2
  4. data/Gemfile +5 -7
  5. data/MIGRATING.md +33 -0
  6. data/README.md +10 -2
  7. data/Rakefile +1 -0
  8. data/bin/generate-api +7 -1
  9. data/dl.rb +0 -0
  10. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +6 -6
  11. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +1 -1
  12. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +1 -0
  13. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  14. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +759 -759
  15. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +152 -152
  16. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +376 -375
  17. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +58 -58
  18. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +45 -45
  19. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +22 -21
  20. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +5 -5
  21. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +5 -5
  22. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -0
  23. data/generated/google/apis/admin_datatransfer_v1/classes.rb +2 -2
  24. data/generated/google/apis/admin_datatransfer_v1/representations.rb +2 -2
  25. data/generated/google/apis/admin_datatransfer_v1/service.rb +2 -1
  26. data/generated/google/apis/admin_directory_v1/classes.rb +11 -11
  27. data/generated/google/apis/admin_directory_v1/representations.rb +11 -11
  28. data/generated/google/apis/admin_directory_v1/service.rb +1 -0
  29. data/generated/google/apis/admin_reports_v1/classes.rb +5 -5
  30. data/generated/google/apis/admin_reports_v1/representations.rb +4 -4
  31. data/generated/google/apis/admin_reports_v1/service.rb +1 -0
  32. data/generated/google/apis/adsense_v1_4.rb +1 -1
  33. data/generated/google/apis/adsense_v1_4/classes.rb +2 -2
  34. data/generated/google/apis/adsense_v1_4/representations.rb +2 -2
  35. data/generated/google/apis/adsense_v1_4/service.rb +1 -0
  36. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  37. data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -1
  38. data/generated/google/apis/adsensehost_v4_1/representations.rb +1 -1
  39. data/generated/google/apis/adsensehost_v4_1/service.rb +1 -0
  40. data/generated/google/apis/analytics_v3/classes.rb +10 -10
  41. data/generated/google/apis/analytics_v3/representations.rb +10 -10
  42. data/generated/google/apis/analytics_v3/service.rb +1 -0
  43. data/generated/google/apis/analyticsreporting_v4/classes.rb +933 -933
  44. data/generated/google/apis/analyticsreporting_v4/representations.rb +197 -197
  45. data/generated/google/apis/analyticsreporting_v4/service.rb +5 -4
  46. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  47. data/generated/google/apis/androidenterprise_v1/classes.rb +1 -1
  48. data/generated/google/apis/androidenterprise_v1/representations.rb +1 -1
  49. data/generated/google/apis/androidenterprise_v1/service.rb +1 -0
  50. data/generated/google/apis/androidpublisher_v2/classes.rb +13 -13
  51. data/generated/google/apis/androidpublisher_v2/representations.rb +13 -13
  52. data/generated/google/apis/androidpublisher_v2/service.rb +3 -2
  53. data/generated/google/apis/appengine_v1/classes.rb +2 -2
  54. data/generated/google/apis/appengine_v1/representations.rb +2 -2
  55. data/generated/google/apis/appengine_v1/service.rb +1 -0
  56. data/generated/google/apis/appsactivity_v1/classes.rb +1 -1
  57. data/generated/google/apis/appsactivity_v1/representations.rb +1 -1
  58. data/generated/google/apis/appsactivity_v1/service.rb +1 -0
  59. data/generated/google/apis/appsmarket_v2.rb +35 -0
  60. data/generated/google/apis/appsmarket_v2/classes.rb +396 -0
  61. data/generated/google/apis/appsmarket_v2/representations.rb +180 -0
  62. data/generated/google/apis/appsmarket_v2/service.rb +187 -0
  63. data/generated/google/apis/appstate_v1.rb +1 -1
  64. data/generated/google/apis/appstate_v1/service.rb +1 -0
  65. data/generated/google/apis/bigquery_v2/classes.rb +39 -39
  66. data/generated/google/apis/bigquery_v2/representations.rb +38 -38
  67. data/generated/google/apis/bigquery_v2/service.rb +3 -2
  68. data/generated/google/apis/blogger_v3/classes.rb +2 -2
  69. data/generated/google/apis/blogger_v3/representations.rb +2 -2
  70. data/generated/google/apis/blogger_v3/service.rb +1 -0
  71. data/generated/google/apis/books_v1/classes.rb +5 -5
  72. data/generated/google/apis/books_v1/representations.rb +4 -4
  73. data/generated/google/apis/books_v1/service.rb +1 -0
  74. data/generated/google/apis/calendar_v3/classes.rb +1 -1
  75. data/generated/google/apis/calendar_v3/representations.rb +1 -1
  76. data/generated/google/apis/calendar_v3/service.rb +1 -0
  77. data/generated/google/apis/civicinfo_v2/classes.rb +6 -6
  78. data/generated/google/apis/civicinfo_v2/representations.rb +6 -6
  79. data/generated/google/apis/civicinfo_v2/service.rb +2 -1
  80. data/generated/google/apis/classroom_v1/service.rb +1 -0
  81. data/generated/google/apis/cloudbilling_v1/service.rb +1 -0
  82. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  83. data/generated/google/apis/cloudbuild_v1/classes.rb +626 -626
  84. data/generated/google/apis/cloudbuild_v1/representations.rb +109 -109
  85. data/generated/google/apis/cloudbuild_v1/service.rb +159 -158
  86. data/generated/google/apis/clouddebugger_v2/classes.rb +358 -358
  87. data/generated/google/apis/clouddebugger_v2/representations.rb +99 -99
  88. data/generated/google/apis/clouddebugger_v2/service.rb +42 -41
  89. data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
  90. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +220 -220
  91. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +52 -52
  92. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +59 -58
  93. data/generated/google/apis/cloudfunctions_v1/classes.rb +7 -7
  94. data/generated/google/apis/cloudfunctions_v1/representations.rb +1 -1
  95. data/generated/google/apis/cloudfunctions_v1/service.rb +5 -4
  96. data/generated/google/apis/cloudkms_v1/classes.rb +311 -311
  97. data/generated/google/apis/cloudkms_v1/representations.rb +87 -87
  98. data/generated/google/apis/cloudkms_v1/service.rb +168 -167
  99. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +4 -4
  100. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +4 -4
  101. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +1 -0
  102. data/generated/google/apis/cloudresourcemanager_v1.rb +3 -3
  103. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +341 -341
  104. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +62 -62
  105. data/generated/google/apis/cloudresourcemanager_v1/service.rb +458 -457
  106. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +327 -327
  107. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +71 -71
  108. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +237 -236
  109. data/generated/google/apis/cloudtrace_v1.rb +3 -3
  110. data/generated/google/apis/cloudtrace_v1/classes.rb +38 -38
  111. data/generated/google/apis/cloudtrace_v1/representations.rb +13 -13
  112. data/generated/google/apis/cloudtrace_v1/service.rb +14 -13
  113. data/generated/google/apis/clouduseraccounts_beta/classes.rb +4 -4
  114. data/generated/google/apis/clouduseraccounts_beta/representations.rb +4 -4
  115. data/generated/google/apis/clouduseraccounts_beta/service.rb +1 -0
  116. data/generated/google/apis/compute_beta/classes.rb +52 -52
  117. data/generated/google/apis/compute_beta/representations.rb +52 -52
  118. data/generated/google/apis/compute_beta/service.rb +2 -1
  119. data/generated/google/apis/compute_v1/classes.rb +48 -48
  120. data/generated/google/apis/compute_v1/representations.rb +48 -48
  121. data/generated/google/apis/compute_v1/service.rb +2 -1
  122. data/generated/google/apis/container_v1/service.rb +1 -0
  123. data/generated/google/apis/content_v2.rb +1 -1
  124. data/generated/google/apis/content_v2/classes.rb +38 -660
  125. data/generated/google/apis/content_v2/representations.rb +37 -303
  126. data/generated/google/apis/content_v2/service.rb +63 -279
  127. data/generated/google/apis/customsearch_v1/classes.rb +2 -2
  128. data/generated/google/apis/customsearch_v1/representations.rb +2 -2
  129. data/generated/google/apis/customsearch_v1/service.rb +1 -0
  130. data/generated/google/apis/dataflow_v1b3/classes.rb +3281 -3281
  131. data/generated/google/apis/dataflow_v1b3/representations.rb +777 -777
  132. data/generated/google/apis/dataflow_v1b3/service.rb +106 -105
  133. data/generated/google/apis/dataproc_v1/classes.rb +395 -395
  134. data/generated/google/apis/dataproc_v1/representations.rb +91 -91
  135. data/generated/google/apis/dataproc_v1/service.rb +356 -355
  136. data/generated/google/apis/datastore_v1/classes.rb +506 -506
  137. data/generated/google/apis/datastore_v1/representations.rb +147 -147
  138. data/generated/google/apis/datastore_v1/service.rb +46 -45
  139. data/generated/google/apis/deploymentmanager_v2/classes.rb +6 -6
  140. data/generated/google/apis/deploymentmanager_v2/representations.rb +6 -6
  141. data/generated/google/apis/deploymentmanager_v2/service.rb +1 -0
  142. data/generated/google/apis/dfareporting_v2_6/classes.rb +280 -280
  143. data/generated/google/apis/dfareporting_v2_6/representations.rb +266 -266
  144. data/generated/google/apis/dfareporting_v2_6/service.rb +421 -420
  145. data/generated/google/apis/dfareporting_v2_7/classes.rb +280 -280
  146. data/generated/google/apis/dfareporting_v2_7/representations.rb +266 -266
  147. data/generated/google/apis/dfareporting_v2_7/service.rb +423 -422
  148. data/generated/google/apis/discovery_v1/service.rb +1 -0
  149. data/generated/google/apis/dns_v1/classes.rb +2 -2
  150. data/generated/google/apis/dns_v1/representations.rb +2 -2
  151. data/generated/google/apis/dns_v1/service.rb +1 -0
  152. data/generated/google/apis/dns_v2beta1/classes.rb +2 -2
  153. data/generated/google/apis/dns_v2beta1/representations.rb +2 -2
  154. data/generated/google/apis/dns_v2beta1/service.rb +1 -0
  155. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +15 -15
  156. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +13 -13
  157. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +5 -4
  158. data/generated/google/apis/doubleclicksearch_v2/classes.rb +28 -28
  159. data/generated/google/apis/doubleclicksearch_v2/representations.rb +28 -28
  160. data/generated/google/apis/doubleclicksearch_v2/service.rb +13 -12
  161. data/generated/google/apis/drive_v2/classes.rb +17 -17
  162. data/generated/google/apis/drive_v2/representations.rb +17 -17
  163. data/generated/google/apis/drive_v2/service.rb +5 -4
  164. data/generated/google/apis/drive_v3/classes.rb +13 -13
  165. data/generated/google/apis/drive_v3/representations.rb +12 -12
  166. data/generated/google/apis/drive_v3/service.rb +1 -0
  167. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  168. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +81 -81
  169. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +24 -24
  170. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +1 -0
  171. data/generated/google/apis/firebaserules_v1/classes.rb +201 -201
  172. data/generated/google/apis/firebaserules_v1/representations.rb +61 -61
  173. data/generated/google/apis/firebaserules_v1/service.rb +1 -0
  174. data/generated/google/apis/fitness_v1/classes.rb +18 -18
  175. data/generated/google/apis/fitness_v1/representations.rb +18 -18
  176. data/generated/google/apis/fitness_v1/service.rb +6 -5
  177. data/generated/google/apis/fusiontables_v2/classes.rb +2 -2
  178. data/generated/google/apis/fusiontables_v2/representations.rb +2 -2
  179. data/generated/google/apis/fusiontables_v2/service.rb +1 -0
  180. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  181. data/generated/google/apis/games_configuration_v1configuration/classes.rb +2 -2
  182. data/generated/google/apis/games_configuration_v1configuration/representations.rb +2 -2
  183. data/generated/google/apis/games_configuration_v1configuration/service.rb +1 -0
  184. data/generated/google/apis/games_management_v1management.rb +1 -1
  185. data/generated/google/apis/games_management_v1management/classes.rb +6 -6
  186. data/generated/google/apis/games_management_v1management/representations.rb +6 -6
  187. data/generated/google/apis/games_management_v1management/service.rb +1 -0
  188. data/generated/google/apis/games_v1.rb +1 -1
  189. data/generated/google/apis/games_v1/classes.rb +47 -47
  190. data/generated/google/apis/games_v1/representations.rb +47 -47
  191. data/generated/google/apis/games_v1/service.rb +58 -57
  192. data/generated/google/apis/genomics_v1.rb +6 -6
  193. data/generated/google/apis/genomics_v1/classes.rb +2354 -2354
  194. data/generated/google/apis/genomics_v1/representations.rb +487 -487
  195. data/generated/google/apis/genomics_v1/service.rb +1188 -1187
  196. data/generated/google/apis/gmail_v1/classes.rb +11 -11
  197. data/generated/google/apis/gmail_v1/representations.rb +11 -11
  198. data/generated/google/apis/gmail_v1/service.rb +2 -1
  199. data/generated/google/apis/groupsmigration_v1/service.rb +1 -0
  200. data/generated/google/apis/groupssettings_v1/service.rb +1 -0
  201. data/generated/google/apis/iam_v1/classes.rb +437 -437
  202. data/generated/google/apis/iam_v1/representations.rb +95 -95
  203. data/generated/google/apis/iam_v1/service.rb +87 -86
  204. data/generated/google/apis/identitytoolkit_v3/classes.rb +20 -20
  205. data/generated/google/apis/identitytoolkit_v3/representations.rb +20 -20
  206. data/generated/google/apis/identitytoolkit_v3/service.rb +1 -0
  207. data/generated/google/apis/kgsearch_v1/service.rb +9 -8
  208. data/generated/google/apis/language_v1.rb +1 -1
  209. data/generated/google/apis/language_v1/classes.rb +245 -245
  210. data/generated/google/apis/language_v1/representations.rb +65 -65
  211. data/generated/google/apis/language_v1/service.rb +1 -0
  212. data/generated/google/apis/language_v1beta1.rb +1 -1
  213. data/generated/google/apis/language_v1beta1/classes.rb +277 -277
  214. data/generated/google/apis/language_v1beta1/representations.rb +83 -83
  215. data/generated/google/apis/language_v1beta1/service.rb +31 -30
  216. data/generated/google/apis/licensing_v1/service.rb +1 -0
  217. data/generated/google/apis/logging_v2/classes.rb +408 -408
  218. data/generated/google/apis/logging_v2/representations.rb +93 -93
  219. data/generated/google/apis/logging_v2/service.rb +408 -407
  220. data/generated/google/apis/logging_v2beta1.rb +3 -3
  221. data/generated/google/apis/logging_v2beta1/classes.rb +892 -892
  222. data/generated/google/apis/logging_v2beta1/representations.rb +128 -128
  223. data/generated/google/apis/logging_v2beta1/service.rb +89 -88
  224. data/generated/google/apis/manufacturers_v1/classes.rb +309 -309
  225. data/generated/google/apis/manufacturers_v1/representations.rb +64 -64
  226. data/generated/google/apis/manufacturers_v1/service.rb +1 -0
  227. data/generated/google/apis/mirror_v1/service.rb +1 -0
  228. data/generated/google/apis/ml_v1/classes.rb +1185 -1185
  229. data/generated/google/apis/ml_v1/representations.rb +171 -171
  230. data/generated/google/apis/ml_v1/service.rb +282 -281
  231. data/generated/google/apis/monitoring_v3.rb +3 -3
  232. data/generated/google/apis/monitoring_v3/classes.rb +334 -334
  233. data/generated/google/apis/monitoring_v3/representations.rb +86 -86
  234. data/generated/google/apis/monitoring_v3/service.rb +344 -343
  235. data/generated/google/apis/mybusiness_v3/service.rb +1 -0
  236. data/generated/google/apis/oauth2_v2/service.rb +1 -0
  237. data/generated/google/apis/pagespeedonline_v2/classes.rb +8 -8
  238. data/generated/google/apis/pagespeedonline_v2/representations.rb +8 -8
  239. data/generated/google/apis/pagespeedonline_v2/service.rb +1 -0
  240. data/generated/google/apis/partners_v2/classes.rb +1466 -1466
  241. data/generated/google/apis/partners_v2/representations.rb +371 -371
  242. data/generated/google/apis/partners_v2/service.rb +530 -529
  243. data/generated/google/apis/people_v1.rb +4 -4
  244. data/generated/google/apis/people_v1/classes.rb +1009 -1009
  245. data/generated/google/apis/people_v1/representations.rb +249 -249
  246. data/generated/google/apis/people_v1/service.rb +13 -12
  247. data/generated/google/apis/plus_domains_v1/classes.rb +2 -2
  248. data/generated/google/apis/plus_domains_v1/representations.rb +2 -2
  249. data/generated/google/apis/plus_domains_v1/service.rb +1 -0
  250. data/generated/google/apis/plus_v1/service.rb +1 -0
  251. data/generated/google/apis/prediction_v1_6/classes.rb +9 -9
  252. data/generated/google/apis/prediction_v1_6/representations.rb +9 -9
  253. data/generated/google/apis/prediction_v1_6/service.rb +1 -0
  254. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +221 -221
  255. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +55 -55
  256. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +378 -377
  257. data/generated/google/apis/pubsub_v1/classes.rb +99 -99
  258. data/generated/google/apis/pubsub_v1/representations.rb +25 -25
  259. data/generated/google/apis/pubsub_v1/service.rb +236 -235
  260. data/generated/google/apis/qpx_express_v1/service.rb +1 -0
  261. data/generated/google/apis/replicapool_v1beta2/classes.rb +3 -3
  262. data/generated/google/apis/replicapool_v1beta2/representations.rb +3 -3
  263. data/generated/google/apis/replicapool_v1beta2/service.rb +1 -0
  264. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +2 -2
  265. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +2 -2
  266. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +1 -0
  267. data/generated/google/apis/reseller_v1/classes.rb +5 -5
  268. data/generated/google/apis/reseller_v1/representations.rb +5 -5
  269. data/generated/google/apis/reseller_v1/service.rb +1 -0
  270. data/generated/google/apis/resourceviews_v1beta2/classes.rb +2 -2
  271. data/generated/google/apis/resourceviews_v1beta2/representations.rb +2 -2
  272. data/generated/google/apis/resourceviews_v1beta2/service.rb +1 -0
  273. data/generated/google/apis/runtimeconfig_v1.rb +3 -3
  274. data/generated/google/apis/runtimeconfig_v1/classes.rb +28 -28
  275. data/generated/google/apis/runtimeconfig_v1/representations.rb +3 -3
  276. data/generated/google/apis/runtimeconfig_v1/service.rb +53 -52
  277. data/generated/google/apis/script_v1.rb +18 -18
  278. data/generated/google/apis/script_v1/classes.rb +84 -84
  279. data/generated/google/apis/script_v1/representations.rb +18 -18
  280. data/generated/google/apis/script_v1/service.rb +11 -10
  281. data/generated/google/apis/searchconsole_v1/classes.rb +75 -75
  282. data/generated/google/apis/searchconsole_v1/representations.rb +32 -32
  283. data/generated/google/apis/searchconsole_v1/service.rb +11 -10
  284. data/generated/google/apis/servicecontrol_v1/classes.rb +582 -582
  285. data/generated/google/apis/servicecontrol_v1/representations.rb +113 -113
  286. data/generated/google/apis/servicecontrol_v1/service.rb +71 -70
  287. data/generated/google/apis/servicemanagement_v1.rb +3 -3
  288. data/generated/google/apis/servicemanagement_v1/classes.rb +3725 -3725
  289. data/generated/google/apis/servicemanagement_v1/representations.rb +255 -255
  290. data/generated/google/apis/servicemanagement_v1/service.rb +179 -178
  291. data/generated/google/apis/serviceuser_v1.rb +3 -3
  292. data/generated/google/apis/serviceuser_v1/classes.rb +2845 -2845
  293. data/generated/google/apis/serviceuser_v1/representations.rb +228 -228
  294. data/generated/google/apis/serviceuser_v1/service.rb +47 -46
  295. data/generated/google/apis/sheets_v4.rb +1 -1
  296. data/generated/google/apis/sheets_v4/classes.rb +4456 -4456
  297. data/generated/google/apis/sheets_v4/representations.rb +859 -859
  298. data/generated/google/apis/sheets_v4/service.rb +180 -179
  299. data/generated/google/apis/site_verification_v1/service.rb +1 -0
  300. data/generated/google/apis/slides_v1.rb +1 -1
  301. data/generated/google/apis/slides_v1/classes.rb +2856 -2856
  302. data/generated/google/apis/slides_v1/representations.rb +683 -683
  303. data/generated/google/apis/slides_v1/service.rb +27 -26
  304. data/generated/google/apis/sourcerepo_v1/classes.rb +281 -281
  305. data/generated/google/apis/sourcerepo_v1/representations.rb +79 -79
  306. data/generated/google/apis/sourcerepo_v1/service.rb +112 -111
  307. data/generated/google/apis/spanner_v1/classes.rb +2177 -2177
  308. data/generated/google/apis/spanner_v1/representations.rb +325 -325
  309. data/generated/google/apis/spanner_v1/service.rb +374 -373
  310. data/generated/google/apis/speech_v1beta1/classes.rb +197 -197
  311. data/generated/google/apis/speech_v1beta1/representations.rb +36 -36
  312. data/generated/google/apis/speech_v1beta1/service.rb +27 -26
  313. data/generated/google/apis/sqladmin_v1beta4/classes.rb +14 -14
  314. data/generated/google/apis/sqladmin_v1beta4/representations.rb +14 -14
  315. data/generated/google/apis/sqladmin_v1beta4/service.rb +3 -2
  316. data/generated/google/apis/storage_v1.rb +1 -1
  317. data/generated/google/apis/storage_v1/classes.rb +11 -11
  318. data/generated/google/apis/storage_v1/representations.rb +11 -11
  319. data/generated/google/apis/storage_v1/service.rb +65 -64
  320. data/generated/google/apis/storagetransfer_v1/classes.rb +239 -239
  321. data/generated/google/apis/storagetransfer_v1/representations.rb +79 -79
  322. data/generated/google/apis/storagetransfer_v1/service.rb +133 -132
  323. data/generated/google/apis/surveys_v2/classes.rb +4 -4
  324. data/generated/google/apis/surveys_v2/representations.rb +4 -4
  325. data/generated/google/apis/surveys_v2/service.rb +1 -0
  326. data/generated/google/apis/tagmanager_v1/classes.rb +7 -7
  327. data/generated/google/apis/tagmanager_v1/representations.rb +7 -7
  328. data/generated/google/apis/tagmanager_v1/service.rb +1 -0
  329. data/generated/google/apis/tagmanager_v2/classes.rb +6 -6
  330. data/generated/google/apis/tagmanager_v2/representations.rb +6 -6
  331. data/generated/google/apis/tagmanager_v2/service.rb +1 -0
  332. data/generated/google/apis/taskqueue_v1beta2/classes.rb +5 -5
  333. data/generated/google/apis/taskqueue_v1beta2/representations.rb +5 -5
  334. data/generated/google/apis/taskqueue_v1beta2/service.rb +1 -0
  335. data/generated/google/apis/tasks_v1/service.rb +3 -2
  336. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  337. data/generated/google/apis/toolresults_v1beta3/classes.rb +4 -4
  338. data/generated/google/apis/toolresults_v1beta3/representations.rb +4 -4
  339. data/generated/google/apis/toolresults_v1beta3/service.rb +1 -0
  340. data/generated/google/apis/tracing_v1/classes.rb +421 -421
  341. data/generated/google/apis/tracing_v1/representations.rb +86 -86
  342. data/generated/google/apis/tracing_v1/service.rb +60 -59
  343. data/generated/google/apis/translate_v2/service.rb +1 -0
  344. data/generated/google/apis/urlshortener_v1/classes.rb +3 -3
  345. data/generated/google/apis/urlshortener_v1/representations.rb +3 -3
  346. data/generated/google/apis/urlshortener_v1/service.rb +1 -0
  347. data/generated/google/apis/vision_v1/classes.rb +1290 -1290
  348. data/generated/google/apis/vision_v1/representations.rb +184 -184
  349. data/generated/google/apis/vision_v1/service.rb +11 -10
  350. data/generated/google/apis/webfonts_v1/service.rb +1 -0
  351. data/generated/google/apis/webmasters_v3/classes.rb +5 -5
  352. data/generated/google/apis/webmasters_v3/representations.rb +5 -5
  353. data/generated/google/apis/webmasters_v3/service.rb +1 -0
  354. data/generated/google/apis/youtube_analytics_v1/classes.rb +1 -1
  355. data/generated/google/apis/youtube_analytics_v1/representations.rb +1 -1
  356. data/generated/google/apis/youtube_analytics_v1/service.rb +1 -0
  357. data/generated/google/apis/youtube_partner_v1/classes.rb +13 -13
  358. data/generated/google/apis/youtube_partner_v1/representations.rb +13 -13
  359. data/generated/google/apis/youtube_partner_v1/service.rb +1 -0
  360. data/generated/google/apis/youtube_v3/classes.rb +31 -31
  361. data/generated/google/apis/youtube_v3/representations.rb +31 -31
  362. data/generated/google/apis/youtube_v3/service.rb +2 -1
  363. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  364. data/generated/google/apis/youtubereporting_v1/classes.rb +73 -73
  365. data/generated/google/apis/youtubereporting_v1/representations.rb +18 -18
  366. data/generated/google/apis/youtubereporting_v1/service.rb +77 -76
  367. data/google-api-client.gemspec +4 -6
  368. data/lib/google/apis/core/api_command.rb +8 -3
  369. data/lib/google/apis/core/base_service.rb +47 -18
  370. data/lib/google/apis/core/batch.rb +13 -18
  371. data/lib/google/apis/core/composite_io.rb +97 -0
  372. data/lib/google/apis/core/download.rb +24 -20
  373. data/lib/google/apis/core/http_command.rb +49 -38
  374. data/lib/google/apis/core/json_representation.rb +5 -1
  375. data/lib/google/apis/core/multipart.rb +43 -95
  376. data/lib/google/apis/core/upload.rb +59 -84
  377. data/lib/google/apis/generator/model.rb +2 -0
  378. data/lib/google/apis/generator/templates/_representation.tmpl +1 -1
  379. data/lib/google/apis/generator/templates/service.rb.tmpl +1 -0
  380. data/lib/google/apis/options.rb +24 -12
  381. data/lib/google/apis/version.rb +1 -1
  382. data/samples/web/Gemfile +0 -1
  383. metadata +39 -37
  384. data/lib/google/apis/core/http_client_adapter.rb +0 -82
  385. data/third_party/hurley_patches.rb +0 -103
@@ -50,6 +50,7 @@ module Google
50
50
 
51
51
  def initialize
52
52
  super('https://www.googleapis.com/', 'language/translate/')
53
+ @batch_path = 'batch'
53
54
  end
54
55
 
55
56
  # Detect the language of text.
@@ -40,7 +40,7 @@ module Google
40
40
 
41
41
  # Number of clicks on all goo.gl short URLs pointing to this long URL.
42
42
  # Corresponds to the JSON property `longUrlClicks`
43
- # @return [String]
43
+ # @return [Fixnum]
44
44
  attr_accessor :long_url_clicks
45
45
 
46
46
  # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts.
@@ -57,7 +57,7 @@ module Google
57
57
 
58
58
  # Number of clicks on this short URL.
59
59
  # Corresponds to the JSON property `shortUrlClicks`
60
- # @return [String]
60
+ # @return [Fixnum]
61
61
  attr_accessor :short_url_clicks
62
62
 
63
63
  def initialize(**args)
@@ -125,7 +125,7 @@ module Google
125
125
  # Number of clicks for this top entry, e.g. for this particular country or
126
126
  # browser.
127
127
  # Corresponds to the JSON property `count`
128
- # @return [String]
128
+ # @return [Fixnum]
129
129
  attr_accessor :count
130
130
 
131
131
  # Label assigned to this top entry, e.g. "US" or "Chrome".
@@ -59,12 +59,12 @@ module Google
59
59
 
60
60
  collection :countries, as: 'countries', class: Google::Apis::UrlshortenerV1::StringCount, decorator: Google::Apis::UrlshortenerV1::StringCount::Representation
61
61
 
62
- property :long_url_clicks, as: 'longUrlClicks'
62
+ property :long_url_clicks, :numeric_string => true, as: 'longUrlClicks'
63
63
  collection :platforms, as: 'platforms', class: Google::Apis::UrlshortenerV1::StringCount, decorator: Google::Apis::UrlshortenerV1::StringCount::Representation
64
64
 
65
65
  collection :referrers, as: 'referrers', class: Google::Apis::UrlshortenerV1::StringCount, decorator: Google::Apis::UrlshortenerV1::StringCount::Representation
66
66
 
67
- property :short_url_clicks, as: 'shortUrlClicks'
67
+ property :short_url_clicks, :numeric_string => true, as: 'shortUrlClicks'
68
68
  end
69
69
  end
70
70
 
@@ -87,7 +87,7 @@ module Google
87
87
  class StringCount
88
88
  # @private
89
89
  class Representation < Google::Apis::Core::JsonRepresentation
90
- property :count, as: 'count'
90
+ property :count, :numeric_string => true, as: 'count'
91
91
  property :id, as: 'id'
92
92
  end
93
93
  end
@@ -50,6 +50,7 @@ module Google
50
50
 
51
51
  def initialize
52
52
  super('https://www.googleapis.com/', 'urlshortener/v1/')
53
+ @batch_path = 'batch'
53
54
  end
54
55
 
55
56
  # Expands a short URL or gets creation time and analytics.
@@ -22,19 +22,25 @@ module Google
22
22
  module Apis
23
23
  module VisionV1
24
24
 
25
- # Parameters for crop hints annotation request.
26
- class CropHintsParams
25
+ # Single crop hint that is used to generate a new crop when serving an image.
26
+ class CropHint
27
27
  include Google::Apis::Core::Hashable
28
28
 
29
- # Aspect ratios in floats, representing the ratio of the width to the height
30
- # of the image. For example, if the desired aspect ratio is 4/3, the
31
- # corresponding float value should be 1.33333. If not specified, the
32
- # best possible crop is returned. The number of provided aspect ratios is
33
- # limited to a maximum of 16; any aspect ratios provided after the 16th are
34
- # ignored.
35
- # Corresponds to the JSON property `aspectRatios`
36
- # @return [Array<Float>]
37
- attr_accessor :aspect_ratios
29
+ # Confidence of this being a salient region. Range [0, 1].
30
+ # Corresponds to the JSON property `confidence`
31
+ # @return [Float]
32
+ attr_accessor :confidence
33
+
34
+ # Fraction of importance of this salient region with respect to the original
35
+ # image.
36
+ # Corresponds to the JSON property `importanceFraction`
37
+ # @return [Float]
38
+ attr_accessor :importance_fraction
39
+
40
+ # A bounding polygon for the detected image annotation.
41
+ # Corresponds to the JSON property `boundingPoly`
42
+ # @return [Google::Apis::VisionV1::BoundingPoly]
43
+ attr_accessor :bounding_poly
38
44
 
39
45
  def initialize(**args)
40
46
  update!(**args)
@@ -42,33 +48,31 @@ module Google
42
48
 
43
49
  # Update properties of this object
44
50
  def update!(**args)
45
- @aspect_ratios = args[:aspect_ratios] if args.key?(:aspect_ratios)
51
+ @confidence = args[:confidence] if args.key?(:confidence)
52
+ @importance_fraction = args[:importance_fraction] if args.key?(:importance_fraction)
53
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
46
54
  end
47
55
  end
48
56
 
49
- # Logical element on the page.
50
- class Block
57
+ # A face-specific landmark (for example, a face feature).
58
+ # Landmark positions may fall outside the bounds of the image
59
+ # if the face is near one or more edges of the image.
60
+ # Therefore it is NOT guaranteed that `0 <= x < width` or
61
+ # `0 <= y < height`.
62
+ class Landmark
51
63
  include Google::Apis::Core::Hashable
52
64
 
53
- # Additional information detected on the structural component.
54
- # Corresponds to the JSON property `property`
55
- # @return [Google::Apis::VisionV1::TextProperty]
56
- attr_accessor :property
57
-
58
- # Detected block type (text, image etc) for this block.
59
- # Corresponds to the JSON property `blockType`
65
+ # Face landmark type.
66
+ # Corresponds to the JSON property `type`
60
67
  # @return [String]
61
- attr_accessor :block_type
62
-
63
- # A bounding polygon for the detected image annotation.
64
- # Corresponds to the JSON property `boundingBox`
65
- # @return [Google::Apis::VisionV1::BoundingPoly]
66
- attr_accessor :bounding_box
68
+ attr_accessor :type
67
69
 
68
- # List of paragraphs in this block (if this blocks is of type text).
69
- # Corresponds to the JSON property `paragraphs`
70
- # @return [Array<Google::Apis::VisionV1::Paragraph>]
71
- attr_accessor :paragraphs
70
+ # A 3D position in the image, used primarily for Face detection landmarks.
71
+ # A valid Position must have both x and y coordinates.
72
+ # The position coordinates are in the same scale as the original image.
73
+ # Corresponds to the JSON property `position`
74
+ # @return [Google::Apis::VisionV1::Position]
75
+ attr_accessor :position
72
76
 
73
77
  def initialize(**args)
74
78
  update!(**args)
@@ -76,31 +80,25 @@ module Google
76
80
 
77
81
  # Update properties of this object
78
82
  def update!(**args)
79
- @property = args[:property] if args.key?(:property)
80
- @block_type = args[:block_type] if args.key?(:block_type)
81
- @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
82
- @paragraphs = args[:paragraphs] if args.key?(:paragraphs)
83
+ @type = args[:type] if args.key?(:type)
84
+ @position = args[:position] if args.key?(:position)
83
85
  end
84
86
  end
85
87
 
86
- # A `Property` consists of a user-supplied name/value pair.
87
- class Property
88
+ # Metadata for online images.
89
+ class WebImage
88
90
  include Google::Apis::Core::Hashable
89
91
 
90
- # Value of the property.
91
- # Corresponds to the JSON property `value`
92
- # @return [String]
93
- attr_accessor :value
94
-
95
- # Value of numeric properties.
96
- # Corresponds to the JSON property `uint64Value`
97
- # @return [String]
98
- attr_accessor :uint64_value
92
+ # Overall relevancy score for the image.
93
+ # Not normalized and not comparable across different image queries.
94
+ # Corresponds to the JSON property `score`
95
+ # @return [Float]
96
+ attr_accessor :score
99
97
 
100
- # Name of the property.
101
- # Corresponds to the JSON property `name`
98
+ # The result image URL.
99
+ # Corresponds to the JSON property `url`
102
100
  # @return [String]
103
- attr_accessor :name
101
+ attr_accessor :url
104
102
 
105
103
  def initialize(**args)
106
104
  update!(**args)
@@ -108,56 +106,30 @@ module Google
108
106
 
109
107
  # Update properties of this object
110
108
  def update!(**args)
111
- @value = args[:value] if args.key?(:value)
112
- @uint64_value = args[:uint64_value] if args.key?(:uint64_value)
113
- @name = args[:name] if args.key?(:name)
109
+ @score = args[:score] if args.key?(:score)
110
+ @url = args[:url] if args.key?(:url)
114
111
  end
115
112
  end
116
113
 
117
- # Detected entity location information.
118
- class LocationInfo
114
+ # A word representation.
115
+ class Word
119
116
  include Google::Apis::Core::Hashable
120
117
 
121
- # An object representing a latitude/longitude pair. This is expressed as a pair
122
- # of doubles representing degrees latitude and degrees longitude. Unless
123
- # specified otherwise, this must conform to the
124
- # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
125
- # standard</a>. Values must be within normalized ranges.
126
- # Example of normalization code in Python:
127
- # def NormalizeLongitude(longitude):
128
- # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
129
- # q, r = divmod(longitude, 360.0)
130
- # if r > 180.0 or (r == 180.0 and q <= -1.0):
131
- # return r - 360.0
132
- # return r
133
- # def NormalizeLatLng(latitude, longitude):
134
- # """Wraps decimal degrees latitude and longitude to
135
- # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
136
- # r = latitude % 360.0
137
- # if r <= 90.0:
138
- # return r, NormalizeLongitude(longitude)
139
- # elif r >= 270.0:
140
- # return r - 360, NormalizeLongitude(longitude)
141
- # else:
142
- # return 180 - r, NormalizeLongitude(longitude + 180.0)
143
- # assert 180.0 == NormalizeLongitude(180.0)
144
- # assert -180.0 == NormalizeLongitude(-180.0)
145
- # assert -179.0 == NormalizeLongitude(181.0)
146
- # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
147
- # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
148
- # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
149
- # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
150
- # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
151
- # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
152
- # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
153
- # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
154
- # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
155
- # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
156
- # The code in logs/storage/validator/logs_validator_traits.cc treats this type
157
- # as if it were annotated as ST_LOCATION.
158
- # Corresponds to the JSON property `latLng`
159
- # @return [Google::Apis::VisionV1::LatLng]
160
- attr_accessor :lat_lng
118
+ # Additional information detected on the structural component.
119
+ # Corresponds to the JSON property `property`
120
+ # @return [Google::Apis::VisionV1::TextProperty]
121
+ attr_accessor :property
122
+
123
+ # A bounding polygon for the detected image annotation.
124
+ # Corresponds to the JSON property `boundingBox`
125
+ # @return [Google::Apis::VisionV1::BoundingPoly]
126
+ attr_accessor :bounding_box
127
+
128
+ # List of symbols in the word.
129
+ # The order of the symbols follows the natural reading order.
130
+ # Corresponds to the JSON property `symbols`
131
+ # @return [Array<Google::Apis::VisionV1::Symbol>]
132
+ attr_accessor :symbols
161
133
 
162
134
  def initialize(**args)
163
135
  update!(**args)
@@ -165,37 +137,28 @@ module Google
165
137
 
166
138
  # Update properties of this object
167
139
  def update!(**args)
168
- @lat_lng = args[:lat_lng] if args.key?(:lat_lng)
140
+ @property = args[:property] if args.key?(:property)
141
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
142
+ @symbols = args[:symbols] if args.key?(:symbols)
169
143
  end
170
144
  end
171
145
 
172
- # External image source (Google Cloud Storage image location).
173
- class ImageSource
146
+ # Client image to perform Google Cloud Vision API tasks over.
147
+ class Image
174
148
  include Google::Apis::Core::Hashable
175
149
 
176
- # NOTE: For new code `image_uri` below is preferred.
177
- # Google Cloud Storage image URI, which must be in the following form:
178
- # `gs://bucket_name/object_name` (for details, see
179
- # [Google Cloud Storage Request
180
- # URIs](https://cloud.google.com/storage/docs/reference-uris)).
181
- # NOTE: Cloud Storage object versioning is not supported.
182
- # Corresponds to the JSON property `gcsImageUri`
150
+ # Image content, represented as a stream of bytes.
151
+ # Note: as with all `bytes` fields, protobuffers use a pure binary
152
+ # representation, whereas JSON representations use base64.
153
+ # Corresponds to the JSON property `content`
154
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
183
155
  # @return [String]
184
- attr_accessor :gcs_image_uri
156
+ attr_accessor :content
185
157
 
186
- # Image URI which supports:
187
- # 1) Google Cloud Storage image URI, which must be in the following form:
188
- # `gs://bucket_name/object_name` (for details, see
189
- # [Google Cloud Storage Request
190
- # URIs](https://cloud.google.com/storage/docs/reference-uris)).
191
- # NOTE: Cloud Storage object versioning is not supported.
192
- # 2) Publicly accessible image HTTP/HTTPS URL.
193
- # This is preferred over the legacy `gcs_image_uri` above. When both
194
- # `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
195
- # precedence.
196
- # Corresponds to the JSON property `imageUri`
197
- # @return [String]
198
- attr_accessor :image_uri
158
+ # External image source (Google Cloud Storage image location).
159
+ # Corresponds to the JSON property `source`
160
+ # @return [Google::Apis::VisionV1::ImageSource]
161
+ attr_accessor :source
199
162
 
200
163
  def initialize(**args)
201
164
  update!(**args)
@@ -203,19 +166,29 @@ module Google
203
166
 
204
167
  # Update properties of this object
205
168
  def update!(**args)
206
- @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri)
207
- @image_uri = args[:image_uri] if args.key?(:image_uri)
169
+ @content = args[:content] if args.key?(:content)
170
+ @source = args[:source] if args.key?(:source)
208
171
  end
209
172
  end
210
173
 
211
- # Response to a batch image annotation request.
212
- class BatchAnnotateImagesResponse
174
+ # Structural unit of text representing a number of words in certain order.
175
+ class Paragraph
213
176
  include Google::Apis::Core::Hashable
214
177
 
215
- # Individual responses to image annotation requests within the batch.
216
- # Corresponds to the JSON property `responses`
217
- # @return [Array<Google::Apis::VisionV1::AnnotateImageResponse>]
218
- attr_accessor :responses
178
+ # Additional information detected on the structural component.
179
+ # Corresponds to the JSON property `property`
180
+ # @return [Google::Apis::VisionV1::TextProperty]
181
+ attr_accessor :property
182
+
183
+ # A bounding polygon for the detected image annotation.
184
+ # Corresponds to the JSON property `boundingBox`
185
+ # @return [Google::Apis::VisionV1::BoundingPoly]
186
+ attr_accessor :bounding_box
187
+
188
+ # List of words in this paragraph.
189
+ # Corresponds to the JSON property `words`
190
+ # @return [Array<Google::Apis::VisionV1::Word>]
191
+ attr_accessor :words
219
192
 
220
193
  def initialize(**args)
221
194
  update!(**args)
@@ -223,208 +196,95 @@ module Google
223
196
 
224
197
  # Update properties of this object
225
198
  def update!(**args)
226
- @responses = args[:responses] if args.key?(:responses)
199
+ @property = args[:property] if args.key?(:property)
200
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
201
+ @words = args[:words] if args.key?(:words)
227
202
  end
228
203
  end
229
204
 
230
- # Relevant information for the image from the Internet.
231
- class WebDetection
205
+ # A face annotation object contains the results of face detection.
206
+ class FaceAnnotation
232
207
  include Google::Apis::Core::Hashable
233
208
 
234
- # Fully matching images from the Internet.
235
- # They're definite neardups and most often a copy of the query image with
236
- # merely a size change.
237
- # Corresponds to the JSON property `fullMatchingImages`
238
- # @return [Array<Google::Apis::VisionV1::WebImage>]
239
- attr_accessor :full_matching_images
209
+ # Sorrow likelihood.
210
+ # Corresponds to the JSON property `sorrowLikelihood`
211
+ # @return [String]
212
+ attr_accessor :sorrow_likelihood
240
213
 
241
- # Deduced entities from similar images on the Internet.
242
- # Corresponds to the JSON property `webEntities`
243
- # @return [Array<Google::Apis::VisionV1::WebEntity>]
244
- attr_accessor :web_entities
214
+ # Pitch angle, which indicates the upwards/downwards angle that the face is
215
+ # pointing relative to the image's horizontal plane. Range [-180,180].
216
+ # Corresponds to the JSON property `tiltAngle`
217
+ # @return [Float]
218
+ attr_accessor :tilt_angle
245
219
 
246
- # Web pages containing the matching images from the Internet.
247
- # Corresponds to the JSON property `pagesWithMatchingImages`
248
- # @return [Array<Google::Apis::VisionV1::WebPage>]
249
- attr_accessor :pages_with_matching_images
250
-
251
- # Partial matching images from the Internet.
252
- # Those images are similar enough to share some key-point features. For
253
- # example an original image will likely have partial matching for its crops.
254
- # Corresponds to the JSON property `partialMatchingImages`
255
- # @return [Array<Google::Apis::VisionV1::WebImage>]
256
- attr_accessor :partial_matching_images
220
+ # A bounding polygon for the detected image annotation.
221
+ # Corresponds to the JSON property `fdBoundingPoly`
222
+ # @return [Google::Apis::VisionV1::BoundingPoly]
223
+ attr_accessor :fd_bounding_poly
257
224
 
258
- # The visually similar image results.
259
- # Corresponds to the JSON property `visuallySimilarImages`
260
- # @return [Array<Google::Apis::VisionV1::WebImage>]
261
- attr_accessor :visually_similar_images
225
+ # Surprise likelihood.
226
+ # Corresponds to the JSON property `surpriseLikelihood`
227
+ # @return [String]
228
+ attr_accessor :surprise_likelihood
262
229
 
263
- def initialize(**args)
264
- update!(**args)
265
- end
230
+ # Detected face landmarks.
231
+ # Corresponds to the JSON property `landmarks`
232
+ # @return [Array<Google::Apis::VisionV1::Landmark>]
233
+ attr_accessor :landmarks
266
234
 
267
- # Update properties of this object
268
- def update!(**args)
269
- @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
270
- @web_entities = args[:web_entities] if args.key?(:web_entities)
271
- @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images)
272
- @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
273
- @visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images)
274
- end
275
- end
235
+ # Anger likelihood.
236
+ # Corresponds to the JSON property `angerLikelihood`
237
+ # @return [String]
238
+ attr_accessor :anger_likelihood
276
239
 
277
- # A 3D position in the image, used primarily for Face detection landmarks.
278
- # A valid Position must have both x and y coordinates.
279
- # The position coordinates are in the same scale as the original image.
280
- class Position
281
- include Google::Apis::Core::Hashable
240
+ # Joy likelihood.
241
+ # Corresponds to the JSON property `joyLikelihood`
242
+ # @return [String]
243
+ attr_accessor :joy_likelihood
282
244
 
283
- # Y coordinate.
284
- # Corresponds to the JSON property `y`
245
+ # Face landmarking confidence. Range [0, 1].
246
+ # Corresponds to the JSON property `landmarkingConfidence`
285
247
  # @return [Float]
286
- attr_accessor :y
248
+ attr_accessor :landmarking_confidence
287
249
 
288
- # X coordinate.
289
- # Corresponds to the JSON property `x`
250
+ # Detection confidence. Range [0, 1].
251
+ # Corresponds to the JSON property `detectionConfidence`
290
252
  # @return [Float]
291
- attr_accessor :x
253
+ attr_accessor :detection_confidence
292
254
 
293
- # Z coordinate (or depth).
294
- # Corresponds to the JSON property `z`
255
+ # Yaw angle, which indicates the leftward/rightward angle that the face is
256
+ # pointing relative to the vertical plane perpendicular to the image. Range
257
+ # [-180,180].
258
+ # Corresponds to the JSON property `panAngle`
295
259
  # @return [Float]
296
- attr_accessor :z
297
-
298
- def initialize(**args)
299
- update!(**args)
300
- end
260
+ attr_accessor :pan_angle
301
261
 
302
- # Update properties of this object
303
- def update!(**args)
304
- @y = args[:y] if args.key?(:y)
305
- @x = args[:x] if args.key?(:x)
306
- @z = args[:z] if args.key?(:z)
307
- end
308
- end
262
+ # Under-exposed likelihood.
263
+ # Corresponds to the JSON property `underExposedLikelihood`
264
+ # @return [String]
265
+ attr_accessor :under_exposed_likelihood
309
266
 
310
- # Color information consists of RGB channels, score, and the fraction of
311
- # the image that the color occupies in the image.
312
- class ColorInfo
313
- include Google::Apis::Core::Hashable
267
+ # Blurred likelihood.
268
+ # Corresponds to the JSON property `blurredLikelihood`
269
+ # @return [String]
270
+ attr_accessor :blurred_likelihood
314
271
 
315
- # The fraction of pixels the color occupies in the image.
316
- # Value in range [0, 1].
317
- # Corresponds to the JSON property `pixelFraction`
318
- # @return [Float]
319
- attr_accessor :pixel_fraction
272
+ # Headwear likelihood.
273
+ # Corresponds to the JSON property `headwearLikelihood`
274
+ # @return [String]
275
+ attr_accessor :headwear_likelihood
320
276
 
321
- # Represents a color in the RGBA color space. This representation is designed
322
- # for simplicity of conversion to/from color representations in various
323
- # languages over compactness; for example, the fields of this representation
324
- # can be trivially provided to the constructor of "java.awt.Color" in Java; it
325
- # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
326
- # method in iOS; and, with just a little work, it can be easily formatted into
327
- # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
328
- # Example (Java):
329
- # import com.google.type.Color;
330
- # // ...
331
- # public static java.awt.Color fromProto(Color protocolor) `
332
- # float alpha = protocolor.hasAlpha()
333
- # ? protocolor.getAlpha().getValue()
334
- # : 1.0;
335
- # return new java.awt.Color(
336
- # protocolor.getRed(),
337
- # protocolor.getGreen(),
338
- # protocolor.getBlue(),
339
- # alpha);
340
- # `
341
- # public static Color toProto(java.awt.Color color) `
342
- # float red = (float) color.getRed();
343
- # float green = (float) color.getGreen();
344
- # float blue = (float) color.getBlue();
345
- # float denominator = 255.0;
346
- # Color.Builder resultBuilder =
347
- # Color
348
- # .newBuilder()
349
- # .setRed(red / denominator)
350
- # .setGreen(green / denominator)
351
- # .setBlue(blue / denominator);
352
- # int alpha = color.getAlpha();
353
- # if (alpha != 255) `
354
- # result.setAlpha(
355
- # FloatValue
356
- # .newBuilder()
357
- # .setValue(((float) alpha) / denominator)
358
- # .build());
359
- # `
360
- # return resultBuilder.build();
361
- # `
362
- # // ...
363
- # Example (iOS / Obj-C):
364
- # // ...
365
- # static UIColor* fromProto(Color* protocolor) `
366
- # float red = [protocolor red];
367
- # float green = [protocolor green];
368
- # float blue = [protocolor blue];
369
- # FloatValue* alpha_wrapper = [protocolor alpha];
370
- # float alpha = 1.0;
371
- # if (alpha_wrapper != nil) `
372
- # alpha = [alpha_wrapper value];
373
- # `
374
- # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
375
- # `
376
- # static Color* toProto(UIColor* color) `
377
- # CGFloat red, green, blue, alpha;
378
- # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
379
- # return nil;
380
- # `
381
- # Color* result = [Color alloc] init];
382
- # [result setRed:red];
383
- # [result setGreen:green];
384
- # [result setBlue:blue];
385
- # if (alpha <= 0.9999) `
386
- # [result setAlpha:floatWrapperWithValue(alpha)];
387
- # `
388
- # [result autorelease];
389
- # return result;
390
- # `
391
- # // ...
392
- # Example (JavaScript):
393
- # // ...
394
- # var protoToCssColor = function(rgb_color) `
395
- # var redFrac = rgb_color.red || 0.0;
396
- # var greenFrac = rgb_color.green || 0.0;
397
- # var blueFrac = rgb_color.blue || 0.0;
398
- # var red = Math.floor(redFrac * 255);
399
- # var green = Math.floor(greenFrac * 255);
400
- # var blue = Math.floor(blueFrac * 255);
401
- # if (!('alpha' in rgb_color)) `
402
- # return rgbToCssColor_(red, green, blue);
403
- # `
404
- # var alphaFrac = rgb_color.alpha.value || 0.0;
405
- # var rgbParams = [red, green, blue].join(',');
406
- # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
407
- # `;
408
- # var rgbToCssColor_ = function(red, green, blue) `
409
- # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
410
- # var hexString = rgbNumber.toString(16);
411
- # var missingZeros = 6 - hexString.length;
412
- # var resultBuilder = ['#'];
413
- # for (var i = 0; i < missingZeros; i++) `
414
- # resultBuilder.push('0');
415
- # `
416
- # resultBuilder.push(hexString);
417
- # return resultBuilder.join('');
418
- # `;
419
- # // ...
420
- # Corresponds to the JSON property `color`
421
- # @return [Google::Apis::VisionV1::Color]
422
- attr_accessor :color
277
+ # A bounding polygon for the detected image annotation.
278
+ # Corresponds to the JSON property `boundingPoly`
279
+ # @return [Google::Apis::VisionV1::BoundingPoly]
280
+ attr_accessor :bounding_poly
423
281
 
424
- # Image-specific score for this color. Value in range [0, 1].
425
- # Corresponds to the JSON property `score`
282
+ # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
283
+ # of the face relative to the image vertical about the axis perpendicular to
284
+ # the face. Range [-180,180].
285
+ # Corresponds to the JSON property `rollAngle`
426
286
  # @return [Float]
427
- attr_accessor :score
287
+ attr_accessor :roll_angle
428
288
 
429
289
  def initialize(**args)
430
290
  update!(**args)
@@ -432,26 +292,32 @@ module Google
432
292
 
433
293
  # Update properties of this object
434
294
  def update!(**args)
435
- @pixel_fraction = args[:pixel_fraction] if args.key?(:pixel_fraction)
436
- @color = args[:color] if args.key?(:color)
437
- @score = args[:score] if args.key?(:score)
295
+ @sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood)
296
+ @tilt_angle = args[:tilt_angle] if args.key?(:tilt_angle)
297
+ @fd_bounding_poly = args[:fd_bounding_poly] if args.key?(:fd_bounding_poly)
298
+ @surprise_likelihood = args[:surprise_likelihood] if args.key?(:surprise_likelihood)
299
+ @landmarks = args[:landmarks] if args.key?(:landmarks)
300
+ @anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood)
301
+ @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood)
302
+ @landmarking_confidence = args[:landmarking_confidence] if args.key?(:landmarking_confidence)
303
+ @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence)
304
+ @pan_angle = args[:pan_angle] if args.key?(:pan_angle)
305
+ @under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood)
306
+ @blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood)
307
+ @headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood)
308
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
309
+ @roll_angle = args[:roll_angle] if args.key?(:roll_angle)
438
310
  end
439
311
  end
440
312
 
441
- # Metadata for web pages.
442
- class WebPage
313
+ # Multiple image annotation requests are batched into a single service call.
314
+ class BatchAnnotateImagesRequest
443
315
  include Google::Apis::Core::Hashable
444
316
 
445
- # The result web page URL.
446
- # Corresponds to the JSON property `url`
447
- # @return [String]
448
- attr_accessor :url
449
-
450
- # Overall relevancy score for the web page.
451
- # Not normalized and not comparable across different image queries.
452
- # Corresponds to the JSON property `score`
453
- # @return [Float]
454
- attr_accessor :score
317
+ # Individual image annotation requests for this batch.
318
+ # Corresponds to the JSON property `requests`
319
+ # @return [Array<Google::Apis::VisionV1::AnnotateImageRequest>]
320
+ attr_accessor :requests
455
321
 
456
322
  def initialize(**args)
457
323
  update!(**args)
@@ -459,170 +325,61 @@ module Google
459
325
 
460
326
  # Update properties of this object
461
327
  def update!(**args)
462
- @url = args[:url] if args.key?(:url)
463
- @score = args[:score] if args.key?(:score)
328
+ @requests = args[:requests] if args.key?(:requests)
464
329
  end
465
330
  end
466
331
 
467
- # Set of detected entity features.
468
- class EntityAnnotation
469
- include Google::Apis::Core::Hashable
470
-
471
- # The location information for the detected entity. Multiple
472
- # `LocationInfo` elements can be present because one location may
473
- # indicate the location of the scene in the image, and another location
474
- # may indicate the location of the place where the image was taken.
475
- # Location information is usually present for landmarks.
476
- # Corresponds to the JSON property `locations`
477
- # @return [Array<Google::Apis::VisionV1::LocationInfo>]
478
- attr_accessor :locations
479
-
480
- # Opaque entity ID. Some IDs may be available in
481
- # [Google Knowledge Graph Search API](https://developers.google.com/knowledge-
482
- # graph/).
483
- # Corresponds to the JSON property `mid`
484
- # @return [String]
485
- attr_accessor :mid
486
-
487
- # The accuracy of the entity detection in an image.
488
- # For example, for an image in which the "Eiffel Tower" entity is detected,
489
- # this field represents the confidence that there is a tower in the query
490
- # image. Range [0, 1].
491
- # Corresponds to the JSON property `confidence`
492
- # @return [Float]
493
- attr_accessor :confidence
494
-
495
- # A bounding polygon for the detected image annotation.
496
- # Corresponds to the JSON property `boundingPoly`
497
- # @return [Google::Apis::VisionV1::BoundingPoly]
498
- attr_accessor :bounding_poly
499
-
500
- # The language code for the locale in which the entity textual
501
- # `description` is expressed.
502
- # Corresponds to the JSON property `locale`
503
- # @return [String]
504
- attr_accessor :locale
505
-
506
- # Entity textual description, expressed in its `locale` language.
507
- # Corresponds to the JSON property `description`
508
- # @return [String]
509
- attr_accessor :description
510
-
511
- # The relevancy of the ICA (Image Content Annotation) label to the
512
- # image. For example, the relevancy of "tower" is likely higher to an image
513
- # containing the detected "Eiffel Tower" than to an image containing a
514
- # detected distant towering building, even though the confidence that
515
- # there is a tower in each image may be the same. Range [0, 1].
516
- # Corresponds to the JSON property `topicality`
517
- # @return [Float]
518
- attr_accessor :topicality
519
-
520
- # Some entities may have optional user-supplied `Property` (name/value)
521
- # fields, such a score or string that qualifies the entity.
522
- # Corresponds to the JSON property `properties`
523
- # @return [Array<Google::Apis::VisionV1::Property>]
524
- attr_accessor :properties
525
-
526
- # Overall score of the result. Range [0, 1].
527
- # Corresponds to the JSON property `score`
528
- # @return [Float]
529
- attr_accessor :score
530
-
531
- def initialize(**args)
532
- update!(**args)
533
- end
534
-
535
- # Update properties of this object
536
- def update!(**args)
537
- @locations = args[:locations] if args.key?(:locations)
538
- @mid = args[:mid] if args.key?(:mid)
539
- @confidence = args[:confidence] if args.key?(:confidence)
540
- @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
541
- @locale = args[:locale] if args.key?(:locale)
542
- @description = args[:description] if args.key?(:description)
543
- @topicality = args[:topicality] if args.key?(:topicality)
544
- @properties = args[:properties] if args.key?(:properties)
545
- @score = args[:score] if args.key?(:score)
546
- end
547
- end
548
-
549
- # Single crop hint that is used to generate a new crop when serving an image.
550
- class CropHint
332
+ # Detected start or end of a structural component.
333
+ class DetectedBreak
551
334
  include Google::Apis::Core::Hashable
552
335
 
553
- # Confidence of this being a salient region. Range [0, 1].
554
- # Corresponds to the JSON property `confidence`
555
- # @return [Float]
556
- attr_accessor :confidence
557
-
558
- # Fraction of importance of this salient region with respect to the original
559
- # image.
560
- # Corresponds to the JSON property `importanceFraction`
561
- # @return [Float]
562
- attr_accessor :importance_fraction
563
-
564
- # A bounding polygon for the detected image annotation.
565
- # Corresponds to the JSON property `boundingPoly`
566
- # @return [Google::Apis::VisionV1::BoundingPoly]
567
- attr_accessor :bounding_poly
568
-
569
- def initialize(**args)
570
- update!(**args)
571
- end
572
-
573
- # Update properties of this object
574
- def update!(**args)
575
- @confidence = args[:confidence] if args.key?(:confidence)
576
- @importance_fraction = args[:importance_fraction] if args.key?(:importance_fraction)
577
- @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
578
- end
579
- end
580
-
581
- # A face-specific landmark (for example, a face feature).
582
- # Landmark positions may fall outside the bounds of the image
583
- # if the face is near one or more edges of the image.
584
- # Therefore it is NOT guaranteed that `0 <= x < width` or
585
- # `0 <= y < height`.
586
- class Landmark
587
- include Google::Apis::Core::Hashable
336
+ # True if break prepends the element.
337
+ # Corresponds to the JSON property `isPrefix`
338
+ # @return [Boolean]
339
+ attr_accessor :is_prefix
340
+ alias_method :is_prefix?, :is_prefix
588
341
 
589
- # Face landmark type.
342
+ # Detected break type.
590
343
  # Corresponds to the JSON property `type`
591
344
  # @return [String]
592
345
  attr_accessor :type
593
346
 
594
- # A 3D position in the image, used primarily for Face detection landmarks.
595
- # A valid Position must have both x and y coordinates.
596
- # The position coordinates are in the same scale as the original image.
597
- # Corresponds to the JSON property `position`
598
- # @return [Google::Apis::VisionV1::Position]
599
- attr_accessor :position
600
-
601
347
  def initialize(**args)
602
348
  update!(**args)
603
349
  end
604
350
 
605
351
  # Update properties of this object
606
352
  def update!(**args)
353
+ @is_prefix = args[:is_prefix] if args.key?(:is_prefix)
607
354
  @type = args[:type] if args.key?(:type)
608
- @position = args[:position] if args.key?(:position)
609
355
  end
610
356
  end
611
357
 
612
- # Metadata for online images.
613
- class WebImage
358
+ # Image context and/or feature-specific parameters.
359
+ class ImageContext
614
360
  include Google::Apis::Core::Hashable
615
361
 
616
- # Overall relevancy score for the image.
617
- # Not normalized and not comparable across different image queries.
618
- # Corresponds to the JSON property `score`
619
- # @return [Float]
620
- attr_accessor :score
362
+ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
363
+ # yields the best results since it enables automatic language detection. For
364
+ # languages based on the Latin alphabet, setting `language_hints` is not
365
+ # needed. In rare cases, when the language of the text in the image is known,
366
+ # setting a hint will help get better results (although it will be a
367
+ # significant hindrance if the hint is wrong). Text detection returns an
368
+ # error if one or more of the specified languages is not one of the
369
+ # [supported languages](/vision/docs/languages).
370
+ # Corresponds to the JSON property `languageHints`
371
+ # @return [Array<String>]
372
+ attr_accessor :language_hints
621
373
 
622
- # The result image URL.
623
- # Corresponds to the JSON property `url`
624
- # @return [String]
625
- attr_accessor :url
374
+ # Rectangle determined by min and max `LatLng` pairs.
375
+ # Corresponds to the JSON property `latLongRect`
376
+ # @return [Google::Apis::VisionV1::LatLongRect]
377
+ attr_accessor :lat_long_rect
378
+
379
+ # Parameters for crop hints annotation request.
380
+ # Corresponds to the JSON property `cropHintsParams`
381
+ # @return [Google::Apis::VisionV1::CropHintsParams]
382
+ attr_accessor :crop_hints_params
626
383
 
627
384
  def initialize(**args)
628
385
  update!(**args)
@@ -630,59 +387,68 @@ module Google
630
387
 
631
388
  # Update properties of this object
632
389
  def update!(**args)
633
- @score = args[:score] if args.key?(:score)
634
- @url = args[:url] if args.key?(:url)
390
+ @language_hints = args[:language_hints] if args.key?(:language_hints)
391
+ @lat_long_rect = args[:lat_long_rect] if args.key?(:lat_long_rect)
392
+ @crop_hints_params = args[:crop_hints_params] if args.key?(:crop_hints_params)
635
393
  end
636
394
  end
637
395
 
638
- # A word representation.
639
- class Word
396
+ # Detected page from OCR.
397
+ class Page
640
398
  include Google::Apis::Core::Hashable
641
399
 
642
- # A bounding polygon for the detected image annotation.
643
- # Corresponds to the JSON property `boundingBox`
644
- # @return [Google::Apis::VisionV1::BoundingPoly]
645
- attr_accessor :bounding_box
646
-
647
- # List of symbols in the word.
648
- # The order of the symbols follows the natural reading order.
649
- # Corresponds to the JSON property `symbols`
650
- # @return [Array<Google::Apis::VisionV1::Symbol>]
651
- attr_accessor :symbols
400
+ # List of blocks of text, images etc on this page.
401
+ # Corresponds to the JSON property `blocks`
402
+ # @return [Array<Google::Apis::VisionV1::Block>]
403
+ attr_accessor :blocks
652
404
 
653
405
  # Additional information detected on the structural component.
654
406
  # Corresponds to the JSON property `property`
655
407
  # @return [Google::Apis::VisionV1::TextProperty]
656
408
  attr_accessor :property
657
409
 
410
+ # Page height in pixels.
411
+ # Corresponds to the JSON property `height`
412
+ # @return [Fixnum]
413
+ attr_accessor :height
414
+
415
+ # Page width in pixels.
416
+ # Corresponds to the JSON property `width`
417
+ # @return [Fixnum]
418
+ attr_accessor :width
419
+
658
420
  def initialize(**args)
659
421
  update!(**args)
660
422
  end
661
423
 
662
424
  # Update properties of this object
663
425
  def update!(**args)
664
- @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
665
- @symbols = args[:symbols] if args.key?(:symbols)
426
+ @blocks = args[:blocks] if args.key?(:blocks)
666
427
  @property = args[:property] if args.key?(:property)
428
+ @height = args[:height] if args.key?(:height)
429
+ @width = args[:width] if args.key?(:width)
667
430
  end
668
431
  end
669
432
 
670
- # Client image to perform Google Cloud Vision API tasks over.
671
- class Image
433
+ # Request for performing Google Cloud Vision API tasks over a user-provided
434
+ # image, with user-requested features.
435
+ class AnnotateImageRequest
672
436
  include Google::Apis::Core::Hashable
673
437
 
674
- # Image content, represented as a stream of bytes.
675
- # Note: as with all `bytes` fields, protobuffers use a pure binary
676
- # representation, whereas JSON representations use base64.
677
- # Corresponds to the JSON property `content`
678
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
679
- # @return [String]
680
- attr_accessor :content
438
+ # Client image to perform Google Cloud Vision API tasks over.
439
+ # Corresponds to the JSON property `image`
440
+ # @return [Google::Apis::VisionV1::Image]
441
+ attr_accessor :image
681
442
 
682
- # External image source (Google Cloud Storage image location).
683
- # Corresponds to the JSON property `source`
684
- # @return [Google::Apis::VisionV1::ImageSource]
685
- attr_accessor :source
443
+ # Requested features.
444
+ # Corresponds to the JSON property `features`
445
+ # @return [Array<Google::Apis::VisionV1::Feature>]
446
+ attr_accessor :features
447
+
448
+ # Image context and/or feature-specific parameters.
449
+ # Corresponds to the JSON property `imageContext`
450
+ # @return [Google::Apis::VisionV1::ImageContext]
451
+ attr_accessor :image_context
686
452
 
687
453
  def initialize(**args)
688
454
  update!(**args)
@@ -690,29 +456,71 @@ module Google
690
456
 
691
457
  # Update properties of this object
692
458
  def update!(**args)
693
- @content = args[:content] if args.key?(:content)
694
- @source = args[:source] if args.key?(:source)
459
+ @image = args[:image] if args.key?(:image)
460
+ @features = args[:features] if args.key?(:features)
461
+ @image_context = args[:image_context] if args.key?(:image_context)
695
462
  end
696
463
  end
697
464
 
698
- # Structural unit of text representing a number of words in certain order.
699
- class Paragraph
700
- include Google::Apis::Core::Hashable
701
-
702
- # A bounding polygon for the detected image annotation.
703
- # Corresponds to the JSON property `boundingBox`
704
- # @return [Google::Apis::VisionV1::BoundingPoly]
705
- attr_accessor :bounding_box
706
-
707
- # List of words in this paragraph.
708
- # Corresponds to the JSON property `words`
709
- # @return [Array<Google::Apis::VisionV1::Word>]
710
- attr_accessor :words
711
-
712
- # Additional information detected on the structural component.
713
- # Corresponds to the JSON property `property`
714
- # @return [Google::Apis::VisionV1::TextProperty]
715
- attr_accessor :property
465
+ # The `Status` type defines a logical error model that is suitable for different
466
+ # programming environments, including REST APIs and RPC APIs. It is used by
467
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
468
+ # - Simple to use and understand for most users
469
+ # - Flexible enough to meet unexpected needs
470
+ # # Overview
471
+ # The `Status` message contains three pieces of data: error code, error message,
472
+ # and error details. The error code should be an enum value of
473
+ # google.rpc.Code, but it may accept additional error codes if needed. The
474
+ # error message should be a developer-facing English message that helps
475
+ # developers *understand* and *resolve* the error. If a localized user-facing
476
+ # error message is needed, put the localized message in the error details or
477
+ # localize it in the client. The optional error details may contain arbitrary
478
+ # information about the error. There is a predefined set of error detail types
479
+ # in the package `google.rpc` which can be used for common error conditions.
480
+ # # Language mapping
481
+ # The `Status` message is the logical representation of the error model, but it
482
+ # is not necessarily the actual wire format. When the `Status` message is
483
+ # exposed in different client libraries and different wire protocols, it can be
484
+ # mapped differently. For example, it will likely be mapped to some exceptions
485
+ # in Java, but more likely mapped to some error codes in C.
486
+ # # Other uses
487
+ # The error model and the `Status` message can be used in a variety of
488
+ # environments, either with or without APIs, to provide a
489
+ # consistent developer experience across different environments.
490
+ # Example uses of this error model include:
491
+ # - Partial errors. If a service needs to return partial errors to the client,
492
+ # it may embed the `Status` in the normal response to indicate the partial
493
+ # errors.
494
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
495
+ # have a `Status` message for error reporting purpose.
496
+ # - Batch operations. If a client uses batch request and batch response, the
497
+ # `Status` message should be used directly inside batch response, one for
498
+ # each error sub-response.
499
+ # - Asynchronous operations. If an API call embeds asynchronous operation
500
+ # results in its response, the status of those operations should be
501
+ # represented directly using the `Status` message.
502
+ # - Logging. If some API errors are stored in logs, the message `Status` could
503
+ # be used directly after any stripping needed for security/privacy reasons.
504
+ class Status
505
+ include Google::Apis::Core::Hashable
506
+
507
+ # A list of messages that carry the error details. There will be a
508
+ # common set of message types for APIs to use.
509
+ # Corresponds to the JSON property `details`
510
+ # @return [Array<Hash<String,Object>>]
511
+ attr_accessor :details
512
+
513
+ # The status code, which should be an enum value of google.rpc.Code.
514
+ # Corresponds to the JSON property `code`
515
+ # @return [Fixnum]
516
+ attr_accessor :code
517
+
518
+ # A developer-facing error message, which should be in English. Any
519
+ # user-facing error message should be localized and sent in the
520
+ # google.rpc.Status.details field, or localized by the client.
521
+ # Corresponds to the JSON property `message`
522
+ # @return [String]
523
+ attr_accessor :message
716
524
 
717
525
  def initialize(**args)
718
526
  update!(**args)
@@ -720,95 +528,127 @@ module Google
720
528
 
721
529
  # Update properties of this object
722
530
  def update!(**args)
723
- @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
724
- @words = args[:words] if args.key?(:words)
725
- @property = args[:property] if args.key?(:property)
531
+ @details = args[:details] if args.key?(:details)
532
+ @code = args[:code] if args.key?(:code)
533
+ @message = args[:message] if args.key?(:message)
726
534
  end
727
535
  end
728
536
 
729
- # A face annotation object contains the results of face detection.
730
- class FaceAnnotation
537
+ # Rectangle determined by min and max `LatLng` pairs.
538
+ class LatLongRect
731
539
  include Google::Apis::Core::Hashable
732
540
 
733
- # A bounding polygon for the detected image annotation.
734
- # Corresponds to the JSON property `fdBoundingPoly`
735
- # @return [Google::Apis::VisionV1::BoundingPoly]
736
- attr_accessor :fd_bounding_poly
737
-
738
- # Anger likelihood.
739
- # Corresponds to the JSON property `angerLikelihood`
740
- # @return [String]
741
- attr_accessor :anger_likelihood
742
-
743
- # Detected face landmarks.
744
- # Corresponds to the JSON property `landmarks`
745
- # @return [Array<Google::Apis::VisionV1::Landmark>]
746
- attr_accessor :landmarks
747
-
748
- # Surprise likelihood.
749
- # Corresponds to the JSON property `surpriseLikelihood`
750
- # @return [String]
751
- attr_accessor :surprise_likelihood
752
-
753
- # Face landmarking confidence. Range [0, 1].
754
- # Corresponds to the JSON property `landmarkingConfidence`
755
- # @return [Float]
756
- attr_accessor :landmarking_confidence
757
-
758
- # Joy likelihood.
759
- # Corresponds to the JSON property `joyLikelihood`
760
- # @return [String]
761
- attr_accessor :joy_likelihood
541
+ # An object representing a latitude/longitude pair. This is expressed as a pair
542
+ # of doubles representing degrees latitude and degrees longitude. Unless
543
+ # specified otherwise, this must conform to the
544
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
545
+ # standard</a>. Values must be within normalized ranges.
546
+ # Example of normalization code in Python:
547
+ # def NormalizeLongitude(longitude):
548
+ # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
549
+ # q, r = divmod(longitude, 360.0)
550
+ # if r > 180.0 or (r == 180.0 and q <= -1.0):
551
+ # return r - 360.0
552
+ # return r
553
+ # def NormalizeLatLng(latitude, longitude):
554
+ # """Wraps decimal degrees latitude and longitude to
555
+ # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
556
+ # r = latitude % 360.0
557
+ # if r <= 90.0:
558
+ # return r, NormalizeLongitude(longitude)
559
+ # elif r >= 270.0:
560
+ # return r - 360, NormalizeLongitude(longitude)
561
+ # else:
562
+ # return 180 - r, NormalizeLongitude(longitude + 180.0)
563
+ # assert 180.0 == NormalizeLongitude(180.0)
564
+ # assert -180.0 == NormalizeLongitude(-180.0)
565
+ # assert -179.0 == NormalizeLongitude(181.0)
566
+ # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
567
+ # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
568
+ # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
569
+ # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
570
+ # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
571
+ # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
572
+ # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
573
+ # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
574
+ # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
575
+ # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
576
+ # The code in logs/storage/validator/logs_validator_traits.cc treats this type
577
+ # as if it were annotated as ST_LOCATION.
578
+ # Corresponds to the JSON property `minLatLng`
579
+ # @return [Google::Apis::VisionV1::LatLng]
580
+ attr_accessor :min_lat_lng
762
581
 
763
- # Detection confidence. Range [0, 1].
764
- # Corresponds to the JSON property `detectionConfidence`
765
- # @return [Float]
766
- attr_accessor :detection_confidence
582
+ # An object representing a latitude/longitude pair. This is expressed as a pair
583
+ # of doubles representing degrees latitude and degrees longitude. Unless
584
+ # specified otherwise, this must conform to the
585
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
586
+ # standard</a>. Values must be within normalized ranges.
587
+ # Example of normalization code in Python:
588
+ # def NormalizeLongitude(longitude):
589
+ # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
590
+ # q, r = divmod(longitude, 360.0)
591
+ # if r > 180.0 or (r == 180.0 and q <= -1.0):
592
+ # return r - 360.0
593
+ # return r
594
+ # def NormalizeLatLng(latitude, longitude):
595
+ # """Wraps decimal degrees latitude and longitude to
596
+ # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
597
+ # r = latitude % 360.0
598
+ # if r <= 90.0:
599
+ # return r, NormalizeLongitude(longitude)
600
+ # elif r >= 270.0:
601
+ # return r - 360, NormalizeLongitude(longitude)
602
+ # else:
603
+ # return 180 - r, NormalizeLongitude(longitude + 180.0)
604
+ # assert 180.0 == NormalizeLongitude(180.0)
605
+ # assert -180.0 == NormalizeLongitude(-180.0)
606
+ # assert -179.0 == NormalizeLongitude(181.0)
607
+ # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
608
+ # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
609
+ # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
610
+ # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
611
+ # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
612
+ # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
613
+ # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
614
+ # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
615
+ # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
616
+ # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
617
+ # The code in logs/storage/validator/logs_validator_traits.cc treats this type
618
+ # as if it were annotated as ST_LOCATION.
619
+ # Corresponds to the JSON property `maxLatLng`
620
+ # @return [Google::Apis::VisionV1::LatLng]
621
+ attr_accessor :max_lat_lng
767
622
 
768
- # Yaw angle, which indicates the leftward/rightward angle that the face is
769
- # pointing relative to the vertical plane perpendicular to the image. Range
770
- # [-180,180].
771
- # Corresponds to the JSON property `panAngle`
772
- # @return [Float]
773
- attr_accessor :pan_angle
623
+ def initialize(**args)
624
+ update!(**args)
625
+ end
774
626
 
775
- # Under-exposed likelihood.
776
- # Corresponds to the JSON property `underExposedLikelihood`
777
- # @return [String]
778
- attr_accessor :under_exposed_likelihood
627
+ # Update properties of this object
628
+ def update!(**args)
629
+ @min_lat_lng = args[:min_lat_lng] if args.key?(:min_lat_lng)
630
+ @max_lat_lng = args[:max_lat_lng] if args.key?(:max_lat_lng)
631
+ end
632
+ end
779
633
 
780
- # Blurred likelihood.
781
- # Corresponds to the JSON property `blurredLikelihood`
782
- # @return [String]
783
- attr_accessor :blurred_likelihood
634
+ # A single symbol representation.
635
+ class Symbol
636
+ include Google::Apis::Core::Hashable
784
637
 
785
- # Headwear likelihood.
786
- # Corresponds to the JSON property `headwearLikelihood`
787
- # @return [String]
788
- attr_accessor :headwear_likelihood
638
+ # Additional information detected on the structural component.
639
+ # Corresponds to the JSON property `property`
640
+ # @return [Google::Apis::VisionV1::TextProperty]
641
+ attr_accessor :property
789
642
 
790
643
  # A bounding polygon for the detected image annotation.
791
- # Corresponds to the JSON property `boundingPoly`
644
+ # Corresponds to the JSON property `boundingBox`
792
645
  # @return [Google::Apis::VisionV1::BoundingPoly]
793
- attr_accessor :bounding_poly
794
-
795
- # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
796
- # of the face relative to the image vertical about the axis perpendicular to
797
- # the face. Range [-180,180].
798
- # Corresponds to the JSON property `rollAngle`
799
- # @return [Float]
800
- attr_accessor :roll_angle
646
+ attr_accessor :bounding_box
801
647
 
802
- # Sorrow likelihood.
803
- # Corresponds to the JSON property `sorrowLikelihood`
648
+ # The actual UTF-8 representation of the symbol.
649
+ # Corresponds to the JSON property `text`
804
650
  # @return [String]
805
- attr_accessor :sorrow_likelihood
806
-
807
- # Pitch angle, which indicates the upwards/downwards angle that the face is
808
- # pointing relative to the image's horizontal plane. Range [-180,180].
809
- # Corresponds to the JSON property `tiltAngle`
810
- # @return [Float]
811
- attr_accessor :tilt_angle
651
+ attr_accessor :text
812
652
 
813
653
  def initialize(**args)
814
654
  update!(**args)
@@ -816,32 +656,20 @@ module Google
816
656
 
817
657
  # Update properties of this object
818
658
  def update!(**args)
819
- @fd_bounding_poly = args[:fd_bounding_poly] if args.key?(:fd_bounding_poly)
820
- @anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood)
821
- @landmarks = args[:landmarks] if args.key?(:landmarks)
822
- @surprise_likelihood = args[:surprise_likelihood] if args.key?(:surprise_likelihood)
823
- @landmarking_confidence = args[:landmarking_confidence] if args.key?(:landmarking_confidence)
824
- @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood)
825
- @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence)
826
- @pan_angle = args[:pan_angle] if args.key?(:pan_angle)
827
- @under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood)
828
- @blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood)
829
- @headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood)
830
- @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
831
- @roll_angle = args[:roll_angle] if args.key?(:roll_angle)
832
- @sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood)
833
- @tilt_angle = args[:tilt_angle] if args.key?(:tilt_angle)
834
- end
659
+ @property = args[:property] if args.key?(:property)
660
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
661
+ @text = args[:text] if args.key?(:text)
662
+ end
835
663
  end
836
664
 
837
- # Multiple image annotation requests are batched into a single service call.
838
- class BatchAnnotateImagesRequest
665
+ # Set of crop hints that are used to generate new crops when serving images.
666
+ class CropHintsAnnotation
839
667
  include Google::Apis::Core::Hashable
840
668
 
841
- # Individual image annotation requests for this batch.
842
- # Corresponds to the JSON property `requests`
843
- # @return [Array<Google::Apis::VisionV1::AnnotateImageRequest>]
844
- attr_accessor :requests
669
+ # Crop hint results.
670
+ # Corresponds to the JSON property `cropHints`
671
+ # @return [Array<Google::Apis::VisionV1::CropHint>]
672
+ attr_accessor :crop_hints
845
673
 
846
674
  def initialize(**args)
847
675
  update!(**args)
@@ -849,24 +677,59 @@ module Google
849
677
 
850
678
  # Update properties of this object
851
679
  def update!(**args)
852
- @requests = args[:requests] if args.key?(:requests)
680
+ @crop_hints = args[:crop_hints] if args.key?(:crop_hints)
853
681
  end
854
682
  end
855
683
 
856
- # Detected start or end of a structural component.
857
- class DetectedBreak
684
+ # An object representing a latitude/longitude pair. This is expressed as a pair
685
+ # of doubles representing degrees latitude and degrees longitude. Unless
686
+ # specified otherwise, this must conform to the
687
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
688
+ # standard</a>. Values must be within normalized ranges.
689
+ # Example of normalization code in Python:
690
+ # def NormalizeLongitude(longitude):
691
+ # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
692
+ # q, r = divmod(longitude, 360.0)
693
+ # if r > 180.0 or (r == 180.0 and q <= -1.0):
694
+ # return r - 360.0
695
+ # return r
696
+ # def NormalizeLatLng(latitude, longitude):
697
+ # """Wraps decimal degrees latitude and longitude to
698
+ # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
699
+ # r = latitude % 360.0
700
+ # if r <= 90.0:
701
+ # return r, NormalizeLongitude(longitude)
702
+ # elif r >= 270.0:
703
+ # return r - 360, NormalizeLongitude(longitude)
704
+ # else:
705
+ # return 180 - r, NormalizeLongitude(longitude + 180.0)
706
+ # assert 180.0 == NormalizeLongitude(180.0)
707
+ # assert -180.0 == NormalizeLongitude(-180.0)
708
+ # assert -179.0 == NormalizeLongitude(181.0)
709
+ # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
710
+ # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
711
+ # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
712
+ # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
713
+ # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
714
+ # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
715
+ # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
716
+ # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
717
+ # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
718
+ # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
719
+ # The code in logs/storage/validator/logs_validator_traits.cc treats this type
720
+ # as if it were annotated as ST_LOCATION.
721
+ class LatLng
858
722
  include Google::Apis::Core::Hashable
859
723
 
860
- # Detected break type.
861
- # Corresponds to the JSON property `type`
862
- # @return [String]
863
- attr_accessor :type
724
+ # The latitude in degrees. It must be in the range [-90.0, +90.0].
725
+ # Corresponds to the JSON property `latitude`
726
+ # @return [Float]
727
+ attr_accessor :latitude
864
728
 
865
- # True if break prepends the element.
866
- # Corresponds to the JSON property `isPrefix`
867
- # @return [Boolean]
868
- attr_accessor :is_prefix
869
- alias_method :is_prefix?, :is_prefix
729
+ # The longitude in degrees. It must be in the range [-180.0, +180.0].
730
+ # Corresponds to the JSON property `longitude`
731
+ # @return [Float]
732
+ attr_accessor :longitude
870
733
 
871
734
  def initialize(**args)
872
735
  update!(**args)
@@ -874,36 +737,140 @@ module Google
874
737
 
875
738
  # Update properties of this object
876
739
  def update!(**args)
877
- @type = args[:type] if args.key?(:type)
878
- @is_prefix = args[:is_prefix] if args.key?(:is_prefix)
740
+ @latitude = args[:latitude] if args.key?(:latitude)
741
+ @longitude = args[:longitude] if args.key?(:longitude)
879
742
  end
880
743
  end
881
744
 
882
- # Image context and/or feature-specific parameters.
883
- class ImageContext
745
+ # Represents a color in the RGBA color space. This representation is designed
746
+ # for simplicity of conversion to/from color representations in various
747
+ # languages over compactness; for example, the fields of this representation
748
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
749
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
750
+ # method in iOS; and, with just a little work, it can be easily formatted into
751
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
752
+ # Example (Java):
753
+ # import com.google.type.Color;
754
+ # // ...
755
+ # public static java.awt.Color fromProto(Color protocolor) `
756
+ # float alpha = protocolor.hasAlpha()
757
+ # ? protocolor.getAlpha().getValue()
758
+ # : 1.0;
759
+ # return new java.awt.Color(
760
+ # protocolor.getRed(),
761
+ # protocolor.getGreen(),
762
+ # protocolor.getBlue(),
763
+ # alpha);
764
+ # `
765
+ # public static Color toProto(java.awt.Color color) `
766
+ # float red = (float) color.getRed();
767
+ # float green = (float) color.getGreen();
768
+ # float blue = (float) color.getBlue();
769
+ # float denominator = 255.0;
770
+ # Color.Builder resultBuilder =
771
+ # Color
772
+ # .newBuilder()
773
+ # .setRed(red / denominator)
774
+ # .setGreen(green / denominator)
775
+ # .setBlue(blue / denominator);
776
+ # int alpha = color.getAlpha();
777
+ # if (alpha != 255) `
778
+ # result.setAlpha(
779
+ # FloatValue
780
+ # .newBuilder()
781
+ # .setValue(((float) alpha) / denominator)
782
+ # .build());
783
+ # `
784
+ # return resultBuilder.build();
785
+ # `
786
+ # // ...
787
+ # Example (iOS / Obj-C):
788
+ # // ...
789
+ # static UIColor* fromProto(Color* protocolor) `
790
+ # float red = [protocolor red];
791
+ # float green = [protocolor green];
792
+ # float blue = [protocolor blue];
793
+ # FloatValue* alpha_wrapper = [protocolor alpha];
794
+ # float alpha = 1.0;
795
+ # if (alpha_wrapper != nil) `
796
+ # alpha = [alpha_wrapper value];
797
+ # `
798
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
799
+ # `
800
+ # static Color* toProto(UIColor* color) `
801
+ # CGFloat red, green, blue, alpha;
802
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
803
+ # return nil;
804
+ # `
805
+ # Color* result = [Color alloc] init];
806
+ # [result setRed:red];
807
+ # [result setGreen:green];
808
+ # [result setBlue:blue];
809
+ # if (alpha <= 0.9999) `
810
+ # [result setAlpha:floatWrapperWithValue(alpha)];
811
+ # `
812
+ # [result autorelease];
813
+ # return result;
814
+ # `
815
+ # // ...
816
+ # Example (JavaScript):
817
+ # // ...
818
+ # var protoToCssColor = function(rgb_color) `
819
+ # var redFrac = rgb_color.red || 0.0;
820
+ # var greenFrac = rgb_color.green || 0.0;
821
+ # var blueFrac = rgb_color.blue || 0.0;
822
+ # var red = Math.floor(redFrac * 255);
823
+ # var green = Math.floor(greenFrac * 255);
824
+ # var blue = Math.floor(blueFrac * 255);
825
+ # if (!('alpha' in rgb_color)) `
826
+ # return rgbToCssColor_(red, green, blue);
827
+ # `
828
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
829
+ # var rgbParams = [red, green, blue].join(',');
830
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
831
+ # `;
832
+ # var rgbToCssColor_ = function(red, green, blue) `
833
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
834
+ # var hexString = rgbNumber.toString(16);
835
+ # var missingZeros = 6 - hexString.length;
836
+ # var resultBuilder = ['#'];
837
+ # for (var i = 0; i < missingZeros; i++) `
838
+ # resultBuilder.push('0');
839
+ # `
840
+ # resultBuilder.push(hexString);
841
+ # return resultBuilder.join('');
842
+ # `;
843
+ # // ...
844
+ class Color
884
845
  include Google::Apis::Core::Hashable
885
846
 
886
- # Rectangle determined by min and max `LatLng` pairs.
887
- # Corresponds to the JSON property `latLongRect`
888
- # @return [Google::Apis::VisionV1::LatLongRect]
889
- attr_accessor :lat_long_rect
847
+ # The amount of red in the color as a value in the interval [0, 1].
848
+ # Corresponds to the JSON property `red`
849
+ # @return [Float]
850
+ attr_accessor :red
890
851
 
891
- # Parameters for crop hints annotation request.
892
- # Corresponds to the JSON property `cropHintsParams`
893
- # @return [Google::Apis::VisionV1::CropHintsParams]
894
- attr_accessor :crop_hints_params
852
+ # The amount of green in the color as a value in the interval [0, 1].
853
+ # Corresponds to the JSON property `green`
854
+ # @return [Float]
855
+ attr_accessor :green
895
856
 
896
- # List of languages to use for TEXT_DETECTION. In most cases, an empty value
897
- # yields the best results since it enables automatic language detection. For
898
- # languages based on the Latin alphabet, setting `language_hints` is not
899
- # needed. In rare cases, when the language of the text in the image is known,
900
- # setting a hint will help get better results (although it will be a
901
- # significant hindrance if the hint is wrong). Text detection returns an
902
- # error if one or more of the specified languages is not one of the
903
- # [supported languages](/vision/docs/languages).
904
- # Corresponds to the JSON property `languageHints`
905
- # @return [Array<String>]
906
- attr_accessor :language_hints
857
+ # The amount of blue in the color as a value in the interval [0, 1].
858
+ # Corresponds to the JSON property `blue`
859
+ # @return [Float]
860
+ attr_accessor :blue
861
+
862
+ # The fraction of this color that should be applied to the pixel. That is,
863
+ # the final pixel color is defined by the equation:
864
+ # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
865
+ # This means that a value of 1.0 corresponds to a solid color, whereas
866
+ # a value of 0.0 corresponds to a completely transparent color. This
867
+ # uses a wrapper message rather than a simple float scalar so that it is
868
+ # possible to distinguish between a default value and the value being unset.
869
+ # If omitted, this color object is to be rendered as a solid color
870
+ # (as if the alpha value had been explicitly given with a value of 1.0).
871
+ # Corresponds to the JSON property `alpha`
872
+ # @return [Float]
873
+ attr_accessor :alpha
907
874
 
908
875
  def initialize(**args)
909
876
  update!(**args)
@@ -911,35 +878,48 @@ module Google
911
878
 
912
879
  # Update properties of this object
913
880
  def update!(**args)
914
- @lat_long_rect = args[:lat_long_rect] if args.key?(:lat_long_rect)
915
- @crop_hints_params = args[:crop_hints_params] if args.key?(:crop_hints_params)
916
- @language_hints = args[:language_hints] if args.key?(:language_hints)
881
+ @red = args[:red] if args.key?(:red)
882
+ @green = args[:green] if args.key?(:green)
883
+ @blue = args[:blue] if args.key?(:blue)
884
+ @alpha = args[:alpha] if args.key?(:alpha)
917
885
  end
918
886
  end
919
887
 
920
- # Detected page from OCR.
921
- class Page
888
+ # Stores image properties, such as dominant colors.
889
+ class ImageProperties
922
890
  include Google::Apis::Core::Hashable
923
891
 
924
- # Page height in pixels.
925
- # Corresponds to the JSON property `height`
926
- # @return [Fixnum]
927
- attr_accessor :height
928
-
929
- # Page width in pixels.
930
- # Corresponds to the JSON property `width`
931
- # @return [Fixnum]
932
- attr_accessor :width
892
+ # Set of dominant colors and their corresponding scores.
893
+ # Corresponds to the JSON property `dominantColors`
894
+ # @return [Google::Apis::VisionV1::DominantColorsAnnotation]
895
+ attr_accessor :dominant_colors
933
896
 
934
- # List of blocks of text, images etc on this page.
935
- # Corresponds to the JSON property `blocks`
936
- # @return [Array<Google::Apis::VisionV1::Block>]
937
- attr_accessor :blocks
897
+ def initialize(**args)
898
+ update!(**args)
899
+ end
938
900
 
939
- # Additional information detected on the structural component.
940
- # Corresponds to the JSON property `property`
941
- # @return [Google::Apis::VisionV1::TextProperty]
942
- attr_accessor :property
901
+ # Update properties of this object
902
+ def update!(**args)
903
+ @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors)
904
+ end
905
+ end
906
+
907
+ # Users describe the type of Google Cloud Vision API tasks to perform over
908
+ # images by using *Feature*s. Each Feature indicates a type of image
909
+ # detection task to perform. Features encode the Cloud Vision API
910
+ # vertical to operate on and the number of top-scoring results to return.
911
+ class Feature
912
+ include Google::Apis::Core::Hashable
913
+
914
+ # The feature type.
915
+ # Corresponds to the JSON property `type`
916
+ # @return [String]
917
+ attr_accessor :type
918
+
919
+ # Maximum number of results of this type.
920
+ # Corresponds to the JSON property `maxResults`
921
+ # @return [Fixnum]
922
+ attr_accessor :max_results
943
923
 
944
924
  def initialize(**args)
945
925
  update!(**args)
@@ -947,32 +927,38 @@ module Google
947
927
 
948
928
  # Update properties of this object
949
929
  def update!(**args)
950
- @height = args[:height] if args.key?(:height)
951
- @width = args[:width] if args.key?(:width)
952
- @blocks = args[:blocks] if args.key?(:blocks)
953
- @property = args[:property] if args.key?(:property)
930
+ @type = args[:type] if args.key?(:type)
931
+ @max_results = args[:max_results] if args.key?(:max_results)
954
932
  end
955
933
  end
956
934
 
957
- # Request for performing Google Cloud Vision API tasks over a user-provided
958
- # image, with user-requested features.
959
- class AnnotateImageRequest
935
+ # Set of features pertaining to the image, computed by computer vision
936
+ # methods over safe-search verticals (for example, adult, spoof, medical,
937
+ # violence).
938
+ class SafeSearchAnnotation
960
939
  include Google::Apis::Core::Hashable
961
940
 
962
- # Image context and/or feature-specific parameters.
963
- # Corresponds to the JSON property `imageContext`
964
- # @return [Google::Apis::VisionV1::ImageContext]
965
- attr_accessor :image_context
941
+ # Represents the adult content likelihood for the image.
942
+ # Corresponds to the JSON property `adult`
943
+ # @return [String]
944
+ attr_accessor :adult
966
945
 
967
- # Client image to perform Google Cloud Vision API tasks over.
968
- # Corresponds to the JSON property `image`
969
- # @return [Google::Apis::VisionV1::Image]
970
- attr_accessor :image
946
+ # Spoof likelihood. The likelihood that an modification
947
+ # was made to the image's canonical version to make it appear
948
+ # funny or offensive.
949
+ # Corresponds to the JSON property `spoof`
950
+ # @return [String]
951
+ attr_accessor :spoof
971
952
 
972
- # Requested features.
973
- # Corresponds to the JSON property `features`
974
- # @return [Array<Google::Apis::VisionV1::Feature>]
975
- attr_accessor :features
953
+ # Likelihood that this is a medical image.
954
+ # Corresponds to the JSON property `medical`
955
+ # @return [String]
956
+ attr_accessor :medical
957
+
958
+ # Violence likelihood.
959
+ # Corresponds to the JSON property `violence`
960
+ # @return [String]
961
+ attr_accessor :violence
976
962
 
977
963
  def initialize(**args)
978
964
  update!(**args)
@@ -980,71 +966,21 @@ module Google
980
966
 
981
967
  # Update properties of this object
982
968
  def update!(**args)
983
- @image_context = args[:image_context] if args.key?(:image_context)
984
- @image = args[:image] if args.key?(:image)
985
- @features = args[:features] if args.key?(:features)
969
+ @adult = args[:adult] if args.key?(:adult)
970
+ @spoof = args[:spoof] if args.key?(:spoof)
971
+ @medical = args[:medical] if args.key?(:medical)
972
+ @violence = args[:violence] if args.key?(:violence)
986
973
  end
987
974
  end
988
975
 
989
- # The `Status` type defines a logical error model that is suitable for different
990
- # programming environments, including REST APIs and RPC APIs. It is used by
991
- # [gRPC](https://github.com/grpc). The error model is designed to be:
992
- # - Simple to use and understand for most users
993
- # - Flexible enough to meet unexpected needs
994
- # # Overview
995
- # The `Status` message contains three pieces of data: error code, error message,
996
- # and error details. The error code should be an enum value of
997
- # google.rpc.Code, but it may accept additional error codes if needed. The
998
- # error message should be a developer-facing English message that helps
999
- # developers *understand* and *resolve* the error. If a localized user-facing
1000
- # error message is needed, put the localized message in the error details or
1001
- # localize it in the client. The optional error details may contain arbitrary
1002
- # information about the error. There is a predefined set of error detail types
1003
- # in the package `google.rpc` which can be used for common error conditions.
1004
- # # Language mapping
1005
- # The `Status` message is the logical representation of the error model, but it
1006
- # is not necessarily the actual wire format. When the `Status` message is
1007
- # exposed in different client libraries and different wire protocols, it can be
1008
- # mapped differently. For example, it will likely be mapped to some exceptions
1009
- # in Java, but more likely mapped to some error codes in C.
1010
- # # Other uses
1011
- # The error model and the `Status` message can be used in a variety of
1012
- # environments, either with or without APIs, to provide a
1013
- # consistent developer experience across different environments.
1014
- # Example uses of this error model include:
1015
- # - Partial errors. If a service needs to return partial errors to the client,
1016
- # it may embed the `Status` in the normal response to indicate the partial
1017
- # errors.
1018
- # - Workflow errors. A typical workflow has multiple steps. Each step may
1019
- # have a `Status` message for error reporting purpose.
1020
- # - Batch operations. If a client uses batch request and batch response, the
1021
- # `Status` message should be used directly inside batch response, one for
1022
- # each error sub-response.
1023
- # - Asynchronous operations. If an API call embeds asynchronous operation
1024
- # results in its response, the status of those operations should be
1025
- # represented directly using the `Status` message.
1026
- # - Logging. If some API errors are stored in logs, the message `Status` could
1027
- # be used directly after any stripping needed for security/privacy reasons.
1028
- class Status
976
+ # Set of dominant colors and their corresponding scores.
977
+ class DominantColorsAnnotation
1029
978
  include Google::Apis::Core::Hashable
1030
979
 
1031
- # A list of messages that carry the error details. There will be a
1032
- # common set of message types for APIs to use.
1033
- # Corresponds to the JSON property `details`
1034
- # @return [Array<Hash<String,Object>>]
1035
- attr_accessor :details
1036
-
1037
- # The status code, which should be an enum value of google.rpc.Code.
1038
- # Corresponds to the JSON property `code`
1039
- # @return [Fixnum]
1040
- attr_accessor :code
1041
-
1042
- # A developer-facing error message, which should be in English. Any
1043
- # user-facing error message should be localized and sent in the
1044
- # google.rpc.Status.details field, or localized by the client.
1045
- # Corresponds to the JSON property `message`
1046
- # @return [String]
1047
- attr_accessor :message
980
+ # RGB color values with their score and pixel fraction.
981
+ # Corresponds to the JSON property `colors`
982
+ # @return [Array<Google::Apis::VisionV1::ColorInfo>]
983
+ attr_accessor :colors
1048
984
 
1049
985
  def initialize(**args)
1050
986
  update!(**args)
@@ -1052,27 +988,26 @@ module Google
1052
988
 
1053
989
  # Update properties of this object
1054
990
  def update!(**args)
1055
- @details = args[:details] if args.key?(:details)
1056
- @code = args[:code] if args.key?(:code)
1057
- @message = args[:message] if args.key?(:message)
991
+ @colors = args[:colors] if args.key?(:colors)
1058
992
  end
1059
993
  end
1060
994
 
1061
- # A single symbol representation.
1062
- class Symbol
995
+ # TextAnnotation contains a structured representation of OCR extracted text.
996
+ # The hierarchy of an OCR extracted text structure is like this:
997
+ # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
998
+ # Each structural component, starting from Page, may further have their own
999
+ # properties. Properties describe detected languages, breaks etc.. Please
1000
+ # refer to the google.cloud.vision.v1.TextAnnotation.TextProperty message
1001
+ # definition below for more detail.
1002
+ class TextAnnotation
1063
1003
  include Google::Apis::Core::Hashable
1064
1004
 
1065
- # Additional information detected on the structural component.
1066
- # Corresponds to the JSON property `property`
1067
- # @return [Google::Apis::VisionV1::TextProperty]
1068
- attr_accessor :property
1069
-
1070
- # A bounding polygon for the detected image annotation.
1071
- # Corresponds to the JSON property `boundingBox`
1072
- # @return [Google::Apis::VisionV1::BoundingPoly]
1073
- attr_accessor :bounding_box
1005
+ # List of pages detected by OCR.
1006
+ # Corresponds to the JSON property `pages`
1007
+ # @return [Array<Google::Apis::VisionV1::Page>]
1008
+ attr_accessor :pages
1074
1009
 
1075
- # The actual UTF-8 representation of the symbol.
1010
+ # UTF-8 text detected on the pages.
1076
1011
  # Corresponds to the JSON property `text`
1077
1012
  # @return [String]
1078
1013
  attr_accessor :text
@@ -1083,97 +1018,25 @@ module Google
1083
1018
 
1084
1019
  # Update properties of this object
1085
1020
  def update!(**args)
1086
- @property = args[:property] if args.key?(:property)
1087
- @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
1021
+ @pages = args[:pages] if args.key?(:pages)
1088
1022
  @text = args[:text] if args.key?(:text)
1089
1023
  end
1090
1024
  end
1091
1025
 
1092
- # Rectangle determined by min and max `LatLng` pairs.
1093
- class LatLongRect
1026
+ # A vertex represents a 2D point in the image.
1027
+ # NOTE: the vertex coordinates are in the same scale as the original image.
1028
+ class Vertex
1094
1029
  include Google::Apis::Core::Hashable
1095
1030
 
1096
- # An object representing a latitude/longitude pair. This is expressed as a pair
1097
- # of doubles representing degrees latitude and degrees longitude. Unless
1098
- # specified otherwise, this must conform to the
1099
- # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1100
- # standard</a>. Values must be within normalized ranges.
1101
- # Example of normalization code in Python:
1102
- # def NormalizeLongitude(longitude):
1103
- # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
1104
- # q, r = divmod(longitude, 360.0)
1105
- # if r > 180.0 or (r == 180.0 and q <= -1.0):
1106
- # return r - 360.0
1107
- # return r
1108
- # def NormalizeLatLng(latitude, longitude):
1109
- # """Wraps decimal degrees latitude and longitude to
1110
- # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
1111
- # r = latitude % 360.0
1112
- # if r <= 90.0:
1113
- # return r, NormalizeLongitude(longitude)
1114
- # elif r >= 270.0:
1115
- # return r - 360, NormalizeLongitude(longitude)
1116
- # else:
1117
- # return 180 - r, NormalizeLongitude(longitude + 180.0)
1118
- # assert 180.0 == NormalizeLongitude(180.0)
1119
- # assert -180.0 == NormalizeLongitude(-180.0)
1120
- # assert -179.0 == NormalizeLongitude(181.0)
1121
- # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
1122
- # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
1123
- # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
1124
- # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
1125
- # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
1126
- # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
1127
- # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
1128
- # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
1129
- # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
1130
- # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
1131
- # The code in logs/storage/validator/logs_validator_traits.cc treats this type
1132
- # as if it were annotated as ST_LOCATION.
1133
- # Corresponds to the JSON property `minLatLng`
1134
- # @return [Google::Apis::VisionV1::LatLng]
1135
- attr_accessor :min_lat_lng
1031
+ # Y coordinate.
1032
+ # Corresponds to the JSON property `y`
1033
+ # @return [Fixnum]
1034
+ attr_accessor :y
1136
1035
 
1137
- # An object representing a latitude/longitude pair. This is expressed as a pair
1138
- # of doubles representing degrees latitude and degrees longitude. Unless
1139
- # specified otherwise, this must conform to the
1140
- # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1141
- # standard</a>. Values must be within normalized ranges.
1142
- # Example of normalization code in Python:
1143
- # def NormalizeLongitude(longitude):
1144
- # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
1145
- # q, r = divmod(longitude, 360.0)
1146
- # if r > 180.0 or (r == 180.0 and q <= -1.0):
1147
- # return r - 360.0
1148
- # return r
1149
- # def NormalizeLatLng(latitude, longitude):
1150
- # """Wraps decimal degrees latitude and longitude to
1151
- # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
1152
- # r = latitude % 360.0
1153
- # if r <= 90.0:
1154
- # return r, NormalizeLongitude(longitude)
1155
- # elif r >= 270.0:
1156
- # return r - 360, NormalizeLongitude(longitude)
1157
- # else:
1158
- # return 180 - r, NormalizeLongitude(longitude + 180.0)
1159
- # assert 180.0 == NormalizeLongitude(180.0)
1160
- # assert -180.0 == NormalizeLongitude(-180.0)
1161
- # assert -179.0 == NormalizeLongitude(181.0)
1162
- # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
1163
- # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
1164
- # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
1165
- # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
1166
- # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
1167
- # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
1168
- # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
1169
- # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
1170
- # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
1171
- # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
1172
- # The code in logs/storage/validator/logs_validator_traits.cc treats this type
1173
- # as if it were annotated as ST_LOCATION.
1174
- # Corresponds to the JSON property `maxLatLng`
1175
- # @return [Google::Apis::VisionV1::LatLng]
1176
- attr_accessor :max_lat_lng
1036
+ # X coordinate.
1037
+ # Corresponds to the JSON property `x`
1038
+ # @return [Fixnum]
1039
+ attr_accessor :x
1177
1040
 
1178
1041
  def initialize(**args)
1179
1042
  update!(**args)
@@ -1181,19 +1044,26 @@ module Google
1181
1044
 
1182
1045
  # Update properties of this object
1183
1046
  def update!(**args)
1184
- @min_lat_lng = args[:min_lat_lng] if args.key?(:min_lat_lng)
1185
- @max_lat_lng = args[:max_lat_lng] if args.key?(:max_lat_lng)
1047
+ @y = args[:y] if args.key?(:y)
1048
+ @x = args[:x] if args.key?(:x)
1186
1049
  end
1187
1050
  end
1188
1051
 
1189
- # Set of crop hints that are used to generate new crops when serving images.
1190
- class CropHintsAnnotation
1052
+ # Detected language for a structural component.
1053
+ class DetectedLanguage
1191
1054
  include Google::Apis::Core::Hashable
1192
1055
 
1193
- # Crop hint results.
1194
- # Corresponds to the JSON property `cropHints`
1195
- # @return [Array<Google::Apis::VisionV1::CropHint>]
1196
- attr_accessor :crop_hints
1056
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
1057
+ # information, see
1058
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1059
+ # Corresponds to the JSON property `languageCode`
1060
+ # @return [String]
1061
+ attr_accessor :language_code
1062
+
1063
+ # Confidence of detected language. Range [0, 1].
1064
+ # Corresponds to the JSON property `confidence`
1065
+ # @return [Float]
1066
+ attr_accessor :confidence
1197
1067
 
1198
1068
  def initialize(**args)
1199
1069
  update!(**args)
@@ -1201,59 +1071,225 @@ module Google
1201
1071
 
1202
1072
  # Update properties of this object
1203
1073
  def update!(**args)
1204
- @crop_hints = args[:crop_hints] if args.key?(:crop_hints)
1074
+ @language_code = args[:language_code] if args.key?(:language_code)
1075
+ @confidence = args[:confidence] if args.key?(:confidence)
1205
1076
  end
1206
1077
  end
1207
1078
 
1208
- # An object representing a latitude/longitude pair. This is expressed as a pair
1209
- # of doubles representing degrees latitude and degrees longitude. Unless
1210
- # specified otherwise, this must conform to the
1211
- # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1212
- # standard</a>. Values must be within normalized ranges.
1213
- # Example of normalization code in Python:
1214
- # def NormalizeLongitude(longitude):
1215
- # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
1216
- # q, r = divmod(longitude, 360.0)
1217
- # if r > 180.0 or (r == 180.0 and q <= -1.0):
1218
- # return r - 360.0
1219
- # return r
1220
- # def NormalizeLatLng(latitude, longitude):
1221
- # """Wraps decimal degrees latitude and longitude to
1222
- # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
1223
- # r = latitude % 360.0
1224
- # if r <= 90.0:
1225
- # return r, NormalizeLongitude(longitude)
1226
- # elif r >= 270.0:
1227
- # return r - 360, NormalizeLongitude(longitude)
1228
- # else:
1229
- # return 180 - r, NormalizeLongitude(longitude + 180.0)
1230
- # assert 180.0 == NormalizeLongitude(180.0)
1231
- # assert -180.0 == NormalizeLongitude(-180.0)
1232
- # assert -179.0 == NormalizeLongitude(181.0)
1233
- # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
1234
- # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
1235
- # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
1236
- # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
1237
- # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
1238
- # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
1239
- # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
1240
- # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
1241
- # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
1242
- # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
1243
- # The code in logs/storage/validator/logs_validator_traits.cc treats this type
1244
- # as if it were annotated as ST_LOCATION.
1245
- class LatLng
1079
+ # Additional information detected on the structural component.
1080
+ class TextProperty
1081
+ include Google::Apis::Core::Hashable
1082
+
1083
+ # Detected start or end of a structural component.
1084
+ # Corresponds to the JSON property `detectedBreak`
1085
+ # @return [Google::Apis::VisionV1::DetectedBreak]
1086
+ attr_accessor :detected_break
1087
+
1088
+ # A list of detected languages together with confidence.
1089
+ # Corresponds to the JSON property `detectedLanguages`
1090
+ # @return [Array<Google::Apis::VisionV1::DetectedLanguage>]
1091
+ attr_accessor :detected_languages
1092
+
1093
+ def initialize(**args)
1094
+ update!(**args)
1095
+ end
1096
+
1097
+ # Update properties of this object
1098
+ def update!(**args)
1099
+ @detected_break = args[:detected_break] if args.key?(:detected_break)
1100
+ @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
1101
+ end
1102
+ end
1103
+
1104
+ # A bounding polygon for the detected image annotation.
1105
+ class BoundingPoly
1106
+ include Google::Apis::Core::Hashable
1107
+
1108
+ # The bounding polygon vertices.
1109
+ # Corresponds to the JSON property `vertices`
1110
+ # @return [Array<Google::Apis::VisionV1::Vertex>]
1111
+ attr_accessor :vertices
1112
+
1113
+ def initialize(**args)
1114
+ update!(**args)
1115
+ end
1116
+
1117
+ # Update properties of this object
1118
+ def update!(**args)
1119
+ @vertices = args[:vertices] if args.key?(:vertices)
1120
+ end
1121
+ end
1122
+
1123
+ # Entity deduced from similar images on the Internet.
1124
+ class WebEntity
1125
+ include Google::Apis::Core::Hashable
1126
+
1127
+ # Opaque entity ID.
1128
+ # Corresponds to the JSON property `entityId`
1129
+ # @return [String]
1130
+ attr_accessor :entity_id
1131
+
1132
+ # Canonical description of the entity, in English.
1133
+ # Corresponds to the JSON property `description`
1134
+ # @return [String]
1135
+ attr_accessor :description
1136
+
1137
+ # Overall relevancy score for the entity.
1138
+ # Not normalized and not comparable across different image queries.
1139
+ # Corresponds to the JSON property `score`
1140
+ # @return [Float]
1141
+ attr_accessor :score
1142
+
1143
+ def initialize(**args)
1144
+ update!(**args)
1145
+ end
1146
+
1147
+ # Update properties of this object
1148
+ def update!(**args)
1149
+ @entity_id = args[:entity_id] if args.key?(:entity_id)
1150
+ @description = args[:description] if args.key?(:description)
1151
+ @score = args[:score] if args.key?(:score)
1152
+ end
1153
+ end
1154
+
1155
+ # Response to an image annotation request.
1156
+ class AnnotateImageResponse
1157
+ include Google::Apis::Core::Hashable
1158
+
1159
+ # If present, text (OCR) detection has completed successfully.
1160
+ # Corresponds to the JSON property `textAnnotations`
1161
+ # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
1162
+ attr_accessor :text_annotations
1163
+
1164
+ # Stores image properties, such as dominant colors.
1165
+ # Corresponds to the JSON property `imagePropertiesAnnotation`
1166
+ # @return [Google::Apis::VisionV1::ImageProperties]
1167
+ attr_accessor :image_properties_annotation
1168
+
1169
+ # If present, face detection has completed successfully.
1170
+ # Corresponds to the JSON property `faceAnnotations`
1171
+ # @return [Array<Google::Apis::VisionV1::FaceAnnotation>]
1172
+ attr_accessor :face_annotations
1173
+
1174
+ # If present, logo detection has completed successfully.
1175
+ # Corresponds to the JSON property `logoAnnotations`
1176
+ # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
1177
+ attr_accessor :logo_annotations
1178
+
1179
+ # Set of crop hints that are used to generate new crops when serving images.
1180
+ # Corresponds to the JSON property `cropHintsAnnotation`
1181
+ # @return [Google::Apis::VisionV1::CropHintsAnnotation]
1182
+ attr_accessor :crop_hints_annotation
1183
+
1184
+ # Relevant information for the image from the Internet.
1185
+ # Corresponds to the JSON property `webDetection`
1186
+ # @return [Google::Apis::VisionV1::WebDetection]
1187
+ attr_accessor :web_detection
1188
+
1189
+ # If present, label detection has completed successfully.
1190
+ # Corresponds to the JSON property `labelAnnotations`
1191
+ # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
1192
+ attr_accessor :label_annotations
1193
+
1194
+ # Set of features pertaining to the image, computed by computer vision
1195
+ # methods over safe-search verticals (for example, adult, spoof, medical,
1196
+ # violence).
1197
+ # Corresponds to the JSON property `safeSearchAnnotation`
1198
+ # @return [Google::Apis::VisionV1::SafeSearchAnnotation]
1199
+ attr_accessor :safe_search_annotation
1200
+
1201
+ # The `Status` type defines a logical error model that is suitable for different
1202
+ # programming environments, including REST APIs and RPC APIs. It is used by
1203
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
1204
+ # - Simple to use and understand for most users
1205
+ # - Flexible enough to meet unexpected needs
1206
+ # # Overview
1207
+ # The `Status` message contains three pieces of data: error code, error message,
1208
+ # and error details. The error code should be an enum value of
1209
+ # google.rpc.Code, but it may accept additional error codes if needed. The
1210
+ # error message should be a developer-facing English message that helps
1211
+ # developers *understand* and *resolve* the error. If a localized user-facing
1212
+ # error message is needed, put the localized message in the error details or
1213
+ # localize it in the client. The optional error details may contain arbitrary
1214
+ # information about the error. There is a predefined set of error detail types
1215
+ # in the package `google.rpc` which can be used for common error conditions.
1216
+ # # Language mapping
1217
+ # The `Status` message is the logical representation of the error model, but it
1218
+ # is not necessarily the actual wire format. When the `Status` message is
1219
+ # exposed in different client libraries and different wire protocols, it can be
1220
+ # mapped differently. For example, it will likely be mapped to some exceptions
1221
+ # in Java, but more likely mapped to some error codes in C.
1222
+ # # Other uses
1223
+ # The error model and the `Status` message can be used in a variety of
1224
+ # environments, either with or without APIs, to provide a
1225
+ # consistent developer experience across different environments.
1226
+ # Example uses of this error model include:
1227
+ # - Partial errors. If a service needs to return partial errors to the client,
1228
+ # it may embed the `Status` in the normal response to indicate the partial
1229
+ # errors.
1230
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
1231
+ # have a `Status` message for error reporting purpose.
1232
+ # - Batch operations. If a client uses batch request and batch response, the
1233
+ # `Status` message should be used directly inside batch response, one for
1234
+ # each error sub-response.
1235
+ # - Asynchronous operations. If an API call embeds asynchronous operation
1236
+ # results in its response, the status of those operations should be
1237
+ # represented directly using the `Status` message.
1238
+ # - Logging. If some API errors are stored in logs, the message `Status` could
1239
+ # be used directly after any stripping needed for security/privacy reasons.
1240
+ # Corresponds to the JSON property `error`
1241
+ # @return [Google::Apis::VisionV1::Status]
1242
+ attr_accessor :error
1243
+
1244
+ # TextAnnotation contains a structured representation of OCR extracted text.
1245
+ # The hierarchy of an OCR extracted text structure is like this:
1246
+ # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
1247
+ # Each structural component, starting from Page, may further have their own
1248
+ # properties. Properties describe detected languages, breaks etc.. Please
1249
+ # refer to the google.cloud.vision.v1.TextAnnotation.TextProperty message
1250
+ # definition below for more detail.
1251
+ # Corresponds to the JSON property `fullTextAnnotation`
1252
+ # @return [Google::Apis::VisionV1::TextAnnotation]
1253
+ attr_accessor :full_text_annotation
1254
+
1255
+ # If present, landmark detection has completed successfully.
1256
+ # Corresponds to the JSON property `landmarkAnnotations`
1257
+ # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
1258
+ attr_accessor :landmark_annotations
1259
+
1260
+ def initialize(**args)
1261
+ update!(**args)
1262
+ end
1263
+
1264
+ # Update properties of this object
1265
+ def update!(**args)
1266
+ @text_annotations = args[:text_annotations] if args.key?(:text_annotations)
1267
+ @image_properties_annotation = args[:image_properties_annotation] if args.key?(:image_properties_annotation)
1268
+ @face_annotations = args[:face_annotations] if args.key?(:face_annotations)
1269
+ @logo_annotations = args[:logo_annotations] if args.key?(:logo_annotations)
1270
+ @crop_hints_annotation = args[:crop_hints_annotation] if args.key?(:crop_hints_annotation)
1271
+ @web_detection = args[:web_detection] if args.key?(:web_detection)
1272
+ @label_annotations = args[:label_annotations] if args.key?(:label_annotations)
1273
+ @safe_search_annotation = args[:safe_search_annotation] if args.key?(:safe_search_annotation)
1274
+ @error = args[:error] if args.key?(:error)
1275
+ @full_text_annotation = args[:full_text_annotation] if args.key?(:full_text_annotation)
1276
+ @landmark_annotations = args[:landmark_annotations] if args.key?(:landmark_annotations)
1277
+ end
1278
+ end
1279
+
1280
+ # Parameters for crop hints annotation request.
1281
+ class CropHintsParams
1246
1282
  include Google::Apis::Core::Hashable
1247
1283
 
1248
- # The latitude in degrees. It must be in the range [-90.0, +90.0].
1249
- # Corresponds to the JSON property `latitude`
1250
- # @return [Float]
1251
- attr_accessor :latitude
1252
-
1253
- # The longitude in degrees. It must be in the range [-180.0, +180.0].
1254
- # Corresponds to the JSON property `longitude`
1255
- # @return [Float]
1256
- attr_accessor :longitude
1284
+ # Aspect ratios in floats, representing the ratio of the width to the height
1285
+ # of the image. For example, if the desired aspect ratio is 4/3, the
1286
+ # corresponding float value should be 1.33333. If not specified, the
1287
+ # best possible crop is returned. The number of provided aspect ratios is
1288
+ # limited to a maximum of 16; any aspect ratios provided after the 16th are
1289
+ # ignored.
1290
+ # Corresponds to the JSON property `aspectRatios`
1291
+ # @return [Array<Float>]
1292
+ attr_accessor :aspect_ratios
1257
1293
 
1258
1294
  def initialize(**args)
1259
1295
  update!(**args)
@@ -1261,140 +1297,33 @@ module Google
1261
1297
 
1262
1298
  # Update properties of this object
1263
1299
  def update!(**args)
1264
- @latitude = args[:latitude] if args.key?(:latitude)
1265
- @longitude = args[:longitude] if args.key?(:longitude)
1300
+ @aspect_ratios = args[:aspect_ratios] if args.key?(:aspect_ratios)
1266
1301
  end
1267
1302
  end
1268
1303
 
1269
- # Represents a color in the RGBA color space. This representation is designed
1270
- # for simplicity of conversion to/from color representations in various
1271
- # languages over compactness; for example, the fields of this representation
1272
- # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1273
- # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1274
- # method in iOS; and, with just a little work, it can be easily formatted into
1275
- # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1276
- # Example (Java):
1277
- # import com.google.type.Color;
1278
- # // ...
1279
- # public static java.awt.Color fromProto(Color protocolor) `
1280
- # float alpha = protocolor.hasAlpha()
1281
- # ? protocolor.getAlpha().getValue()
1282
- # : 1.0;
1283
- # return new java.awt.Color(
1284
- # protocolor.getRed(),
1285
- # protocolor.getGreen(),
1286
- # protocolor.getBlue(),
1287
- # alpha);
1288
- # `
1289
- # public static Color toProto(java.awt.Color color) `
1290
- # float red = (float) color.getRed();
1291
- # float green = (float) color.getGreen();
1292
- # float blue = (float) color.getBlue();
1293
- # float denominator = 255.0;
1294
- # Color.Builder resultBuilder =
1295
- # Color
1296
- # .newBuilder()
1297
- # .setRed(red / denominator)
1298
- # .setGreen(green / denominator)
1299
- # .setBlue(blue / denominator);
1300
- # int alpha = color.getAlpha();
1301
- # if (alpha != 255) `
1302
- # result.setAlpha(
1303
- # FloatValue
1304
- # .newBuilder()
1305
- # .setValue(((float) alpha) / denominator)
1306
- # .build());
1307
- # `
1308
- # return resultBuilder.build();
1309
- # `
1310
- # // ...
1311
- # Example (iOS / Obj-C):
1312
- # // ...
1313
- # static UIColor* fromProto(Color* protocolor) `
1314
- # float red = [protocolor red];
1315
- # float green = [protocolor green];
1316
- # float blue = [protocolor blue];
1317
- # FloatValue* alpha_wrapper = [protocolor alpha];
1318
- # float alpha = 1.0;
1319
- # if (alpha_wrapper != nil) `
1320
- # alpha = [alpha_wrapper value];
1321
- # `
1322
- # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1323
- # `
1324
- # static Color* toProto(UIColor* color) `
1325
- # CGFloat red, green, blue, alpha;
1326
- # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
1327
- # return nil;
1328
- # `
1329
- # Color* result = [Color alloc] init];
1330
- # [result setRed:red];
1331
- # [result setGreen:green];
1332
- # [result setBlue:blue];
1333
- # if (alpha <= 0.9999) `
1334
- # [result setAlpha:floatWrapperWithValue(alpha)];
1335
- # `
1336
- # [result autorelease];
1337
- # return result;
1338
- # `
1339
- # // ...
1340
- # Example (JavaScript):
1341
- # // ...
1342
- # var protoToCssColor = function(rgb_color) `
1343
- # var redFrac = rgb_color.red || 0.0;
1344
- # var greenFrac = rgb_color.green || 0.0;
1345
- # var blueFrac = rgb_color.blue || 0.0;
1346
- # var red = Math.floor(redFrac * 255);
1347
- # var green = Math.floor(greenFrac * 255);
1348
- # var blue = Math.floor(blueFrac * 255);
1349
- # if (!('alpha' in rgb_color)) `
1350
- # return rgbToCssColor_(red, green, blue);
1351
- # `
1352
- # var alphaFrac = rgb_color.alpha.value || 0.0;
1353
- # var rgbParams = [red, green, blue].join(',');
1354
- # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1355
- # `;
1356
- # var rgbToCssColor_ = function(red, green, blue) `
1357
- # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1358
- # var hexString = rgbNumber.toString(16);
1359
- # var missingZeros = 6 - hexString.length;
1360
- # var resultBuilder = ['#'];
1361
- # for (var i = 0; i < missingZeros; i++) `
1362
- # resultBuilder.push('0');
1363
- # `
1364
- # resultBuilder.push(hexString);
1365
- # return resultBuilder.join('');
1366
- # `;
1367
- # // ...
1368
- class Color
1304
+ # Logical element on the page.
1305
+ class Block
1369
1306
  include Google::Apis::Core::Hashable
1370
1307
 
1371
- # The amount of red in the color as a value in the interval [0, 1].
1372
- # Corresponds to the JSON property `red`
1373
- # @return [Float]
1374
- attr_accessor :red
1308
+ # Additional information detected on the structural component.
1309
+ # Corresponds to the JSON property `property`
1310
+ # @return [Google::Apis::VisionV1::TextProperty]
1311
+ attr_accessor :property
1375
1312
 
1376
- # The amount of green in the color as a value in the interval [0, 1].
1377
- # Corresponds to the JSON property `green`
1378
- # @return [Float]
1379
- attr_accessor :green
1313
+ # Detected block type (text, image etc) for this block.
1314
+ # Corresponds to the JSON property `blockType`
1315
+ # @return [String]
1316
+ attr_accessor :block_type
1380
1317
 
1381
- # The amount of blue in the color as a value in the interval [0, 1].
1382
- # Corresponds to the JSON property `blue`
1383
- # @return [Float]
1384
- attr_accessor :blue
1318
+ # A bounding polygon for the detected image annotation.
1319
+ # Corresponds to the JSON property `boundingBox`
1320
+ # @return [Google::Apis::VisionV1::BoundingPoly]
1321
+ attr_accessor :bounding_box
1385
1322
 
1386
- # The fraction of this color that should be applied to the pixel. That is,
1387
- # the final pixel color is defined by the equation:
1388
- # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1389
- # This means that a value of 1.0 corresponds to a solid color, whereas
1390
- # a value of 0.0 corresponds to a completely transparent color. This
1391
- # uses a wrapper message rather than a simple float scalar so that it is
1392
- # possible to distinguish between a default value and the value being unset.
1393
- # If omitted, this color object is to be rendered as a solid color
1394
- # (as if the alpha value had been explicitly given with a value of 1.0).
1395
- # Corresponds to the JSON property `alpha`
1396
- # @return [Float]
1397
- attr_accessor :alpha
1323
+ # List of paragraphs in this block (if this blocks is of type text).
1324
+ # Corresponds to the JSON property `paragraphs`
1325
+ # @return [Array<Google::Apis::VisionV1::Paragraph>]
1326
+ attr_accessor :paragraphs
1398
1327
 
1399
1328
  def initialize(**args)
1400
1329
  update!(**args)
@@ -1402,21 +1331,31 @@ module Google
1402
1331
 
1403
1332
  # Update properties of this object
1404
1333
  def update!(**args)
1405
- @red = args[:red] if args.key?(:red)
1406
- @green = args[:green] if args.key?(:green)
1407
- @blue = args[:blue] if args.key?(:blue)
1408
- @alpha = args[:alpha] if args.key?(:alpha)
1334
+ @property = args[:property] if args.key?(:property)
1335
+ @block_type = args[:block_type] if args.key?(:block_type)
1336
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
1337
+ @paragraphs = args[:paragraphs] if args.key?(:paragraphs)
1409
1338
  end
1410
1339
  end
1411
1340
 
1412
- # Stores image properties, such as dominant colors.
1413
- class ImageProperties
1341
+ # A `Property` consists of a user-supplied name/value pair.
1342
+ class Property
1414
1343
  include Google::Apis::Core::Hashable
1415
1344
 
1416
- # Set of dominant colors and their corresponding scores.
1417
- # Corresponds to the JSON property `dominantColors`
1418
- # @return [Google::Apis::VisionV1::DominantColorsAnnotation]
1419
- attr_accessor :dominant_colors
1345
+ # Value of the property.
1346
+ # Corresponds to the JSON property `value`
1347
+ # @return [String]
1348
+ attr_accessor :value
1349
+
1350
+ # Value of numeric properties.
1351
+ # Corresponds to the JSON property `uint64Value`
1352
+ # @return [Fixnum]
1353
+ attr_accessor :uint64_value
1354
+
1355
+ # Name of the property.
1356
+ # Corresponds to the JSON property `name`
1357
+ # @return [String]
1358
+ attr_accessor :name
1420
1359
 
1421
1360
  def initialize(**args)
1422
1361
  update!(**args)
@@ -1424,26 +1363,56 @@ module Google
1424
1363
 
1425
1364
  # Update properties of this object
1426
1365
  def update!(**args)
1427
- @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors)
1366
+ @value = args[:value] if args.key?(:value)
1367
+ @uint64_value = args[:uint64_value] if args.key?(:uint64_value)
1368
+ @name = args[:name] if args.key?(:name)
1428
1369
  end
1429
1370
  end
1430
1371
 
1431
- # Users describe the type of Google Cloud Vision API tasks to perform over
1432
- # images by using *Feature*s. Each Feature indicates a type of image
1433
- # detection task to perform. Features encode the Cloud Vision API
1434
- # vertical to operate on and the number of top-scoring results to return.
1435
- class Feature
1372
+ # Detected entity location information.
1373
+ class LocationInfo
1436
1374
  include Google::Apis::Core::Hashable
1437
1375
 
1438
- # The feature type.
1439
- # Corresponds to the JSON property `type`
1440
- # @return [String]
1441
- attr_accessor :type
1442
-
1443
- # Maximum number of results of this type.
1444
- # Corresponds to the JSON property `maxResults`
1445
- # @return [Fixnum]
1446
- attr_accessor :max_results
1376
+ # An object representing a latitude/longitude pair. This is expressed as a pair
1377
+ # of doubles representing degrees latitude and degrees longitude. Unless
1378
+ # specified otherwise, this must conform to the
1379
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1380
+ # standard</a>. Values must be within normalized ranges.
1381
+ # Example of normalization code in Python:
1382
+ # def NormalizeLongitude(longitude):
1383
+ # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
1384
+ # q, r = divmod(longitude, 360.0)
1385
+ # if r > 180.0 or (r == 180.0 and q <= -1.0):
1386
+ # return r - 360.0
1387
+ # return r
1388
+ # def NormalizeLatLng(latitude, longitude):
1389
+ # """Wraps decimal degrees latitude and longitude to
1390
+ # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
1391
+ # r = latitude % 360.0
1392
+ # if r <= 90.0:
1393
+ # return r, NormalizeLongitude(longitude)
1394
+ # elif r >= 270.0:
1395
+ # return r - 360, NormalizeLongitude(longitude)
1396
+ # else:
1397
+ # return 180 - r, NormalizeLongitude(longitude + 180.0)
1398
+ # assert 180.0 == NormalizeLongitude(180.0)
1399
+ # assert -180.0 == NormalizeLongitude(-180.0)
1400
+ # assert -179.0 == NormalizeLongitude(181.0)
1401
+ # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
1402
+ # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
1403
+ # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
1404
+ # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
1405
+ # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
1406
+ # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
1407
+ # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
1408
+ # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
1409
+ # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
1410
+ # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
1411
+ # The code in logs/storage/validator/logs_validator_traits.cc treats this type
1412
+ # as if it were annotated as ST_LOCATION.
1413
+ # Corresponds to the JSON property `latLng`
1414
+ # @return [Google::Apis::VisionV1::LatLng]
1415
+ attr_accessor :lat_lng
1447
1416
 
1448
1417
  def initialize(**args)
1449
1418
  update!(**args)
@@ -1451,38 +1420,37 @@ module Google
1451
1420
 
1452
1421
  # Update properties of this object
1453
1422
  def update!(**args)
1454
- @type = args[:type] if args.key?(:type)
1455
- @max_results = args[:max_results] if args.key?(:max_results)
1423
+ @lat_lng = args[:lat_lng] if args.key?(:lat_lng)
1456
1424
  end
1457
1425
  end
1458
1426
 
1459
- # Set of features pertaining to the image, computed by computer vision
1460
- # methods over safe-search verticals (for example, adult, spoof, medical,
1461
- # violence).
1462
- class SafeSearchAnnotation
1427
+ # External image source (Google Cloud Storage image location).
1428
+ class ImageSource
1463
1429
  include Google::Apis::Core::Hashable
1464
1430
 
1465
- # Violence likelihood.
1466
- # Corresponds to the JSON property `violence`
1467
- # @return [String]
1468
- attr_accessor :violence
1469
-
1470
- # Represents the adult content likelihood for the image.
1471
- # Corresponds to the JSON property `adult`
1472
- # @return [String]
1473
- attr_accessor :adult
1474
-
1475
- # Spoof likelihood. The likelihood that an modification
1476
- # was made to the image's canonical version to make it appear
1477
- # funny or offensive.
1478
- # Corresponds to the JSON property `spoof`
1431
+ # NOTE: For new code `image_uri` below is preferred.
1432
+ # Google Cloud Storage image URI, which must be in the following form:
1433
+ # `gs://bucket_name/object_name` (for details, see
1434
+ # [Google Cloud Storage Request
1435
+ # URIs](https://cloud.google.com/storage/docs/reference-uris)).
1436
+ # NOTE: Cloud Storage object versioning is not supported.
1437
+ # Corresponds to the JSON property `gcsImageUri`
1479
1438
  # @return [String]
1480
- attr_accessor :spoof
1439
+ attr_accessor :gcs_image_uri
1481
1440
 
1482
- # Likelihood that this is a medical image.
1483
- # Corresponds to the JSON property `medical`
1441
+ # Image URI which supports:
1442
+ # 1) Google Cloud Storage image URI, which must be in the following form:
1443
+ # `gs://bucket_name/object_name` (for details, see
1444
+ # [Google Cloud Storage Request
1445
+ # URIs](https://cloud.google.com/storage/docs/reference-uris)).
1446
+ # NOTE: Cloud Storage object versioning is not supported.
1447
+ # 2) Publicly accessible image HTTP/HTTPS URL.
1448
+ # This is preferred over the legacy `gcs_image_uri` above. When both
1449
+ # `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
1450
+ # precedence.
1451
+ # Corresponds to the JSON property `imageUri`
1484
1452
  # @return [String]
1485
- attr_accessor :medical
1453
+ attr_accessor :image_uri
1486
1454
 
1487
1455
  def initialize(**args)
1488
1456
  update!(**args)
@@ -1490,21 +1458,19 @@ module Google
1490
1458
 
1491
1459
  # Update properties of this object
1492
1460
  def update!(**args)
1493
- @violence = args[:violence] if args.key?(:violence)
1494
- @adult = args[:adult] if args.key?(:adult)
1495
- @spoof = args[:spoof] if args.key?(:spoof)
1496
- @medical = args[:medical] if args.key?(:medical)
1461
+ @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri)
1462
+ @image_uri = args[:image_uri] if args.key?(:image_uri)
1497
1463
  end
1498
1464
  end
1499
1465
 
1500
- # Set of dominant colors and their corresponding scores.
1501
- class DominantColorsAnnotation
1466
+ # Response to a batch image annotation request.
1467
+ class BatchAnnotateImagesResponse
1502
1468
  include Google::Apis::Core::Hashable
1503
1469
 
1504
- # RGB color values with their score and pixel fraction.
1505
- # Corresponds to the JSON property `colors`
1506
- # @return [Array<Google::Apis::VisionV1::ColorInfo>]
1507
- attr_accessor :colors
1470
+ # Individual responses to image annotation requests within the batch.
1471
+ # Corresponds to the JSON property `responses`
1472
+ # @return [Array<Google::Apis::VisionV1::AnnotateImageResponse>]
1473
+ attr_accessor :responses
1508
1474
 
1509
1475
  def initialize(**args)
1510
1476
  update!(**args)
@@ -1512,29 +1478,42 @@ module Google
1512
1478
 
1513
1479
  # Update properties of this object
1514
1480
  def update!(**args)
1515
- @colors = args[:colors] if args.key?(:colors)
1481
+ @responses = args[:responses] if args.key?(:responses)
1516
1482
  end
1517
1483
  end
1518
1484
 
1519
- # TextAnnotation contains a structured representation of OCR extracted text.
1520
- # The hierarchy of an OCR extracted text structure is like this:
1521
- # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
1522
- # Each structural component, starting from Page, may further have their own
1523
- # properties. Properties describe detected languages, breaks etc.. Please
1524
- # refer to the google.cloud.vision.v1.TextAnnotation.TextProperty message
1525
- # definition below for more detail.
1526
- class TextAnnotation
1485
+ # Relevant information for the image from the Internet.
1486
+ class WebDetection
1527
1487
  include Google::Apis::Core::Hashable
1528
1488
 
1529
- # List of pages detected by OCR.
1530
- # Corresponds to the JSON property `pages`
1531
- # @return [Array<Google::Apis::VisionV1::Page>]
1532
- attr_accessor :pages
1489
+ # Fully matching images from the Internet.
1490
+ # They're definite neardups and most often a copy of the query image with
1491
+ # merely a size change.
1492
+ # Corresponds to the JSON property `fullMatchingImages`
1493
+ # @return [Array<Google::Apis::VisionV1::WebImage>]
1494
+ attr_accessor :full_matching_images
1533
1495
 
1534
- # UTF-8 text detected on the pages.
1535
- # Corresponds to the JSON property `text`
1536
- # @return [String]
1537
- attr_accessor :text
1496
+ # Deduced entities from similar images on the Internet.
1497
+ # Corresponds to the JSON property `webEntities`
1498
+ # @return [Array<Google::Apis::VisionV1::WebEntity>]
1499
+ attr_accessor :web_entities
1500
+
1501
+ # Web pages containing the matching images from the Internet.
1502
+ # Corresponds to the JSON property `pagesWithMatchingImages`
1503
+ # @return [Array<Google::Apis::VisionV1::WebPage>]
1504
+ attr_accessor :pages_with_matching_images
1505
+
1506
+ # Partial matching images from the Internet.
1507
+ # Those images are similar enough to share some key-point features. For
1508
+ # example an original image will likely have partial matching for its crops.
1509
+ # Corresponds to the JSON property `partialMatchingImages`
1510
+ # @return [Array<Google::Apis::VisionV1::WebImage>]
1511
+ attr_accessor :partial_matching_images
1512
+
1513
+ # The visually similar image results.
1514
+ # Corresponds to the JSON property `visuallySimilarImages`
1515
+ # @return [Array<Google::Apis::VisionV1::WebImage>]
1516
+ attr_accessor :visually_similar_images
1538
1517
 
1539
1518
  def initialize(**args)
1540
1519
  update!(**args)
@@ -1542,26 +1521,34 @@ module Google
1542
1521
 
1543
1522
  # Update properties of this object
1544
1523
  def update!(**args)
1545
- @pages = args[:pages] if args.key?(:pages)
1546
- @text = args[:text] if args.key?(:text)
1524
+ @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
1525
+ @web_entities = args[:web_entities] if args.key?(:web_entities)
1526
+ @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images)
1527
+ @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
1528
+ @visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images)
1547
1529
  end
1548
1530
  end
1549
1531
 
1550
- # Detected language for a structural component.
1551
- class DetectedLanguage
1532
+ # A 3D position in the image, used primarily for Face detection landmarks.
1533
+ # A valid Position must have both x and y coordinates.
1534
+ # The position coordinates are in the same scale as the original image.
1535
+ class Position
1552
1536
  include Google::Apis::Core::Hashable
1553
1537
 
1554
- # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
1555
- # information, see
1556
- # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1557
- # Corresponds to the JSON property `languageCode`
1558
- # @return [String]
1559
- attr_accessor :language_code
1538
+ # Y coordinate.
1539
+ # Corresponds to the JSON property `y`
1540
+ # @return [Float]
1541
+ attr_accessor :y
1560
1542
 
1561
- # Confidence of detected language. Range [0, 1].
1562
- # Corresponds to the JSON property `confidence`
1543
+ # X coordinate.
1544
+ # Corresponds to the JSON property `x`
1563
1545
  # @return [Float]
1564
- attr_accessor :confidence
1546
+ attr_accessor :x
1547
+
1548
+ # Z coordinate (or depth).
1549
+ # Corresponds to the JSON property `z`
1550
+ # @return [Float]
1551
+ attr_accessor :z
1565
1552
 
1566
1553
  def initialize(**args)
1567
1554
  update!(**args)
@@ -1569,25 +1556,26 @@ module Google
1569
1556
 
1570
1557
  # Update properties of this object
1571
1558
  def update!(**args)
1572
- @language_code = args[:language_code] if args.key?(:language_code)
1573
- @confidence = args[:confidence] if args.key?(:confidence)
1559
+ @y = args[:y] if args.key?(:y)
1560
+ @x = args[:x] if args.key?(:x)
1561
+ @z = args[:z] if args.key?(:z)
1574
1562
  end
1575
1563
  end
1576
1564
 
1577
- # A vertex represents a 2D point in the image.
1578
- # NOTE: the vertex coordinates are in the same scale as the original image.
1579
- class Vertex
1565
+ # Metadata for web pages.
1566
+ class WebPage
1580
1567
  include Google::Apis::Core::Hashable
1581
1568
 
1582
- # Y coordinate.
1583
- # Corresponds to the JSON property `y`
1584
- # @return [Fixnum]
1585
- attr_accessor :y
1569
+ # Overall relevancy score for the web page.
1570
+ # Not normalized and not comparable across different image queries.
1571
+ # Corresponds to the JSON property `score`
1572
+ # @return [Float]
1573
+ attr_accessor :score
1586
1574
 
1587
- # X coordinate.
1588
- # Corresponds to the JSON property `x`
1589
- # @return [Fixnum]
1590
- attr_accessor :x
1575
+ # The result web page URL.
1576
+ # Corresponds to the JSON property `url`
1577
+ # @return [String]
1578
+ attr_accessor :url
1591
1579
 
1592
1580
  def initialize(**args)
1593
1581
  update!(**args)
@@ -1595,24 +1583,129 @@ module Google
1595
1583
 
1596
1584
  # Update properties of this object
1597
1585
  def update!(**args)
1598
- @y = args[:y] if args.key?(:y)
1599
- @x = args[:x] if args.key?(:x)
1586
+ @score = args[:score] if args.key?(:score)
1587
+ @url = args[:url] if args.key?(:url)
1600
1588
  end
1601
1589
  end
1602
1590
 
1603
- # Additional information detected on the structural component.
1604
- class TextProperty
1591
+ # Color information consists of RGB channels, score, and the fraction of
1592
+ # the image that the color occupies in the image.
1593
+ class ColorInfo
1605
1594
  include Google::Apis::Core::Hashable
1606
1595
 
1607
- # A list of detected languages together with confidence.
1608
- # Corresponds to the JSON property `detectedLanguages`
1609
- # @return [Array<Google::Apis::VisionV1::DetectedLanguage>]
1610
- attr_accessor :detected_languages
1596
+ # Image-specific score for this color. Value in range [0, 1].
1597
+ # Corresponds to the JSON property `score`
1598
+ # @return [Float]
1599
+ attr_accessor :score
1611
1600
 
1612
- # Detected start or end of a structural component.
1613
- # Corresponds to the JSON property `detectedBreak`
1614
- # @return [Google::Apis::VisionV1::DetectedBreak]
1615
- attr_accessor :detected_break
1601
+ # The fraction of pixels the color occupies in the image.
1602
+ # Value in range [0, 1].
1603
+ # Corresponds to the JSON property `pixelFraction`
1604
+ # @return [Float]
1605
+ attr_accessor :pixel_fraction
1606
+
1607
+ # Represents a color in the RGBA color space. This representation is designed
1608
+ # for simplicity of conversion to/from color representations in various
1609
+ # languages over compactness; for example, the fields of this representation
1610
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1611
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1612
+ # method in iOS; and, with just a little work, it can be easily formatted into
1613
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1614
+ # Example (Java):
1615
+ # import com.google.type.Color;
1616
+ # // ...
1617
+ # public static java.awt.Color fromProto(Color protocolor) `
1618
+ # float alpha = protocolor.hasAlpha()
1619
+ # ? protocolor.getAlpha().getValue()
1620
+ # : 1.0;
1621
+ # return new java.awt.Color(
1622
+ # protocolor.getRed(),
1623
+ # protocolor.getGreen(),
1624
+ # protocolor.getBlue(),
1625
+ # alpha);
1626
+ # `
1627
+ # public static Color toProto(java.awt.Color color) `
1628
+ # float red = (float) color.getRed();
1629
+ # float green = (float) color.getGreen();
1630
+ # float blue = (float) color.getBlue();
1631
+ # float denominator = 255.0;
1632
+ # Color.Builder resultBuilder =
1633
+ # Color
1634
+ # .newBuilder()
1635
+ # .setRed(red / denominator)
1636
+ # .setGreen(green / denominator)
1637
+ # .setBlue(blue / denominator);
1638
+ # int alpha = color.getAlpha();
1639
+ # if (alpha != 255) `
1640
+ # result.setAlpha(
1641
+ # FloatValue
1642
+ # .newBuilder()
1643
+ # .setValue(((float) alpha) / denominator)
1644
+ # .build());
1645
+ # `
1646
+ # return resultBuilder.build();
1647
+ # `
1648
+ # // ...
1649
+ # Example (iOS / Obj-C):
1650
+ # // ...
1651
+ # static UIColor* fromProto(Color* protocolor) `
1652
+ # float red = [protocolor red];
1653
+ # float green = [protocolor green];
1654
+ # float blue = [protocolor blue];
1655
+ # FloatValue* alpha_wrapper = [protocolor alpha];
1656
+ # float alpha = 1.0;
1657
+ # if (alpha_wrapper != nil) `
1658
+ # alpha = [alpha_wrapper value];
1659
+ # `
1660
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1661
+ # `
1662
+ # static Color* toProto(UIColor* color) `
1663
+ # CGFloat red, green, blue, alpha;
1664
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
1665
+ # return nil;
1666
+ # `
1667
+ # Color* result = [Color alloc] init];
1668
+ # [result setRed:red];
1669
+ # [result setGreen:green];
1670
+ # [result setBlue:blue];
1671
+ # if (alpha <= 0.9999) `
1672
+ # [result setAlpha:floatWrapperWithValue(alpha)];
1673
+ # `
1674
+ # [result autorelease];
1675
+ # return result;
1676
+ # `
1677
+ # // ...
1678
+ # Example (JavaScript):
1679
+ # // ...
1680
+ # var protoToCssColor = function(rgb_color) `
1681
+ # var redFrac = rgb_color.red || 0.0;
1682
+ # var greenFrac = rgb_color.green || 0.0;
1683
+ # var blueFrac = rgb_color.blue || 0.0;
1684
+ # var red = Math.floor(redFrac * 255);
1685
+ # var green = Math.floor(greenFrac * 255);
1686
+ # var blue = Math.floor(blueFrac * 255);
1687
+ # if (!('alpha' in rgb_color)) `
1688
+ # return rgbToCssColor_(red, green, blue);
1689
+ # `
1690
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
1691
+ # var rgbParams = [red, green, blue].join(',');
1692
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1693
+ # `;
1694
+ # var rgbToCssColor_ = function(red, green, blue) `
1695
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1696
+ # var hexString = rgbNumber.toString(16);
1697
+ # var missingZeros = 6 - hexString.length;
1698
+ # var resultBuilder = ['#'];
1699
+ # for (var i = 0; i < missingZeros; i++) `
1700
+ # resultBuilder.push('0');
1701
+ # `
1702
+ # resultBuilder.push(hexString);
1703
+ # return resultBuilder.join('');
1704
+ # `;
1705
+ # // ...
1706
+ # Corresponds to the JSON property `color`
1707
+ # @return [Google::Apis::VisionV1::Color]
1708
+ attr_accessor :color
1616
1709
 
1617
1710
  def initialize(**args)
1618
1711
  update!(**args)
@@ -1620,166 +1713,75 @@ module Google
1620
1713
 
1621
1714
  # Update properties of this object
1622
1715
  def update!(**args)
1623
- @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
1624
- @detected_break = args[:detected_break] if args.key?(:detected_break)
1716
+ @score = args[:score] if args.key?(:score)
1717
+ @pixel_fraction = args[:pixel_fraction] if args.key?(:pixel_fraction)
1718
+ @color = args[:color] if args.key?(:color)
1625
1719
  end
1626
1720
  end
1627
1721
 
1628
- # A bounding polygon for the detected image annotation.
1629
- class BoundingPoly
1722
+ # Set of detected entity features.
1723
+ class EntityAnnotation
1630
1724
  include Google::Apis::Core::Hashable
1631
1725
 
1632
- # The bounding polygon vertices.
1633
- # Corresponds to the JSON property `vertices`
1634
- # @return [Array<Google::Apis::VisionV1::Vertex>]
1635
- attr_accessor :vertices
1636
-
1637
- def initialize(**args)
1638
- update!(**args)
1639
- end
1640
-
1641
- # Update properties of this object
1642
- def update!(**args)
1643
- @vertices = args[:vertices] if args.key?(:vertices)
1644
- end
1645
- end
1646
-
1647
- # Entity deduced from similar images on the Internet.
1648
- class WebEntity
1649
- include Google::Apis::Core::Hashable
1726
+ # A bounding polygon for the detected image annotation.
1727
+ # Corresponds to the JSON property `boundingPoly`
1728
+ # @return [Google::Apis::VisionV1::BoundingPoly]
1729
+ attr_accessor :bounding_poly
1650
1730
 
1651
- # Opaque entity ID.
1652
- # Corresponds to the JSON property `entityId`
1731
+ # The language code for the locale in which the entity textual
1732
+ # `description` is expressed.
1733
+ # Corresponds to the JSON property `locale`
1653
1734
  # @return [String]
1654
- attr_accessor :entity_id
1735
+ attr_accessor :locale
1655
1736
 
1656
- # Canonical description of the entity, in English.
1737
+ # The relevancy of the ICA (Image Content Annotation) label to the
1738
+ # image. For example, the relevancy of "tower" is likely higher to an image
1739
+ # containing the detected "Eiffel Tower" than to an image containing a
1740
+ # detected distant towering building, even though the confidence that
1741
+ # there is a tower in each image may be the same. Range [0, 1].
1742
+ # Corresponds to the JSON property `topicality`
1743
+ # @return [Float]
1744
+ attr_accessor :topicality
1745
+
1746
+ # Entity textual description, expressed in its `locale` language.
1657
1747
  # Corresponds to the JSON property `description`
1658
1748
  # @return [String]
1659
1749
  attr_accessor :description
1660
1750
 
1661
- # Overall relevancy score for the entity.
1662
- # Not normalized and not comparable across different image queries.
1751
+ # Some entities may have optional user-supplied `Property` (name/value)
1752
+ # fields, such a score or string that qualifies the entity.
1753
+ # Corresponds to the JSON property `properties`
1754
+ # @return [Array<Google::Apis::VisionV1::Property>]
1755
+ attr_accessor :properties
1756
+
1757
+ # Overall score of the result. Range [0, 1].
1663
1758
  # Corresponds to the JSON property `score`
1664
1759
  # @return [Float]
1665
1760
  attr_accessor :score
1666
1761
 
1667
- def initialize(**args)
1668
- update!(**args)
1669
- end
1670
-
1671
- # Update properties of this object
1672
- def update!(**args)
1673
- @entity_id = args[:entity_id] if args.key?(:entity_id)
1674
- @description = args[:description] if args.key?(:description)
1675
- @score = args[:score] if args.key?(:score)
1676
- end
1677
- end
1678
-
1679
- # Response to an image annotation request.
1680
- class AnnotateImageResponse
1681
- include Google::Apis::Core::Hashable
1682
-
1683
- # The `Status` type defines a logical error model that is suitable for different
1684
- # programming environments, including REST APIs and RPC APIs. It is used by
1685
- # [gRPC](https://github.com/grpc). The error model is designed to be:
1686
- # - Simple to use and understand for most users
1687
- # - Flexible enough to meet unexpected needs
1688
- # # Overview
1689
- # The `Status` message contains three pieces of data: error code, error message,
1690
- # and error details. The error code should be an enum value of
1691
- # google.rpc.Code, but it may accept additional error codes if needed. The
1692
- # error message should be a developer-facing English message that helps
1693
- # developers *understand* and *resolve* the error. If a localized user-facing
1694
- # error message is needed, put the localized message in the error details or
1695
- # localize it in the client. The optional error details may contain arbitrary
1696
- # information about the error. There is a predefined set of error detail types
1697
- # in the package `google.rpc` which can be used for common error conditions.
1698
- # # Language mapping
1699
- # The `Status` message is the logical representation of the error model, but it
1700
- # is not necessarily the actual wire format. When the `Status` message is
1701
- # exposed in different client libraries and different wire protocols, it can be
1702
- # mapped differently. For example, it will likely be mapped to some exceptions
1703
- # in Java, but more likely mapped to some error codes in C.
1704
- # # Other uses
1705
- # The error model and the `Status` message can be used in a variety of
1706
- # environments, either with or without APIs, to provide a
1707
- # consistent developer experience across different environments.
1708
- # Example uses of this error model include:
1709
- # - Partial errors. If a service needs to return partial errors to the client,
1710
- # it may embed the `Status` in the normal response to indicate the partial
1711
- # errors.
1712
- # - Workflow errors. A typical workflow has multiple steps. Each step may
1713
- # have a `Status` message for error reporting purpose.
1714
- # - Batch operations. If a client uses batch request and batch response, the
1715
- # `Status` message should be used directly inside batch response, one for
1716
- # each error sub-response.
1717
- # - Asynchronous operations. If an API call embeds asynchronous operation
1718
- # results in its response, the status of those operations should be
1719
- # represented directly using the `Status` message.
1720
- # - Logging. If some API errors are stored in logs, the message `Status` could
1721
- # be used directly after any stripping needed for security/privacy reasons.
1722
- # Corresponds to the JSON property `error`
1723
- # @return [Google::Apis::VisionV1::Status]
1724
- attr_accessor :error
1725
-
1726
- # TextAnnotation contains a structured representation of OCR extracted text.
1727
- # The hierarchy of an OCR extracted text structure is like this:
1728
- # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
1729
- # Each structural component, starting from Page, may further have their own
1730
- # properties. Properties describe detected languages, breaks etc.. Please
1731
- # refer to the google.cloud.vision.v1.TextAnnotation.TextProperty message
1732
- # definition below for more detail.
1733
- # Corresponds to the JSON property `fullTextAnnotation`
1734
- # @return [Google::Apis::VisionV1::TextAnnotation]
1735
- attr_accessor :full_text_annotation
1736
-
1737
- # If present, landmark detection has completed successfully.
1738
- # Corresponds to the JSON property `landmarkAnnotations`
1739
- # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
1740
- attr_accessor :landmark_annotations
1741
-
1742
- # If present, text (OCR) detection has completed successfully.
1743
- # Corresponds to the JSON property `textAnnotations`
1744
- # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
1745
- attr_accessor :text_annotations
1746
-
1747
- # Stores image properties, such as dominant colors.
1748
- # Corresponds to the JSON property `imagePropertiesAnnotation`
1749
- # @return [Google::Apis::VisionV1::ImageProperties]
1750
- attr_accessor :image_properties_annotation
1751
-
1752
- # If present, face detection has completed successfully.
1753
- # Corresponds to the JSON property `faceAnnotations`
1754
- # @return [Array<Google::Apis::VisionV1::FaceAnnotation>]
1755
- attr_accessor :face_annotations
1756
-
1757
- # If present, logo detection has completed successfully.
1758
- # Corresponds to the JSON property `logoAnnotations`
1759
- # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
1760
- attr_accessor :logo_annotations
1761
-
1762
- # Set of crop hints that are used to generate new crops when serving images.
1763
- # Corresponds to the JSON property `cropHintsAnnotation`
1764
- # @return [Google::Apis::VisionV1::CropHintsAnnotation]
1765
- attr_accessor :crop_hints_annotation
1766
-
1767
- # Relevant information for the image from the Internet.
1768
- # Corresponds to the JSON property `webDetection`
1769
- # @return [Google::Apis::VisionV1::WebDetection]
1770
- attr_accessor :web_detection
1762
+ # The location information for the detected entity. Multiple
1763
+ # `LocationInfo` elements can be present because one location may
1764
+ # indicate the location of the scene in the image, and another location
1765
+ # may indicate the location of the place where the image was taken.
1766
+ # Location information is usually present for landmarks.
1767
+ # Corresponds to the JSON property `locations`
1768
+ # @return [Array<Google::Apis::VisionV1::LocationInfo>]
1769
+ attr_accessor :locations
1771
1770
 
1772
- # If present, label detection has completed successfully.
1773
- # Corresponds to the JSON property `labelAnnotations`
1774
- # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
1775
- attr_accessor :label_annotations
1771
+ # Opaque entity ID. Some IDs may be available in
1772
+ # [Google Knowledge Graph Search API](https://developers.google.com/knowledge-
1773
+ # graph/).
1774
+ # Corresponds to the JSON property `mid`
1775
+ # @return [String]
1776
+ attr_accessor :mid
1776
1777
 
1777
- # Set of features pertaining to the image, computed by computer vision
1778
- # methods over safe-search verticals (for example, adult, spoof, medical,
1779
- # violence).
1780
- # Corresponds to the JSON property `safeSearchAnnotation`
1781
- # @return [Google::Apis::VisionV1::SafeSearchAnnotation]
1782
- attr_accessor :safe_search_annotation
1778
+ # The accuracy of the entity detection in an image.
1779
+ # For example, for an image in which the "Eiffel Tower" entity is detected,
1780
+ # this field represents the confidence that there is a tower in the query
1781
+ # image. Range [0, 1].
1782
+ # Corresponds to the JSON property `confidence`
1783
+ # @return [Float]
1784
+ attr_accessor :confidence
1783
1785
 
1784
1786
  def initialize(**args)
1785
1787
  update!(**args)
@@ -1787,17 +1789,15 @@ module Google
1787
1789
 
1788
1790
  # Update properties of this object
1789
1791
  def update!(**args)
1790
- @error = args[:error] if args.key?(:error)
1791
- @full_text_annotation = args[:full_text_annotation] if args.key?(:full_text_annotation)
1792
- @landmark_annotations = args[:landmark_annotations] if args.key?(:landmark_annotations)
1793
- @text_annotations = args[:text_annotations] if args.key?(:text_annotations)
1794
- @image_properties_annotation = args[:image_properties_annotation] if args.key?(:image_properties_annotation)
1795
- @face_annotations = args[:face_annotations] if args.key?(:face_annotations)
1796
- @logo_annotations = args[:logo_annotations] if args.key?(:logo_annotations)
1797
- @crop_hints_annotation = args[:crop_hints_annotation] if args.key?(:crop_hints_annotation)
1798
- @web_detection = args[:web_detection] if args.key?(:web_detection)
1799
- @label_annotations = args[:label_annotations] if args.key?(:label_annotations)
1800
- @safe_search_annotation = args[:safe_search_annotation] if args.key?(:safe_search_annotation)
1792
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
1793
+ @locale = args[:locale] if args.key?(:locale)
1794
+ @topicality = args[:topicality] if args.key?(:topicality)
1795
+ @description = args[:description] if args.key?(:description)
1796
+ @properties = args[:properties] if args.key?(:properties)
1797
+ @score = args[:score] if args.key?(:score)
1798
+ @locations = args[:locations] if args.key?(:locations)
1799
+ @mid = args[:mid] if args.key?(:mid)
1800
+ @confidence = args[:confidence] if args.key?(:confidence)
1801
1801
  end
1802
1802
  end
1803
1803
  end