google-api-client 0.12.0 → 0.13.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 (315) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/api_names.yaml +945 -41609
  4. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +12 -12
  5. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +2 -2
  6. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1437 -412
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +516 -71
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +1098 -422
  10. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +6 -6
  11. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +3 -3
  12. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +3 -3
  13. data/generated/google/apis/adexchangeseller_v2_0/service.rb +10 -10
  14. data/generated/google/apis/admin_directory_v1/service.rb +26 -26
  15. data/generated/google/apis/adsense_v1_4.rb +1 -1
  16. data/generated/google/apis/adsense_v1_4/classes.rb +2 -2
  17. data/generated/google/apis/adsense_v1_4/representations.rb +3 -3
  18. data/generated/google/apis/adsense_v1_4/service.rb +44 -44
  19. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  20. data/generated/google/apis/adsensehost_v4_1/service.rb +22 -22
  21. data/generated/google/apis/analytics_v3/classes.rb +3 -3
  22. data/generated/google/apis/analytics_v3/representations.rb +3 -3
  23. data/generated/google/apis/analytics_v3/service.rb +82 -82
  24. data/generated/google/apis/analyticsreporting_v4/classes.rb +937 -937
  25. data/generated/google/apis/analyticsreporting_v4/representations.rb +128 -128
  26. data/generated/google/apis/analyticsreporting_v4/service.rb +1 -1
  27. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  28. data/generated/google/apis/androidenterprise_v1/classes.rb +10 -10
  29. data/generated/google/apis/androidenterprise_v1/representations.rb +20 -20
  30. data/generated/google/apis/androidenterprise_v1/service.rb +43 -43
  31. data/generated/google/apis/androidpublisher_v2/classes.rb +26 -26
  32. data/generated/google/apis/androidpublisher_v2/representations.rb +46 -46
  33. data/generated/google/apis/androidpublisher_v2/service.rb +95 -95
  34. data/generated/google/apis/appengine_v1.rb +4 -4
  35. data/generated/google/apis/appengine_v1/classes.rb +1570 -1512
  36. data/generated/google/apis/appengine_v1/representations.rb +362 -343
  37. data/generated/google/apis/appengine_v1/service.rb +220 -220
  38. data/generated/google/apis/appstate_v1.rb +1 -1
  39. data/generated/google/apis/bigquery_v2.rb +1 -1
  40. data/generated/google/apis/bigquery_v2/classes.rb +5 -5
  41. data/generated/google/apis/bigquery_v2/representations.rb +8 -8
  42. data/generated/google/apis/bigquery_v2/service.rb +13 -13
  43. data/generated/google/apis/blogger_v3/service.rb +3 -3
  44. data/generated/google/apis/books_v1/classes.rb +55 -55
  45. data/generated/google/apis/books_v1/representations.rb +67 -67
  46. data/generated/google/apis/books_v1/service.rb +82 -82
  47. data/generated/google/apis/calendar_v3.rb +1 -1
  48. data/generated/google/apis/calendar_v3/classes.rb +6 -6
  49. data/generated/google/apis/calendar_v3/representations.rb +3 -3
  50. data/generated/google/apis/calendar_v3/service.rb +2 -2
  51. data/generated/google/apis/civicinfo_v2/classes.rb +2 -2
  52. data/generated/google/apis/civicinfo_v2/representations.rb +4 -4
  53. data/generated/google/apis/civicinfo_v2/service.rb +12 -12
  54. data/generated/google/apis/classroom_v1.rb +7 -7
  55. data/generated/google/apis/classroom_v1/classes.rb +1013 -991
  56. data/generated/google/apis/classroom_v1/representations.rb +207 -204
  57. data/generated/google/apis/classroom_v1/service.rb +709 -709
  58. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  59. data/generated/google/apis/cloudbuild_v1/classes.rb +307 -307
  60. data/generated/google/apis/cloudbuild_v1/representations.rb +84 -84
  61. data/generated/google/apis/cloudbuild_v1/service.rb +125 -125
  62. data/generated/google/apis/clouddebugger_v2/classes.rb +673 -673
  63. data/generated/google/apis/clouddebugger_v2/representations.rb +152 -152
  64. data/generated/google/apis/clouddebugger_v2/service.rb +55 -55
  65. data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
  66. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +121 -121
  67. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +25 -25
  68. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +74 -74
  69. data/generated/google/apis/cloudkms_v1.rb +1 -1
  70. data/generated/google/apis/cloudkms_v1/classes.rb +668 -613
  71. data/generated/google/apis/cloudkms_v1/representations.rb +151 -133
  72. data/generated/google/apis/cloudkms_v1/service.rb +267 -267
  73. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  74. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1167 -1168
  75. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +193 -193
  76. data/generated/google/apis/cloudresourcemanager_v1/service.rb +470 -469
  77. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  78. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +508 -509
  79. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +94 -94
  80. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +157 -156
  81. data/generated/google/apis/cloudtrace_v1/service.rb +34 -34
  82. data/generated/google/apis/compute_beta.rb +1 -1
  83. data/generated/google/apis/compute_beta/classes.rb +163 -15
  84. data/generated/google/apis/compute_beta/representations.rb +54 -14
  85. data/generated/google/apis/compute_beta/service.rb +2258 -482
  86. data/generated/google/apis/compute_v1.rb +1 -1
  87. data/generated/google/apis/compute_v1/classes.rb +465 -13
  88. data/generated/google/apis/compute_v1/representations.rb +202 -16
  89. data/generated/google/apis/compute_v1/service.rb +573 -309
  90. data/generated/google/apis/container_v1.rb +1 -1
  91. data/generated/google/apis/container_v1/classes.rb +635 -589
  92. data/generated/google/apis/container_v1/representations.rb +139 -111
  93. data/generated/google/apis/container_v1/service.rb +272 -227
  94. data/generated/google/apis/content_v2.rb +1 -1
  95. data/generated/google/apis/content_v2/classes.rb +86 -74
  96. data/generated/google/apis/content_v2/representations.rb +107 -105
  97. data/generated/google/apis/content_v2/service.rb +131 -130
  98. data/generated/google/apis/customsearch_v1.rb +2 -2
  99. data/generated/google/apis/customsearch_v1/classes.rb +0 -6
  100. data/generated/google/apis/customsearch_v1/representations.rb +0 -1
  101. data/generated/google/apis/customsearch_v1/service.rb +2 -5
  102. data/generated/google/apis/dataflow_v1b3.rb +7 -4
  103. data/generated/google/apis/dataflow_v1b3/classes.rb +3405 -3405
  104. data/generated/google/apis/dataflow_v1b3/representations.rb +834 -834
  105. data/generated/google/apis/dataflow_v1b3/service.rb +244 -244
  106. data/generated/google/apis/dataproc_v1.rb +1 -1
  107. data/generated/google/apis/dataproc_v1/classes.rb +543 -691
  108. data/generated/google/apis/dataproc_v1/representations.rb +129 -185
  109. data/generated/google/apis/dataproc_v1/service.rb +347 -347
  110. data/generated/google/apis/datastore_v1.rb +4 -4
  111. data/generated/google/apis/datastore_v1/classes.rb +833 -833
  112. data/generated/google/apis/datastore_v1/representations.rb +182 -182
  113. data/generated/google/apis/datastore_v1/service.rb +45 -45
  114. data/generated/google/apis/deploymentmanager_v2/classes.rb +5 -5
  115. data/generated/google/apis/deploymentmanager_v2/representations.rb +10 -10
  116. data/generated/google/apis/deploymentmanager_v2/service.rb +20 -20
  117. data/generated/google/apis/discovery_v1/classes.rb +4 -4
  118. data/generated/google/apis/discovery_v1/representations.rb +2 -2
  119. data/generated/google/apis/discovery_v1/service.rb +1 -1
  120. data/generated/google/apis/dns_v1.rb +1 -1
  121. data/generated/google/apis/dns_v1/classes.rb +3 -3
  122. data/generated/google/apis/dns_v1/representations.rb +6 -6
  123. data/generated/google/apis/dns_v1/service.rb +12 -12
  124. data/generated/google/apis/dns_v2beta1.rb +1 -1
  125. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +8 -8
  126. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  127. data/generated/google/apis/drive_v2.rb +1 -1
  128. data/generated/google/apis/drive_v2/classes.rb +1 -1
  129. data/generated/google/apis/drive_v2/service.rb +1 -1
  130. data/generated/google/apis/drive_v3.rb +1 -1
  131. data/generated/google/apis/drive_v3/service.rb +1 -1
  132. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  133. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +160 -110
  134. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +60 -31
  135. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +38 -3
  136. data/generated/google/apis/firebaserules_v1/classes.rb +354 -354
  137. data/generated/google/apis/firebaserules_v1/representations.rb +87 -87
  138. data/generated/google/apis/firebaserules_v1/service.rb +103 -103
  139. data/generated/google/apis/fusiontables_v2/service.rb +2 -2
  140. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  141. data/generated/google/apis/games_configuration_v1configuration/classes.rb +2 -2
  142. data/generated/google/apis/games_configuration_v1configuration/representations.rb +4 -4
  143. data/generated/google/apis/games_configuration_v1configuration/service.rb +8 -8
  144. data/generated/google/apis/games_management_v1management.rb +1 -1
  145. data/generated/google/apis/games_v1.rb +1 -1
  146. data/generated/google/apis/games_v1/classes.rb +23 -23
  147. data/generated/google/apis/games_v1/representations.rb +43 -43
  148. data/generated/google/apis/games_v1/service.rb +72 -72
  149. data/generated/google/apis/genomics_v1.rb +1 -1
  150. data/generated/google/apis/genomics_v1/classes.rb +2316 -2316
  151. data/generated/google/apis/genomics_v1/representations.rb +291 -291
  152. data/generated/google/apis/genomics_v1/service.rb +821 -821
  153. data/generated/google/apis/gmail_v1.rb +1 -1
  154. data/generated/google/apis/groupsmigration_v1.rb +1 -1
  155. data/generated/google/apis/groupssettings_v1.rb +1 -1
  156. data/generated/google/apis/groupssettings_v1/classes.rb +2 -2
  157. data/generated/google/apis/groupssettings_v1/service.rb +3 -0
  158. data/generated/google/apis/iam_v1/classes.rb +338 -338
  159. data/generated/google/apis/iam_v1/representations.rb +98 -98
  160. data/generated/google/apis/iam_v1/service.rb +35 -35
  161. data/generated/google/apis/identitytoolkit_v3/classes.rb +15 -15
  162. data/generated/google/apis/identitytoolkit_v3/representations.rb +30 -30
  163. data/generated/google/apis/identitytoolkit_v3/service.rb +64 -64
  164. data/generated/google/apis/kgsearch_v1/service.rb +13 -13
  165. data/generated/google/apis/language_v1.rb +1 -1
  166. data/generated/google/apis/language_v1/classes.rb +374 -374
  167. data/generated/google/apis/language_v1/representations.rb +97 -97
  168. data/generated/google/apis/language_v1/service.rb +16 -16
  169. data/generated/google/apis/language_v1beta1.rb +1 -1
  170. data/generated/google/apis/language_v1beta1/classes.rb +441 -441
  171. data/generated/google/apis/language_v1beta1/representations.rb +108 -108
  172. data/generated/google/apis/language_v1beta1/service.rb +30 -30
  173. data/generated/google/apis/licensing_v1/service.rb +2 -2
  174. data/generated/google/apis/logging_v2.rb +1 -1
  175. data/generated/google/apis/logging_v2/classes.rb +712 -712
  176. data/generated/google/apis/logging_v2/representations.rb +109 -109
  177. data/generated/google/apis/logging_v2/service.rb +543 -539
  178. data/generated/google/apis/logging_v2beta1.rb +1 -1
  179. data/generated/google/apis/logging_v2beta1/classes.rb +752 -752
  180. data/generated/google/apis/logging_v2beta1/representations.rb +94 -94
  181. data/generated/google/apis/logging_v2beta1/service.rb +257 -256
  182. data/generated/google/apis/manufacturers_v1/classes.rb +130 -130
  183. data/generated/google/apis/manufacturers_v1/representations.rb +28 -28
  184. data/generated/google/apis/mirror_v1/classes.rb +5 -5
  185. data/generated/google/apis/mirror_v1/representations.rb +10 -10
  186. data/generated/google/apis/mirror_v1/service.rb +20 -20
  187. data/generated/google/apis/ml_v1.rb +1 -1
  188. data/generated/google/apis/ml_v1/classes.rb +1830 -1210
  189. data/generated/google/apis/ml_v1/representations.rb +342 -120
  190. data/generated/google/apis/ml_v1/service.rb +365 -258
  191. data/generated/google/apis/monitoring_v3.rb +4 -4
  192. data/generated/google/apis/monitoring_v3/classes.rb +889 -889
  193. data/generated/google/apis/monitoring_v3/representations.rb +174 -174
  194. data/generated/google/apis/monitoring_v3/service.rb +119 -119
  195. data/generated/google/apis/mybusiness_v3/service.rb +5 -5
  196. data/generated/google/apis/oauth2_v2/service.rb +1 -1
  197. data/generated/google/apis/pagespeedonline_v2/classes.rb +11 -11
  198. data/generated/google/apis/pagespeedonline_v2/representations.rb +13 -13
  199. data/generated/google/apis/pagespeedonline_v2/service.rb +1 -1
  200. data/generated/google/apis/partners_v2.rb +1 -1
  201. data/generated/google/apis/partners_v2/classes.rb +550 -536
  202. data/generated/google/apis/partners_v2/representations.rb +118 -116
  203. data/generated/google/apis/partners_v2/service.rb +439 -439
  204. data/generated/google/apis/people_v1.rb +4 -4
  205. data/generated/google/apis/people_v1/classes.rb +414 -413
  206. data/generated/google/apis/people_v1/representations.rb +85 -85
  207. data/generated/google/apis/people_v1/service.rb +111 -18
  208. data/generated/google/apis/plus_domains_v1.rb +1 -1
  209. data/generated/google/apis/plus_domains_v1/service.rb +4 -4
  210. data/generated/google/apis/plus_v1.rb +1 -1
  211. data/generated/google/apis/plus_v1/service.rb +1 -1
  212. data/generated/google/apis/prediction_v1_6/service.rb +8 -8
  213. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  214. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +443 -443
  215. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +92 -92
  216. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +152 -152
  217. data/generated/google/apis/pubsub_v1/classes.rb +249 -249
  218. data/generated/google/apis/pubsub_v1/representations.rb +80 -80
  219. data/generated/google/apis/pubsub_v1/service.rb +415 -415
  220. data/generated/google/apis/qpx_express_v1/classes.rb +2 -2
  221. data/generated/google/apis/qpx_express_v1/representations.rb +4 -4
  222. data/generated/google/apis/qpx_express_v1/service.rb +8 -8
  223. data/generated/google/apis/replicapool_v1beta2/classes.rb +5 -5
  224. data/generated/google/apis/replicapool_v1beta2/representations.rb +10 -10
  225. data/generated/google/apis/replicapool_v1beta2/service.rb +21 -21
  226. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +1 -1
  227. data/generated/google/apis/resourceviews_v1beta2/classes.rb +5 -5
  228. data/generated/google/apis/resourceviews_v1beta2/representations.rb +10 -10
  229. data/generated/google/apis/resourceviews_v1beta2/service.rb +20 -20
  230. data/generated/google/apis/runtimeconfig_v1.rb +4 -4
  231. data/generated/google/apis/runtimeconfig_v1/classes.rb +15 -15
  232. data/generated/google/apis/runtimeconfig_v1/representations.rb +2 -2
  233. data/generated/google/apis/runtimeconfig_v1/service.rb +4 -4
  234. data/generated/google/apis/script_v1.rb +17 -17
  235. data/generated/google/apis/script_v1/classes.rb +27 -27
  236. data/generated/google/apis/script_v1/representations.rb +5 -5
  237. data/generated/google/apis/script_v1/service.rb +4 -4
  238. data/generated/google/apis/searchconsole_v1.rb +1 -1
  239. data/generated/google/apis/searchconsole_v1/classes.rb +53 -53
  240. data/generated/google/apis/searchconsole_v1/representations.rb +23 -23
  241. data/generated/google/apis/searchconsole_v1/service.rb +4 -4
  242. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  243. data/generated/google/apis/servicecontrol_v1/classes.rb +1175 -1175
  244. data/generated/google/apis/servicecontrol_v1/representations.rb +206 -206
  245. data/generated/google/apis/servicecontrol_v1/service.rb +116 -116
  246. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  247. data/generated/google/apis/servicemanagement_v1/classes.rb +1186 -1125
  248. data/generated/google/apis/servicemanagement_v1/representations.rb +241 -223
  249. data/generated/google/apis/servicemanagement_v1/service.rb +201 -201
  250. data/generated/google/apis/serviceuser_v1.rb +1 -1
  251. data/generated/google/apis/serviceuser_v1/classes.rb +2645 -2641
  252. data/generated/google/apis/serviceuser_v1/representations.rb +234 -234
  253. data/generated/google/apis/serviceuser_v1/service.rb +37 -37
  254. data/generated/google/apis/sheets_v4.rb +1 -1
  255. data/generated/google/apis/sheets_v4/classes.rb +5042 -4111
  256. data/generated/google/apis/sheets_v4/representations.rb +994 -824
  257. data/generated/google/apis/sheets_v4/service.rb +80 -80
  258. data/generated/google/apis/site_verification_v1/classes.rb +6 -6
  259. data/generated/google/apis/site_verification_v1/representations.rb +8 -8
  260. data/generated/google/apis/site_verification_v1/service.rb +12 -12
  261. data/generated/google/apis/slides_v1.rb +1 -1
  262. data/generated/google/apis/slides_v1/classes.rb +2885 -2885
  263. data/generated/google/apis/slides_v1/representations.rb +310 -310
  264. data/generated/google/apis/slides_v1/service.rb +54 -54
  265. data/generated/google/apis/sourcerepo_v1/classes.rb +206 -206
  266. data/generated/google/apis/sourcerepo_v1/representations.rb +52 -52
  267. data/generated/google/apis/sourcerepo_v1/service.rb +5 -5
  268. data/generated/google/apis/spanner_v1.rb +1 -1
  269. data/generated/google/apis/spanner_v1/classes.rb +2142 -2141
  270. data/generated/google/apis/spanner_v1/representations.rb +174 -174
  271. data/generated/google/apis/spanner_v1/service.rb +497 -497
  272. data/generated/google/apis/speech_v1beta1.rb +1 -1
  273. data/generated/google/apis/speech_v1beta1/classes.rb +227 -227
  274. data/generated/google/apis/speech_v1beta1/representations.rb +50 -50
  275. data/generated/google/apis/speech_v1beta1/service.rb +33 -33
  276. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  277. data/generated/google/apis/sqladmin_v1beta4/classes.rb +21 -21
  278. data/generated/google/apis/sqladmin_v1beta4/representations.rb +29 -29
  279. data/generated/google/apis/sqladmin_v1beta4/service.rb +56 -56
  280. data/generated/google/apis/storage_v1.rb +1 -1
  281. data/generated/google/apis/storage_v1/classes.rb +40 -6
  282. data/generated/google/apis/storage_v1/representations.rb +20 -4
  283. data/generated/google/apis/storage_v1/service.rb +61 -46
  284. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  285. data/generated/google/apis/storagetransfer_v1/classes.rb +184 -184
  286. data/generated/google/apis/storagetransfer_v1/representations.rb +35 -35
  287. data/generated/google/apis/storagetransfer_v1/service.rb +70 -70
  288. data/generated/google/apis/tagmanager_v1/service.rb +33 -33
  289. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  290. data/generated/google/apis/translate_v2/classes.rb +12 -12
  291. data/generated/google/apis/translate_v2/representations.rb +10 -10
  292. data/generated/google/apis/translate_v2/service.rb +62 -62
  293. data/generated/google/apis/vision_v1.rb +1 -1
  294. data/generated/google/apis/vision_v1/classes.rb +1267 -1267
  295. data/generated/google/apis/vision_v1/representations.rb +200 -200
  296. data/generated/google/apis/vision_v1/service.rb +10 -10
  297. data/generated/google/apis/webmasters_v3.rb +1 -1
  298. data/generated/google/apis/webmasters_v3/classes.rb +4 -4
  299. data/generated/google/apis/webmasters_v3/representations.rb +8 -8
  300. data/generated/google/apis/webmasters_v3/service.rb +21 -21
  301. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  302. data/generated/google/apis/youtube_analytics_v1/classes.rb +2 -2
  303. data/generated/google/apis/youtube_analytics_v1/representations.rb +4 -4
  304. data/generated/google/apis/youtube_analytics_v1/service.rb +8 -8
  305. data/generated/google/apis/youtube_v3/classes.rb +20 -20
  306. data/generated/google/apis/youtube_v3/representations.rb +40 -40
  307. data/generated/google/apis/youtube_v3/service.rb +80 -80
  308. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  309. data/generated/google/apis/youtubereporting_v1/classes.rb +129 -129
  310. data/generated/google/apis/youtubereporting_v1/representations.rb +38 -38
  311. data/generated/google/apis/youtubereporting_v1/service.rb +97 -97
  312. data/lib/google/apis/generator/annotator.rb +2 -2
  313. data/lib/google/apis/generator/model.rb +2 -2
  314. data/lib/google/apis/version.rb +1 -1
  315. metadata +2 -2
