google-api-client 0.13.2 → 0.13.3

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