google-api-client 0.19.8 → 0.20.0

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 (355) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +7 -4
  3. data/CHANGELOG.md +106 -0
  4. data/MIGRATING.md +3 -3
  5. data/README.md +6 -9
  6. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1 -7
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +0 -1
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +2 -8
  10. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  11. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +84 -9
  12. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +33 -0
  13. data/generated/google/apis/admin_directory_v1.rb +1 -1
  14. data/generated/google/apis/admin_directory_v1/classes.rb +11 -10
  15. data/generated/google/apis/admin_directory_v1/service.rb +21 -7
  16. data/generated/google/apis/analytics_v3.rb +1 -1
  17. data/generated/google/apis/analytics_v3/service.rb +1 -1
  18. data/generated/google/apis/androiddeviceprovisioning_v1.rb +1 -1
  19. data/generated/google/apis/androiddeviceprovisioning_v1/classes.rb +52 -35
  20. data/generated/google/apis/androiddeviceprovisioning_v1/service.rb +33 -20
  21. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  22. data/generated/google/apis/androidenterprise_v1/classes.rb +44 -0
  23. data/generated/google/apis/androidenterprise_v1/representations.rb +17 -0
  24. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  25. data/generated/google/apis/androidmanagement_v1/classes.rb +66 -0
  26. data/generated/google/apis/androidmanagement_v1/representations.rb +10 -0
  27. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  28. data/generated/google/apis/androidpublisher_v2/classes.rb +37 -72
  29. data/generated/google/apis/androidpublisher_v2/representations.rb +5 -34
  30. data/generated/google/apis/androidpublisher_v2/service.rb +6 -52
  31. data/generated/google/apis/appengine_v1.rb +2 -2
  32. data/generated/google/apis/appengine_v1/classes.rb +82 -7
  33. data/generated/google/apis/appengine_v1/representations.rb +32 -0
  34. data/generated/google/apis/appengine_v1/service.rb +2 -2
  35. data/generated/google/apis/appengine_v1alpha.rb +2 -2
  36. data/generated/google/apis/appengine_v1alpha/classes.rb +35 -0
  37. data/generated/google/apis/appengine_v1alpha/representations.rb +16 -0
  38. data/generated/google/apis/appengine_v1alpha/service.rb +2 -2
  39. data/generated/google/apis/appengine_v1beta.rb +2 -2
  40. data/generated/google/apis/appengine_v1beta/classes.rb +51 -7
  41. data/generated/google/apis/appengine_v1beta/representations.rb +17 -0
  42. data/generated/google/apis/appengine_v1beta/service.rb +2 -2
  43. data/generated/google/apis/appengine_v1beta4.rb +2 -2
  44. data/generated/google/apis/appengine_v1beta4/classes.rb +50 -6
  45. data/generated/google/apis/appengine_v1beta4/representations.rb +17 -0
  46. data/generated/google/apis/appengine_v1beta4/service.rb +2 -2
  47. data/generated/google/apis/appengine_v1beta5.rb +2 -2
  48. data/generated/google/apis/appengine_v1beta5/classes.rb +50 -6
  49. data/generated/google/apis/appengine_v1beta5/representations.rb +17 -0
  50. data/generated/google/apis/appengine_v1beta5/service.rb +2 -2
  51. data/generated/google/apis/bigquery_v2.rb +1 -1
  52. data/generated/google/apis/bigquery_v2/classes.rb +19 -11
  53. data/generated/google/apis/bigquery_v2/representations.rb +4 -3
  54. data/generated/google/apis/bigquery_v2/service.rb +9 -1
  55. data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
  56. data/generated/google/apis/bigquerydatatransfer_v1/classes.rb +9 -6
  57. data/generated/google/apis/bigquerydatatransfer_v1/representations.rb +1 -0
  58. data/generated/google/apis/bigquerydatatransfer_v1/service.rb +1 -1
  59. data/generated/google/apis/calendar_v3.rb +1 -1
  60. data/generated/google/apis/calendar_v3/classes.rb +3 -1
  61. data/generated/google/apis/{firebaseremoteconfig_v1.rb → chat_v1.rb} +8 -9
  62. data/generated/google/apis/chat_v1/classes.rb +890 -0
  63. data/generated/google/apis/chat_v1/representations.rb +445 -0
  64. data/generated/google/apis/chat_v1/service.rb +344 -0
  65. data/generated/google/apis/cloudbilling_v1.rb +2 -2
  66. data/generated/google/apis/cloudbilling_v1/classes.rb +341 -5
  67. data/generated/google/apis/cloudbilling_v1/representations.rb +103 -0
  68. data/generated/google/apis/cloudbilling_v1/service.rb +217 -10
  69. data/generated/google/apis/cloudbuild_v1.rb +2 -2
  70. data/generated/google/apis/cloudbuild_v1/classes.rb +180 -84
  71. data/generated/google/apis/cloudbuild_v1/representations.rb +35 -0
  72. data/generated/google/apis/cloudbuild_v1/service.rb +25 -25
  73. data/generated/google/apis/cloudiot_v1.rb +2 -2
  74. data/generated/google/apis/cloudiot_v1/classes.rb +13 -142
  75. data/generated/google/apis/cloudiot_v1/representations.rb +0 -32
  76. data/generated/google/apis/cloudiot_v1/service.rb +2 -2
  77. data/generated/google/apis/cloudkms_v1.rb +1 -1
  78. data/generated/google/apis/cloudkms_v1/classes.rb +7 -1
  79. data/generated/google/apis/cloudkms_v1/representations.rb +1 -0
  80. data/generated/google/apis/cloudkms_v1/service.rb +1 -1
  81. data/generated/google/apis/cloudresourcemanager_v1.rb +2 -2
  82. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +2 -2
  83. data/generated/google/apis/cloudresourcemanager_v1/service.rb +4 -5
  84. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +2 -2
  85. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +1 -1
  86. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +6 -6
  87. data/generated/google/apis/{clouduseraccounts_beta.rb → cloudresourcemanager_v2.rb} +10 -16
  88. data/generated/google/apis/cloudresourcemanager_v2/classes.rb +821 -0
  89. data/generated/google/apis/cloudresourcemanager_v2/representations.rb +304 -0
  90. data/generated/google/apis/cloudresourcemanager_v2/service.rb +534 -0
  91. data/generated/google/apis/cloudresourcemanager_v2beta1.rb +2 -2
  92. data/generated/google/apis/cloudresourcemanager_v2beta1/service.rb +1 -1
  93. data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
  94. data/generated/google/apis/cloudtasks_v2beta2/classes.rb +7 -0
  95. data/generated/google/apis/cloudtasks_v2beta2/representations.rb +1 -0
  96. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  97. data/generated/google/apis/cloudtrace_v1/classes.rb +2 -0
  98. data/generated/google/apis/compute_alpha.rb +1 -1
  99. data/generated/google/apis/compute_alpha/classes.rb +216 -120
  100. data/generated/google/apis/compute_alpha/representations.rb +25 -1
  101. data/generated/google/apis/compute_alpha/service.rb +1354 -1621
  102. data/generated/google/apis/compute_beta.rb +1 -1
  103. data/generated/google/apis/compute_beta/classes.rb +548 -85
  104. data/generated/google/apis/compute_beta/representations.rb +159 -0
  105. data/generated/google/apis/compute_beta/service.rb +1971 -1460
  106. data/generated/google/apis/compute_v1.rb +1 -1
  107. data/generated/google/apis/compute_v1/classes.rb +206 -70
  108. data/generated/google/apis/compute_v1/representations.rb +32 -0
  109. data/generated/google/apis/compute_v1/service.rb +1184 -1278
  110. data/generated/google/apis/container_v1.rb +1 -1
  111. data/generated/google/apis/container_v1/classes.rb +742 -9
  112. data/generated/google/apis/container_v1/representations.rb +90 -0
  113. data/generated/google/apis/container_v1/service.rb +1380 -100
  114. data/generated/google/apis/container_v1beta1.rb +1 -1
  115. data/generated/google/apis/container_v1beta1/classes.rb +191 -138
  116. data/generated/google/apis/container_v1beta1/representations.rb +2 -0
  117. data/generated/google/apis/container_v1beta1/service.rb +236 -231
  118. data/generated/google/apis/content_v2.rb +1 -1
  119. data/generated/google/apis/content_v2/classes.rb +2690 -1540
  120. data/generated/google/apis/content_v2/representations.rb +491 -0
  121. data/generated/google/apis/content_v2/service.rb +684 -0
  122. data/generated/google/apis/content_v2sandbox.rb +1 -1
  123. data/generated/google/apis/content_v2sandbox/classes.rb +2 -1
  124. data/generated/google/apis/dataflow_v1b3.rb +2 -2
  125. data/generated/google/apis/dataflow_v1b3/classes.rb +95 -0
  126. data/generated/google/apis/dataflow_v1b3/representations.rb +36 -0
  127. data/generated/google/apis/dataflow_v1b3/service.rb +1 -1
  128. data/generated/google/apis/dataproc_v1.rb +1 -1
  129. data/generated/google/apis/dataproc_v1/classes.rb +56 -45
  130. data/generated/google/apis/dataproc_v1/representations.rb +1 -0
  131. data/generated/google/apis/dataproc_v1/service.rb +30 -3
  132. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  133. data/generated/google/apis/dataproc_v1beta2/classes.rb +77 -53
  134. data/generated/google/apis/dataproc_v1beta2/representations.rb +2 -0
  135. data/generated/google/apis/dataproc_v1beta2/service.rb +484 -18
  136. data/generated/google/apis/datastore_v1.rb +1 -1
  137. data/generated/google/apis/datastore_v1/classes.rb +372 -0
  138. data/generated/google/apis/datastore_v1/representations.rb +132 -0
  139. data/generated/google/apis/datastore_v1/service.rb +77 -0
  140. data/generated/google/apis/datastore_v1beta1.rb +1 -1
  141. data/generated/google/apis/datastore_v1beta1/classes.rb +255 -0
  142. data/generated/google/apis/datastore_v1beta1/representations.rb +100 -0
  143. data/generated/google/apis/datastore_v1beta3.rb +1 -1
  144. data/generated/google/apis/datastore_v1beta3/classes.rb +255 -0
  145. data/generated/google/apis/datastore_v1beta3/representations.rb +100 -0
  146. data/generated/google/apis/deploymentmanager_alpha.rb +1 -1
  147. data/generated/google/apis/deploymentmanager_alpha/classes.rb +6 -1
  148. data/generated/google/apis/deploymentmanager_alpha/service.rb +121 -145
  149. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  150. data/generated/google/apis/deploymentmanager_v2/service.rb +79 -91
  151. data/generated/google/apis/deploymentmanager_v2beta.rb +1 -1
  152. data/generated/google/apis/deploymentmanager_v2beta/classes.rb +6 -1
  153. data/generated/google/apis/deploymentmanager_v2beta/service.rb +121 -145
  154. data/generated/google/apis/dialogflow_v2.rb +35 -0
  155. data/generated/google/apis/dialogflow_v2/classes.rb +3994 -0
  156. data/generated/google/apis/dialogflow_v2/representations.rb +1670 -0
  157. data/generated/google/apis/dialogflow_v2/service.rb +1397 -0
  158. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  159. data/generated/google/apis/dialogflow_v2beta1/classes.rb +39 -11
  160. data/generated/google/apis/dialogflow_v2beta1/representations.rb +1 -0
  161. data/generated/google/apis/dialogflow_v2beta1/service.rb +559 -16
  162. data/generated/google/apis/dlp_v2.rb +36 -0
  163. data/generated/google/apis/dlp_v2/classes.rb +6431 -0
  164. data/generated/google/apis/dlp_v2/representations.rb +3116 -0
  165. data/generated/google/apis/dlp_v2/service.rb +1300 -0
  166. data/generated/google/apis/dlp_v2beta1.rb +4 -4
  167. data/generated/google/apis/dlp_v2beta1/classes.rb +38 -0
  168. data/generated/google/apis/dlp_v2beta1/representations.rb +17 -0
  169. data/generated/google/apis/dlp_v2beta1/service.rb +3 -3
  170. data/generated/google/apis/dlp_v2beta2.rb +4 -4
  171. data/generated/google/apis/dlp_v2beta2/classes.rb +229 -1
  172. data/generated/google/apis/dlp_v2beta2/representations.rb +91 -0
  173. data/generated/google/apis/dlp_v2beta2/service.rb +3 -3
  174. data/generated/google/apis/dns_v1.rb +1 -1
  175. data/generated/google/apis/dns_v1/classes.rb +496 -0
  176. data/generated/google/apis/dns_v1/representations.rb +188 -0
  177. data/generated/google/apis/dns_v1/service.rb +319 -6
  178. data/generated/google/apis/dns_v1beta2.rb +1 -1
  179. data/generated/google/apis/dns_v1beta2/classes.rb +0 -19
  180. data/generated/google/apis/dns_v1beta2/representations.rb +0 -14
  181. data/generated/google/apis/dns_v1beta2/service.rb +2 -4
  182. data/generated/google/apis/dns_v2beta1.rb +1 -1
  183. data/generated/google/apis/dns_v2beta1/classes.rb +6 -19
  184. data/generated/google/apis/dns_v2beta1/representations.rb +1 -14
  185. data/generated/google/apis/dns_v2beta1/service.rb +2 -4
  186. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  187. data/generated/google/apis/doubleclicksearch_v2/classes.rb +4 -0
  188. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  189. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +2 -2
  190. data/generated/google/apis/firestore_v1beta1.rb +1 -1
  191. data/generated/google/apis/firestore_v1beta1/classes.rb +1 -1
  192. data/generated/google/apis/genomics_v1.rb +1 -1
  193. data/generated/google/apis/genomics_v1/classes.rb +271 -1
  194. data/generated/google/apis/genomics_v1/representations.rb +140 -0
  195. data/generated/google/apis/genomics_v1/service.rb +9 -1
  196. data/generated/google/apis/genomics_v1alpha2.rb +1 -1
  197. data/generated/google/apis/genomics_v1alpha2/classes.rb +271 -1
  198. data/generated/google/apis/genomics_v1alpha2/representations.rb +140 -0
  199. data/generated/google/apis/genomics_v1alpha2/service.rb +9 -1
  200. data/generated/google/apis/genomics_v2alpha1.rb +37 -0
  201. data/generated/google/apis/genomics_v2alpha1/classes.rb +1306 -0
  202. data/generated/google/apis/genomics_v2alpha1/representations.rb +535 -0
  203. data/generated/google/apis/genomics_v2alpha1/service.rb +261 -0
  204. data/generated/google/apis/gmail_v1.rb +1 -1
  205. data/generated/google/apis/gmail_v1/classes.rb +2 -1
  206. data/generated/google/apis/iam_v1.rb +1 -1
  207. data/generated/google/apis/iam_v1/classes.rb +1 -1
  208. data/generated/google/apis/language_v1.rb +2 -2
  209. data/generated/google/apis/language_v1/classes.rb +2 -1
  210. data/generated/google/apis/language_v1/service.rb +1 -1
  211. data/generated/google/apis/language_v1beta1.rb +2 -2
  212. data/generated/google/apis/language_v1beta1/service.rb +1 -1
  213. data/generated/google/apis/language_v1beta2.rb +2 -2
  214. data/generated/google/apis/language_v1beta2/classes.rb +2 -1
  215. data/generated/google/apis/language_v1beta2/service.rb +1 -1
  216. data/generated/google/apis/logging_v2.rb +1 -1
  217. data/generated/google/apis/logging_v2beta1.rb +1 -1
  218. data/generated/google/apis/manufacturers_v1.rb +1 -1
  219. data/generated/google/apis/manufacturers_v1/service.rb +14 -11
  220. data/generated/google/apis/ml_v1.rb +2 -2
  221. data/generated/google/apis/ml_v1/classes.rb +180 -5
  222. data/generated/google/apis/ml_v1/representations.rb +49 -0
  223. data/generated/google/apis/ml_v1/service.rb +1 -1
  224. data/generated/google/apis/monitoring_v3.rb +1 -1
  225. data/generated/google/apis/monitoring_v3/classes.rb +797 -2
  226. data/generated/google/apis/monitoring_v3/representations.rb +279 -0
  227. data/generated/google/apis/monitoring_v3/service.rb +612 -0
  228. data/generated/google/apis/oslogin_v1.rb +2 -2
  229. data/generated/google/apis/oslogin_v1/service.rb +1 -1
  230. data/generated/google/apis/oslogin_v1alpha.rb +2 -2
  231. data/generated/google/apis/oslogin_v1alpha/service.rb +1 -1
  232. data/generated/google/apis/oslogin_v1beta.rb +2 -2
  233. data/generated/google/apis/oslogin_v1beta/service.rb +1 -1
  234. data/generated/google/apis/pagespeedonline_v4.rb +32 -0
  235. data/generated/google/apis/pagespeedonline_v4/classes.rb +795 -0
  236. data/generated/google/apis/pagespeedonline_v4/representations.rb +335 -0
  237. data/generated/google/apis/pagespeedonline_v4/service.rb +129 -0
  238. data/generated/google/apis/people_v1.rb +2 -2
  239. data/generated/google/apis/people_v1/classes.rb +5 -2
  240. data/generated/google/apis/people_v1/service.rb +9 -7
  241. data/generated/google/apis/poly_v1.rb +1 -1
  242. data/generated/google/apis/poly_v1/classes.rb +153 -0
  243. data/generated/google/apis/poly_v1/representations.rb +67 -0
  244. data/generated/google/apis/proximitybeacon_v1beta1.rb +2 -2
  245. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +1 -1
  246. data/generated/google/apis/pubsub_v1.rb +1 -1
  247. data/generated/google/apis/pubsub_v1/classes.rb +3 -0
  248. data/generated/google/apis/pubsub_v1/service.rb +7 -0
  249. data/generated/google/apis/script_v1.rb +2 -2
  250. data/generated/google/apis/script_v1/service.rb +1 -1
  251. data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
  252. data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +21 -126
  253. data/generated/google/apis/serviceconsumermanagement_v1/representations.rb +0 -30
  254. data/generated/google/apis/serviceconsumermanagement_v1/service.rb +14 -13
  255. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  256. data/generated/google/apis/servicecontrol_v1/classes.rb +2 -1
  257. data/generated/google/apis/servicecontrol_v1/service.rb +9 -6
  258. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  259. data/generated/google/apis/servicemanagement_v1/classes.rb +44 -157
  260. data/generated/google/apis/servicemanagement_v1/representations.rb +2 -48
  261. data/generated/google/apis/servicemanagement_v1/service.rb +9 -0
  262. data/generated/google/apis/{serviceusage_v1.rb → serviceusage_v1beta1.rb} +6 -6
  263. data/generated/google/apis/{serviceusage_v1 → serviceusage_v1beta1}/classes.rb +290 -325
  264. data/generated/google/apis/{serviceusage_v1 → serviceusage_v1beta1}/representations.rb +105 -163
  265. data/generated/google/apis/{serviceusage_v1 → serviceusage_v1beta1}/service.rb +105 -163
  266. data/generated/google/apis/serviceuser_v1.rb +2 -2
  267. data/generated/google/apis/serviceuser_v1/classes.rb +44 -101
  268. data/generated/google/apis/serviceuser_v1/representations.rb +2 -30
  269. data/generated/google/apis/serviceuser_v1/service.rb +1 -1
  270. data/generated/google/apis/sheets_v4.rb +1 -1
  271. data/generated/google/apis/sheets_v4/classes.rb +643 -10
  272. data/generated/google/apis/sheets_v4/representations.rb +53 -0
  273. data/generated/google/apis/slides_v1.rb +1 -1
  274. data/generated/google/apis/slides_v1/classes.rb +92 -9
  275. data/generated/google/apis/slides_v1/representations.rb +21 -0
  276. data/generated/google/apis/slides_v1/service.rb +3 -2
  277. data/generated/google/apis/sourcerepo_v1.rb +1 -1
  278. data/generated/google/apis/sourcerepo_v1/classes.rb +4 -73
  279. data/generated/google/apis/sourcerepo_v1/representations.rb +0 -20
  280. data/generated/google/apis/spanner_v1.rb +1 -1
  281. data/generated/google/apis/spanner_v1/classes.rb +238 -2
  282. data/generated/google/apis/spanner_v1/representations.rb +86 -0
  283. data/generated/google/apis/spanner_v1/service.rb +80 -0
  284. data/generated/google/apis/speech_v1.rb +2 -2
  285. data/generated/google/apis/speech_v1/classes.rb +14 -19
  286. data/generated/google/apis/speech_v1/representations.rb +0 -1
  287. data/generated/google/apis/speech_v1/service.rb +1 -1
  288. data/generated/google/apis/speech_v1beta1.rb +2 -2
  289. data/generated/google/apis/speech_v1beta1/service.rb +1 -1
  290. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  291. data/generated/google/apis/sqladmin_v1beta4/classes.rb +15 -6
  292. data/generated/google/apis/sqladmin_v1beta4/representations.rb +1 -0
  293. data/generated/google/apis/storage_v1.rb +1 -1
  294. data/generated/google/apis/storage_v1/service.rb +3 -6
  295. data/generated/google/apis/storagetransfer_v1.rb +2 -2
  296. data/generated/google/apis/storagetransfer_v1/service.rb +1 -1
  297. data/generated/google/apis/testing_v1.rb +1 -1
  298. data/generated/google/apis/testing_v1/classes.rb +107 -2
  299. data/generated/google/apis/testing_v1/representations.rb +38 -0
  300. data/generated/google/apis/texttospeech_v1beta1.rb +34 -0
  301. data/generated/google/apis/texttospeech_v1beta1/classes.rb +278 -0
  302. data/generated/google/apis/texttospeech_v1beta1/representations.rb +133 -0
  303. data/generated/google/apis/texttospeech_v1beta1/service.rb +128 -0
  304. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  305. data/generated/google/apis/toolresults_v1beta3/classes.rb +30 -16
  306. data/generated/google/apis/tpu_v1alpha1.rb +1 -1
  307. data/generated/google/apis/tpu_v1alpha1/classes.rb +57 -0
  308. data/generated/google/apis/tpu_v1alpha1/representations.rb +30 -0
  309. data/generated/google/apis/tpu_v1alpha1/service.rb +73 -1
  310. data/generated/google/apis/vault_v1.rb +1 -1
  311. data/generated/google/apis/vault_v1/classes.rb +29 -3
  312. data/generated/google/apis/vault_v1/representations.rb +15 -0
  313. data/generated/google/apis/vault_v1/service.rb +8 -2
  314. data/generated/google/apis/videointelligence_v1beta1.rb +1 -1
  315. data/generated/google/apis/videointelligence_v1beta1/classes.rb +650 -0
  316. data/generated/google/apis/videointelligence_v1beta1/representations.rb +315 -0
  317. data/generated/google/apis/vision_v1.rb +2 -2
  318. data/generated/google/apis/vision_v1/classes.rb +290 -2
  319. data/generated/google/apis/vision_v1/representations.rb +128 -0
  320. data/generated/google/apis/vision_v1/service.rb +187 -1
  321. data/generated/google/apis/vision_v1p1beta1.rb +2 -2
  322. data/generated/google/apis/vision_v1p1beta1/classes.rb +136 -2
  323. data/generated/google/apis/vision_v1p1beta1/representations.rb +71 -0
  324. data/generated/google/apis/vision_v1p1beta1/service.rb +1 -1
  325. data/generated/google/apis/vision_v1p2beta1.rb +39 -0
  326. data/generated/google/apis/vision_v1p2beta1/classes.rb +2172 -0
  327. data/generated/google/apis/vision_v1p2beta1/representations.rb +895 -0
  328. data/generated/google/apis/vision_v1p2beta1/service.rb +126 -0
  329. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  330. data/generated/google/apis/youtube_v3.rb +1 -1
  331. data/generated/google/apis/youtube_v3/classes.rb +12 -0
  332. data/generated/google/apis/youtube_v3/representations.rb +2 -0
  333. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  334. data/lib/google/apis/core/json_representation.rb +1 -1
  335. data/lib/google/apis/version.rb +3 -3
  336. data/samples/web/Gemfile +3 -0
  337. metadata +38 -26
  338. data/generated/google/apis/clouduseraccounts_alpha.rb +0 -44
  339. data/generated/google/apis/clouduseraccounts_alpha/classes.rb +0 -1188
  340. data/generated/google/apis/clouduseraccounts_alpha/representations.rb +0 -494
  341. data/generated/google/apis/clouduseraccounts_alpha/service.rb +0 -1152
  342. data/generated/google/apis/clouduseraccounts_beta/classes.rb +0 -845
  343. data/generated/google/apis/clouduseraccounts_beta/representations.rb +0 -352
  344. data/generated/google/apis/clouduseraccounts_beta/service.rb +0 -908
  345. data/generated/google/apis/clouduseraccounts_vm_alpha.rb +0 -44
  346. data/generated/google/apis/clouduseraccounts_vm_alpha/classes.rb +0 -1188
  347. data/generated/google/apis/clouduseraccounts_vm_alpha/representations.rb +0 -494
  348. data/generated/google/apis/clouduseraccounts_vm_alpha/service.rb +0 -1152
  349. data/generated/google/apis/clouduseraccounts_vm_beta.rb +0 -44
  350. data/generated/google/apis/clouduseraccounts_vm_beta/classes.rb +0 -845
  351. data/generated/google/apis/clouduseraccounts_vm_beta/representations.rb +0 -352
  352. data/generated/google/apis/clouduseraccounts_vm_beta/service.rb +0 -908
  353. data/generated/google/apis/firebaseremoteconfig_v1/classes.rb +0 -200
  354. data/generated/google/apis/firebaseremoteconfig_v1/representations.rb +0 -89
  355. data/generated/google/apis/firebaseremoteconfig_v1/service.rb +0 -153