@@ -27,7 +27,7 @@ module Google
27
27
  # @see https://cloud.google.com/natural-language/
28
28
  module LanguageV1beta1
29
29
  VERSION = 'V1beta1'
30
- REVISION = '20170525'
30
+ REVISION = '20170601'
31
31
 
32
32
  # View and manage your data across Google Cloud Platform services
33
33
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -22,128 +22,69 @@ module Google
22
22
  module Apis
23
23
  module LanguageV1beta1
24
24
 
25
- # Represents an output piece of text.
26
- class TextSpan
25
+ # Represents part of speech information for a token.
26
+ class PartOfSpeech
27
27
  include Google::Apis::Core::Hashable
28
28
 
29
- # The content of the output text.
30
- # Corresponds to the JSON property `content`
29
+ # The grammatical form.
30
+ # Corresponds to the JSON property `form`
31
31
  # @return [String]
32
- attr_accessor :content
33
-
34
- # The API calculates the beginning offset of the content in the original
35
- # document according to the EncodingType specified in the API request.
36
- # Corresponds to the JSON property `beginOffset`
37
- # @return [Fixnum]
38
- attr_accessor :begin_offset
39
-
40
- def initialize(**args)
41
- update!(**args)
42
- end
43
-
44
- # Update properties of this object
45
- def update!(**args)
46
- @content = args[:content] if args.key?(:content)
47
- @begin_offset = args[:begin_offset] if args.key?(:begin_offset)
48
- end
49
- end
32
+ attr_accessor :form
50
33
 
51
- # Represents the smallest syntactic building block of the text.
52
- class Token
53
- include Google::Apis::Core::Hashable
34
+ # The grammatical number.
35
+ # Corresponds to the JSON property `number`
36
+ # @return [String]
37
+ attr_accessor :number
54
38
 
55
- # Represents part of speech information for a token.
56
- # Corresponds to the JSON property `partOfSpeech`
57
- # @return [Google::Apis::LanguageV1beta1::PartOfSpeech]
58
- attr_accessor :part_of_speech
39
+ # The grammatical voice.
40
+ # Corresponds to the JSON property `voice`
41
+ # @return [String]
42
+ attr_accessor :voice
59
43
 
60
- # Represents an output piece of text.
61
- # Corresponds to the JSON property `text`
62
- # @return [Google::Apis::LanguageV1beta1::TextSpan]
63
- attr_accessor :text
44
+ # The grammatical aspect.
45
+ # Corresponds to the JSON property `aspect`
46
+ # @return [String]
47
+ attr_accessor :aspect
64
48
 
65
- # Represents dependency parse tree information for a token.
66
- # Corresponds to the JSON property `dependencyEdge`
67
- # @return [Google::Apis::LanguageV1beta1::DependencyEdge]
68
- attr_accessor :dependency_edge
49
+ # The grammatical mood.
50
+ # Corresponds to the JSON property `mood`
51
+ # @return [String]
52
+ attr_accessor :mood
69
53
 
70
- # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
71
- # Corresponds to the JSON property `lemma`
54
+ # The part of speech tag.
55
+ # Corresponds to the JSON property `tag`
72
56
  # @return [String]
73
- attr_accessor :lemma
57
+ attr_accessor :tag
74
58
 
75
- def initialize(**args)
76
- update!(**args)
77
- end
59
+ # The grammatical gender.
60
+ # Corresponds to the JSON property `gender`
61
+ # @return [String]
62
+ attr_accessor :gender
78
63
 
79
- # Update properties of this object
80
- def update!(**args)
81
- @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech)
82
- @text = args[:text] if args.key?(:text)
83
- @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge)
84
- @lemma = args[:lemma] if args.key?(:lemma)
85
- end
86
- end
64
+ # The grammatical person.
65
+ # Corresponds to the JSON property `person`
66
+ # @return [String]
67
+ attr_accessor :person
87
68
 