@@ -262,6 +262,36 @@ module Google
262
262
  include Google::Apis::Core::JsonObjectSupport
263
263
  end
264
264
 
265
+ class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
266
+ class Representation < Google::Apis::Core::JsonRepresentation; end
267
+
268
+ include Google::Apis::Core::JsonObjectSupport
269
+ end
270
+
271
+ class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
272
+ class Representation < Google::Apis::Core::JsonRepresentation; end
273
+
274
+ include Google::Apis::Core::JsonObjectSupport
275
+ end
276
+
277
+ class GoogleCloudVisionV1p2beta1GcsDestination
278
+ class Representation < Google::Apis::Core::JsonRepresentation; end
279
+
280
+ include Google::Apis::Core::JsonObjectSupport
281
+ end
282
+
283
+ class GoogleCloudVisionV1p2beta1OperationMetadata
284
+ class Representation < Google::Apis::Core::JsonRepresentation; end
285
+
286
+ include Google::Apis::Core::JsonObjectSupport
287
+ end
288
+
289
+ class GoogleCloudVisionV1p2beta1OutputConfig
290
+ class Representation < Google::Apis::Core::JsonRepresentation; end
291
+
292
+ include Google::Apis::Core::JsonObjectSupport
293
+ end
294
+
265
295
  class LatLng
266
296
  class Representation < Google::Apis::Core::JsonRepresentation; end
267
297
 
@@ -707,6 +737,47 @@ module Google
707
737
  end
708
738
  end
709
739
 
740
+ class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
741
+ # @private
742
+ class Representation < Google::Apis::Core::JsonRepresentation
743
+ property :output_config, as: 'outputConfig', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1OutputConfig, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1OutputConfig::Representation
744
+
745
+ end
746
+ end
747
+
748
+ class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
749
+ # @private
750
+ class Representation < Google::Apis::Core::JsonRepresentation
751
+ collection :responses, as: 'responses', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse::Representation
752
+
753
+ end
754
+ end
755
+
756
+ class GoogleCloudVisionV1p2beta1GcsDestination
757
+ # @private
758
+ class Representation < Google::Apis::Core::JsonRepresentation
759
+ property :uri, as: 'uri'
760
+ end
761
+ end
762
+
763
+ class GoogleCloudVisionV1p2beta1OperationMetadata
764
+ # @private
765
+ class Representation < Google::Apis::Core::JsonRepresentation
766
+ property :create_time, as: 'createTime'
767
+ property :state, as: 'state'
768
+ property :update_time, as: 'updateTime'
769
+ end
770
+ end
771
+
772
+ class GoogleCloudVisionV1p2beta1OutputConfig
773
+ # @private
774
+ class Representation < Google::Apis::Core::JsonRepresentation
775
+ property :batch_size, as: 'batchSize'
776
+ property :gcs_destination, as: 'gcsDestination', class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1GcsDestination, decorator: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p2beta1GcsDestination::Representation
777
+
778
+ end
779
+ end
780
+
710
781
  class LatLng