88
- # The `Status` type defines a logical error model that is suitable for different
89
- # programming environments, including REST APIs and RPC APIs. It is used by
90
- # [gRPC](https://github.com/grpc). The error model is designed to be:
91
- # - Simple to use and understand for most users
92
- # - Flexible enough to meet unexpected needs
93
- # # Overview
94
- # The `Status` message contains three pieces of data: error code, error message,
95
- # and error details. The error code should be an enum value of
96
- # google.rpc.Code, but it may accept additional error codes if needed. The
97
- # error message should be a developer-facing English message that helps
98
- # developers *understand* and *resolve* the error. If a localized user-facing
99
- # error message is needed, put the localized message in the error details or
100
- # localize it in the client. The optional error details may contain arbitrary
101
- # information about the error. There is a predefined set of error detail types
102
- # in the package `google.rpc` that can be used for common error conditions.
103
- # # Language mapping
104
- # The `Status` message is the logical representation of the error model, but it
105
- # is not necessarily the actual wire format. When the `Status` message is
106
- # exposed in different client libraries and different wire protocols, it can be
107
- # mapped differently. For example, it will likely be mapped to some exceptions
108
- # in Java, but more likely mapped to some error codes in C.
109
- # # Other uses
110
- # The error model and the `Status` message can be used in a variety of
111
- # environments, either with or without APIs, to provide a
112
- # consistent developer experience across different environments.
113
- # Example uses of this error model include:
114
- # - Partial errors. If a service needs to return partial errors to the client,
115
- # it may embed the `Status` in the normal response to indicate the partial
116
- # errors.
117
- # - Workflow errors. A typical workflow has multiple steps. Each step may
118
- # have a `Status` message for error reporting.
119
- # - Batch operations. If a client uses batch request and batch response, the
120
- # `Status` message should be used directly inside batch response, one for
121
- # each error sub-response.
122
- # - Asynchronous operations. If an API call embeds asynchronous operation
123
- # results in its response, the status of those operations should be
124
- # represented directly using the `Status` message.
125
- # - Logging. If some API errors are stored in logs, the message `Status` could
126
- # be used directly after any stripping needed for security/privacy reasons.
127
- class Status
128
- include Google::Apis::Core::Hashable
69
+ # The grammatical properness.
70
+ # Corresponds to the JSON property `proper`
71
+ # @return [String]
72
+ attr_accessor :proper
129
73
 
130
- # A list of messages that carry the error details. There will be a
131
- # common set of message types for APIs to use.
132
- # Corresponds to the JSON property `details`
133
- # @return [Array<Hash<String,Object>>]
134
- attr_accessor :details
74
+ # The grammatical case.
75
+ # Corresponds to the JSON property `case`
76
+ # @return [String]
77
+ attr_accessor :case
135
78
 
136
- # The status code, which should be an enum value of google.rpc.Code.
137
- # Corresponds to the JSON property `code`
138
- # @return [Fixnum]
139
- attr_accessor :code
79
+ # The grammatical tense.
80
+ # Corresponds to the JSON property `tense`
81
+ # @return [String]
82
+ attr_accessor :tense
140
83
 
141
- # A developer-facing error message, which should be in English. Any
142
- # user-facing error message should be localized and sent in the
143
- # google.rpc.Status.details field, or localized by the client.
144
- # Corresponds to the JSON property `message`
84
+ # The grammatical reciprocity.
85
+ # Corresponds to the JSON property `reciprocity`
145
86
  # @return [String]
146
- attr_accessor :message
87
+ attr_accessor :reciprocity
147
88
 
148
89
  def initialize(**args)
149
90
  update!(**args)
@@ -151,26 +92,35 @@ module Google
151
92
 
152
93
  # Update properties of this object
153
94
  def update!(**args)
154
- @details = args[:details] if args.key?(:details)
155
- @code = args[:code] if args.key?(:code)
156
- @message = args[:message] if args.key?(:message)
95
+ @form = args[:form] if args.key?(:form)
96
+ @number = args[:number] if args.key?(:number)
97
+ @voice = args[:voice] if args.key?(:voice)
98
+ @aspect = args[:aspect] if args.key?(:aspect)
99
+ @mood = args[:mood] if args.key?(:mood)
100
+ @tag = args[:tag] if args.key?(:tag)
101
+ @gender = args[:gender] if args.key?(:gender)
102
+ @person = args[:person] if args.key?(:person)
103
+ @proper = args[:proper] if args.key?(:proper)
104
+ @case = args[:case] if args.key?(:case)
105
+ @tense = args[:tense] if args.key?(:tense)
106
+ @reciprocity = args[:reciprocity] if args.key?(:reciprocity)
157
107
  end
158
108
  end
159
109
 
160
- # Represents a mention for an entity in the text. Currently, proper noun
161
- # mentions are supported.
162
- class EntityMention
110
+ # The syntax analysis request message.
111
+ class AnalyzeSyntaxRequest
163
112
  include Google::Apis::Core::Hashable
164
113
 
165
- # Represents an output piece of text.
166
- # Corresponds to the JSON property `text`
167
- # @return [Google::Apis::LanguageV1beta1::TextSpan]
168
- attr_accessor :text
114
+ # ################################################################ #
115
+ # Represents the input to API methods.
116
+ # Corresponds to the JSON property `document`
117
+ # @return [Google::Apis::LanguageV1beta1::Document]
118
+ attr_accessor :document
169
119
 
170
- # The type of the entity mention.
171
- # Corresponds to the JSON property `type`
120
+ # The encoding type used by the API to calculate offsets.
121
+ # Corresponds to the JSON property `encodingType`
172
122
  # @return [String]
173
- attr_accessor :type
123
+ attr_accessor :encoding_type
174
124
 
175
125
  def initialize(**args)
176
126
  update!(**args)
@@ -178,33 +128,32 @@ module Google
178
128
 
179
129
  # Update properties of this object
180
130
  def update!(**args)
181
- @text = args[:text] if args.key?(:text)
182
- @type = args[:type] if args.key?(:type)
131
+ @document = args[:document] if args.key?(:document)
132
+ @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
183
133
  end
184
134
  end
185
135
 
186
- # All available features for sentiment, syntax, and semantic analysis.
187
- # Setting each one to true will enable that specific analysis for the input.
188
- class Features
136
+ # The sentiment analysis response message.
137
+ class AnalyzeSentimentResponse
189
138
  include Google::Apis::Core::Hashable
190
139
 
191
- # Extract syntax information.
192
- # Corresponds to the JSON property `extractSyntax`
193
- # @return [Boolean]
194
- attr_accessor :extract_syntax
195
- alias_method :extract_syntax?, :extract_syntax
140
+ # The language of the text, which will be the same as the language specified
141
+ # in the request or, if not specified, the automatically-detected language.
142
+ # See Document.language field for more details.
143
+ # Corresponds to the JSON property `language`
144
+ # @return [String]
145
+ attr_accessor :language
196
146
 
197
- # Extract document-level sentiment.
198
- # Corresponds to the JSON property `extractDocumentSentiment`
199
- # @return [Boolean]
200
- attr_accessor :extract_document_sentiment
201
- alias_method :extract_document_sentiment?, :extract_document_sentiment
147
+ # The sentiment for all the sentences in the document.
148
+ # Corresponds to the JSON property `sentences`
149
+ # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
150
+ attr_accessor :sentences
202
151
 
203
- # Extract entities.
204
- # Corresponds to the JSON property `extractEntities`
205
- # @return [Boolean]
206
- attr_accessor :extract_entities
207
- alias_method :extract_entities?, :extract_entities
152
+ # Represents the feeling associated with the entire text or entities in
153
+ # the text.
154
+ # Corresponds to the JSON property `documentSentiment`
155
+ # @return [Google::Apis::LanguageV1beta1::Sentiment]
156
+ attr_accessor :document_sentiment
208
157
 
209
158
  def initialize(**args)
210
159
  update!(**args)
@@ -212,26 +161,27 @@ module Google
212
161
 
213
162
  # Update properties of this object
214
163
  def update!(**args)
215
- @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax)
216
- @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment)
217
- @extract_entities = args[:extract_entities] if args.key?(:extract_entities)
164
+ @language = args[:language] if args.key?(:language)
165
+ @sentences = args[:sentences] if args.key?(:sentences)
166
+ @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
218
167
  end
219
168
  end
220
169
 
221
- # Represents a sentence in the input document.
222
- class Sentence
170
+ # The entity analysis response message.
171
+ class AnalyzeEntitiesResponse
223
172
  include Google::Apis::Core::Hashable
224
173
 
225
- # Represents an output piece of text.
226
- # Corresponds to the JSON property `text`
227
- # @return [Google::Apis::LanguageV1beta1::TextSpan]
228
- attr_accessor :text
174
+ # The language of the text, which will be the same as the language specified
175
+ # in the request or, if not specified, the automatically-detected language.
176
+ # See Document.language field for more details.
177
+ # Corresponds to the JSON property `language`
178
+ # @return [String]
179
+ attr_accessor :language
229
180
 
230
- # Represents the feeling associated with the entire text or entities in
231
- # the text.
232
- # Corresponds to the JSON property `sentiment`
233
- # @return [Google::Apis::LanguageV1beta1::Sentiment]
234
- attr_accessor :sentiment
181
+ # The recognized entities in the input document.
182
+ # Corresponds to the JSON property `entities`
183
+ # @return [Array<Google::Apis::LanguageV1beta1::Entity>]
184
+ attr_accessor :entities
235
185
 
236
186
  def initialize(**args)
237
187
  update!(**args)
@@ -239,46 +189,31 @@ module Google
239
189
 
240
190
  # Update properties of this object
241
191
  def update!(**args)
242
- @text = args[:text] if args.key?(:text)
243
- @sentiment = args[:sentiment] if args.key?(:sentiment)
192
+ @language = args[:language] if args.key?(:language)
193
+ @entities = args[:entities] if args.key?(:entities)
244
194
  end
245
195
  end
246
196
 
247
- # ################################################################ #
248
- # Represents the input to API methods.
249
- class Document
197
+ # The syntax analysis response message.
198
+ class AnalyzeSyntaxResponse
250
199
  include Google::Apis::Core::Hashable
251
200
 
252
- # The language of the document (if not specified, the language is
253
- # automatically detected). Both ISO and BCP-47 language codes are
254
- # accepted.<br>
255
- # [Language Support](/natural-language/docs/languages)
256
- # lists currently supported languages for each API method.
257
- # If the language (either specified by the caller or automatically detected)
258
- # is not supported by the called API method, an `INVALID_ARGUMENT` error
259
- # is returned.
201
+ # The language of the text, which will be the same as the language specified
202
+ # in the request or, if not specified, the automatically-detected language.
203
+ # See Document.language field for more details.
260
204
  # Corresponds to the JSON property `language`
261
205
  # @return [String]
262
206
  attr_accessor :language
263
207
 
264
- # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
265
- # returns an `INVALID_ARGUMENT` error.
266
- # Corresponds to the JSON property `type`
267
- # @return [String]
268
- attr_accessor :type
269
-
270
- # The content of the input in string format.
271
- # Corresponds to the JSON property `content`
272
- # @return [String]
273
- attr_accessor :content
208
+ # Sentences in the input document.
209
+ # Corresponds to the JSON property `sentences`
210
+ # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
211
+ attr_accessor :sentences
274
212
 
275
- # The Google Cloud Storage URI where the file content is located.
276
- # This URI must be of the form: gs://bucket_name/object_name. For more
277
- # details, see https://cloud.google.com/storage/docs/reference-uris.
278
- # NOTE: Cloud Storage object versioning is not supported.
279
- # Corresponds to the JSON property `gcsContentUri`
280
- # @return [String]
281
- attr_accessor :gcs_content_uri
213
+ # Tokens, along with their syntactic information, in the input document.
214
+ # Corresponds to the JSON property `tokens`
215
+ # @return [Array<Google::Apis::LanguageV1beta1::Token>]
216
+ attr_accessor :tokens
282
217
 
283
218
  def initialize(**args)
284
219
  update!(**args)
@@ -287,36 +222,48 @@ module Google
287
222
  # Update properties of this object
288
223
  def update!(**args)
289
224
  @language = args[:language] if args.key?(:language)
290
- @type = args[:type] if args.key?(:type)
291
- @content = args[:content] if args.key?(:content)
292
- @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri)
225
+ @sentences = args[:sentences] if args.key?(:sentences)
226
+ @tokens = args[:tokens] if args.key?(:tokens)
293
227
  end
294
228
  end
295
229
 
296
- # Represents the feeling associated with the entire text or entities in
297
- # the text.
298
- class Sentiment
230
+ # Represents a phrase in the text that is a known entity, such as
231
+ # a person, an organization, or location. The API associates information, such
232
+ # as salience and mentions, with entities.
233
+ class Entity
299
234
  include Google::Apis::Core::Hashable
300
235
 
301
- # DEPRECATED FIELD - This field is being deprecated in
302
- # favor of score. Please refer to our documentation at
303
- # https://cloud.google.com/natural-language/docs for more information.
304
- # Corresponds to the JSON property `polarity`
305
- # @return [Float]
306
- attr_accessor :polarity
236
+ # The entity type.
237
+ # Corresponds to the JSON property `type`
238
+ # @return [String]
239
+ attr_accessor :type
307
240
 
308
- # Sentiment score between -1.0 (negative sentiment) and 1.0
309
- # (positive sentiment).
310
- # Corresponds to the JSON property `score`
311
- # @return [Float]
312
- attr_accessor :score
241
+ # Metadata associated with the entity.
242
+ # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
243
+ # available. The associated keys are "wikipedia_url" and "mid", respectively.
244
+ # Corresponds to the JSON property `metadata`
245
+ # @return [Hash<String,String>]
246
+ attr_accessor :metadata
313
247
 
314
- # A non-negative number in the [0, +inf) range, which represents
315
- # the absolute magnitude of sentiment regardless of score (positive or
316
- # negative).
317
- # Corresponds to the JSON property `magnitude`
248
+ # The salience score associated with the entity in the [0, 1.0] range.
249
+ # The salience score for an entity provides information about the
250
+ # importance or centrality of that entity to the entire document text.
251
+ # Scores closer to 0 are less salient, while scores closer to 1.0 are highly
252
+ # salient.
253
+ # Corresponds to the JSON property `salience`
318
254
  # @return [Float]
319
- attr_accessor :magnitude
255
+ attr_accessor :salience
256
+
257
+ # The mentions of this entity in the input document. The API currently
258
+ # supports proper noun mentions.
259
+ # Corresponds to the JSON property `mentions`
260
+ # @return [Array<Google::Apis::LanguageV1beta1::EntityMention>]
261
+ attr_accessor :mentions
262
+
263
+ # The representative name for the entity.
264
+ # Corresponds to the JSON property `name`
265
+ # @return [String]
266
+ attr_accessor :name
320
267
 
321
268
  def initialize(**args)
322
269
  update!(**args)
@@ -324,14 +271,17 @@ module Google
324
271
 
325
272
  # Update properties of this object
326
273
  def update!(**args)
327
- @polarity = args[:polarity] if args.key?(:polarity)
328
- @score = args[:score] if args.key?(:score)
329
- @magnitude = args[:magnitude] if args.key?(:magnitude)
274
+ @type = args[:type] if args.key?(:type)
275
+ @metadata = args[:metadata] if args.key?(:metadata)
276
+ @salience = args[:salience] if args.key?(:salience)
277
+ @mentions = args[:mentions] if args.key?(:mentions)
278
+ @name = args[:name] if args.key?(:name)
330
279
  end
331
280
  end
332
281
 
333
- # The entity analysis request message.
334
- class AnalyzeEntitiesRequest
282
+ # The request message for the text annotation API, which can perform multiple
283
+ # analysis types (sentiment, entities, and syntax) in one call.
284
+ class AnnotateTextRequest
335
285
  include Google::Apis::Core::Hashable
336
286
 
337
287
  # The encoding type used by the API to calculate offsets.
@@ -345,6 +295,12 @@ module Google
345
295
  # @return [Google::Apis::LanguageV1beta1::Document]
346
296
  attr_accessor :document
347
297
 
298
+ # All available features for sentiment, syntax, and semantic analysis.
299
+ # Setting each one to true will enable that specific analysis for the input.
300
+ # Corresponds to the JSON property `features`
301
+ # @return [Google::Apis::LanguageV1beta1::Features]
302
+ attr_accessor :features
303
+
348
304
  def initialize(**args)
349
305
  update!(**args)
350
306
  end
@@ -353,72 +309,46 @@ module Google
353
309
  def update!(**args)
354
310
  @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
355
311
  @document = args[:document] if args.key?(:document)
312
+ @features = args[:features] if args.key?(:features)
356
313
  end
357
314
  end
358
315
 
359
- # Represents part of speech information for a token.
360
- class PartOfSpeech
316
+ # The text annotations response message.
317
+ class AnnotateTextResponse
361
318
  include Google::Apis::Core::Hashable
362
319
 