711
782
  # @private
712
783
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -20,7 +20,7 @@ require 'google/apis/errors'
20
20
  module Google
21
21
  module Apis
22
22
  module VisionV1p1beta1
23
- # Google Cloud Vision API
23
+ # Cloud Vision API
24
24
  #
25
25
  # Integrates Google Vision features, including image labeling, face, logo, and
26
26
  # landmark detection, optical character recognition (OCR), and detection of
@@ -0,0 +1,39 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/vision_v1p2beta1/service.rb'
16
+ require 'google/apis/vision_v1p2beta1/classes.rb'
17
+ require 'google/apis/vision_v1p2beta1/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # Cloud Vision API
22
+ #
23
+ # Integrates Google Vision features, including image labeling, face, logo, and
24
+ # landmark detection, optical character recognition (OCR), and detection of
25
+ # explicit content, into applications.
26
+ #
27
+ # @see https://cloud.google.com/vision/
28
+ module VisionV1p2beta1
29
+ VERSION = 'V1p2beta1'
30
+ REVISION = '20180327'
31
+
32
+ # View and manage your data across Google Cloud Platform services
33
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
+
35
+ # Apply machine learning models to understand and label images
36
+ AUTH_CLOUD_VISION = 'https://www.googleapis.com/auth/cloud-vision'
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,2172 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module VisionV1p2beta1
24
+
25
+ # Represents a color in the RGBA color space. This representation is designed
26
+ # for simplicity of conversion to/from color representations in various
27
+ # languages over compactness; for example, the fields of this representation
28
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30
+ # method in iOS; and, with just a little work, it can be easily formatted into
31
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32
+ # Example (Java):
33
+ # import com.google.type.Color;
34
+ # // ...
35
+ # public static java.awt.Color fromProto(Color protocolor) `
36
+ # float alpha = protocolor.hasAlpha()
37
+ # ? protocolor.getAlpha().getValue()
38
+ # : 1.0;
39
+ # return new java.awt.Color(
40
+ # protocolor.getRed(),
41
+ # protocolor.getGreen(),
42
+ # protocolor.getBlue(),
43
+ # alpha);
44
+ # `
45
+ # public static Color toProto(java.awt.Color color) `
46
+ # float red = (float) color.getRed();
47
+ # float green = (float) color.getGreen();
48
+ # float blue = (float) color.getBlue();
49
+ # float denominator = 255.0;
50
+ # Color.Builder resultBuilder =
51
+ # Color
52
+ # .newBuilder()
53
+ # .setRed(red / denominator)
54
+ # .setGreen(green / denominator)
55
+ # .setBlue(blue / denominator);
56
+ # int alpha = color.getAlpha();
57
+ # if (alpha != 255) `
58
+ # result.setAlpha(
59
+ # FloatValue
60
+ # .newBuilder()
61
+ # .setValue(((float) alpha) / denominator)
62
+ # .build());
63
+ # `
64
+ # return resultBuilder.build();
65
+ # `
66
+ # // ...
67
+ # Example (iOS / Obj-C):
68
+ # // ...
69
+ # static UIColor* fromProto(Color* protocolor) `
70
+ # float red = [protocolor red];
71
+ # float green = [protocolor green];
72
+ # float blue = [protocolor blue];
73
+ # FloatValue* alpha_wrapper = [protocolor alpha];
74
+ # float alpha = 1.0;
75
+ # if (alpha_wrapper != nil) `
76
+ # alpha = [alpha_wrapper value];
77
+ # `
78
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
79
+ # `
80
+ # static Color* toProto(UIColor* color) `
81
+ # CGFloat red, green, blue, alpha;
82
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
83
+ # return nil;
84
+ # `
85
+ # Color* result = [Color alloc] init];
86
+ # [result setRed:red];
87
+ # [result setGreen:green];
88
+ # [result setBlue:blue];
89
+ # if (alpha <= 0.9999) `
90
+ # [result setAlpha:floatWrapperWithValue(alpha)];
91
+ # `
92
+ # [result autorelease];
93
+ # return result;
94
+ # `
95
+ # // ...
96
+ # Example (JavaScript):
97
+ # // ...
98
+ # var protoToCssColor = function(rgb_color) `
99
+ # var redFrac = rgb_color.red || 0.0;
100
+ # var greenFrac = rgb_color.green || 0.0;
101
+ # var blueFrac = rgb_color.blue || 0.0;
102
+ # var red = Math.floor(redFrac * 255);
103
+ # var green = Math.floor(greenFrac * 255);
104
+ # var blue = Math.floor(blueFrac * 255);
105
+ # if (!('alpha' in rgb_color)) `
106
+ # return rgbToCssColor_(red, green, blue);
107
+ # `
108
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
109
+ # var rgbParams = [red, green, blue].join(',');
110
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
111
+ # `;
112
+ # var rgbToCssColor_ = function(red, green, blue) `
113
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
114
+ # var hexString = rgbNumber.toString(16);
115
+ # var missingZeros = 6 - hexString.length;
116
+ # var resultBuilder = ['#'];
117
+ # for (var i = 0; i < missingZeros; i++) `
118
+ # resultBuilder.push('0');
119
+ # `
120
+ # resultBuilder.push(hexString);
121
+ # return resultBuilder.join('');
122
+ # `;
123
+ # // ...
124
+ class Color
125
+ include Google::Apis::Core::Hashable
126
+
127
+ # The fraction of this color that should be applied to the pixel. That is,
128
+ # the final pixel color is defined by the equation:
129
+ # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
130
+ # This means that a value of 1.0 corresponds to a solid color, whereas
131
+ # a value of 0.0 corresponds to a completely transparent color. This
132
+ # uses a wrapper message rather than a simple float scalar so that it is
133
+ # possible to distinguish between a default value and the value being unset.
134
+ # If omitted, this color object is to be rendered as a solid color
135
+ # (as if the alpha value had been explicitly given with a value of 1.0).
136
+ # Corresponds to the JSON property `alpha`
137
+ # @return [Float]
138
+ attr_accessor :alpha
139
+
140
+ # The amount of blue in the color as a value in the interval [0, 1].
141
+ # Corresponds to the JSON property `blue`
142
+ # @return [Float]
143
+ attr_accessor :blue
144
+
145
+ # The amount of green in the color as a value in the interval [0, 1].
146
+ # Corresponds to the JSON property `green`
147
+ # @return [Float]
148
+ attr_accessor :green
149
+
150
+ # The amount of red in the color as a value in the interval [0, 1].
151
+ # Corresponds to the JSON property `red`
152
+ # @return [Float]
153
+ attr_accessor :red
154
+
155
+ def initialize(**args)
156
+ update!(**args)
157
+ end
158
+
159
+ # Update properties of this object
160
+ def update!(**args)
161
+ @alpha = args[:alpha] if args.key?(:alpha)
162
+ @blue = args[:blue] if args.key?(:blue)
163
+ @green = args[:green] if args.key?(:green)
164
+ @red = args[:red] if args.key?(:red)
165
+ end
166
+ end
167
+
168
+ # Request for performing Google Cloud Vision API tasks over a user-provided
169
+ # image, with user-requested features.
170
+ class GoogleCloudVisionV1p2beta1AnnotateImageRequest
171
+ include Google::Apis::Core::Hashable
172
+
173
+ # Requested features.
174
+ # Corresponds to the JSON property `features`
175
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Feature>]
176
+ attr_accessor :features
177
+
178
+ # Client image to perform Google Cloud Vision API tasks over.
179
+ # Corresponds to the JSON property `image`
180
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Image]
181
+ attr_accessor :image
182
+
183
+ # Image context and/or feature-specific parameters.
184
+ # Corresponds to the JSON property `imageContext`
185
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageContext]
186
+ attr_accessor :image_context
187
+
188
+ def initialize(**args)
189
+ update!(**args)
190
+ end
191
+
192
+ # Update properties of this object
193
+ def update!(**args)
194
+ @features = args[:features] if args.key?(:features)
195
+ @image = args[:image] if args.key?(:image)
196
+ @image_context = args[:image_context] if args.key?(:image_context)
197
+ end
198
+ end
199
+
200
+ # Response to an image annotation request.
201
+ class GoogleCloudVisionV1p2beta1AnnotateImageResponse
202
+ include Google::Apis::Core::Hashable
203
+
204
+ # If an image was produced from a file (e.g. a PDF), this message gives
205
+ # information about the source of that image.
206
+ # Corresponds to the JSON property `context`
207
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageAnnotationContext]
208
+ attr_accessor :context
209
+
210
+ # Set of crop hints that are used to generate new crops when serving images.
211
+ # Corresponds to the JSON property `cropHintsAnnotation`
212
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHintsAnnotation]
213
+ attr_accessor :crop_hints_annotation
214
+
215
+ # The `Status` type defines a logical error model that is suitable for different
216
+ # programming environments, including REST APIs and RPC APIs. It is used by
217
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
218
+ # - Simple to use and understand for most users
219
+ # - Flexible enough to meet unexpected needs
220
+ # # Overview
221
+ # The `Status` message contains three pieces of data: error code, error message,
222
+ # and error details. The error code should be an enum value of
223
+ # google.rpc.Code, but it may accept additional error codes if needed. The
224
+ # error message should be a developer-facing English message that helps
225
+ # developers *understand* and *resolve* the error. If a localized user-facing
226
+ # error message is needed, put the localized message in the error details or
227
+ # localize it in the client. The optional error details may contain arbitrary
228
+ # information about the error. There is a predefined set of error detail types
229
+ # in the package `google.rpc` that can be used for common error conditions.
230
+ # # Language mapping
231
+ # The `Status` message is the logical representation of the error model, but it
232
+ # is not necessarily the actual wire format. When the `Status` message is
233
+ # exposed in different client libraries and different wire protocols, it can be
234
+ # mapped differently. For example, it will likely be mapped to some exceptions
235
+ # in Java, but more likely mapped to some error codes in C.
236
+ # # Other uses
237
+ # The error model and the `Status` message can be used in a variety of
238
+ # environments, either with or without APIs, to provide a
239
+ # consistent developer experience across different environments.
240
+ # Example uses of this error model include:
241
+ # - Partial errors. If a service needs to return partial errors to the client,
242
+ # it may embed the `Status` in the normal response to indicate the partial
243
+ # errors.
244
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
245
+ # have a `Status` message for error reporting.
246
+ # - Batch operations. If a client uses batch request and batch response, the
247
+ # `Status` message should be used directly inside batch response, one for
248
+ # each error sub-response.
249
+ # - Asynchronous operations. If an API call embeds asynchronous operation
250
+ # results in its response, the status of those operations should be
251
+ # represented directly using the `Status` message.
252
+ # - Logging. If some API errors are stored in logs, the message `Status` could
253
+ # be used directly after any stripping needed for security/privacy reasons.
254
+ # Corresponds to the JSON property `error`
255
+ # @return [Google::Apis::VisionV1p2beta1::Status]
256
+ attr_accessor :error
257
+
258
+ # If present, face detection has completed successfully.
259
+ # Corresponds to the JSON property `faceAnnotations`
260
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1FaceAnnotation>]
261
+ attr_accessor :face_annotations
262
+
263
+ # TextAnnotation contains a structured representation of OCR extracted text.
264
+ # The hierarchy of an OCR extracted text structure is like this:
265
+ # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
266
+ # Each structural component, starting from Page, may further have their own
267
+ # properties. Properties describe detected languages, breaks etc.. Please refer
268
+ # to the TextAnnotation.TextProperty message definition below for more
269
+ # detail.
270
+ # Corresponds to the JSON property `fullTextAnnotation`
271
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotation]
272
+ attr_accessor :full_text_annotation
273
+
274
+ # Stores image properties, such as dominant colors.
275
+ # Corresponds to the JSON property `imagePropertiesAnnotation`
276
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageProperties]
277
+ attr_accessor :image_properties_annotation
278
+
279
+ # If present, label detection has completed successfully.
280
+ # Corresponds to the JSON property `labelAnnotations`
281
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
282
+ attr_accessor :label_annotations
283
+
284
+ # If present, landmark detection has completed successfully.
285
+ # Corresponds to the JSON property `landmarkAnnotations`
286
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
287
+ attr_accessor :landmark_annotations
288
+
289
+ # If present, logo detection has completed successfully.
290
+ # Corresponds to the JSON property `logoAnnotations`
291
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
292
+ attr_accessor :logo_annotations
293
+
294
+ # Set of features pertaining to the image, computed by computer vision
295
+ # methods over safe-search verticals (for example, adult, spoof, medical,
296
+ # violence).
297
+ # Corresponds to the JSON property `safeSearchAnnotation`
298
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1SafeSearchAnnotation]
299
+ attr_accessor :safe_search_annotation
300
+
301
+ # If present, text (OCR) detection has completed successfully.
302
+ # Corresponds to the JSON property `textAnnotations`
303
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
304
+ attr_accessor :text_annotations
305
+
306
+ # Relevant information for the image from the Internet.
307
+ # Corresponds to the JSON property `webDetection`
308
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetection]
309
+ attr_accessor :web_detection
310
+
311
+ def initialize(**args)
312
+ update!(**args)
313
+ end
314
+
315
+ # Update properties of this object
316
+ def update!(**args)
317
+ @context = args[:context] if args.key?(:context)
318
+ @crop_hints_annotation = args[:crop_hints_annotation] if args.key?(:crop_hints_annotation)
319
+ @error = args[:error] if args.key?(:error)
320
+ @face_annotations = args[:face_annotations] if args.key?(:face_annotations)
321
+ @full_text_annotation = args[:full_text_annotation] if args.key?(:full_text_annotation)
322
+ @image_properties_annotation = args[:image_properties_annotation] if args.key?(:image_properties_annotation)
323
+ @label_annotations = args[:label_annotations] if args.key?(:label_annotations)
324
+ @landmark_annotations = args[:landmark_annotations] if args.key?(:landmark_annotations)
325
+ @logo_annotations = args[:logo_annotations] if args.key?(:logo_annotations)
326
+ @safe_search_annotation = args[:safe_search_annotation] if args.key?(:safe_search_annotation)
327
+ @text_annotations = args[:text_annotations] if args.key?(:text_annotations)
328
+ @web_detection = args[:web_detection] if args.key?(:web_detection)
329
+ end
330
+ end
331
+
332
+ # An offline file annotation request.
333
+ class GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest
334
+ include Google::Apis::Core::Hashable
335
+
336
+ # Required. Requested features.
337
+ # Corresponds to the JSON property `features`
338
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Feature>]
339
+ attr_accessor :features
340
+
341
+ # Image context and/or feature-specific parameters.
342
+ # Corresponds to the JSON property `imageContext`
343
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageContext]
344
+ attr_accessor :image_context
345
+
346
+ # The desired input location and metadata.
347
+ # Corresponds to the JSON property `inputConfig`
348
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1InputConfig]
349
+ attr_accessor :input_config
350
+
351
+ # The desired output location and metadata.
352
+ # Corresponds to the JSON property `outputConfig`
353
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig]
354
+ attr_accessor :output_config
355
+
356
+ def initialize(**args)
357
+ update!(**args)
358
+ end
359
+
360
+ # Update properties of this object
361
+ def update!(**args)
362
+ @features = args[:features] if args.key?(:features)
363
+ @image_context = args[:image_context] if args.key?(:image_context)
364
+ @input_config = args[:input_config] if args.key?(:input_config)
365
+ @output_config = args[:output_config] if args.key?(:output_config)
366
+ end
367
+ end
368
+
369
+ # The response for a single offline file annotation request.
370
+ class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
371
+ include Google::Apis::Core::Hashable
372
+
373
+ # The desired output location and metadata.
374
+ # Corresponds to the JSON property `outputConfig`
375
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig]
376
+ attr_accessor :output_config
377
+
378
+ def initialize(**args)
379
+ update!(**args)
380
+ end
381
+
382
+ # Update properties of this object
383
+ def update!(**args)
384
+ @output_config = args[:output_config] if args.key?(:output_config)
385
+ end
386
+ end
387
+
388
+ # Multiple async file annotation requests are batched into a single service
389
+ # call.
390
+ class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
391
+ include Google::Apis::Core::Hashable
392
+
393
+ # Individual async file annotation requests for this batch.
394
+ # Corresponds to the JSON property `requests`
395
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest>]
396
+ attr_accessor :requests
397
+
398
+ def initialize(**args)
399
+ update!(**args)
400
+ end
401
+
402
+ # Update properties of this object
403
+ def update!(**args)
404
+ @requests = args[:requests] if args.key?(:requests)
405
+ end
406
+ end
407
+
408
+ # Response to an async batch file annotation request.
409
+ class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
410
+ include Google::Apis::Core::Hashable
411
+
412
+ # The list of file annotation responses, one for each request in
413
+ # AsyncBatchAnnotateFilesRequest.
414
+ # Corresponds to the JSON property `responses`
415
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse>]
416
+ attr_accessor :responses
417
+
418
+ def initialize(**args)
419
+ update!(**args)
420
+ end
421
+
422
+ # Update properties of this object
423
+ def update!(**args)
424
+ @responses = args[:responses] if args.key?(:responses)
425
+ end
426
+ end
427
+
428
+ # Multiple image annotation requests are batched into a single service call.
429
+ class GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest
430
+ include Google::Apis::Core::Hashable
431
+
432
+ # Individual image annotation requests for this batch.
433
+ # Corresponds to the JSON property `requests`
434
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest>]
435
+ attr_accessor :requests
436
+
437
+ def initialize(**args)
438
+ update!(**args)
439
+ end
440
+
441
+ # Update properties of this object
442
+ def update!(**args)
443
+ @requests = args[:requests] if args.key?(:requests)
444
+ end
445
+ end
446
+
447
+ # Response to a batch image annotation request.
448
+ class GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse
449
+ include Google::Apis::Core::Hashable
450
+
451
+ # Individual responses to image annotation requests within the batch.
452
+ # Corresponds to the JSON property `responses`
453
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageResponse>]
454
+ attr_accessor :responses
455
+
456
+ def initialize(**args)
457
+ update!(**args)
458
+ end
459
+
460
+ # Update properties of this object
461
+ def update!(**args)
462
+ @responses = args[:responses] if args.key?(:responses)
463
+ end
464
+ end
465
+
466
+ # Logical element on the page.
467
+ class GoogleCloudVisionV1p2beta1Block
468
+ include Google::Apis::Core::Hashable
469
+
470
+ # Detected block type (text, image etc) for this block.
471
+ # Corresponds to the JSON property `blockType`
472
+ # @return [String]
473
+ attr_accessor :block_type
474
+
475
+ # A bounding polygon for the detected image annotation.
476
+ # Corresponds to the JSON property `boundingBox`
477
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
478
+ attr_accessor :bounding_box
479
+
480
+ # Confidence of the OCR results on the block. Range [0, 1].
481
+ # Corresponds to the JSON property `confidence`
482
+ # @return [Float]
483
+ attr_accessor :confidence
484
+
485
+ # List of paragraphs in this block (if this blocks is of type text).
486
+ # Corresponds to the JSON property `paragraphs`
487
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Paragraph>]
488
+ attr_accessor :paragraphs
489
+
490
+ # Additional information detected on the structural component.
491
+ # Corresponds to the JSON property `property`
492
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
493
+ attr_accessor :property
494
+
495
+ def initialize(**args)
496
+ update!(**args)
497
+ end
498
+
499
+ # Update properties of this object
500
+ def update!(**args)
501
+ @block_type = args[:block_type] if args.key?(:block_type)
502
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
503
+ @confidence = args[:confidence] if args.key?(:confidence)
504
+ @paragraphs = args[:paragraphs] if args.key?(:paragraphs)
505
+ @property = args[:property] if args.key?(:property)
506
+ end
507
+ end
508
+
509
+ # A bounding polygon for the detected image annotation.
510
+ class GoogleCloudVisionV1p2beta1BoundingPoly
511
+ include Google::Apis::Core::Hashable
512
+
513
+ # The bounding polygon vertices.
514
+ # Corresponds to the JSON property `vertices`
515
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Vertex>]
516
+ attr_accessor :vertices
517
+
518
+ def initialize(**args)
519
+ update!(**args)
520
+ end
521
+
522
+ # Update properties of this object
523
+ def update!(**args)
524
+ @vertices = args[:vertices] if args.key?(:vertices)
525
+ end
526
+ end
527
+
528
+ # Color information consists of RGB channels, score, and the fraction of
529
+ # the image that the color occupies in the image.
530
+ class GoogleCloudVisionV1p2beta1ColorInfo
531
+ include Google::Apis::Core::Hashable
532
+
533
+ # Represents a color in the RGBA color space. This representation is designed
534
+ # for simplicity of conversion to/from color representations in various
535
+ # languages over compactness; for example, the fields of this representation
536
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
537
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
538
+ # method in iOS; and, with just a little work, it can be easily formatted into
539
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
540
+ # Example (Java):
541
+ # import com.google.type.Color;
542
+ # // ...
543
+ # public static java.awt.Color fromProto(Color protocolor) `
544
+ # float alpha = protocolor.hasAlpha()
545
+ # ? protocolor.getAlpha().getValue()
546
+ # : 1.0;
547
+ # return new java.awt.Color(
548
+ # protocolor.getRed(),
549
+ # protocolor.getGreen(),
550
+ # protocolor.getBlue(),
551
+ # alpha);
552
+ # `
553
+ # public static Color toProto(java.awt.Color color) `
554
+ # float red = (float) color.getRed();
555
+ # float green = (float) color.getGreen();
556
+ # float blue = (float) color.getBlue();
557
+ # float denominator = 255.0;
558
+ # Color.Builder resultBuilder =
559
+ # Color
560
+ # .newBuilder()
561
+ # .setRed(red / denominator)
562
+ # .setGreen(green / denominator)
563
+ # .setBlue(blue / denominator);
564
+ # int alpha = color.getAlpha();
565
+ # if (alpha != 255) `
566
+ # result.setAlpha(
567
+ # FloatValue
568
+ # .newBuilder()
569
+ # .setValue(((float) alpha) / denominator)
570
+ # .build());
571
+ # `
572
+ # return resultBuilder.build();
573
+ # `
574
+ # // ...
575
+ # Example (iOS / Obj-C):
576
+ # // ...
577
+ # static UIColor* fromProto(Color* protocolor) `
578
+ # float red = [protocolor red];
579
+ # float green = [protocolor green];
580
+ # float blue = [protocolor blue];
581
+ # FloatValue* alpha_wrapper = [protocolor alpha];
582
+ # float alpha = 1.0;
583
+ # if (alpha_wrapper != nil) `
584
+ # alpha = [alpha_wrapper value];
585
+ # `
586
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
587
+ # `
588
+ # static Color* toProto(UIColor* color) `
589
+ # CGFloat red, green, blue, alpha;
590
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
591
+ # return nil;
592
+ # `
593
+ # Color* result = [Color alloc] init];
594
+ # [result setRed:red];
595
+ # [result setGreen:green];
596
+ # [result setBlue:blue];
597
+ # if (alpha <= 0.9999) `
598
+ # [result setAlpha:floatWrapperWithValue(alpha)];
599
+ # `
600
+ # [result autorelease];
601
+ # return result;
602
+ # `
603
+ # // ...
604
+ # Example (JavaScript):
605
+ # // ...
606
+ # var protoToCssColor = function(rgb_color) `
607
+ # var redFrac = rgb_color.red || 0.0;
608
+ # var greenFrac = rgb_color.green || 0.0;
609
+ # var blueFrac = rgb_color.blue || 0.0;
610
+ # var red = Math.floor(redFrac * 255);
611
+ # var green = Math.floor(greenFrac * 255);
612
+ # var blue = Math.floor(blueFrac * 255);
613
+ # if (!('alpha' in rgb_color)) `
614
+ # return rgbToCssColor_(red, green, blue);
615
+ # `
616
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
617
+ # var rgbParams = [red, green, blue].join(',');
618
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
619
+ # `;
620
+ # var rgbToCssColor_ = function(red, green, blue) `
621
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
622
+ # var hexString = rgbNumber.toString(16);
623
+ # var missingZeros = 6 - hexString.length;
624
+ # var resultBuilder = ['#'];
625
+ # for (var i = 0; i < missingZeros; i++) `
626
+ # resultBuilder.push('0');
627
+ # `
628
+ # resultBuilder.push(hexString);
629
+ # return resultBuilder.join('');
630
+ # `;
631
+ # // ...
632
+ # Corresponds to the JSON property `color`
633
+ # @return [Google::Apis::VisionV1p2beta1::Color]
634
+ attr_accessor :color
635
+
636
+ # The fraction of pixels the color occupies in the image.
637
+ # Value in range [0, 1].
638
+ # Corresponds to the JSON property `pixelFraction`
639
+ # @return [Float]
640
+ attr_accessor :pixel_fraction
641
+
642
+ # Image-specific score for this color. Value in range [0, 1].
643
+ # Corresponds to the JSON property `score`
644
+ # @return [Float]
645
+ attr_accessor :score
646
+
647
+ def initialize(**args)
648
+ update!(**args)
649
+ end
650
+
651
+ # Update properties of this object
652
+ def update!(**args)
653
+ @color = args[:color] if args.key?(:color)
654
+ @pixel_fraction = args[:pixel_fraction] if args.key?(:pixel_fraction)
655
+ @score = args[:score] if args.key?(:score)
656
+ end
657
+ end
658
+
659
+ # Single crop hint that is used to generate a new crop when serving an image.
660
+ class GoogleCloudVisionV1p2beta1CropHint
661
+ include Google::Apis::Core::Hashable
662
+
663
+ # A bounding polygon for the detected image annotation.
664
+ # Corresponds to the JSON property `boundingPoly`
665
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
666
+ attr_accessor :bounding_poly
667
+
668
+ # Confidence of this being a salient region. Range [0, 1].
669
+ # Corresponds to the JSON property `confidence`
670
+ # @return [Float]
671
+ attr_accessor :confidence
672
+
673
+ # Fraction of importance of this salient region with respect to the original
674
+ # image.
675
+ # Corresponds to the JSON property `importanceFraction`
676
+ # @return [Float]
677
+ attr_accessor :importance_fraction
678
+
679
+ def initialize(**args)
680
+ update!(**args)
681
+ end
682
+
683
+ # Update properties of this object
684
+ def update!(**args)
685
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
686
+ @confidence = args[:confidence] if args.key?(:confidence)
687
+ @importance_fraction = args[:importance_fraction] if args.key?(:importance_fraction)
688
+ end
689
+ end
690
+
691
+ # Set of crop hints that are used to generate new crops when serving images.
692
+ class GoogleCloudVisionV1p2beta1CropHintsAnnotation
693
+ include Google::Apis::Core::Hashable
694
+
695
+ # Crop hint results.
696
+ # Corresponds to the JSON property `cropHints`
697
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHint>]
698
+ attr_accessor :crop_hints
699
+
700
+ def initialize(**args)
701
+ update!(**args)
702
+ end
703
+
704
+ # Update properties of this object
705
+ def update!(**args)
706
+ @crop_hints = args[:crop_hints] if args.key?(:crop_hints)
707
+ end
708
+ end
709
+
710
+ # Parameters for crop hints annotation request.
711
+ class GoogleCloudVisionV1p2beta1CropHintsParams
712
+ include Google::Apis::Core::Hashable
713
+
714
+ # Aspect ratios in floats, representing the ratio of the width to the height
715
+ # of the image. For example, if the desired aspect ratio is 4/3, the
716
+ # corresponding float value should be 1.33333. If not specified, the
717
+ # best possible crop is returned. The number of provided aspect ratios is
718
+ # limited to a maximum of 16; any aspect ratios provided after the 16th are
719
+ # ignored.
720
+ # Corresponds to the JSON property `aspectRatios`
721
+ # @return [Array<Float>]
722
+ attr_accessor :aspect_ratios
723
+
724
+ def initialize(**args)
725
+ update!(**args)
726
+ end
727
+
728
+ # Update properties of this object
729
+ def update!(**args)
730
+ @aspect_ratios = args[:aspect_ratios] if args.key?(:aspect_ratios)
731
+ end
732
+ end
733
+
734
+ # Set of dominant colors and their corresponding scores.
735
+ class GoogleCloudVisionV1p2beta1DominantColorsAnnotation
736
+ include Google::Apis::Core::Hashable
737
+
738
+ # RGB color values with their score and pixel fraction.
739
+ # Corresponds to the JSON property `colors`
740
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ColorInfo>]
741
+ attr_accessor :colors
742
+
743
+ def initialize(**args)
744
+ update!(**args)
745
+ end
746
+
747
+ # Update properties of this object
748
+ def update!(**args)
749
+ @colors = args[:colors] if args.key?(:colors)
750
+ end
751
+ end
752
+
753
+ # Set of detected entity features.
754
+ class GoogleCloudVisionV1p2beta1EntityAnnotation
755
+ include Google::Apis::Core::Hashable
756
+
757
+ # A bounding polygon for the detected image annotation.
758
+ # Corresponds to the JSON property `boundingPoly`
759
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
760
+ attr_accessor :bounding_poly
761
+
762
+ # **Deprecated. Use `score` instead.**
763
+ # The accuracy of the entity detection in an image.
764
+ # For example, for an image in which the "Eiffel Tower" entity is detected,
765
+ # this field represents the confidence that there is a tower in the query
766
+ # image. Range [0, 1].
767
+ # Corresponds to the JSON property `confidence`
768
+ # @return [Float]
769
+ attr_accessor :confidence
770
+
771
+ # Entity textual description, expressed in its `locale` language.
772
+ # Corresponds to the JSON property `description`
773
+ # @return [String]
774
+ attr_accessor :description
775
+
776
+ # The language code for the locale in which the entity textual
777
+ # `description` is expressed.
778
+ # Corresponds to the JSON property `locale`
779
+ # @return [String]
780
+ attr_accessor :locale
781
+
782
+ # The location information for the detected entity. Multiple
783
+ # `LocationInfo` elements can be present because one location may
784
+ # indicate the location of the scene in the image, and another location
785
+ # may indicate the location of the place where the image was taken.
786
+ # Location information is usually present for landmarks.
787
+ # Corresponds to the JSON property `locations`
788
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1LocationInfo>]
789
+ attr_accessor :locations
790
+
791
+ # Opaque entity ID. Some IDs may be available in
792
+ # [Google Knowledge Graph Search
793
+ # API](https://developers.google.com/knowledge-graph/).
794
+ # Corresponds to the JSON property `mid`
795
+ # @return [String]
796
+ attr_accessor :mid
797
+
798
+ # Some entities may have optional user-supplied `Property` (name/value)
799
+ # fields, such a score or string that qualifies the entity.
800
+ # Corresponds to the JSON property `properties`
801
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Property>]
802
+ attr_accessor :properties
803
+
804
+ # Overall score of the result. Range [0, 1].
805
+ # Corresponds to the JSON property `score`
806
+ # @return [Float]
807
+ attr_accessor :score
808
+
809
+ # The relevancy of the ICA (Image Content Annotation) label to the
810
+ # image. For example, the relevancy of "tower" is likely higher to an image
811
+ # containing the detected "Eiffel Tower" than to an image containing a
812
+ # detected distant towering building, even though the confidence that
813
+ # there is a tower in each image may be the same. Range [0, 1].
814
+ # Corresponds to the JSON property `topicality`
815
+ # @return [Float]
816
+ attr_accessor :topicality
817
+
818
+ def initialize(**args)
819
+ update!(**args)
820
+ end
821
+
822
+ # Update properties of this object
823
+ def update!(**args)
824
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
825
+ @confidence = args[:confidence] if args.key?(:confidence)
826
+ @description = args[:description] if args.key?(:description)
827
+ @locale = args[:locale] if args.key?(:locale)
828
+ @locations = args[:locations] if args.key?(:locations)
829
+ @mid = args[:mid] if args.key?(:mid)
830
+ @properties = args[:properties] if args.key?(:properties)
831
+ @score = args[:score] if args.key?(:score)
832
+ @topicality = args[:topicality] if args.key?(:topicality)
833
+ end
834
+ end
835
+
836
+ # A face annotation object contains the results of face detection.
837
+ class GoogleCloudVisionV1p2beta1FaceAnnotation
838
+ include Google::Apis::Core::Hashable
839
+
840
+ # Anger likelihood.
841
+ # Corresponds to the JSON property `angerLikelihood`
842
+ # @return [String]
843
+ attr_accessor :anger_likelihood
844
+
845
+ # Blurred likelihood.
846
+ # Corresponds to the JSON property `blurredLikelihood`
847
+ # @return [String]
848
+ attr_accessor :blurred_likelihood
849
+
850
+ # A bounding polygon for the detected image annotation.
851
+ # Corresponds to the JSON property `boundingPoly`
852
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
853
+ attr_accessor :bounding_poly
854
+
855
+ # Detection confidence. Range [0, 1].
856
+ # Corresponds to the JSON property `detectionConfidence`
857
+ # @return [Float]
858
+ attr_accessor :detection_confidence
859
+
860
+ # A bounding polygon for the detected image annotation.
861
+ # Corresponds to the JSON property `fdBoundingPoly`
862
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
863
+ attr_accessor :fd_bounding_poly
864
+
865
+ # Headwear likelihood.
866
+ # Corresponds to the JSON property `headwearLikelihood`
867
+ # @return [String]
868
+ attr_accessor :headwear_likelihood
869
+
870
+ # Joy likelihood.
871
+ # Corresponds to the JSON property `joyLikelihood`
872
+ # @return [String]
873
+ attr_accessor :joy_likelihood
874
+
875
+ # Face landmarking confidence. Range [0, 1].
876
+ # Corresponds to the JSON property `landmarkingConfidence`
877
+ # @return [Float]
878
+ attr_accessor :landmarking_confidence
879
+
880
+ # Detected face landmarks.
881
+ # Corresponds to the JSON property `landmarks`
882
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1FaceAnnotationLandmark>]
883
+ attr_accessor :landmarks
884
+
885
+ # Yaw angle, which indicates the leftward/rightward angle that the face is
886
+ # pointing relative to the vertical plane perpendicular to the image. Range
887
+ # [-180,180].
888
+ # Corresponds to the JSON property `panAngle`
889
+ # @return [Float]
890
+ attr_accessor :pan_angle
891
+
892
+ # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
893
+ # of the face relative to the image vertical about the axis perpendicular to
894
+ # the face. Range [-180,180].
895
+ # Corresponds to the JSON property `rollAngle`
896
+ # @return [Float]
897
+ attr_accessor :roll_angle
898
+
899
+ # Sorrow likelihood.
900
+ # Corresponds to the JSON property `sorrowLikelihood`
901
+ # @return [String]
902
+ attr_accessor :sorrow_likelihood
903
+
904
+ # Surprise likelihood.
905
+ # Corresponds to the JSON property `surpriseLikelihood`
906
+ # @return [String]
907
+ attr_accessor :surprise_likelihood
908
+
909
+ # Pitch angle, which indicates the upwards/downwards angle that the face is
910
+ # pointing relative to the image's horizontal plane. Range [-180,180].
911
+ # Corresponds to the JSON property `tiltAngle`
912
+ # @return [Float]
913
+ attr_accessor :tilt_angle
914
+
915
+ # Under-exposed likelihood.
916
+ # Corresponds to the JSON property `underExposedLikelihood`
917
+ # @return [String]
918
+ attr_accessor :under_exposed_likelihood
919
+
920
+ def initialize(**args)
921
+ update!(**args)
922
+ end
923
+
924
+ # Update properties of this object
925
+ def update!(**args)
926
+ @anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood)
927
+ @blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood)
928
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
929
+ @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence)
930
+ @fd_bounding_poly = args[:fd_bounding_poly] if args.key?(:fd_bounding_poly)
931
+ @headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood)
932
+ @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood)
933
+ @landmarking_confidence = args[:landmarking_confidence] if args.key?(:landmarking_confidence)
934
+ @landmarks = args[:landmarks] if args.key?(:landmarks)
935
+ @pan_angle = args[:pan_angle] if args.key?(:pan_angle)
936
+ @roll_angle = args[:roll_angle] if args.key?(:roll_angle)
937
+ @sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood)
938
+ @surprise_likelihood = args[:surprise_likelihood] if args.key?(:surprise_likelihood)
939
+ @tilt_angle = args[:tilt_angle] if args.key?(:tilt_angle)
940
+ @under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood)
941
+ end
942
+ end
943
+
944
+ # A face-specific landmark (for example, a face feature).
945
+ class GoogleCloudVisionV1p2beta1FaceAnnotationLandmark
946
+ include Google::Apis::Core::Hashable
947
+
948
+ # A 3D position in the image, used primarily for Face detection landmarks.
949
+ # A valid Position must have both x and y coordinates.
950
+ # The position coordinates are in the same scale as the original image.
951
+ # Corresponds to the JSON property `position`
952
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Position]
953
+ attr_accessor :position
954
+
955
+ # Face landmark type.
956
+ # Corresponds to the JSON property `type`
957
+ # @return [String]
958
+ attr_accessor :type
959
+
960
+ def initialize(**args)
961
+ update!(**args)
962
+ end
963
+
964
+ # Update properties of this object
965
+ def update!(**args)
966
+ @position = args[:position] if args.key?(:position)
967
+ @type = args[:type] if args.key?(:type)
968
+ end
969
+ end
970
+
971
+ # The type of Google Cloud Vision API detection to perform, and the maximum
972
+ # number of results to return for that type. Multiple `Feature` objects can
973
+ # be specified in the `features` list.
974
+ class GoogleCloudVisionV1p2beta1Feature
975
+ include Google::Apis::Core::Hashable
976
+
977
+ # Maximum number of results of this type. Does not apply to
978
+ # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
979
+ # Corresponds to the JSON property `maxResults`
980
+ # @return [Fixnum]
981
+ attr_accessor :max_results
982
+
983
+ # Model to use for the feature.
984
+ # Supported values: "builtin/stable" (the default if unset) and
985
+ # "builtin/latest".
986
+ # Corresponds to the JSON property `model`
987
+ # @return [String]
988
+ attr_accessor :model
989
+
990
+ # The feature type.
991
+ # Corresponds to the JSON property `type`
992
+ # @return [String]
993
+ attr_accessor :type
994
+
995
+ def initialize(**args)
996
+ update!(**args)
997
+ end
998
+
999
+ # Update properties of this object
1000
+ def update!(**args)
1001
+ @max_results = args[:max_results] if args.key?(:max_results)
1002
+ @model = args[:model] if args.key?(:model)
1003
+ @type = args[:type] if args.key?(:type)
1004
+ end
1005
+ end
1006
+
1007
+ # The Google Cloud Storage location where the output will be written to.
1008
+ class GoogleCloudVisionV1p2beta1GcsDestination
1009
+ include Google::Apis::Core::Hashable
1010
+
1011
+ # Google Cloud Storage URI where the results will be stored. Results will
1012
+ # be in JSON format and preceded by its corresponding input URI. This field
1013
+ # can either represent a single file, or a prefix for multiple outputs.
1014
+ # Prefixes must end in a `/`.
1015
+ # Examples:
1016
+ # * File: gs://bucket-name/filename.json
1017
+ # * Prefix: gs://bucket-name/prefix/here/
1018
+ # * File: gs://bucket-name/prefix/here
1019
+ # If multiple outputs, each response is still AnnotateFileResponse, each of
1020
+ # which contains some subset of the full list of AnnotateImageResponse.
1021
+ # Multiple outputs can happen if, for example, the output JSON is too large
1022
+ # and overflows into multiple sharded files.
1023
+ # Corresponds to the JSON property `uri`
1024
+ # @return [String]
1025
+ attr_accessor :uri
1026
+
1027
+ def initialize(**args)
1028
+ update!(**args)
1029
+ end
1030
+
1031
+ # Update properties of this object
1032
+ def update!(**args)
1033
+ @uri = args[:uri] if args.key?(:uri)
1034
+ end
1035
+ end
1036
+
1037
+ # The Google Cloud Storage location where the input will be read from.
1038
+ class GoogleCloudVisionV1p2beta1GcsSource
1039
+ include Google::Apis::Core::Hashable
1040
+
1041
+ # Google Cloud Storage URI for the input file. This must only be a GCS
1042
+ # object. Wildcards are not currently supported.
1043
+ # Corresponds to the JSON property `uri`
1044
+ # @return [String]
1045
+ attr_accessor :uri
1046
+
1047
+ def initialize(**args)
1048
+ update!(**args)
1049
+ end
1050
+
1051
+ # Update properties of this object
1052
+ def update!(**args)
1053
+ @uri = args[:uri] if args.key?(:uri)
1054
+ end
1055
+ end
1056
+
1057
+ # Client image to perform Google Cloud Vision API tasks over.
1058
+ class GoogleCloudVisionV1p2beta1Image
1059
+ include Google::Apis::Core::Hashable
1060
+
1061
+ # Image content, represented as a stream of bytes.
1062
+ # Note: As with all `bytes` fields, protobuffers use a pure binary
1063
+ # representation, whereas JSON representations use base64.
1064
+ # Corresponds to the JSON property `content`
1065
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1066
+ # @return [String]
1067
+ attr_accessor :content
1068
+
1069
+ # External image source (Google Cloud Storage or web URL image location).
1070
+ # Corresponds to the JSON property `source`
1071
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageSource]
1072
+ attr_accessor :source
1073
+
1074
+ def initialize(**args)
1075
+ update!(**args)
1076
+ end
1077
+
1078
+ # Update properties of this object
1079
+ def update!(**args)
1080
+ @content = args[:content] if args.key?(:content)
1081
+ @source = args[:source] if args.key?(:source)
1082
+ end
1083
+ end
1084
+
1085
+ # If an image was produced from a file (e.g. a PDF), this message gives
1086
+ # information about the source of that image.
1087
+ class GoogleCloudVisionV1p2beta1ImageAnnotationContext
1088
+ include Google::Apis::Core::Hashable
1089
+
1090
+ # If the file was a PDF or TIFF, this field gives the page number within
1091
+ # the file used to produce the image.
1092
+ # Corresponds to the JSON property `pageNumber`
1093
+ # @return [Fixnum]
1094
+ attr_accessor :page_number
1095
+
1096
+ # The URI of the file used to produce the image.
1097
+ # Corresponds to the JSON property `uri`
1098
+ # @return [String]
1099
+ attr_accessor :uri
1100
+
1101
+ def initialize(**args)
1102
+ update!(**args)
1103
+ end
1104
+
1105
+ # Update properties of this object
1106
+ def update!(**args)
1107
+ @page_number = args[:page_number] if args.key?(:page_number)
1108
+ @uri = args[:uri] if args.key?(:uri)
1109
+ end
1110
+ end
1111
+
1112
+ # Image context and/or feature-specific parameters.
1113
+ class GoogleCloudVisionV1p2beta1ImageContext
1114
+ include Google::Apis::Core::Hashable
1115
+
1116
+ # Parameters for crop hints annotation request.
1117
+ # Corresponds to the JSON property `cropHintsParams`
1118
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHintsParams]
1119
+ attr_accessor :crop_hints_params
1120
+
1121
+ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
1122
+ # yields the best results since it enables automatic language detection. For
1123
+ # languages based on the Latin alphabet, setting `language_hints` is not
1124
+ # needed. In rare cases, when the language of the text in the image is known,
1125
+ # setting a hint will help get better results (although it will be a
1126
+ # significant hindrance if the hint is wrong). Text detection returns an
1127
+ # error if one or more of the specified languages is not one of the
1128
+ # [supported languages](/vision/docs/languages).
1129
+ # Corresponds to the JSON property `languageHints`
1130
+ # @return [Array<String>]
1131
+ attr_accessor :language_hints
1132
+
1133
+ # Rectangle determined by min and max `LatLng` pairs.
1134
+ # Corresponds to the JSON property `latLongRect`
1135
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1LatLongRect]
1136
+ attr_accessor :lat_long_rect
1137
+
1138
+ # Parameters for web detection request.
1139
+ # Corresponds to the JSON property `webDetectionParams`
1140
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionParams]
1141
+ attr_accessor :web_detection_params
1142
+
1143
+ def initialize(**args)
1144
+ update!(**args)
1145
+ end
1146
+
1147
+ # Update properties of this object
1148
+ def update!(**args)
1149
+ @crop_hints_params = args[:crop_hints_params] if args.key?(:crop_hints_params)
1150
+ @language_hints = args[:language_hints] if args.key?(:language_hints)
1151
+ @lat_long_rect = args[:lat_long_rect] if args.key?(:lat_long_rect)
1152
+ @web_detection_params = args[:web_detection_params] if args.key?(:web_detection_params)
1153
+ end
1154
+ end
1155
+
1156
+ # Stores image properties, such as dominant colors.
1157
+ class GoogleCloudVisionV1p2beta1ImageProperties
1158
+ include Google::Apis::Core::Hashable
1159
+
1160
+ # Set of dominant colors and their corresponding scores.
1161
+ # Corresponds to the JSON property `dominantColors`
1162
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1DominantColorsAnnotation]
1163
+ attr_accessor :dominant_colors
1164
+
1165
+ def initialize(**args)
1166
+ update!(**args)
1167
+ end
1168
+
1169
+ # Update properties of this object
1170
+ def update!(**args)
1171
+ @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors)
1172
+ end
1173
+ end
1174
+
1175
+ # External image source (Google Cloud Storage or web URL image location).
1176
+ class GoogleCloudVisionV1p2beta1ImageSource
1177
+ include Google::Apis::Core::Hashable
1178
+
1179
+ # **Use `image_uri` instead.**
1180
+ # The Google Cloud Storage URI of the form
1181
+ # `gs://bucket_name/object_name`. Object versioning is not supported. See
1182
+ # [Google Cloud Storage Request
1183
+ # URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
1184
+ # Corresponds to the JSON property `gcsImageUri`
1185
+ # @return [String]
1186
+ attr_accessor :gcs_image_uri
1187
+
1188
+ # The URI of the source image. Can be either:
1189
+ # 1. A Google Cloud Storage URI of the form
1190
+ # `gs://bucket_name/object_name`. Object versioning is not supported. See
1191
+ # [Google Cloud Storage Request
1192
+ # URIs](https://cloud.google.com/storage/docs/reference-uris) for more
1193
+ # info.
1194
+ # 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
1195
+ # HTTP/HTTPS URLs, Google cannot guarantee that the request will be
1196
+ # completed. Your request may fail if the specified host denies the
1197
+ # request (e.g. due to request throttling or DOS prevention), or if Google
1198
+ # throttles requests to the site for abuse prevention. You should not
1199
+ # depend on externally-hosted images for production applications.
1200
+ # When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
1201
+ # precedence.
1202
+ # Corresponds to the JSON property `imageUri`
1203
+ # @return [String]
1204
+ attr_accessor :image_uri
1205
+
1206
+ def initialize(**args)
1207
+ update!(**args)
1208
+ end
1209
+
1210
+ # Update properties of this object
1211
+ def update!(**args)
1212
+ @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri)
1213
+ @image_uri = args[:image_uri] if args.key?(:image_uri)
1214
+ end
1215
+ end
1216
+
1217
+ # The desired input location and metadata.
1218
+ class GoogleCloudVisionV1p2beta1InputConfig
1219
+ include Google::Apis::Core::Hashable
1220
+
1221
+ # The Google Cloud Storage location where the input will be read from.
1222
+ # Corresponds to the JSON property `gcsSource`
1223
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1GcsSource]
1224
+ attr_accessor :gcs_source
1225
+
1226
+ # The type of the file. Currently only "application/pdf" and "image/tiff"
1227
+ # are supported. Wildcards are not supported.
1228
+ # Corresponds to the JSON property `mimeType`
1229
+ # @return [String]
1230
+ attr_accessor :mime_type
1231
+
1232
+ def initialize(**args)
1233
+ update!(**args)
1234
+ end
1235
+
1236
+ # Update properties of this object
1237
+ def update!(**args)
1238
+ @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
1239
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
1240
+ end
1241
+ end
1242
+
1243
+ # Rectangle determined by min and max `LatLng` pairs.
1244
+ class GoogleCloudVisionV1p2beta1LatLongRect
1245
+ include Google::Apis::Core::Hashable
1246
+
1247
+ # An object representing a latitude/longitude pair. This is expressed as a pair
1248
+ # of doubles representing degrees latitude and degrees longitude. Unless
1249
+ # specified otherwise, this must conform to the
1250
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1251
+ # standard</a>. Values must be within normalized ranges.
1252
+ # Corresponds to the JSON property `maxLatLng`
1253
+ # @return [Google::Apis::VisionV1p2beta1::LatLng]
1254
+ attr_accessor :max_lat_lng
1255
+
1256
+ # An object representing a latitude/longitude pair. This is expressed as a pair
1257
+ # of doubles representing degrees latitude and degrees longitude. Unless
1258
+ # specified otherwise, this must conform to the
1259
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1260
+ # standard</a>. Values must be within normalized ranges.
1261
+ # Corresponds to the JSON property `minLatLng`
1262
+ # @return [Google::Apis::VisionV1p2beta1::LatLng]
1263
+ attr_accessor :min_lat_lng
1264
+
1265
+ def initialize(**args)
1266
+ update!(**args)
1267
+ end
1268
+
1269
+ # Update properties of this object
1270
+ def update!(**args)
1271
+ @max_lat_lng = args[:max_lat_lng] if args.key?(:max_lat_lng)
1272
+ @min_lat_lng = args[:min_lat_lng] if args.key?(:min_lat_lng)
1273
+ end
1274
+ end
1275
+
1276
+ # Detected entity location information.
1277
+ class GoogleCloudVisionV1p2beta1LocationInfo
1278
+ include Google::Apis::Core::Hashable
1279
+
1280
+ # An object representing a latitude/longitude pair. This is expressed as a pair
1281
+ # of doubles representing degrees latitude and degrees longitude. Unless
1282
+ # specified otherwise, this must conform to the
1283
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1284
+ # standard</a>. Values must be within normalized ranges.
1285
+ # Corresponds to the JSON property `latLng`
1286
+ # @return [Google::Apis::VisionV1p2beta1::LatLng]
1287
+ attr_accessor :lat_lng
1288
+
1289
+ def initialize(**args)
1290
+ update!(**args)
1291
+ end
1292
+
1293
+ # Update properties of this object
1294
+ def update!(**args)
1295
+ @lat_lng = args[:lat_lng] if args.key?(:lat_lng)
1296
+ end
1297
+ end
1298
+
1299
+ # Contains metadata for the BatchAnnotateImages operation.
1300
+ class GoogleCloudVisionV1p2beta1OperationMetadata
1301
+ include Google::Apis::Core::Hashable
1302
+
1303
+ # The time when the batch request was received.
1304
+ # Corresponds to the JSON property `createTime`
1305
+ # @return [String]
1306
+ attr_accessor :create_time
1307
+
1308
+ # Current state of the batch operation.
1309
+ # Corresponds to the JSON property `state`
1310
+ # @return [String]
1311
+ attr_accessor :state
1312
+
1313
+ # The time when the operation result was last updated.
1314
+ # Corresponds to the JSON property `updateTime`
1315
+ # @return [String]
1316
+ attr_accessor :update_time
1317
+
1318
+ def initialize(**args)
1319
+ update!(**args)
1320
+ end
1321
+
1322
+ # Update properties of this object
1323
+ def update!(**args)
1324
+ @create_time = args[:create_time] if args.key?(:create_time)
1325
+ @state = args[:state] if args.key?(:state)
1326
+ @update_time = args[:update_time] if args.key?(:update_time)
1327
+ end
1328
+ end
1329
+
1330
+ # The desired output location and metadata.
1331
+ class GoogleCloudVisionV1p2beta1OutputConfig
1332
+ include Google::Apis::Core::Hashable
1333
+
1334
+ # The max number of response protos to put into each output JSON file on GCS.
1335
+ # The valid range is [1, 100]. If not specified, the default value is 20.
1336
+ # For example, for one pdf file with 100 pages, 100 response protos will
1337
+ # be generated. If `batch_size` = 20, then 5 json files each
1338
+ # containing 20 response protos will be written under the prefix
1339
+ # `gcs_destination`.`uri`.
1340
+ # Currently, batch_size only applies to GcsDestination, with potential future
1341
+ # support for other output configurations.
1342
+ # Corresponds to the JSON property `batchSize`
1343
+ # @return [Fixnum]
1344
+ attr_accessor :batch_size
1345
+
1346
+ # The Google Cloud Storage location where the output will be written to.
1347
+ # Corresponds to the JSON property `gcsDestination`
1348
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1GcsDestination]
1349
+ attr_accessor :gcs_destination
1350
+
1351
+ def initialize(**args)
1352
+ update!(**args)
1353
+ end
1354
+
1355
+ # Update properties of this object
1356
+ def update!(**args)
1357
+ @batch_size = args[:batch_size] if args.key?(:batch_size)
1358
+ @gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
1359
+ end
1360
+ end
1361
+
1362
+ # Detected page from OCR.
1363
+ class GoogleCloudVisionV1p2beta1Page
1364
+ include Google::Apis::Core::Hashable
1365
+
1366
+ # List of blocks of text, images etc on this page.
1367
+ # Corresponds to the JSON property `blocks`
1368
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Block>]
1369
+ attr_accessor :blocks
1370
+
1371
+ # Confidence of the OCR results on the page. Range [0, 1].
1372
+ # Corresponds to the JSON property `confidence`
1373
+ # @return [Float]
1374
+ attr_accessor :confidence
1375
+
1376
+ # Page height. For PDFs the unit is points. For images (including
1377
+ # TIFFs) the unit is pixels.
1378
+ # Corresponds to the JSON property `height`
1379
+ # @return [Fixnum]
1380
+ attr_accessor :height
1381
+
1382
+ # Additional information detected on the structural component.
1383
+ # Corresponds to the JSON property `property`
1384
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
1385
+ attr_accessor :property
1386
+
1387
+ # Page width. For PDFs the unit is points. For images (including
1388
+ # TIFFs) the unit is pixels.
1389
+ # Corresponds to the JSON property `width`
1390
+ # @return [Fixnum]
1391
+ attr_accessor :width
1392
+
1393
+ def initialize(**args)
1394
+ update!(**args)
1395
+ end
1396
+
1397
+ # Update properties of this object
1398
+ def update!(**args)
1399
+ @blocks = args[:blocks] if args.key?(:blocks)
1400
+ @confidence = args[:confidence] if args.key?(:confidence)
1401
+ @height = args[:height] if args.key?(:height)
1402
+ @property = args[:property] if args.key?(:property)
1403
+ @width = args[:width] if args.key?(:width)
1404
+ end
1405
+ end
1406
+
1407
+ # Structural unit of text representing a number of words in certain order.
1408
+ class GoogleCloudVisionV1p2beta1Paragraph
1409
+ include Google::Apis::Core::Hashable
1410
+
1411
+ # A bounding polygon for the detected image annotation.
1412
+ # Corresponds to the JSON property `boundingBox`
1413
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
1414
+ attr_accessor :bounding_box
1415
+
1416
+ # Confidence of the OCR results for the paragraph. Range [0, 1].
1417
+ # Corresponds to the JSON property `confidence`
1418
+ # @return [Float]
1419
+ attr_accessor :confidence
1420
+
1421
+ # Additional information detected on the structural component.
1422
+ # Corresponds to the JSON property `property`
1423
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
1424
+ attr_accessor :property
1425
+
1426
+ # List of words in this paragraph.
1427
+ # Corresponds to the JSON property `words`
1428
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Word>]
1429
+ attr_accessor :words
1430
+
1431
+ def initialize(**args)
1432
+ update!(**args)
1433
+ end
1434
+
1435
+ # Update properties of this object
1436
+ def update!(**args)
1437
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
1438
+ @confidence = args[:confidence] if args.key?(:confidence)
1439
+ @property = args[:property] if args.key?(:property)
1440
+ @words = args[:words] if args.key?(:words)
1441
+ end
1442
+ end
1443
+
1444
+ # A 3D position in the image, used primarily for Face detection landmarks.
1445
+ # A valid Position must have both x and y coordinates.
1446
+ # The position coordinates are in the same scale as the original image.
1447
+ class GoogleCloudVisionV1p2beta1Position
1448
+ include Google::Apis::Core::Hashable
1449
+
1450
+ # X coordinate.
1451
+ # Corresponds to the JSON property `x`
1452
+ # @return [Float]
1453
+ attr_accessor :x
1454
+
1455
+ # Y coordinate.
1456
+ # Corresponds to the JSON property `y`
1457
+ # @return [Float]
1458
+ attr_accessor :y
1459
+
1460
+ # Z coordinate (or depth).
1461
+ # Corresponds to the JSON property `z`
1462
+ # @return [Float]
1463
+ attr_accessor :z
1464
+
1465
+ def initialize(**args)
1466
+ update!(**args)
1467
+ end
1468
+
1469
+ # Update properties of this object
1470
+ def update!(**args)
1471
+ @x = args[:x] if args.key?(:x)
1472
+ @y = args[:y] if args.key?(:y)
1473
+ @z = args[:z] if args.key?(:z)
1474
+ end
1475
+ end
1476
+
1477
+ # A `Property` consists of a user-supplied name/value pair.
1478
+ class GoogleCloudVisionV1p2beta1Property
1479
+ include Google::Apis::Core::Hashable
1480
+
1481
+ # Name of the property.
1482
+ # Corresponds to the JSON property `name`
1483
+ # @return [String]
1484
+ attr_accessor :name
1485
+
1486
+ # Value of numeric properties.
1487
+ # Corresponds to the JSON property `uint64Value`
1488
+ # @return [Fixnum]
1489
+ attr_accessor :uint64_value
1490
+
1491
+ # Value of the property.
1492
+ # Corresponds to the JSON property `value`
1493
+ # @return [String]
1494
+ attr_accessor :value
1495
+
1496
+ def initialize(**args)
1497
+ update!(**args)
1498
+ end
1499
+
1500
+ # Update properties of this object
1501
+ def update!(**args)
1502
+ @name = args[:name] if args.key?(:name)
1503
+ @uint64_value = args[:uint64_value] if args.key?(:uint64_value)
1504
+ @value = args[:value] if args.key?(:value)
1505
+ end
1506
+ end
1507
+
1508
+ # Set of features pertaining to the image, computed by computer vision
1509
+ # methods over safe-search verticals (for example, adult, spoof, medical,
1510
+ # violence).
1511
+ class GoogleCloudVisionV1p2beta1SafeSearchAnnotation
1512
+ include Google::Apis::Core::Hashable
1513
+
1514
+ # Represents the adult content likelihood for the image. Adult content may
1515
+ # contain elements such as nudity, pornographic images or cartoons, or
1516
+ # sexual activities.
1517
+ # Corresponds to the JSON property `adult`
1518
+ # @return [String]
1519
+ attr_accessor :adult
1520
+
1521
+ # Likelihood that this is a medical image.
1522
+ # Corresponds to the JSON property `medical`
1523
+ # @return [String]
1524
+ attr_accessor :medical
1525
+
1526
+ # Likelihood that the request image contains racy content. Racy content may
1527
+ # include (but is not limited to) skimpy or sheer clothing, strategically
1528
+ # covered nudity, lewd or provocative poses, or close-ups of sensitive
1529
+ # body areas.
1530
+ # Corresponds to the JSON property `racy`
1531
+ # @return [String]
1532
+ attr_accessor :racy
1533
+
1534
+ # Spoof likelihood. The likelihood that an modification
1535
+ # was made to the image's canonical version to make it appear
1536
+ # funny or offensive.
1537
+ # Corresponds to the JSON property `spoof`
1538
+ # @return [String]
1539
+ attr_accessor :spoof
1540
+
1541
+ # Likelihood that this image contains violent content.
1542
+ # Corresponds to the JSON property `violence`
1543
+ # @return [String]
1544
+ attr_accessor :violence
1545
+
1546
+ def initialize(**args)
1547
+ update!(**args)
1548
+ end
1549
+
1550
+ # Update properties of this object
1551
+ def update!(**args)
1552
+ @adult = args[:adult] if args.key?(:adult)
1553
+ @medical = args[:medical] if args.key?(:medical)
1554
+ @racy = args[:racy] if args.key?(:racy)
1555
+ @spoof = args[:spoof] if args.key?(:spoof)
1556
+ @violence = args[:violence] if args.key?(:violence)
1557
+ end
1558
+ end
1559
+
1560
+ # A single symbol representation.
1561
+ class GoogleCloudVisionV1p2beta1Symbol
1562
+ include Google::Apis::Core::Hashable
1563
+
1564
+ # A bounding polygon for the detected image annotation.
1565
+ # Corresponds to the JSON property `boundingBox`
1566
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
1567
+ attr_accessor :bounding_box
1568
+
1569
+ # Confidence of the OCR results for the symbol. Range [0, 1].
1570
+ # Corresponds to the JSON property `confidence`
1571
+ # @return [Float]
1572
+ attr_accessor :confidence
1573
+
1574
+ # Additional information detected on the structural component.
1575
+ # Corresponds to the JSON property `property`
1576
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
1577
+ attr_accessor :property
1578
+
1579
+ # The actual UTF-8 representation of the symbol.
1580
+ # Corresponds to the JSON property `text`
1581
+ # @return [String]
1582
+ attr_accessor :text
1583
+
1584
+ def initialize(**args)
1585
+ update!(**args)
1586
+ end
1587
+
1588
+ # Update properties of this object
1589
+ def update!(**args)
1590
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
1591
+ @confidence = args[:confidence] if args.key?(:confidence)
1592
+ @property = args[:property] if args.key?(:property)
1593
+ @text = args[:text] if args.key?(:text)
1594
+ end
1595
+ end
1596
+
1597
+ # TextAnnotation contains a structured representation of OCR extracted text.
1598
+ # The hierarchy of an OCR extracted text structure is like this:
1599
+ # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
1600
+ # Each structural component, starting from Page, may further have their own
1601
+ # properties. Properties describe detected languages, breaks etc.. Please refer
1602
+ # to the TextAnnotation.TextProperty message definition below for more
1603
+ # detail.
1604
+ class GoogleCloudVisionV1p2beta1TextAnnotation
1605
+ include Google::Apis::Core::Hashable
1606
+
1607
+ # List of pages detected by OCR.
1608
+ # Corresponds to the JSON property `pages`
1609
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Page>]
1610
+ attr_accessor :pages
1611
+
1612
+ # UTF-8 text detected on the pages.
1613
+ # Corresponds to the JSON property `text`
1614
+ # @return [String]
1615
+ attr_accessor :text
1616
+
1617
+ def initialize(**args)
1618
+ update!(**args)
1619
+ end
1620
+
1621
+ # Update properties of this object
1622
+ def update!(**args)
1623
+ @pages = args[:pages] if args.key?(:pages)
1624
+ @text = args[:text] if args.key?(:text)
1625
+ end
1626
+ end
1627
+
1628
+ # Detected start or end of a structural component.
1629
+ class GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak
1630
+ include Google::Apis::Core::Hashable
1631
+
1632
+ # True if break prepends the element.
1633
+ # Corresponds to the JSON property `isPrefix`
1634
+ # @return [Boolean]
1635
+ attr_accessor :is_prefix
1636
+ alias_method :is_prefix?, :is_prefix
1637
+
1638
+ # Detected break type.
1639
+ # Corresponds to the JSON property `type`
1640
+ # @return [String]
1641
+ attr_accessor :type
1642
+
1643
+ def initialize(**args)
1644
+ update!(**args)
1645
+ end
1646
+
1647
+ # Update properties of this object
1648
+ def update!(**args)
1649
+ @is_prefix = args[:is_prefix] if args.key?(:is_prefix)
1650
+ @type = args[:type] if args.key?(:type)
1651
+ end
1652
+ end
1653
+
1654
+ # Detected language for a structural component.
1655
+ class GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage
1656
+ include Google::Apis::Core::Hashable
1657
+
1658
+ # Confidence of detected language. Range [0, 1].
1659
+ # Corresponds to the JSON property `confidence`
1660
+ # @return [Float]
1661
+ attr_accessor :confidence
1662
+
1663
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
1664
+ # information, see
1665
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1666
+ # Corresponds to the JSON property `languageCode`
1667
+ # @return [String]
1668
+ attr_accessor :language_code
1669
+
1670
+ def initialize(**args)
1671
+ update!(**args)
1672
+ end
1673
+
1674
+ # Update properties of this object
1675
+ def update!(**args)
1676
+ @confidence = args[:confidence] if args.key?(:confidence)
1677
+ @language_code = args[:language_code] if args.key?(:language_code)
1678
+ end
1679
+ end
1680
+
1681
+ # Additional information detected on the structural component.
1682
+ class GoogleCloudVisionV1p2beta1TextAnnotationTextProperty
1683
+ include Google::Apis::Core::Hashable
1684
+
1685
+ # Detected start or end of a structural component.
1686
+ # Corresponds to the JSON property `detectedBreak`
1687
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak]
1688
+ attr_accessor :detected_break
1689
+
1690
+ # A list of detected languages together with confidence.
1691
+ # Corresponds to the JSON property `detectedLanguages`
1692
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage>]
1693
+ attr_accessor :detected_languages
1694
+
1695
+ def initialize(**args)
1696
+ update!(**args)
1697
+ end
1698
+
1699
+ # Update properties of this object
1700
+ def update!(**args)
1701
+ @detected_break = args[:detected_break] if args.key?(:detected_break)
1702
+ @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
1703
+ end
1704
+ end
1705
+
1706
+ # A vertex represents a 2D point in the image.
1707
+ # NOTE: the vertex coordinates are in the same scale as the original image.
1708
+ class GoogleCloudVisionV1p2beta1Vertex
1709
+ include Google::Apis::Core::Hashable
1710
+
1711
+ # X coordinate.
1712
+ # Corresponds to the JSON property `x`
1713
+ # @return [Fixnum]
1714
+ attr_accessor :x
1715
+
1716
+ # Y coordinate.
1717
+ # Corresponds to the JSON property `y`
1718
+ # @return [Fixnum]
1719
+ attr_accessor :y
1720
+
1721
+ def initialize(**args)
1722
+ update!(**args)
1723
+ end
1724
+
1725
+ # Update properties of this object
1726
+ def update!(**args)
1727
+ @x = args[:x] if args.key?(:x)
1728
+ @y = args[:y] if args.key?(:y)
1729
+ end
1730
+ end
1731
+
1732
+ # Relevant information for the image from the Internet.
1733
+ class GoogleCloudVisionV1p2beta1WebDetection
1734
+ include Google::Apis::Core::Hashable
1735
+
1736
+ # Best guess text labels for the request image.
1737
+ # Corresponds to the JSON property `bestGuessLabels`
1738
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebLabel>]
1739
+ attr_accessor :best_guess_labels
1740
+
1741
+ # Fully matching images from the Internet.
1742
+ # Can include resized copies of the query image.
1743
+ # Corresponds to the JSON property `fullMatchingImages`
1744
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
1745
+ attr_accessor :full_matching_images
1746
+
1747
+ # Web pages containing the matching images from the Internet.
1748
+ # Corresponds to the JSON property `pagesWithMatchingImages`
1749
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebPage>]
1750
+ attr_accessor :pages_with_matching_images
1751
+
1752
+ # Partial matching images from the Internet.
1753
+ # Those images are similar enough to share some key-point features. For
1754
+ # example an original image will likely have partial matching for its crops.
1755
+ # Corresponds to the JSON property `partialMatchingImages`
1756
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
1757
+ attr_accessor :partial_matching_images
1758
+
1759
+ # The visually similar image results.
1760
+ # Corresponds to the JSON property `visuallySimilarImages`
1761
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
1762
+ attr_accessor :visually_similar_images
1763
+
1764
+ # Deduced entities from similar images on the Internet.
1765
+ # Corresponds to the JSON property `webEntities`
1766
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebEntity>]
1767
+ attr_accessor :web_entities
1768
+
1769
+ def initialize(**args)
1770
+ update!(**args)
1771
+ end
1772
+
1773
+ # Update properties of this object
1774
+ def update!(**args)
1775
+ @best_guess_labels = args[:best_guess_labels] if args.key?(:best_guess_labels)
1776
+ @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
1777
+ @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images)
1778
+ @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
1779
+ @visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images)
1780
+ @web_entities = args[:web_entities] if args.key?(:web_entities)
1781
+ end
1782
+ end
1783
+
1784
+ # Parameters for web detection request.
1785
+ class GoogleCloudVisionV1p2beta1WebDetectionParams
1786
+ include Google::Apis::Core::Hashable
1787
+
1788
+ # Whether to include results derived from the geo information in the image.
1789
+ # Corresponds to the JSON property `includeGeoResults`
1790
+ # @return [Boolean]
1791
+ attr_accessor :include_geo_results
1792
+ alias_method :include_geo_results?, :include_geo_results
1793
+
1794
+ def initialize(**args)
1795
+ update!(**args)
1796
+ end
1797
+
1798
+ # Update properties of this object
1799
+ def update!(**args)
1800
+ @include_geo_results = args[:include_geo_results] if args.key?(:include_geo_results)
1801
+ end
1802
+ end
1803
+
1804
+ # Entity deduced from similar images on the Internet.
1805
+ class GoogleCloudVisionV1p2beta1WebDetectionWebEntity
1806
+ include Google::Apis::Core::Hashable
1807
+
1808
+ # Canonical description of the entity, in English.
1809
+ # Corresponds to the JSON property `description`
1810
+ # @return [String]
1811
+ attr_accessor :description
1812
+
1813
+ # Opaque entity ID.
1814
+ # Corresponds to the JSON property `entityId`
1815
+ # @return [String]
1816
+ attr_accessor :entity_id
1817
+
1818
+ # Overall relevancy score for the entity.
1819
+ # Not normalized and not comparable across different image queries.
1820
+ # Corresponds to the JSON property `score`
1821
+ # @return [Float]
1822
+ attr_accessor :score
1823
+
1824
+ def initialize(**args)
1825
+ update!(**args)
1826
+ end
1827
+
1828
+ # Update properties of this object
1829
+ def update!(**args)
1830
+ @description = args[:description] if args.key?(:description)
1831
+ @entity_id = args[:entity_id] if args.key?(:entity_id)
1832
+ @score = args[:score] if args.key?(:score)
1833
+ end
1834
+ end
1835
+
1836
+ # Metadata for online images.
1837
+ class GoogleCloudVisionV1p2beta1WebDetectionWebImage
1838
+ include Google::Apis::Core::Hashable
1839
+
1840
+ # (Deprecated) Overall relevancy score for the image.
1841
+ # Corresponds to the JSON property `score`
1842
+ # @return [Float]
1843
+ attr_accessor :score
1844
+
1845
+ # The result image URL.
1846
+ # Corresponds to the JSON property `url`
1847
+ # @return [String]
1848
+ attr_accessor :url
1849
+
1850
+ def initialize(**args)
1851
+ update!(**args)
1852
+ end
1853
+
1854
+ # Update properties of this object
1855
+ def update!(**args)
1856
+ @score = args[:score] if args.key?(:score)
1857
+ @url = args[:url] if args.key?(:url)
1858
+ end
1859
+ end
1860
+
1861
+ # Label to provide extra metadata for the web detection.
1862
+ class GoogleCloudVisionV1p2beta1WebDetectionWebLabel
1863
+ include Google::Apis::Core::Hashable
1864
+
1865
+ # Label for extra metadata.
1866
+ # Corresponds to the JSON property `label`
1867
+ # @return [String]
1868
+ attr_accessor :label
1869
+
1870
+ # The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
1871
+ # For more information, see
1872
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1873
+ # Corresponds to the JSON property `languageCode`
1874
+ # @return [String]
1875
+ attr_accessor :language_code
1876
+
1877
+ def initialize(**args)
1878
+ update!(**args)
1879
+ end
1880
+
1881
+ # Update properties of this object
1882
+ def update!(**args)
1883
+ @label = args[:label] if args.key?(:label)
1884
+ @language_code = args[:language_code] if args.key?(:language_code)
1885
+ end
1886
+ end
1887
+
1888
+ # Metadata for web pages.
1889
+ class GoogleCloudVisionV1p2beta1WebDetectionWebPage
1890
+ include Google::Apis::Core::Hashable
1891
+
1892
+ # Fully matching images on the page.
1893
+ # Can include resized copies of the query image.
1894
+ # Corresponds to the JSON property `fullMatchingImages`
1895
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
1896
+ attr_accessor :full_matching_images
1897
+
1898
+ # Title for the web page, may contain HTML markups.
1899
+ # Corresponds to the JSON property `pageTitle`
1900
+ # @return [String]
1901
+ attr_accessor :page_title
1902
+
1903
+ # Partial matching images on the page.
1904
+ # Those images are similar enough to share some key-point features. For
1905
+ # example an original image will likely have partial matching for its
1906
+ # crops.
1907
+ # Corresponds to the JSON property `partialMatchingImages`
1908
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
1909
+ attr_accessor :partial_matching_images
1910
+
1911
+ # (Deprecated) Overall relevancy score for the web page.
1912
+ # Corresponds to the JSON property `score`
1913
+ # @return [Float]
1914
+ attr_accessor :score
1915
+
1916
+ # The result web page URL.
1917
+ # Corresponds to the JSON property `url`
1918
+ # @return [String]
1919
+ attr_accessor :url
1920
+
1921
+ def initialize(**args)
1922
+ update!(**args)
1923
+ end
1924
+
1925
+ # Update properties of this object
1926
+ def update!(**args)
1927
+ @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
1928
+ @page_title = args[:page_title] if args.key?(:page_title)
1929
+ @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
1930
+ @score = args[:score] if args.key?(:score)
1931
+ @url = args[:url] if args.key?(:url)
1932
+ end
1933
+ end
1934
+
1935
+ # A word representation.
1936
+ class GoogleCloudVisionV1p2beta1Word
1937
+ include Google::Apis::Core::Hashable
1938
+
1939
+ # A bounding polygon for the detected image annotation.
1940
+ # Corresponds to the JSON property `boundingBox`
1941
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
1942
+ attr_accessor :bounding_box
1943
+
1944
+ # Confidence of the OCR results for the word. Range [0, 1].
1945
+ # Corresponds to the JSON property `confidence`
1946
+ # @return [Float]
1947
+ attr_accessor :confidence
1948
+
1949
+ # Additional information detected on the structural component.
1950
+ # Corresponds to the JSON property `property`
1951
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
1952
+ attr_accessor :property
1953
+
1954
+ # List of symbols in the word.
1955
+ # The order of the symbols follows the natural reading order.
1956
+ # Corresponds to the JSON property `symbols`
1957
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Symbol>]
1958
+ attr_accessor :symbols
1959
+
1960
+ def initialize(**args)
1961
+ update!(**args)
1962
+ end
1963
+
1964
+ # Update properties of this object
1965
+ def update!(**args)
1966
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
1967
+ @confidence = args[:confidence] if args.key?(:confidence)
1968
+ @property = args[:property] if args.key?(:property)
1969
+ @symbols = args[:symbols] if args.key?(:symbols)
1970
+ end
1971
+ end
1972
+
1973
+ # An object representing a latitude/longitude pair. This is expressed as a pair
1974
+ # of doubles representing degrees latitude and degrees longitude. Unless
1975
+ # specified otherwise, this must conform to the
1976
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1977
+ # standard</a>. Values must be within normalized ranges.
1978
+ class LatLng
1979
+ include Google::Apis::Core::Hashable
1980
+
1981
+ # The latitude in degrees. It must be in the range [-90.0, +90.0].
1982
+ # Corresponds to the JSON property `latitude`
1983
+ # @return [Float]
1984
+ attr_accessor :latitude
1985
+
1986
+ # The longitude in degrees. It must be in the range [-180.0, +180.0].
1987
+ # Corresponds to the JSON property `longitude`
1988
+ # @return [Float]
1989
+ attr_accessor :longitude
1990
+
1991
+ def initialize(**args)
1992
+ update!(**args)
1993
+ end
1994
+
1995
+ # Update properties of this object
1996
+ def update!(**args)
1997
+ @latitude = args[:latitude] if args.key?(:latitude)
1998
+ @longitude = args[:longitude] if args.key?(:longitude)
1999
+ end
2000
+ end
2001
+
2002
+ # This resource represents a long-running operation that is the result of a
2003
+ # network API call.
2004
+ class Operation
2005
+ include Google::Apis::Core::Hashable
2006
+
2007
+ # If the value is `false`, it means the operation is still in progress.
2008
+ # If `true`, the operation is completed, and either `error` or `response` is
2009
+ # available.
2010
+ # Corresponds to the JSON property `done`
2011
+ # @return [Boolean]
2012
+ attr_accessor :done
2013
+ alias_method :done?, :done
2014
+
2015
+ # The `Status` type defines a logical error model that is suitable for different
2016
+ # programming environments, including REST APIs and RPC APIs. It is used by
2017
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
2018
+ # - Simple to use and understand for most users
2019
+ # - Flexible enough to meet unexpected needs
2020
+ # # Overview
2021
+ # The `Status` message contains three pieces of data: error code, error message,
2022
+ # and error details. The error code should be an enum value of
2023
+ # google.rpc.Code, but it may accept additional error codes if needed. The
2024
+ # error message should be a developer-facing English message that helps
2025
+ # developers *understand* and *resolve* the error. If a localized user-facing
2026
+ # error message is needed, put the localized message in the error details or
2027
+ # localize it in the client. The optional error details may contain arbitrary
2028
+ # information about the error. There is a predefined set of error detail types
2029
+ # in the package `google.rpc` that can be used for common error conditions.
2030
+ # # Language mapping
2031
+ # The `Status` message is the logical representation of the error model, but it
2032
+ # is not necessarily the actual wire format. When the `Status` message is
2033
+ # exposed in different client libraries and different wire protocols, it can be
2034
+ # mapped differently. For example, it will likely be mapped to some exceptions
2035
+ # in Java, but more likely mapped to some error codes in C.
2036
+ # # Other uses
2037
+ # The error model and the `Status` message can be used in a variety of
2038
+ # environments, either with or without APIs, to provide a
2039
+ # consistent developer experience across different environments.
2040
+ # Example uses of this error model include:
2041
+ # - Partial errors. If a service needs to return partial errors to the client,
2042
+ # it may embed the `Status` in the normal response to indicate the partial
2043
+ # errors.
2044
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
2045
+ # have a `Status` message for error reporting.
2046
+ # - Batch operations. If a client uses batch request and batch response, the
2047
+ # `Status` message should be used directly inside batch response, one for
2048
+ # each error sub-response.
2049
+ # - Asynchronous operations. If an API call embeds asynchronous operation
2050
+ # results in its response, the status of those operations should be
2051
+ # represented directly using the `Status` message.
2052
+ # - Logging. If some API errors are stored in logs, the message `Status` could
2053
+ # be used directly after any stripping needed for security/privacy reasons.
2054
+ # Corresponds to the JSON property `error`
2055
+ # @return [Google::Apis::VisionV1p2beta1::Status]
2056
+ attr_accessor :error
2057
+
2058
+ # Service-specific metadata associated with the operation. It typically
2059
+ # contains progress information and common metadata such as create time.
2060
+ # Some services might not provide such metadata. Any method that returns a
2061
+ # long-running operation should document the metadata type, if any.
2062
+ # Corresponds to the JSON property `metadata`
2063
+ # @return [Hash<String,Object>]
2064
+ attr_accessor :metadata
2065
+
2066
+ # The server-assigned name, which is only unique within the same service that
2067
+ # originally returns it. If you use the default HTTP mapping, the
2068
+ # `name` should have the format of `operations/some/unique/name`.
2069
+ # Corresponds to the JSON property `name`
2070
+ # @return [String]
2071
+ attr_accessor :name
2072
+
2073
+ # The normal response of the operation in case of success. If the original
2074
+ # method returns no data on success, such as `Delete`, the response is
2075
+ # `google.protobuf.Empty`. If the original method is standard
2076
+ # `Get`/`Create`/`Update`, the response should be the resource. For other
2077
+ # methods, the response should have the type `XxxResponse`, where `Xxx`
2078
+ # is the original method name. For example, if the original method name
2079
+ # is `TakeSnapshot()`, the inferred response type is
2080
+ # `TakeSnapshotResponse`.
2081
+ # Corresponds to the JSON property `response`
2082
+ # @return [Hash<String,Object>]
2083
+ attr_accessor :response
2084
+
2085
+ def initialize(**args)
2086
+ update!(**args)
2087
+ end
2088
+
2089
+ # Update properties of this object
2090
+ def update!(**args)
2091
+ @done = args[:done] if args.key?(:done)
2092
+ @error = args[:error] if args.key?(:error)
2093
+ @metadata = args[:metadata] if args.key?(:metadata)
2094
+ @name = args[:name] if args.key?(:name)
2095
+ @response = args[:response] if args.key?(:response)
2096
+ end
2097
+ end
2098
+
2099
+ # The `Status` type defines a logical error model that is suitable for different
2100
+ # programming environments, including REST APIs and RPC APIs. It is used by
2101
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
2102
+ # - Simple to use and understand for most users
2103
+ # - Flexible enough to meet unexpected needs
2104
+ # # Overview
2105
+ # The `Status` message contains three pieces of data: error code, error message,
2106
+ # and error details. The error code should be an enum value of
2107
+ # google.rpc.Code, but it may accept additional error codes if needed. The
2108
+ # error message should be a developer-facing English message that helps
2109
+ # developers *understand* and *resolve* the error. If a localized user-facing
2110
+ # error message is needed, put the localized message in the error details or
2111
+ # localize it in the client. The optional error details may contain arbitrary
2112
+ # information about the error. There is a predefined set of error detail types
2113
+ # in the package `google.rpc` that can be used for common error conditions.
2114
+ # # Language mapping
2115
+ # The `Status` message is the logical representation of the error model, but it
2116
+ # is not necessarily the actual wire format. When the `Status` message is
2117
+ # exposed in different client libraries and different wire protocols, it can be
2118
+ # mapped differently. For example, it will likely be mapped to some exceptions
2119
+ # in Java, but more likely mapped to some error codes in C.
2120
+ # # Other uses
2121
+ # The error model and the `Status` message can be used in a variety of
2122
+ # environments, either with or without APIs, to provide a
2123
+ # consistent developer experience across different environments.
2124
+ # Example uses of this error model include:
2125
+ # - Partial errors. If a service needs to return partial errors to the client,
2126
+ # it may embed the `Status` in the normal response to indicate the partial
2127
+ # errors.
2128
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
2129
+ # have a `Status` message for error reporting.
2130
+ # - Batch operations. If a client uses batch request and batch response, the
2131
+ # `Status` message should be used directly inside batch response, one for
2132
+ # each error sub-response.
2133
+ # - Asynchronous operations. If an API call embeds asynchronous operation
2134
+ # results in its response, the status of those operations should be
2135
+ # represented directly using the `Status` message.
2136
+ # - Logging. If some API errors are stored in logs, the message `Status` could
2137
+ # be used directly after any stripping needed for security/privacy reasons.
2138
+ class Status
2139
+ include Google::Apis::Core::Hashable
2140
+
2141
+ # The status code, which should be an enum value of google.rpc.Code.
2142
+ # Corresponds to the JSON property `code`
2143
+ # @return [Fixnum]
2144
+ attr_accessor :code
2145
+
2146
+ # A list of messages that carry the error details. There is a common set of
2147
+ # message types for APIs to use.
2148
+ # Corresponds to the JSON property `details`
2149
+ # @return [Array<Hash<String,Object>>]
2150
+ attr_accessor :details
2151
+
2152
+ # A developer-facing error message, which should be in English. Any
2153
+ # user-facing error message should be localized and sent in the
2154
+ # google.rpc.Status.details field, or localized by the client.
2155
+ # Corresponds to the JSON property `message`
2156
+ # @return [String]
2157
+ attr_accessor :message
2158
+
2159
+ def initialize(**args)
2160
+ update!(**args)
2161
+ end
2162
+
2163
+ # Update properties of this object
2164
+ def update!(**args)
2165
+ @code = args[:code] if args.key?(:code)
2166
+ @details = args[:details] if args.key?(:details)
2167
+ @message = args[:message] if args.key?(:message)
2168
+ end
2169
+ end
2170
+ end
2171
+ end
2172
+ end