363
- # The grammatical reciprocity.
364
- # Corresponds to the JSON property `reciprocity`
365
- # @return [String]
366
- attr_accessor :reciprocity
367
-
368
- # The grammatical form.
369
- # Corresponds to the JSON property `form`
370
- # @return [String]
371
- attr_accessor :form
372
-
373
- # The grammatical number.
374
- # Corresponds to the JSON property `number`
375
- # @return [String]
376
- attr_accessor :number
377
-
378
- # The grammatical voice.
379
- # Corresponds to the JSON property `voice`
380
- # @return [String]
381
- attr_accessor :voice
382
-
383
- # The grammatical aspect.
384
- # Corresponds to the JSON property `aspect`
385
- # @return [String]
386
- attr_accessor :aspect
387
-
388
- # The grammatical mood.
389
- # Corresponds to the JSON property `mood`
390
- # @return [String]
391
- attr_accessor :mood
392
-
393
- # The part of speech tag.
394
- # Corresponds to the JSON property `tag`
395
- # @return [String]
396
- attr_accessor :tag
397
-
398
- # The grammatical gender.
399
- # Corresponds to the JSON property `gender`
320
+ # The language of the text, which will be the same as the language specified
321
+ # in the request or, if not specified, the automatically-detected language.
322
+ # See Document.language field for more details.
323
+ # Corresponds to the JSON property `language`
400
324
  # @return [String]
401
- attr_accessor :gender
325
+ attr_accessor :language
402
326
 
403
- # The grammatical person.
404
- # Corresponds to the JSON property `person`
405
- # @return [String]
406
- attr_accessor :person
327
+ # Sentences in the input document. Populated if the user enables
328
+ # AnnotateTextRequest.Features.extract_syntax.
329
+ # Corresponds to the JSON property `sentences`
330
+ # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
331
+ attr_accessor :sentences
407
332
 
408
- # The grammatical properness.
409
- # Corresponds to the JSON property `proper`
410
- # @return [String]
411
- attr_accessor :proper
333
+ # Tokens, along with their syntactic information, in the input document.
334
+ # Populated if the user enables
335
+ # AnnotateTextRequest.Features.extract_syntax.
336
+ # Corresponds to the JSON property `tokens`
337
+ # @return [Array<Google::Apis::LanguageV1beta1::Token>]
338
+ attr_accessor :tokens
412
339
 
413
- # The grammatical case.
414
- # Corresponds to the JSON property `case`
415
- # @return [String]
416
- attr_accessor :case
340
+ # Entities, along with their semantic information, in the input document.
341
+ # Populated if the user enables
342
+ # AnnotateTextRequest.Features.extract_entities.
343
+ # Corresponds to the JSON property `entities`
344
+ # @return [Array<Google::Apis::LanguageV1beta1::Entity>]
345
+ attr_accessor :entities
417
346
 
418
- # The grammatical tense.
419
- # Corresponds to the JSON property `tense`
420
- # @return [String]
421
- attr_accessor :tense
347
+ # Represents the feeling associated with the entire text or entities in
348
+ # the text.
349
+ # Corresponds to the JSON property `documentSentiment`
350
+ # @return [Google::Apis::LanguageV1beta1::Sentiment]
351
+ attr_accessor :document_sentiment
422
352
 
423
353
  def initialize(**args)
424
354
  update!(**args)
@@ -426,26 +356,20 @@ module Google
426
356
 
427
357
  # Update properties of this object
428
358
  def update!(**args)
429
- @reciprocity = args[:reciprocity] if args.key?(:reciprocity)
430
- @form = args[:form] if args.key?(:form)
431
- @number = args[:number] if args.key?(:number)
432
- @voice = args[:voice] if args.key?(:voice)
433
- @aspect = args[:aspect] if args.key?(:aspect)
434
- @mood = args[:mood] if args.key?(:mood)
435
- @tag = args[:tag] if args.key?(:tag)
436
- @gender = args[:gender] if args.key?(:gender)
437
- @person = args[:person] if args.key?(:person)
438
- @proper = args[:proper] if args.key?(:proper)
439
- @case = args[:case] if args.key?(:case)
440
- @tense = args[:tense] if args.key?(:tense)
359
+ @language = args[:language] if args.key?(:language)
360
+ @sentences = args[:sentences] if args.key?(:sentences)
361
+ @tokens = args[:tokens] if args.key?(:tokens)
362
+ @entities = args[:entities] if args.key?(:entities)
363
+ @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
441
364
  end
442
365
  end
443
366
 
444
- # The syntax analysis request message.
445
- class AnalyzeSyntaxRequest
367
+ # The sentiment analysis request message.
368
+ class AnalyzeSentimentRequest
446
369
  include Google::Apis::Core::Hashable
447
370
 
448
- # The encoding type used by the API to calculate offsets.
371
+ # The encoding type used by the API to calculate sentence offsets for the
372
+ # sentence sentiment.
449
373
  # Corresponds to the JSON property `encodingType`
450
374
  # @return [String]
451
375
  attr_accessor :encoding_type
@@ -467,27 +391,49 @@ module Google
467
391
  end
468
392
  end
469
393
 
470
- # The sentiment analysis response message.
471
- class AnalyzeSentimentResponse
394
+ # Represents dependency parse tree information for a token.
395
+ class DependencyEdge
472
396
  include Google::Apis::Core::Hashable
473
397
 
474
- # The language of the text, which will be the same as the language specified
475
- # in the request or, if not specified, the automatically-detected language.
476
- # See Document.language field for more details.
477
- # Corresponds to the JSON property `language`
398
+ # The parse label for the token.
399
+ # Corresponds to the JSON property `label`
478
400
  # @return [String]
479
- attr_accessor :language
401
+ attr_accessor :label
480
402
 
481
- # The sentiment for all the sentences in the document.
482
- # Corresponds to the JSON property `sentences`
483
- # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
484
- attr_accessor :sentences
403
+ # Represents the head of this token in the dependency tree.
404
+ # This is the index of the token which has an arc going to this token.
405
+ # The index is the position of the token in the array of tokens returned
406
+ # by the API method. If this token is a root token, then the
407
+ # `head_token_index` is its own index.
408
+ # Corresponds to the JSON property `headTokenIndex`
409
+ # @return [Fixnum]
410
+ attr_accessor :head_token_index
485
411
 
486
- # Represents the feeling associated with the entire text or entities in
487
- # the text.
488
- # Corresponds to the JSON property `documentSentiment`
489
- # @return [Google::Apis::LanguageV1beta1::Sentiment]
490
- attr_accessor :document_sentiment
412
+ def initialize(**args)
413
+ update!(**args)
414
+ end
415
+
416
+ # Update properties of this object
417
+ def update!(**args)
418
+ @label = args[:label] if args.key?(:label)
419
+ @head_token_index = args[:head_token_index] if args.key?(:head_token_index)
420
+ end
421
+ end
422
+
423
+ # Represents an output piece of text.
424
+ class TextSpan
425
+ include Google::Apis::Core::Hashable
426
+
427
+ # The API calculates the beginning offset of the content in the original
428
+ # document according to the EncodingType specified in the API request.
429
+ # Corresponds to the JSON property `beginOffset`
430
+ # @return [Fixnum]
431
+ attr_accessor :begin_offset
432
+
433
+ # The content of the output text.
434
+ # Corresponds to the JSON property `content`
435
+ # @return [String]
436
+ attr_accessor :content
491
437
 
492
438
  def initialize(**args)
493
439
  update!(**args)
@@ -495,27 +441,107 @@ module Google
495
441
 
496
442
  # Update properties of this object
497
443
  def update!(**args)
498
- @language = args[:language] if args.key?(:language)
499
- @sentences = args[:sentences] if args.key?(:sentences)
500
- @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
444
+ @begin_offset = args[:begin_offset] if args.key?(:begin_offset)
445
+ @content = args[:content] if args.key?(:content)
501
446
  end
502
447
  end
503
448
 
504
- # The entity analysis response message.
505
- class AnalyzeEntitiesResponse
449
+ # Represents the smallest syntactic building block of the text.
450
+ class Token
506
451
  include Google::Apis::Core::Hashable
507
452
 
508
- # The language of the text, which will be the same as the language specified
509
- # in the request or, if not specified, the automatically-detected language.
510
- # See Document.language field for more details.
511
- # Corresponds to the JSON property `language`
453
+ # Represents an output piece of text.
454
+ # Corresponds to the JSON property `text`
455
+ # @return [Google::Apis::LanguageV1beta1::TextSpan]
456
+ attr_accessor :text
457
+
458
+ # Represents dependency parse tree information for a token.
459
+ # Corresponds to the JSON property `dependencyEdge`
460
+ # @return [Google::Apis::LanguageV1beta1::DependencyEdge]
461
+ attr_accessor :dependency_edge
462
+
463
+ # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
464
+ # Corresponds to the JSON property `lemma`
465
+ # @return [String]
466
+ attr_accessor :lemma
467
+
468
+ # Represents part of speech information for a token.
469
+ # Corresponds to the JSON property `partOfSpeech`
470
+ # @return [Google::Apis::LanguageV1beta1::PartOfSpeech]
471
+ attr_accessor :part_of_speech
472
+
473
+ def initialize(**args)
474
+ update!(**args)
475
+ end
476
+
477
+ # Update properties of this object
478
+ def update!(**args)
479
+ @text = args[:text] if args.key?(:text)
480
+ @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge)
481
+ @lemma = args[:lemma] if args.key?(:lemma)
482
+ @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech)
483
+ end
484
+ end
485
+
486
+ # The `Status` type defines a logical error model that is suitable for different
487
+ # programming environments, including REST APIs and RPC APIs. It is used by
488
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
489
+ # - Simple to use and understand for most users
490
+ # - Flexible enough to meet unexpected needs
491
+ # # Overview
492
+ # The `Status` message contains three pieces of data: error code, error message,
493
+ # and error details. The error code should be an enum value of
494
+ # google.rpc.Code, but it may accept additional error codes if needed. The
495
+ # error message should be a developer-facing English message that helps
496
+ # developers *understand* and *resolve* the error. If a localized user-facing
497
+ # error message is needed, put the localized message in the error details or
498
+ # localize it in the client. The optional error details may contain arbitrary
499
+ # information about the error. There is a predefined set of error detail types
500
+ # in the package `google.rpc` that can be used for common error conditions.
501
+ # # Language mapping
502
+ # The `Status` message is the logical representation of the error model, but it
503
+ # is not necessarily the actual wire format. When the `Status` message is
504
+ # exposed in different client libraries and different wire protocols, it can be
505
+ # mapped differently. For example, it will likely be mapped to some exceptions
506
+ # in Java, but more likely mapped to some error codes in C.
507
+ # # Other uses
508
+ # The error model and the `Status` message can be used in a variety of
509
+ # environments, either with or without APIs, to provide a
510
+ # consistent developer experience across different environments.
511
+ # Example uses of this error model include:
512
+ # - Partial errors. If a service needs to return partial errors to the client,
513
+ # it may embed the `Status` in the normal response to indicate the partial
514
+ # errors.
515
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
516
+ # have a `Status` message for error reporting.
517
+ # - Batch operations. If a client uses batch request and batch response, the
518
+ # `Status` message should be used directly inside batch response, one for
519
+ # each error sub-response.
520
+ # - Asynchronous operations. If an API call embeds asynchronous operation
521
+ # results in its response, the status of those operations should be
522
+ # represented directly using the `Status` message.
523
+ # - Logging. If some API errors are stored in logs, the message `Status` could
524
+ # be used directly after any stripping needed for security/privacy reasons.
525
+ class Status
526
+ include Google::Apis::Core::Hashable
527
+
528
+ # A developer-facing error message, which should be in English. Any
529
+ # user-facing error message should be localized and sent in the
530
+ # google.rpc.Status.details field, or localized by the client.
531
+ # Corresponds to the JSON property `message`
512
532
  # @return [String]
513
- attr_accessor :language
533
+ attr_accessor :message
514
534
 
515
- # The recognized entities in the input document.
516
- # Corresponds to the JSON property `entities`
517
- # @return [Array<Google::Apis::LanguageV1beta1::Entity>]
518
- attr_accessor :entities
535
+ # A list of messages that carry the error details. There will be a
536
+ # common set of message types for APIs to use.
537
+ # Corresponds to the JSON property `details`
538
+ # @return [Array<Hash<String,Object>>]
539
+ attr_accessor :details
540
+
541
+ # The status code, which should be an enum value of google.rpc.Code.
542
+ # Corresponds to the JSON property `code`
543
+ # @return [Fixnum]
544
+ attr_accessor :code
519
545
 
520
546
  def initialize(**args)
521
547
  update!(**args)
@@ -523,83 +549,60 @@ module Google
523
549
 
524
550
  # Update properties of this object
525
551
  def update!(**args)
526
- @language = args[:language] if args.key?(:language)
527
- @entities = args[:entities] if args.key?(:entities)
552
+ @message = args[:message] if args.key?(:message)
553
+ @details = args[:details] if args.key?(:details)
554
+ @code = args[:code] if args.key?(:code)
528
555
  end
529
556
  end
530
557
 
531
- # Represents a phrase in the text that is a known entity, such as
532
- # a person, an organization, or location. The API associates information, such
533
- # as salience and mentions, with entities.
534
- class Entity
558
+ # Represents a mention for an entity in the text. Currently, proper noun
559
+ # mentions are supported.
560
+ class EntityMention
535
561
  include Google::Apis::Core::Hashable
536
562
 
537
- # The mentions of this entity in the input document. The API currently
538
- # supports proper noun mentions.
539
- # Corresponds to the JSON property `mentions`
540
- # @return [Array<Google::Apis::LanguageV1beta1::EntityMention>]
541
- attr_accessor :mentions
542
-
543
- # The representative name for the entity.
544
- # Corresponds to the JSON property `name`
545
- # @return [String]
546
- attr_accessor :name
563
+ # Represents an output piece of text.
564
+ # Corresponds to the JSON property `text`
565
+ # @return [Google::Apis::LanguageV1beta1::TextSpan]
566
+ attr_accessor :text
547
567
 
548
- # The entity type.
568
+ # The type of the entity mention.
549
569
  # Corresponds to the JSON property `type`
550
570
  # @return [String]
551
571
  attr_accessor :type
552
572
 
553
- # Metadata associated with the entity.
554
- # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
555
- # available. The associated keys are "wikipedia_url" and "mid", respectively.
556
- # Corresponds to the JSON property `metadata`
557
- # @return [Hash<String,String>]
558
- attr_accessor :metadata
559
-
560
- # The salience score associated with the entity in the [0, 1.0] range.
561
- # The salience score for an entity provides information about the
562
- # importance or centrality of that entity to the entire document text.
563
- # Scores closer to 0 are less salient, while scores closer to 1.0 are highly
564
- # salient.
565
- # Corresponds to the JSON property `salience`
566
- # @return [Float]
567
- attr_accessor :salience
568
-
569
573
  def initialize(**args)
570
574
  update!(**args)
571
575
  end
572
576
 
573
577
  # Update properties of this object
574
578
  def update!(**args)
575
- @mentions = args[:mentions] if args.key?(:mentions)
576
- @name = args[:name] if args.key?(:name)
579
+ @text = args[:text] if args.key?(:text)
577
580
  @type = args[:type] if args.key?(:type)
578
- @metadata = args[:metadata] if args.key?(:metadata)
579
- @salience = args[:salience] if args.key?(:salience)
580
581
  end
581
582
  end
582
583
 
583
- # The syntax analysis response message.
584
- class AnalyzeSyntaxResponse
584
+ # All available features for sentiment, syntax, and semantic analysis.
585
+ # Setting each one to true will enable that specific analysis for the input.
586
+ class Features
585
587
  include Google::Apis::Core::Hashable
586
588
 
587
- # The language of the text, which will be the same as the language specified
588
- # in the request or, if not specified, the automatically-detected language.
589
- # See Document.language field for more details.
590
- # Corresponds to the JSON property `language`
591
- # @return [String]
592
- attr_accessor :language
589
+ # Extract entities.
590
+ # Corresponds to the JSON property `extractEntities`
591
+ # @return [Boolean]
592
+ attr_accessor :extract_entities
593
+ alias_method :extract_entities?, :extract_entities
593
594
 
594
- # Sentences in the input document.
595
- # Corresponds to the JSON property `sentences`
596
- # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
597
- attr_accessor :sentences
595
+ # Extract syntax information.
596
+ # Corresponds to the JSON property `extractSyntax`
597
+ # @return [Boolean]
598
+ attr_accessor :extract_syntax
599
+ alias_method :extract_syntax?, :extract_syntax
598
600
 
599
- # Tokens, along with their syntactic information, in the input document.
600
- # Corresponds to the JSON property `tokens`
601
- # @return [Array<Google::Apis::LanguageV1beta1::Token>]
602
- attr_accessor :tokens
601
+ # Extract document-level sentiment.
602
+ # Corresponds to the JSON property `extractDocumentSentiment`
603
+ # @return [Boolean]
604
+ attr_accessor :extract_document_sentiment
605
+ alias_method :extract_document_sentiment?, :extract_document_sentiment
603
606
 
604
607
  def initialize(**args)
605
608
  update!(**args)
@@ -607,33 +610,47 @@ module Google
607
610
 
608
611
  # Update properties of this object
609
612
  def update!(**args)
610
- @language = args[:language] if args.key?(:language)
611
- @sentences = args[:sentences] if args.key?(:sentences)
612
- @tokens = args[:tokens] if args.key?(:tokens)
613
+ @extract_entities = args[:extract_entities] if args.key?(:extract_entities)
614
+ @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax)
615
+ @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment)
613
616
  end
614
617
  end
615
618
 
616
- # The request message for the text annotation API, which can perform multiple
617
- # analysis types (sentiment, entities, and syntax) in one call.
618
- class AnnotateTextRequest
619
+ # ################################################################ #
620
+ # Represents the input to API methods.
621
+ class Document
619
622
  include Google::Apis::Core::Hashable
620
623
 
621
- # All available features for sentiment, syntax, and semantic analysis.
622
- # Setting each one to true will enable that specific analysis for the input.
623
- # Corresponds to the JSON property `features`
624
- # @return [Google::Apis::LanguageV1beta1::Features]
625
- attr_accessor :features
624
+ # The Google Cloud Storage URI where the file content is located.
625
+ # This URI must be of the form: gs://bucket_name/object_name. For more
626
+ # details, see https://cloud.google.com/storage/docs/reference-uris.
627
+ # NOTE: Cloud Storage object versioning is not supported.
628
+ # Corresponds to the JSON property `gcsContentUri`
629
+ # @return [String]
630
+ attr_accessor :gcs_content_uri
626
631
 
627
- # The encoding type used by the API to calculate offsets.
628
- # Corresponds to the JSON property `encodingType`
632
+ # The language of the document (if not specified, the language is
633
+ # automatically detected). Both ISO and BCP-47 language codes are
634
+ # accepted.<br>
635
+ # [Language Support](/natural-language/docs/languages)
636
+ # lists currently supported languages for each API method.
637
+ # If the language (either specified by the caller or automatically detected)
638
+ # is not supported by the called API method, an `INVALID_ARGUMENT` error
639
+ # is returned.
640
+ # Corresponds to the JSON property `language`
629
641
  # @return [String]
630
- attr_accessor :encoding_type
642
+ attr_accessor :language
631
643
 
632
- # ################################################################ #
633
- # Represents the input to API methods.
634
- # Corresponds to the JSON property `document`
635
- # @return [Google::Apis::LanguageV1beta1::Document]
636
- attr_accessor :document
644
+ # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
645
+ # returns an `INVALID_ARGUMENT` error.
646
+ # Corresponds to the JSON property `type`
647
+ # @return [String]
648
+ attr_accessor :type
649
+
650
+ # The content of the input in string format.
651
+ # Corresponds to the JSON property `content`
652
+ # @return [String]
653
+ attr_accessor :content
637
654
 
638
655
  def initialize(**args)
639
656
  update!(**args)
@@ -641,48 +658,27 @@ module Google
641
658
 
642
659
  # Update properties of this object
643
660
  def update!(**args)
644
- @features = args[:features] if args.key?(:features)
645
- @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
646
- @document = args[:document] if args.key?(:document)
661
+ @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri)
662
+ @language = args[:language] if args.key?(:language)
663
+ @type = args[:type] if args.key?(:type)
664
+ @content = args[:content] if args.key?(:content)
647
665
  end
648
666
  end
649
667
 
650
- # The text annotations response message.
651
- class AnnotateTextResponse
668
+ # Represents a sentence in the input document.
669
+ class Sentence
652
670
  include Google::Apis::Core::Hashable
653
671
 
654
- # Tokens, along with their syntactic information, in the input document.
655
- # Populated if the user enables
656
- # AnnotateTextRequest.Features.extract_syntax.
657
- # Corresponds to the JSON property `tokens`
658
- # @return [Array<Google::Apis::LanguageV1beta1::Token>]
659
- attr_accessor :tokens
660
-
661
- # Entities, along with their semantic information, in the input document.
662
- # Populated if the user enables
663
- # AnnotateTextRequest.Features.extract_entities.
664
- # Corresponds to the JSON property `entities`
665
- # @return [Array<Google::Apis::LanguageV1beta1::Entity>]
666
- attr_accessor :entities
672
+ # Represents an output piece of text.
673
+ # Corresponds to the JSON property `text`
674
+ # @return [Google::Apis::LanguageV1beta1::TextSpan]
675
+ attr_accessor :text
667
676
 
668
677
  # Represents the feeling associated with the entire text or entities in
669
678
  # the text.
670
- # Corresponds to the JSON property `documentSentiment`
679
+ # Corresponds to the JSON property `sentiment`
671
680
  # @return [Google::Apis::LanguageV1beta1::Sentiment]
672
- attr_accessor :document_sentiment
673
-
674
- # The language of the text, which will be the same as the language specified
675
- # in the request or, if not specified, the automatically-detected language.
676
- # See Document.language field for more details.
677
- # Corresponds to the JSON property `language`
678
- # @return [String]
679
- attr_accessor :language
680
-
681
- # Sentences in the input document. Populated if the user enables
682
- # AnnotateTextRequest.Features.extract_syntax.
683
- # Corresponds to the JSON property `sentences`
684
- # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
685
- attr_accessor :sentences
681
+ attr_accessor :sentiment
686
682
 
687
683
  def initialize(**args)
688
684
  update!(**args)
@@ -690,20 +686,16 @@ module Google
690
686
 
691
687
  # Update properties of this object
692
688
  def update!(**args)
693
- @tokens = args[:tokens] if args.key?(:tokens)
694
- @entities = args[:entities] if args.key?(:entities)
695
- @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
696
- @language = args[:language] if args.key?(:language)
697
- @sentences = args[:sentences] if args.key?(:sentences)
689
+ @text = args[:text] if args.key?(:text)
690
+ @sentiment = args[:sentiment] if args.key?(:sentiment)
698
691
  end
699
692
  end
700
693
 
701
- # The sentiment analysis request message.
702
- class AnalyzeSentimentRequest
694
+ # The entity analysis request message.
695
+ class AnalyzeEntitiesRequest
703
696
  include Google::Apis::Core::Hashable
704
697
 
705
- # The encoding type used by the API to calculate sentence offsets for the
706
- # sentence sentiment.
698
+ # The encoding type used by the API to calculate offsets.
707
699
  # Corresponds to the JSON property `encodingType`
708
700
  # @return [String]
709
701
  attr_accessor :encoding_type
@@ -725,23 +717,30 @@ module Google
725
717
  end
726
718
  end
727
719
 
728
- # Represents dependency parse tree information for a token.
729
- class DependencyEdge
720
+ # Represents the feeling associated with the entire text or entities in
721
+ # the text.
722
+ class Sentiment
730
723
  include Google::Apis::Core::Hashable
731
724
 
732
- # The parse label for the token.
733
- # Corresponds to the JSON property `label`
734
- # @return [String]
735
- attr_accessor :label
725
+ # DEPRECATED FIELD - This field is being deprecated in
726
+ # favor of score. Please refer to our documentation at
727
+ # https://cloud.google.com/natural-language/docs for more information.
728
+ # Corresponds to the JSON property `polarity`
729
+ # @return [Float]
730
+ attr_accessor :polarity
736
731
 
737
- # Represents the head of this token in the dependency tree.
738
- # This is the index of the token which has an arc going to this token.
739
- # The index is the position of the token in the array of tokens returned
740
- # by the API method. If this token is a root token, then the
741
- # `head_token_index` is its own index.
742
- # Corresponds to the JSON property `headTokenIndex`
743
- # @return [Fixnum]
744
- attr_accessor :head_token_index
732
+ # Sentiment score between -1.0 (negative sentiment) and 1.0
733
+ # (positive sentiment).
734
+ # Corresponds to the JSON property `score`
735
+ # @return [Float]
736
+ attr_accessor :score
737
+
738
+ # A non-negative number in the [0, +inf) range, which represents
739
+ # the absolute magnitude of sentiment regardless of score (positive or
740
+ # negative).
741
+ # Corresponds to the JSON property `magnitude`
742
+ # @return [Float]
743
+ attr_accessor :magnitude
745
744
 
746
745
  def initialize(**args)
747
746
  update!(**args)
@@ -749,8 +748,9 @@ module Google
749
748
 
750
749
  # Update properties of this object
751
750
  def update!(**args)
752
- @label = args[:label] if args.key?(:label)
753
- @head_token_index = args[:head_token_index] if args.key?(:head_token_index)
751
+ @polarity = args[:polarity] if args.key?(:polarity)
752
+ @score = args[:score] if args.key?(:score)
753
+ @magnitude = args[:magnitude] if args.key?(:magnitude)
754
754
  end
755
755
  end
756
756
  end