google-api-client 0.11.1 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/api_names.yaml +42335 -1
  4. data/generated/google/apis/acceleratedmobilepageurl_v1.rb +3 -3
  5. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +28 -28
  6. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +12 -12
  7. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +2 -2
  8. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +757 -757
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +162 -162
  11. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +48 -48
  12. data/generated/google/apis/admin_directory_v1.rb +1 -1
  13. data/generated/google/apis/admin_directory_v1/classes.rb +75 -7
  14. data/generated/google/apis/admin_directory_v1/representations.rb +20 -0
  15. data/generated/google/apis/admin_directory_v1/service.rb +61 -61
  16. data/generated/google/apis/adsense_v1_4.rb +1 -1
  17. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  18. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  19. data/generated/google/apis/analyticsreporting_v4/classes.rb +403 -403
  20. data/generated/google/apis/analyticsreporting_v4/representations.rb +108 -108
  21. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  22. data/generated/google/apis/androidenterprise_v1/classes.rb +36 -11
  23. data/generated/google/apis/androidenterprise_v1/representations.rb +2 -0
  24. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  25. data/generated/google/apis/appengine_v1.rb +6 -5
  26. data/generated/google/apis/appengine_v1/classes.rb +1429 -1421
  27. data/generated/google/apis/appengine_v1/representations.rb +331 -331
  28. data/generated/google/apis/appengine_v1/service.rb +173 -168
  29. data/generated/google/apis/appstate_v1.rb +1 -1
  30. data/generated/google/apis/bigquery_v2.rb +1 -1
  31. data/generated/google/apis/calendar_v3.rb +1 -1
  32. data/generated/google/apis/classroom_v1.rb +1 -1
  33. data/generated/google/apis/cloudbilling_v1.rb +1 -1
  34. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  35. data/generated/google/apis/cloudbuild_v1/classes.rb +624 -618
  36. data/generated/google/apis/cloudbuild_v1/representations.rb +126 -125
  37. data/generated/google/apis/cloudbuild_v1/service.rb +87 -87
  38. data/generated/google/apis/clouddebugger_v2.rb +4 -4
  39. data/generated/google/apis/clouddebugger_v2/classes.rb +267 -267
  40. data/generated/google/apis/clouddebugger_v2/representations.rb +83 -83
  41. data/generated/google/apis/clouddebugger_v2/service.rb +137 -137
  42. data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
  43. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +131 -131
  44. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +28 -28
  45. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +17 -17
  46. data/generated/google/apis/cloudfunctions_v1.rb +1 -4
  47. data/generated/google/apis/cloudfunctions_v1/classes.rb +7 -47
  48. data/generated/google/apis/cloudfunctions_v1/representations.rb +1 -17
  49. data/generated/google/apis/cloudfunctions_v1/service.rb +0 -30
  50. data/generated/google/apis/cloudkms_v1.rb +1 -1
  51. data/generated/google/apis/cloudkms_v1/classes.rb +625 -625
  52. data/generated/google/apis/cloudkms_v1/representations.rb +132 -132
  53. data/generated/google/apis/cloudkms_v1/service.rb +272 -272
  54. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  55. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  56. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +242 -242
  57. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +43 -43
  58. data/generated/google/apis/cloudresourcemanager_v1/service.rb +505 -505
  59. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  60. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +172 -172
  61. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +39 -39
  62. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +310 -310
  63. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  64. data/generated/google/apis/cloudtrace_v1/classes.rb +96 -69
  65. data/generated/google/apis/cloudtrace_v1/representations.rb +16 -16
  66. data/generated/google/apis/cloudtrace_v1/service.rb +42 -15
  67. data/generated/google/apis/compute_beta.rb +1 -1
  68. data/generated/google/apis/compute_beta/classes.rb +194 -25
  69. data/generated/google/apis/compute_beta/representations.rb +42 -0
  70. data/generated/google/apis/compute_beta/service.rb +196 -100
  71. data/generated/google/apis/compute_v1.rb +1 -1
  72. data/generated/google/apis/compute_v1/classes.rb +69 -18
  73. data/generated/google/apis/compute_v1/representations.rb +16 -0
  74. data/generated/google/apis/compute_v1/service.rb +84 -26
  75. data/generated/google/apis/container_v1.rb +3 -3
  76. data/generated/google/apis/container_v1/classes.rb +794 -586
  77. data/generated/google/apis/container_v1/representations.rb +202 -118
  78. data/generated/google/apis/container_v1/service.rb +396 -167
  79. data/generated/google/apis/content_v2.rb +1 -1
  80. data/generated/google/apis/content_v2/service.rb +4 -4
  81. data/generated/google/apis/dataproc_v1.rb +1 -1
  82. data/generated/google/apis/dataproc_v1/classes.rb +487 -484
  83. data/generated/google/apis/dataproc_v1/representations.rb +83 -83
  84. data/generated/google/apis/dataproc_v1/service.rb +299 -297
  85. data/generated/google/apis/datastore_v1.rb +1 -1
  86. data/generated/google/apis/datastore_v1/classes.rb +703 -703
  87. data/generated/google/apis/datastore_v1/representations.rb +148 -148
  88. data/generated/google/apis/datastore_v1/service.rb +62 -62
  89. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  90. data/generated/google/apis/deploymentmanager_v2/classes.rb +7 -5
  91. data/generated/google/apis/dfareporting_v2_6.rb +1 -1
  92. data/generated/google/apis/dfareporting_v2_6/classes.rb +66 -53
  93. data/generated/google/apis/dfareporting_v2_6/service.rb +30 -30
  94. data/generated/google/apis/dfareporting_v2_7.rb +1 -1
  95. data/generated/google/apis/dfareporting_v2_7/classes.rb +69 -55
  96. data/generated/google/apis/dfareporting_v2_7/service.rb +38 -37
  97. data/generated/google/apis/dfareporting_v2_8.rb +40 -0
  98. data/generated/google/apis/dfareporting_v2_8/classes.rb +12046 -0
  99. data/generated/google/apis/dfareporting_v2_8/representations.rb +4310 -0
  100. data/generated/google/apis/dfareporting_v2_8/service.rb +9135 -0
  101. data/generated/google/apis/dns_v1.rb +1 -1
  102. data/generated/google/apis/dns_v2beta1.rb +1 -1
  103. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  104. data/generated/google/apis/drive_v2.rb +1 -1
  105. data/generated/google/apis/drive_v2/classes.rb +15 -0
  106. data/generated/google/apis/drive_v2/representations.rb +2 -0
  107. data/generated/google/apis/drive_v2/service.rb +2 -1
  108. data/generated/google/apis/drive_v3.rb +1 -1
  109. data/generated/google/apis/drive_v3/classes.rb +16 -0
  110. data/generated/google/apis/drive_v3/representations.rb +2 -0
  111. data/generated/google/apis/drive_v3/service.rb +2 -1
  112. data/generated/google/apis/firebasedynamiclinks_v1.rb +2 -3
  113. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +159 -159
  114. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +55 -55
  115. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +5 -6
  116. data/generated/google/apis/firebaserules_v1.rb +1 -1
  117. data/generated/google/apis/firebaserules_v1/classes.rb +73 -73
  118. data/generated/google/apis/firebaserules_v1/representations.rb +25 -25
  119. data/generated/google/apis/firebaserules_v1/service.rb +118 -118
  120. data/generated/google/apis/fusiontables_v2.rb +1 -1
  121. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  122. data/generated/google/apis/games_management_v1management.rb +1 -1
  123. data/generated/google/apis/games_v1.rb +1 -1
  124. data/generated/google/apis/genomics_v1.rb +1 -1
  125. data/generated/google/apis/genomics_v1/classes.rb +920 -920
  126. data/generated/google/apis/genomics_v1/representations.rb +202 -202
  127. data/generated/google/apis/genomics_v1/service.rb +1092 -1092
  128. data/generated/google/apis/gmail_v1.rb +1 -1
  129. data/generated/google/apis/iam_v1.rb +1 -1
  130. data/generated/google/apis/iam_v1/classes.rb +455 -435
  131. data/generated/google/apis/iam_v1/representations.rb +96 -93
  132. data/generated/google/apis/iam_v1/service.rb +157 -157
  133. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  134. data/generated/google/apis/identitytoolkit_v3/classes.rb +12 -0
  135. data/generated/google/apis/identitytoolkit_v3/representations.rb +2 -0
  136. data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
  137. data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
  138. data/generated/google/apis/kgsearch_v1/service.rb +9 -9
  139. data/generated/google/apis/language_v1.rb +1 -1
  140. data/generated/google/apis/language_v1/classes.rb +455 -455
  141. data/generated/google/apis/language_v1/representations.rb +102 -102
  142. data/generated/google/apis/language_v1/service.rb +42 -42
  143. data/generated/google/apis/language_v1beta1.rb +1 -1
  144. data/generated/google/apis/language_v1beta1/classes.rb +216 -215
  145. data/generated/google/apis/language_v1beta1/representations.rb +75 -75
  146. data/generated/google/apis/language_v1beta1/service.rb +45 -45
  147. data/generated/google/apis/logging_v2.rb +1 -1
  148. data/generated/google/apis/logging_v2/classes.rb +908 -895
  149. data/generated/google/apis/logging_v2/representations.rb +121 -120
  150. data/generated/google/apis/logging_v2/service.rb +489 -489
  151. data/generated/google/apis/logging_v2beta1.rb +4 -4
  152. data/generated/google/apis/logging_v2beta1/classes.rb +928 -915
  153. data/generated/google/apis/logging_v2beta1/representations.rb +121 -120
  154. data/generated/google/apis/logging_v2beta1/service.rb +249 -249
  155. data/generated/google/apis/manufacturers_v1.rb +1 -1
  156. data/generated/google/apis/manufacturers_v1/classes.rb +294 -294
  157. data/generated/google/apis/manufacturers_v1/representations.rb +84 -84
  158. data/generated/google/apis/manufacturers_v1/service.rb +8 -8
  159. data/generated/google/apis/mirror_v1.rb +1 -1
  160. data/generated/google/apis/ml_v1.rb +1 -1
  161. data/generated/google/apis/ml_v1/classes.rb +1186 -1183
  162. data/generated/google/apis/ml_v1/representations.rb +177 -177
  163. data/generated/google/apis/ml_v1/service.rb +244 -244
  164. data/generated/google/apis/monitoring_v3.rb +1 -1
  165. data/generated/google/apis/monitoring_v3/classes.rb +866 -866
  166. data/generated/google/apis/monitoring_v3/representations.rb +163 -163
  167. data/generated/google/apis/monitoring_v3/service.rb +355 -316
  168. data/generated/google/apis/oauth2_v2.rb +1 -1
  169. data/generated/google/apis/partners_v2.rb +1 -1
  170. data/generated/google/apis/partners_v2/classes.rb +1499 -1499
  171. data/generated/google/apis/partners_v2/representations.rb +368 -368
  172. data/generated/google/apis/partners_v2/service.rb +512 -512
  173. data/generated/google/apis/people_v1.rb +10 -10
  174. data/generated/google/apis/people_v1/classes.rb +544 -423
  175. data/generated/google/apis/people_v1/representations.rb +127 -109
  176. data/generated/google/apis/people_v1/service.rb +8 -8
  177. data/generated/google/apis/plus_domains_v1.rb +1 -1
  178. data/generated/google/apis/plus_v1.rb +1 -1
  179. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  180. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +200 -200
  181. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +41 -41
  182. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +80 -80
  183. data/generated/google/apis/pubsub_v1.rb +1 -1
  184. data/generated/google/apis/pubsub_v1/classes.rb +377 -377
  185. data/generated/google/apis/pubsub_v1/representations.rb +82 -82
  186. data/generated/google/apis/pubsub_v1/service.rb +93 -93
  187. data/generated/google/apis/runtimeconfig_v1.rb +6 -4
  188. data/generated/google/apis/runtimeconfig_v1/classes.rb +22 -22
  189. data/generated/google/apis/runtimeconfig_v1/representations.rb +2 -2
  190. data/generated/google/apis/runtimeconfig_v1/service.rb +57 -55
  191. data/generated/google/apis/script_v1.rb +14 -14
  192. data/generated/google/apis/script_v1/classes.rb +113 -58
  193. data/generated/google/apis/script_v1/representations.rb +43 -14
  194. data/generated/google/apis/script_v1/service.rb +6 -6
  195. data/generated/google/apis/searchconsole_v1.rb +1 -1
  196. data/generated/google/apis/searchconsole_v1/classes.rb +67 -67
  197. data/generated/google/apis/searchconsole_v1/representations.rb +29 -29
  198. data/generated/google/apis/searchconsole_v1/service.rb +6 -6
  199. data/generated/google/apis/servicecontrol_v1.rb +4 -4
  200. data/generated/google/apis/servicecontrol_v1/classes.rb +1125 -1125
  201. data/generated/google/apis/servicecontrol_v1/representations.rb +213 -213
  202. data/generated/google/apis/servicecontrol_v1/service.rb +92 -92
  203. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  204. data/generated/google/apis/servicemanagement_v1/classes.rb +3364 -3622
  205. data/generated/google/apis/servicemanagement_v1/representations.rb +546 -530
  206. data/generated/google/apis/servicemanagement_v1/service.rb +262 -152
  207. data/generated/google/apis/serviceuser_v1.rb +4 -4
  208. data/generated/google/apis/serviceuser_v1/classes.rb +2616 -2874
  209. data/generated/google/apis/serviceuser_v1/representations.rb +294 -278
  210. data/generated/google/apis/serviceuser_v1/service.rb +19 -19
  211. data/generated/google/apis/sheets_v4.rb +4 -1
  212. data/generated/google/apis/sheets_v4/classes.rb +4315 -4313
  213. data/generated/google/apis/sheets_v4/representations.rb +858 -858
  214. data/generated/google/apis/sheets_v4/service.rb +115 -115
  215. data/generated/google/apis/slides_v1.rb +1 -1
  216. data/generated/google/apis/slides_v1/classes.rb +2890 -2890
  217. data/generated/google/apis/slides_v1/representations.rb +638 -638
  218. data/generated/google/apis/slides_v1/service.rb +36 -36
  219. data/generated/google/apis/sourcerepo_v1.rb +1 -1
  220. data/generated/google/apis/sourcerepo_v1/classes.rb +283 -283
  221. data/generated/google/apis/sourcerepo_v1/representations.rb +67 -67
  222. data/generated/google/apis/sourcerepo_v1/service.rb +88 -88
  223. data/generated/google/apis/spanner_v1.rb +1 -1
  224. data/generated/google/apis/spanner_v1/classes.rb +2258 -2233
  225. data/generated/google/apis/spanner_v1/representations.rb +325 -325
  226. data/generated/google/apis/spanner_v1/service.rb +466 -466
  227. data/generated/google/apis/speech_v1beta1.rb +2 -2
  228. data/generated/google/apis/speech_v1beta1/classes.rb +97 -97
  229. data/generated/google/apis/speech_v1beta1/representations.rb +29 -29
  230. data/generated/google/apis/speech_v1beta1/service.rb +49 -49
  231. data/generated/google/apis/storage_v1.rb +1 -1
  232. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  233. data/generated/google/apis/storagetransfer_v1/classes.rb +786 -786
  234. data/generated/google/apis/storagetransfer_v1/representations.rb +133 -133
  235. data/generated/google/apis/storagetransfer_v1/service.rb +30 -30
  236. data/generated/google/apis/surveys_v2.rb +1 -1
  237. data/generated/google/apis/surveys_v2/classes.rb +0 -12
  238. data/generated/google/apis/surveys_v2/representations.rb +0 -4
  239. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  240. data/generated/google/apis/vision_v1.rb +1 -1
  241. data/generated/google/apis/vision_v1/classes.rb +1301 -1302
  242. data/generated/google/apis/vision_v1/representations.rb +183 -183
  243. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  244. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  245. data/generated/google/apis/youtube_partner_v1/classes.rb +10 -0
  246. data/generated/google/apis/youtube_partner_v1/representations.rb +1 -0
  247. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  248. data/generated/google/apis/youtubereporting_v1/classes.rb +64 -64
  249. data/generated/google/apis/youtubereporting_v1/representations.rb +12 -12
  250. data/generated/google/apis/youtubereporting_v1/service.rb +94 -94
  251. data/lib/google/apis/version.rb +1 -1
  252. metadata +7 -3
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/identity-toolkit/v3/
26
26
  module IdentitytoolkitV3
27
27
  VERSION = 'V3'
28
- REVISION = '20170308'
28
+ REVISION = '20170425'
29
29
 
30
30
  # View and manage your data across Google Cloud Platform services
31
31
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -1748,6 +1748,11 @@ module Google
1748
1748
  # @return [Float]
1749
1749
  attr_accessor :password_updated_at
1750
1750
 
1751
+ # User's phone number.
1752
+ # Corresponds to the JSON property `phoneNumber`
1753
+ # @return [String]
1754
+ attr_accessor :phone_number
1755
+
1751
1756
  # The URL of the user profile photo.
1752
1757
  # Corresponds to the JSON property `photoUrl`
1753
1758
  # @return [String]
@@ -1800,6 +1805,7 @@ module Google
1800
1805
  @local_id = args[:local_id] if args.key?(:local_id)
1801
1806
  @password_hash = args[:password_hash] if args.key?(:password_hash)
1802
1807
  @password_updated_at = args[:password_updated_at] if args.key?(:password_updated_at)
1808
+ @phone_number = args[:phone_number] if args.key?(:phone_number)
1803
1809
  @photo_url = args[:photo_url] if args.key?(:photo_url)
1804
1810
  @provider_user_info = args[:provider_user_info] if args.key?(:provider_user_info)
1805
1811
  @raw_password = args[:raw_password] if args.key?(:raw_password)
@@ -1828,6 +1834,11 @@ module Google
1828
1834
  # @return [String]
1829
1835
  attr_accessor :federated_id
1830
1836
 
1837
+ # User's phone number.
1838
+ # Corresponds to the JSON property `phoneNumber`
1839
+ # @return [String]
1840
+ attr_accessor :phone_number
1841
+
1831
1842
  # The user's photo url at the IDP.
1832
1843
  # Corresponds to the JSON property `photoUrl`
1833
1844
  # @return [String]
@@ -1858,6 +1869,7 @@ module Google
1858
1869
  @display_name = args[:display_name] if args.key?(:display_name)
1859
1870
  @email = args[:email] if args.key?(:email)
1860
1871
  @federated_id = args[:federated_id] if args.key?(:federated_id)
1872
+ @phone_number = args[:phone_number] if args.key?(:phone_number)
1861
1873
  @photo_url = args[:photo_url] if args.key?(:photo_url)
1862
1874
  @provider_id = args[:provider_id] if args.key?(:provider_id)
1863
1875
  @raw_id = args[:raw_id] if args.key?(:raw_id)
@@ -652,6 +652,7 @@ module Google
652
652
  property :local_id, as: 'localId'
653
653
  property :password_hash, :base64 => true, as: 'passwordHash'
654
654
  property :password_updated_at, as: 'passwordUpdatedAt'
655
+ property :phone_number, as: 'phoneNumber'
655
656
  property :photo_url, as: 'photoUrl'
656
657
  collection :provider_user_info, as: 'providerUserInfo', class: Google::Apis::IdentitytoolkitV3::UserInfo::ProviderUserInfo, decorator: Google::Apis::IdentitytoolkitV3::UserInfo::ProviderUserInfo::Representation
657
658
 
@@ -668,6 +669,7 @@ module Google
668
669
  property :display_name, as: 'displayName'
669
670
  property :email, as: 'email'
670
671
  property :federated_id, as: 'federatedId'
672
+ property :phone_number, as: 'phoneNumber'
671
673
  property :photo_url, as: 'photoUrl'
672
674
  property :provider_id, as: 'providerId'
673
675
  property :raw_id, as: 'rawId'
@@ -27,11 +27,6 @@ module Google
27
27
  class SearchResponse
28
28
  include Google::Apis::Core::Hashable
29
29
 
30
- # The schema type of top-level JSON-LD object, e.g. ItemList.
31
- # Corresponds to the JSON property `@type`
32
- # @return [Object]
33
- attr_accessor :_type
34
-
35
30
  # The local context applicable for the response. See more details at
36
31
  # http://www.w3.org/TR/json-ld/#context-definitions.
37
32
  # Corresponds to the JSON property `@context`
@@ -43,15 +38,20 @@ module Google
43
38
  # @return [Array<Object>]
44
39
  attr_accessor :item_list_element
45
40
 
41
+ # The schema type of top-level JSON-LD object, e.g. ItemList.
42
+ # Corresponds to the JSON property `@type`
43
+ # @return [Object]
44
+ attr_accessor :_type
45
+
46
46
  def initialize(**args)
47
47
  update!(**args)
48
48
  end
49
49
 
50
50
  # Update properties of this object
51
51
  def update!(**args)
52
- @_type = args[:_type] if args.key?(:_type)
53
52
  @_context = args[:_context] if args.key?(:_context)
54
53
  @item_list_element = args[:item_list_element] if args.key?(:item_list_element)
54
+ @_type = args[:_type] if args.key?(:_type)
55
55
  end
56
56
  end
57
57
  end
@@ -31,9 +31,9 @@ module Google
31
31
  class SearchResponse
32
32
  # @private
33
33
  class Representation < Google::Apis::Core::JsonRepresentation
34
- property :_type, as: '@type'
35
34
  property :_context, as: '@context'
36
35
  collection :item_list_element, as: 'itemListElement'
36
+ property :_type, as: '@type'
37
37
  end
38
38
  end
39
39
  end
@@ -50,10 +50,6 @@ module Google
50
50
  # Searches Knowledge Graph for entities that match the constraints.
51
51
  # A list of matched entities will be returned in response, which will be in
52
52
  # JSON-LD format and compatible with http://schema.org
53
- # @param [Array<String>, String] ids
54
- # The list of entity id to be used for search instead of query string.
55
- # To specify multiple ids in the HTTP request, repeat the parameter in the
56
- # URL as in ...?ids=A&ids=B
57
53
  # @param [Fixnum] limit
58
54
  # Limits the number of entities to be returned.
59
55
  # @param [Boolean] prefix
@@ -69,11 +65,15 @@ module Google
69
65
  # @param [Array<String>, String] languages
70
66
  # The list of language codes (defined in ISO 693) to run the query with,
71
67
  # e.g. 'en'.
68
+ # @param [Array<String>, String] ids
69
+ # The list of entity id to be used for search instead of query string.
70
+ # To specify multiple ids in the HTTP request, repeat the parameter in the
71
+ # URL as in ...?ids=A&ids=B
72
+ # @param [String] fields
73
+ # Selector specifying which fields to include in a partial response.
72
74
  # @param [String] quota_user
73
75
  # Available to use for quota purposes for server-side applications. Can be any
74
76
  # arbitrary string assigned to a user, but should not exceed 40 characters.
75
- # @param [String] fields
76
- # Selector specifying which fields to include in a partial response.
77
77
  # @param [Google::Apis::RequestOptions] options
78
78
  # Request-specific options
79
79
  #
@@ -86,19 +86,19 @@ module Google
86
86
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
87
87
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
88
88
  # @raise [Google::Apis::AuthorizationError] Authorization is required
89
- def search_entities(ids: nil, limit: nil, prefix: nil, query: nil, types: nil, indent: nil, languages: nil, quota_user: nil, fields: nil, options: nil, &block)
89
+ def search_entities(limit: nil, prefix: nil, query: nil, types: nil, indent: nil, languages: nil, ids: nil, fields: nil, quota_user: nil, options: nil, &block)
90
90
  command = make_simple_command(:get, 'v1/entities:search', options)
91
91
  command.response_representation = Google::Apis::KgsearchV1::SearchResponse::Representation
92
92
  command.response_class = Google::Apis::KgsearchV1::SearchResponse
93
- command.query['ids'] = ids unless ids.nil?
94
93
  command.query['limit'] = limit unless limit.nil?
95
94
  command.query['prefix'] = prefix unless prefix.nil?
96
95
  command.query['query'] = query unless query.nil?
97
96
  command.query['types'] = types unless types.nil?
98
97
  command.query['indent'] = indent unless indent.nil?
99
98
  command.query['languages'] = languages unless languages.nil?
100
- command.query['quotaUser'] = quota_user unless quota_user.nil?
99
+ command.query['ids'] = ids unless ids.nil?
101
100
  command.query['fields'] = fields unless fields.nil?
101
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
102
102
  execute_or_queue_command(command, &block)
103
103
  end
104
104
 
@@ -27,7 +27,7 @@ module Google
27
27
  # @see https://cloud.google.com/natural-language/
28
28
  module LanguageV1
29
29
  VERSION = 'V1'
30
- REVISION = '20170329'
30
+ REVISION = '20170502'
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,71 +22,100 @@ module Google
22
22
  module Apis
23
23
  module LanguageV1
24
24
 
25
- # Represents part of speech information for a token. Parts of speech
26
- # are as defined in
27
- # http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf
28
- class PartOfSpeech
25
+ # The `Status` type defines a logical error model that is suitable for different
26
+ # programming environments, including REST APIs and RPC APIs. It is used by
27
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
28
+ # - Simple to use and understand for most users
29
+ # - Flexible enough to meet unexpected needs
30
+ # # Overview
31
+ # The `Status` message contains three pieces of data: error code, error message,
32
+ # and error details. The error code should be an enum value of
33
+ # google.rpc.Code, but it may accept additional error codes if needed. The
34
+ # error message should be a developer-facing English message that helps
35
+ # developers *understand* and *resolve* the error. If a localized user-facing
36
+ # error message is needed, put the localized message in the error details or
37
+ # localize it in the client. The optional error details may contain arbitrary
38
+ # information about the error. There is a predefined set of error detail types
39
+ # in the package `google.rpc` which can be used for common error conditions.
40
+ # # Language mapping
41
+ # The `Status` message is the logical representation of the error model, but it
42
+ # is not necessarily the actual wire format. When the `Status` message is
43
+ # exposed in different client libraries and different wire protocols, it can be
44
+ # mapped differently. For example, it will likely be mapped to some exceptions
45
+ # in Java, but more likely mapped to some error codes in C.
46
+ # # Other uses
47
+ # The error model and the `Status` message can be used in a variety of
48
+ # environments, either with or without APIs, to provide a
49
+ # consistent developer experience across different environments.
50
+ # Example uses of this error model include:
51
+ # - Partial errors. If a service needs to return partial errors to the client,
52
+ # it may embed the `Status` in the normal response to indicate the partial
53
+ # errors.
54
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
55
+ # have a `Status` message for error reporting purpose.
56
+ # - Batch operations. If a client uses batch request and batch response, the
57
+ # `Status` message should be used directly inside batch response, one for
58
+ # each error sub-response.
59
+ # - Asynchronous operations. If an API call embeds asynchronous operation
60
+ # results in its response, the status of those operations should be
61
+ # represented directly using the `Status` message.
62
+ # - Logging. If some API errors are stored in logs, the message `Status` could
63
+ # be used directly after any stripping needed for security/privacy reasons.
64
+ class Status
29
65
  include Google::Apis::Core::Hashable
30
66
 
31
- # The grammatical reciprocity.
32
- # Corresponds to the JSON property `reciprocity`
33
- # @return [String]
34
- attr_accessor :reciprocity
35
-
36
- # The grammatical form.
37
- # Corresponds to the JSON property `form`
38
- # @return [String]
39
- attr_accessor :form
40
-
41
- # The grammatical number.
42
- # Corresponds to the JSON property `number`
43
- # @return [String]
44
- attr_accessor :number
45
-
46
- # The grammatical voice.
47
- # Corresponds to the JSON property `voice`
48
- # @return [String]
49
- attr_accessor :voice
67
+ # A list of messages that carry the error details. There will be a
68
+ # common set of message types for APIs to use.
69
+ # Corresponds to the JSON property `details`
70
+ # @return [Array<Hash<String,Object>>]
71
+ attr_accessor :details
50
72
 
51
- # The grammatical aspect.
52
- # Corresponds to the JSON property `aspect`
53
- # @return [String]
54
- attr_accessor :aspect
73
+ # The status code, which should be an enum value of google.rpc.Code.
74
+ # Corresponds to the JSON property `code`
75
+ # @return [Fixnum]
76
+ attr_accessor :code
55
77
 
56
- # The grammatical mood.
57
- # Corresponds to the JSON property `mood`
78
+ # A developer-facing error message, which should be in English. Any
79
+ # user-facing error message should be localized and sent in the
80
+ # google.rpc.Status.details field, or localized by the client.
81
+ # Corresponds to the JSON property `message`
58
82
  # @return [String]
59
- attr_accessor :mood
83
+ attr_accessor :message
60
84
 
61
- # The part of speech tag.
62
- # Corresponds to the JSON property `tag`
63
- # @return [String]
64
- attr_accessor :tag
85
+ def initialize(**args)
86
+ update!(**args)
87
+ end
65
88
 
66
- # The grammatical gender.
67
- # Corresponds to the JSON property `gender`
68
- # @return [String]
69
- attr_accessor :gender
89
+ # Update properties of this object
90
+ def update!(**args)
91
+ @details = args[:details] if args.key?(:details)
92
+ @code = args[:code] if args.key?(:code)
93
+ @message = args[:message] if args.key?(:message)
94
+ end
95
+ end
70
96
 
71
- # The grammatical person.
72
- # Corresponds to the JSON property `person`
73
- # @return [String]
74
- attr_accessor :person
97
+ # All available features for sentiment, syntax, and semantic analysis.
98
+ # Setting each one to true will enable that specific analysis for the input.
99
+ class Features
100
+ include Google::Apis::Core::Hashable
75
101
 
76
- # The grammatical properness.
77
- # Corresponds to the JSON property `proper`
78
- # @return [String]
79
- attr_accessor :proper
102
+ # Extract syntax information.
103
+ # Corresponds to the JSON property `extractSyntax`
104
+ # @return [Boolean]
105
+ attr_accessor :extract_syntax
106
+ alias_method :extract_syntax?, :extract_syntax
80
107
 
81
- # The grammatical case.
82
- # Corresponds to the JSON property `case`
83
- # @return [String]
84
- attr_accessor :case
108
+ # Extract document-level sentiment.
109
+ # Corresponds to the JSON property `extractDocumentSentiment`
110
+ # @return [Boolean]
111
+ attr_accessor :extract_document_sentiment
112
+ alias_method :extract_document_sentiment?, :extract_document_sentiment
85
113
 
86
- # The grammatical tense.
87
- # Corresponds to the JSON property `tense`
88
- # @return [String]
89
- attr_accessor :tense
114
+ # Extract entities.
115
+ # Corresponds to the JSON property `extractEntities`
116
+ # @return [Boolean]
117
+ attr_accessor :extract_entities
118
+ alias_method :extract_entities?, :extract_entities
90
119
 
91
120
  def initialize(**args)
92
121
  update!(**args)
@@ -94,35 +123,26 @@ module Google
94
123
 
95
124
  # Update properties of this object
96
125
  def update!(**args)
97
- @reciprocity = args[:reciprocity] if args.key?(:reciprocity)
98
- @form = args[:form] if args.key?(:form)
99
- @number = args[:number] if args.key?(:number)
100
- @voice = args[:voice] if args.key?(:voice)
101
- @aspect = args[:aspect] if args.key?(:aspect)
102
- @mood = args[:mood] if args.key?(:mood)
103
- @tag = args[:tag] if args.key?(:tag)
104
- @gender = args[:gender] if args.key?(:gender)
105
- @person = args[:person] if args.key?(:person)
106
- @proper = args[:proper] if args.key?(:proper)
107
- @case = args[:case] if args.key?(:case)
108
- @tense = args[:tense] if args.key?(:tense)
126
+ @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax)
127
+ @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment)
128
+ @extract_entities = args[:extract_entities] if args.key?(:extract_entities)
109
129
  end
110
130
  end
111
131
 
112
- # The syntax analysis request message.
113
- class AnalyzeSyntaxRequest
132
+ # Represents a mention for an entity in the text. Currently, proper noun
133
+ # mentions are supported.
134
+ class EntityMention
114
135
  include Google::Apis::Core::Hashable
115
136
 
116
- # ################################################################ #
117
- # Represents the input to API methods.
118
- # Corresponds to the JSON property `document`
119
- # @return [Google::Apis::LanguageV1::Document]
120
- attr_accessor :document
137
+ # Represents an output piece of text.
138
+ # Corresponds to the JSON property `text`
139
+ # @return [Google::Apis::LanguageV1::TextSpan]
140
+ attr_accessor :text
121
141
 
122
- # The encoding type used by the API to calculate offsets.
123
- # Corresponds to the JSON property `encodingType`
142
+ # The type of the entity mention.
143
+ # Corresponds to the JSON property `type`
124
144
  # @return [String]
125
- attr_accessor :encoding_type
145
+ attr_accessor :type
126
146
 
127
147
  def initialize(**args)
128
148
  update!(**args)
@@ -130,60 +150,74 @@ module Google
130
150
 
131
151
  # Update properties of this object
132
152
  def update!(**args)
133
- @document = args[:document] if args.key?(:document)
134
- @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
153
+ @text = args[:text] if args.key?(:text)
154
+ @type = args[:type] if args.key?(:type)
135
155
  end
136
156
  end
137
157
 
138
- # The sentiment analysis response message.
139
- class AnalyzeSentimentResponse
158
+ # ################################################################ #
159
+ # Represents the input to API methods.
160
+ class Document
140
161
  include Google::Apis::Core::Hashable
141
162
 
142
- # The sentiment for all the sentences in the document.
143
- # Corresponds to the JSON property `sentences`
144
- # @return [Array<Google::Apis::LanguageV1::Sentence>]
145
- attr_accessor :sentences
146
-
147
- # Represents the feeling associated with the entire text or entities in
148
- # the text.
149
- # Corresponds to the JSON property `documentSentiment`
150
- # @return [Google::Apis::LanguageV1::Sentiment]
151
- attr_accessor :document_sentiment
163
+ # The Google Cloud Storage URI where the file content is located.
164
+ # This URI must be of the form: gs://bucket_name/object_name. For more
165
+ # details, see https://cloud.google.com/storage/docs/reference-uris.
166
+ # NOTE: Cloud Storage object versioning is not supported.
167
+ # Corresponds to the JSON property `gcsContentUri`
168
+ # @return [String]
169
+ attr_accessor :gcs_content_uri
152
170
 
153
- # The language of the text, which will be the same as the language specified
154
- # in the request or, if not specified, the automatically-detected language.
155
- # See `Document.language` field for more details.
171
+ # The language of the document (if not specified, the language is
172
+ # automatically detected). Both ISO and BCP-47 language codes are
173
+ # accepted.<br>
174
+ # [Language Support](https://cloud.google.com/natural-language/docs/languages)
175
+ # lists currently supported languages for each API method.
176
+ # If the language (either specified by the caller or automatically detected)
177
+ # is not supported by the called API method, an `INVALID_ARGUMENT` error
178
+ # is returned.
156
179
  # Corresponds to the JSON property `language`
157
180
  # @return [String]
158
181
  attr_accessor :language
159
182
 
183
+ # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
184
+ # returns an `INVALID_ARGUMENT` error.
185
+ # Corresponds to the JSON property `type`
186
+ # @return [String]
187
+ attr_accessor :type
188
+
189
+ # The content of the input in string format.
190
+ # Corresponds to the JSON property `content`
191
+ # @return [String]
192
+ attr_accessor :content
193
+
160
194
  def initialize(**args)
161
195
  update!(**args)
162
196
  end
163
197
 
164
198
  # Update properties of this object
165
199
  def update!(**args)
166
- @sentences = args[:sentences] if args.key?(:sentences)
167
- @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
200
+ @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri)
168
201
  @language = args[:language] if args.key?(:language)
202
+ @type = args[:type] if args.key?(:type)
203
+ @content = args[:content] if args.key?(:content)
169
204
  end
170
205
  end
171
206
 
172
- # The entity analysis response message.
173
- class AnalyzeEntitiesResponse
207
+ # Represents a sentence in the input document.
208
+ class Sentence
174
209
  include Google::Apis::Core::Hashable
175
210
 
176
- # The language of the text, which will be the same as the language specified
177
- # in the request or, if not specified, the automatically-detected language.
178
- # See `Document.language` field for more details.
179
- # Corresponds to the JSON property `language`
180
- # @return [String]
181
- attr_accessor :language
211
+ # Represents the feeling associated with the entire text or entities in
212
+ # the text.
213
+ # Corresponds to the JSON property `sentiment`
214
+ # @return [Google::Apis::LanguageV1::Sentiment]
215
+ attr_accessor :sentiment
182
216
 
183
- # The recognized entities in the input document.
184
- # Corresponds to the JSON property `entities`
185
- # @return [Array<Google::Apis::LanguageV1::Entity>]
186
- attr_accessor :entities
217
+ # Represents an output piece of text.
218
+ # Corresponds to the JSON property `text`
219
+ # @return [Google::Apis::LanguageV1::TextSpan]
220
+ attr_accessor :text
187
221
 
188
222
  def initialize(**args)
189
223
  update!(**args)
@@ -191,48 +225,28 @@ module Google
191
225
 
192
226
  # Update properties of this object
193
227
  def update!(**args)
194
- @language = args[:language] if args.key?(:language)
195
- @entities = args[:entities] if args.key?(:entities)
228
+ @sentiment = args[:sentiment] if args.key?(:sentiment)
229
+ @text = args[:text] if args.key?(:text)
196
230
  end
197
231
  end
198
232
 
199
- # Represents a phrase in the text that is a known entity, such as
200
- # a person, an organization, or location. The API associates information, such
201
- # as salience and mentions, with entities.
202
- class Entity
233
+ # Represents the feeling associated with the entire text or entities in
234
+ # the text.
235
+ class Sentiment
203
236
  include Google::Apis::Core::Hashable
204
237
 
205
- # The mentions of this entity in the input document. The API currently
206
- # supports proper noun mentions.
207
- # Corresponds to the JSON property `mentions`
208
- # @return [Array<Google::Apis::LanguageV1::EntityMention>]
209
- attr_accessor :mentions
210
-
211
- # The representative name for the entity.
212
- # Corresponds to the JSON property `name`
213
- # @return [String]
214
- attr_accessor :name
215
-
216
- # The entity type.
217
- # Corresponds to the JSON property `type`
218
- # @return [String]
219
- attr_accessor :type
220
-
221
- # Metadata associated with the entity.
222
- # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
223
- # available. The associated keys are "wikipedia_url" and "mid", respectively.
224
- # Corresponds to the JSON property `metadata`
225
- # @return [Hash<String,String>]
226
- attr_accessor :metadata
238
+ # Sentiment score between -1.0 (negative sentiment) and 1.0
239
+ # (positive sentiment).
240
+ # Corresponds to the JSON property `score`
241
+ # @return [Float]
242
+ attr_accessor :score
227
243
 
228
- # The salience score associated with the entity in the [0, 1.0] range.
229
- # The salience score for an entity provides information about the
230
- # importance or centrality of that entity to the entire document text.
231
- # Scores closer to 0 are less salient, while scores closer to 1.0 are highly
232
- # salient.
233
- # Corresponds to the JSON property `salience`
244
+ # A non-negative number in the [0, +inf) range, which represents
245
+ # the absolute magnitude of sentiment regardless of score (positive or
246
+ # negative).
247
+ # Corresponds to the JSON property `magnitude`
234
248
  # @return [Float]
235
- attr_accessor :salience
249
+ attr_accessor :magnitude
236
250
 
237
251
  def initialize(**args)
238
252
  update!(**args)
@@ -240,34 +254,25 @@ module Google
240
254
 
241
255
  # Update properties of this object
242
256
  def update!(**args)
243
- @mentions = args[:mentions] if args.key?(:mentions)
244
- @name = args[:name] if args.key?(:name)
245
- @type = args[:type] if args.key?(:type)
246
- @metadata = args[:metadata] if args.key?(:metadata)
247
- @salience = args[:salience] if args.key?(:salience)
257
+ @score = args[:score] if args.key?(:score)
258
+ @magnitude = args[:magnitude] if args.key?(:magnitude)
248
259
  end
249
260
  end
250
261
 
251
- # The syntax analysis response message.
252
- class AnalyzeSyntaxResponse
262
+ # The entity analysis request message.
263
+ class AnalyzeEntitiesRequest
253
264
  include Google::Apis::Core::Hashable
254
265
 
255
- # The language of the text, which will be the same as the language specified
256
- # in the request or, if not specified, the automatically-detected language.
257
- # See `Document.language` field for more details.
258
- # Corresponds to the JSON property `language`
266
+ # The encoding type used by the API to calculate offsets.
267
+ # Corresponds to the JSON property `encodingType`
259
268
  # @return [String]
260
- attr_accessor :language
261
-
262
- # Sentences in the input document.
263
- # Corresponds to the JSON property `sentences`
264
- # @return [Array<Google::Apis::LanguageV1::Sentence>]
265
- attr_accessor :sentences
269
+ attr_accessor :encoding_type
266
270
 
267
- # Tokens, along with their syntactic information, in the input document.
268
- # Corresponds to the JSON property `tokens`
269
- # @return [Array<Google::Apis::LanguageV1::Token>]
270
- attr_accessor :tokens
271
+ # ################################################################ #
272
+ # Represents the input to API methods.
273
+ # Corresponds to the JSON property `document`
274
+ # @return [Google::Apis::LanguageV1::Document]
275
+ attr_accessor :document
271
276
 
272
277
  def initialize(**args)
273
278
  update!(**args)
@@ -275,33 +280,76 @@ module Google
275
280
 
276
281
  # Update properties of this object
277
282
  def update!(**args)
278
- @language = args[:language] if args.key?(:language)
279
- @sentences = args[:sentences] if args.key?(:sentences)
280
- @tokens = args[:tokens] if args.key?(:tokens)
283
+ @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
284
+ @document = args[:document] if args.key?(:document)
281
285
  end
282
286
  end
283
287
 
284
- # The request message for the text annotation API, which can perform multiple
285
- # analysis types (sentiment, entities, and syntax) in one call.
286
- class AnnotateTextRequest
288
+ # Represents part of speech information for a token. Parts of speech
289
+ # are as defined in
290
+ # http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf
291
+ class PartOfSpeech
287
292
  include Google::Apis::Core::Hashable
288
293
 
289
- # ################################################################ #
290
- # Represents the input to API methods.
291
- # Corresponds to the JSON property `document`
292
- # @return [Google::Apis::LanguageV1::Document]
293
- attr_accessor :document
294
+ # The grammatical case.
295
+ # Corresponds to the JSON property `case`
296
+ # @return [String]
297
+ attr_accessor :case
298
+
299
+ # The grammatical tense.
300
+ # Corresponds to the JSON property `tense`
301
+ # @return [String]
302
+ attr_accessor :tense
303
+
304
+ # The grammatical reciprocity.
305
+ # Corresponds to the JSON property `reciprocity`
306
+ # @return [String]
307
+ attr_accessor :reciprocity
308
+
309
+ # The grammatical form.
310
+ # Corresponds to the JSON property `form`
311
+ # @return [String]
312
+ attr_accessor :form
313
+
314
+ # The grammatical number.
315
+ # Corresponds to the JSON property `number`
316
+ # @return [String]
317
+ attr_accessor :number
318
+
319
+ # The grammatical voice.
320
+ # Corresponds to the JSON property `voice`
321
+ # @return [String]
322
+ attr_accessor :voice
323
+
324
+ # The grammatical aspect.
325
+ # Corresponds to the JSON property `aspect`
326
+ # @return [String]
327
+ attr_accessor :aspect
328
+
329
+ # The grammatical mood.
330
+ # Corresponds to the JSON property `mood`
331
+ # @return [String]
332
+ attr_accessor :mood
333
+
334
+ # The part of speech tag.
335
+ # Corresponds to the JSON property `tag`
336
+ # @return [String]
337
+ attr_accessor :tag
294
338
 
295
- # All available features for sentiment, syntax, and semantic analysis.
296
- # Setting each one to true will enable that specific analysis for the input.
297
- # Corresponds to the JSON property `features`
298
- # @return [Google::Apis::LanguageV1::Features]
299
- attr_accessor :features
339
+ # The grammatical gender.
340
+ # Corresponds to the JSON property `gender`
341
+ # @return [String]
342
+ attr_accessor :gender
300
343
 
301
- # The encoding type used by the API to calculate offsets.
302
- # Corresponds to the JSON property `encodingType`
344
+ # The grammatical person.
345
+ # Corresponds to the JSON property `person`
303
346
  # @return [String]
304
- attr_accessor :encoding_type
347
+ attr_accessor :person
348
+
349
+ # The grammatical properness.
350
+ # Corresponds to the JSON property `proper`
351
+ # @return [String]
352
+ attr_accessor :proper
305
353
 
306
354
  def initialize(**args)
307
355
  update!(**args)
@@ -309,62 +357,51 @@ module Google
309
357
 
310
358
  # Update properties of this object
311
359
  def update!(**args)
312
- @document = args[:document] if args.key?(:document)
313
- @features = args[:features] if args.key?(:features)
314
- @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
360
+ @case = args[:case] if args.key?(:case)
361
+ @tense = args[:tense] if args.key?(:tense)
362
+ @reciprocity = args[:reciprocity] if args.key?(:reciprocity)
363
+ @form = args[:form] if args.key?(:form)
364
+ @number = args[:number] if args.key?(:number)
365
+ @voice = args[:voice] if args.key?(:voice)
366
+ @aspect = args[:aspect] if args.key?(:aspect)
367
+ @mood = args[:mood] if args.key?(:mood)
368
+ @tag = args[:tag] if args.key?(:tag)
369
+ @gender = args[:gender] if args.key?(:gender)
370
+ @person = args[:person] if args.key?(:person)
371
+ @proper = args[:proper] if args.key?(:proper)
315
372
  end
316
373
  end
317
374
 
318
- # The sentiment analysis request message.
319
- class AnalyzeSentimentRequest
375
+ # The syntax analysis request message.
376
+ class AnalyzeSyntaxRequest
320
377
  include Google::Apis::Core::Hashable
321
378
 
379
+ # The encoding type used by the API to calculate offsets.
380
+ # Corresponds to the JSON property `encodingType`
381
+ # @return [String]
382
+ attr_accessor :encoding_type
383
+
322
384
  # ################################################################ #
323
385
  # Represents the input to API methods.
324
386
  # Corresponds to the JSON property `document`
325
387
  # @return [Google::Apis::LanguageV1::Document]
326
388
  attr_accessor :document
327
389
 
328
- # The encoding type used by the API to calculate sentence offsets.
329
- # Corresponds to the JSON property `encodingType`
330
- # @return [String]
331
- attr_accessor :encoding_type
332
-
333
390
  def initialize(**args)
334
391
  update!(**args)
335
392
  end
336
393
 
337
394
  # Update properties of this object
338
395
  def update!(**args)
339
- @document = args[:document] if args.key?(:document)
340
396
  @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
397
+ @document = args[:document] if args.key?(:document)
341
398
  end
342
399
  end
343
400
 
344
- # The text annotations response message.
345
- class AnnotateTextResponse
401
+ # The sentiment analysis response message.
402
+ class AnalyzeSentimentResponse
346
403
  include Google::Apis::Core::Hashable
347
404
 
348
- # Sentences in the input document. Populated if the user enables
349
- # AnnotateTextRequest.Features.extract_syntax.
350
- # Corresponds to the JSON property `sentences`
351
- # @return [Array<Google::Apis::LanguageV1::Sentence>]
352
- attr_accessor :sentences
353
-
354
- # Tokens, along with their syntactic information, in the input document.
355
- # Populated if the user enables
356
- # AnnotateTextRequest.Features.extract_syntax.
357
- # Corresponds to the JSON property `tokens`
358
- # @return [Array<Google::Apis::LanguageV1::Token>]
359
- attr_accessor :tokens
360
-
361
- # Entities, along with their semantic information, in the input document.
362
- # Populated if the user enables
363
- # AnnotateTextRequest.Features.extract_entities.
364
- # Corresponds to the JSON property `entities`
365
- # @return [Array<Google::Apis::LanguageV1::Entity>]
366
- attr_accessor :entities
367
-
368
405
  # Represents the feeling associated with the entire text or entities in
369
406
  # the text.
370
407
  # Corresponds to the JSON property `documentSentiment`
@@ -373,44 +410,43 @@ module Google
373
410
 
374
411
  # The language of the text, which will be the same as the language specified
375
412
  # in the request or, if not specified, the automatically-detected language.
376
- # See `Document.language` field for more details.
413
+ # See Document.language field for more details.
377
414
  # Corresponds to the JSON property `language`
378
415
  # @return [String]
379
416
  attr_accessor :language
380
417
 
418
+ # The sentiment for all the sentences in the document.
419
+ # Corresponds to the JSON property `sentences`
420
+ # @return [Array<Google::Apis::LanguageV1::Sentence>]
421
+ attr_accessor :sentences
422
+
381
423
  def initialize(**args)
382
424
  update!(**args)
383
425
  end
384
426
 
385
427
  # Update properties of this object
386
428
  def update!(**args)
387
- @sentences = args[:sentences] if args.key?(:sentences)
388
- @tokens = args[:tokens] if args.key?(:tokens)
389
- @entities = args[:entities] if args.key?(:entities)
390
429
  @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
391
430
  @language = args[:language] if args.key?(:language)
431
+ @sentences = args[:sentences] if args.key?(:sentences)
392
432
  end
393
433
  end
394
434
 
395
- # Represents dependency parse tree information for a token. (For more
396
- # information on dependency labels, see
397
- # http://www.aclweb.org/anthology/P13-2017
398
- class DependencyEdge
435
+ # The entity analysis response message.
436
+ class AnalyzeEntitiesResponse
399
437
  include Google::Apis::Core::Hashable
400
438
 
401
- # Represents the head of this token in the dependency tree.
402
- # This is the index of the token which has an arc going to this token.
403
- # The index is the position of the token in the array of tokens returned
404
- # by the API method. If this token is a root token, then the
405
- # `head_token_index` is its own index.
406
- # Corresponds to the JSON property `headTokenIndex`
407
- # @return [Fixnum]
408
- attr_accessor :head_token_index
409
-
410
- # The parse label for the token.
411
- # Corresponds to the JSON property `label`
439
+ # The language of the text, which will be the same as the language specified
440
+ # in the request or, if not specified, the automatically-detected language.
441
+ # See Document.language field for more details.
442
+ # Corresponds to the JSON property `language`
412
443
  # @return [String]
413
- attr_accessor :label
444
+ attr_accessor :language
445
+
446
+ # The recognized entities in the input document.
447
+ # Corresponds to the JSON property `entities`
448
+ # @return [Array<Google::Apis::LanguageV1::Entity>]
449
+ attr_accessor :entities
414
450
 
415
451
  def initialize(**args)
416
452
  update!(**args)
@@ -418,64 +454,48 @@ module Google
418
454
 
419
455
  # Update properties of this object
420
456
  def update!(**args)
421
- @head_token_index = args[:head_token_index] if args.key?(:head_token_index)
422
- @label = args[:label] if args.key?(:label)
457
+ @language = args[:language] if args.key?(:language)
458
+ @entities = args[:entities] if args.key?(:entities)
423
459
  end
424
460
  end
425
461
 
426
- # Represents an output piece of text.
427
- class TextSpan
462
+ # Represents a phrase in the text that is a known entity, such as
463
+ # a person, an organization, or location. The API associates information, such
464
+ # as salience and mentions, with entities.
465
+ class Entity
428
466
  include Google::Apis::Core::Hashable
429
467
 
430
- # The API calculates the beginning offset of the content in the original
431
- # document according to the EncodingType specified in the API request.
432
- # Corresponds to the JSON property `beginOffset`
433
- # @return [Fixnum]
434
- attr_accessor :begin_offset
468
+ # The mentions of this entity in the input document. The API currently
469
+ # supports proper noun mentions.
470
+ # Corresponds to the JSON property `mentions`
471
+ # @return [Array<Google::Apis::LanguageV1::EntityMention>]
472
+ attr_accessor :mentions
435
473
 
436
- # The content of the output text.
437
- # Corresponds to the JSON property `content`
474
+ # The representative name for the entity.
475
+ # Corresponds to the JSON property `name`
438
476
  # @return [String]
439
- attr_accessor :content
440
-
441
- def initialize(**args)
442
- update!(**args)
443
- end
444
-
445
- # Update properties of this object
446
- def update!(**args)
447
- @begin_offset = args[:begin_offset] if args.key?(:begin_offset)
448
- @content = args[:content] if args.key?(:content)
449
- end
450
- end
451
-
452
- # Represents the smallest syntactic building block of the text.
453
- class Token
454
- include Google::Apis::Core::Hashable
455
-
456
- # Represents part of speech information for a token. Parts of speech
457
- # are as defined in
458
- # http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf
459
- # Corresponds to the JSON property `partOfSpeech`
460
- # @return [Google::Apis::LanguageV1::PartOfSpeech]
461
- attr_accessor :part_of_speech
477
+ attr_accessor :name
462
478
 
463
- # Represents an output piece of text.
464
- # Corresponds to the JSON property `text`
465
- # @return [Google::Apis::LanguageV1::TextSpan]
466
- attr_accessor :text
479
+ # The entity type.
480
+ # Corresponds to the JSON property `type`
481
+ # @return [String]
482
+ attr_accessor :type
467
483
 
468
- # Represents dependency parse tree information for a token. (For more
469
- # information on dependency labels, see
470
- # http://www.aclweb.org/anthology/P13-2017
471
- # Corresponds to the JSON property `dependencyEdge`
472
- # @return [Google::Apis::LanguageV1::DependencyEdge]
473
- attr_accessor :dependency_edge
484
+ # Metadata associated with the entity.
485
+ # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
486
+ # available. The associated keys are "wikipedia_url" and "mid", respectively.
487
+ # Corresponds to the JSON property `metadata`
488
+ # @return [Hash<String,String>]
489
+ attr_accessor :metadata
474
490
 
475
- # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
476
- # Corresponds to the JSON property `lemma`
477
- # @return [String]
478
- attr_accessor :lemma
491
+ # The salience score associated with the entity in the [0, 1.0] range.
492
+ # The salience score for an entity provides information about the
493
+ # importance or centrality of that entity to the entire document text.
494
+ # Scores closer to 0 are less salient, while scores closer to 1.0 are highly
495
+ # salient.
496
+ # Corresponds to the JSON property `salience`
497
+ # @return [Float]
498
+ attr_accessor :salience
479
499
 
480
500
  def initialize(**args)
481
501
  update!(**args)
@@ -483,72 +503,34 @@ module Google
483
503
 
484
504
  # Update properties of this object
485
505
  def update!(**args)
486
- @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech)
487
- @text = args[:text] if args.key?(:text)
488
- @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge)
489
- @lemma = args[:lemma] if args.key?(:lemma)
506
+ @mentions = args[:mentions] if args.key?(:mentions)
507
+ @name = args[:name] if args.key?(:name)
508
+ @type = args[:type] if args.key?(:type)
509
+ @metadata = args[:metadata] if args.key?(:metadata)
510
+ @salience = args[:salience] if args.key?(:salience)
490
511
  end
491
512
  end
492
513
 
493
- # The `Status` type defines a logical error model that is suitable for different
494
- # programming environments, including REST APIs and RPC APIs. It is used by
495
- # [gRPC](https://github.com/grpc). The error model is designed to be:
496
- # - Simple to use and understand for most users
497
- # - Flexible enough to meet unexpected needs
498
- # # Overview
499
- # The `Status` message contains three pieces of data: error code, error message,
500
- # and error details. The error code should be an enum value of
501
- # google.rpc.Code, but it may accept additional error codes if needed. The
502
- # error message should be a developer-facing English message that helps
503
- # developers *understand* and *resolve* the error. If a localized user-facing
504
- # error message is needed, put the localized message in the error details or
505
- # localize it in the client. The optional error details may contain arbitrary
506
- # information about the error. There is a predefined set of error detail types
507
- # in the package `google.rpc` which can be used for common error conditions.
508
- # # Language mapping
509
- # The `Status` message is the logical representation of the error model, but it
510
- # is not necessarily the actual wire format. When the `Status` message is
511
- # exposed in different client libraries and different wire protocols, it can be
512
- # mapped differently. For example, it will likely be mapped to some exceptions
513
- # in Java, but more likely mapped to some error codes in C.
514
- # # Other uses
515
- # The error model and the `Status` message can be used in a variety of
516
- # environments, either with or without APIs, to provide a
517
- # consistent developer experience across different environments.
518
- # Example uses of this error model include:
519
- # - Partial errors. If a service needs to return partial errors to the client,
520
- # it may embed the `Status` in the normal response to indicate the partial
521
- # errors.
522
- # - Workflow errors. A typical workflow has multiple steps. Each step may
523
- # have a `Status` message for error reporting purpose.
524
- # - Batch operations. If a client uses batch request and batch response, the
525
- # `Status` message should be used directly inside batch response, one for
526
- # each error sub-response.
527
- # - Asynchronous operations. If an API call embeds asynchronous operation
528
- # results in its response, the status of those operations should be
529
- # represented directly using the `Status` message.
530
- # - Logging. If some API errors are stored in logs, the message `Status` could
531
- # be used directly after any stripping needed for security/privacy reasons.
532
- class Status
514
+ # The syntax analysis response message.
515
+ class AnalyzeSyntaxResponse
533
516
  include Google::Apis::Core::Hashable
534
517
 
535
- # The status code, which should be an enum value of google.rpc.Code.
536
- # Corresponds to the JSON property `code`
537
- # @return [Fixnum]
538
- attr_accessor :code
539
-
540
- # A developer-facing error message, which should be in English. Any
541
- # user-facing error message should be localized and sent in the
542
- # google.rpc.Status.details field, or localized by the client.
543
- # Corresponds to the JSON property `message`
518
+ # The language of the text, which will be the same as the language specified
519
+ # in the request or, if not specified, the automatically-detected language.
520
+ # See Document.language field for more details.
521
+ # Corresponds to the JSON property `language`
544
522
  # @return [String]
545
- attr_accessor :message
523
+ attr_accessor :language
546
524
 
547
- # A list of messages that carry the error details. There will be a
548
- # common set of message types for APIs to use.
549
- # Corresponds to the JSON property `details`
550
- # @return [Array<Hash<String,Object>>]
551
- attr_accessor :details
525
+ # Sentences in the input document.
526
+ # Corresponds to the JSON property `sentences`
527
+ # @return [Array<Google::Apis::LanguageV1::Sentence>]
528
+ attr_accessor :sentences
529
+
530
+ # Tokens, along with their syntactic information, in the input document.
531
+ # Corresponds to the JSON property `tokens`
532
+ # @return [Array<Google::Apis::LanguageV1::Token>]
533
+ attr_accessor :tokens
552
534
 
553
535
  def initialize(**args)
554
536
  update!(**args)
@@ -556,34 +538,33 @@ module Google
556
538
 
557
539
  # Update properties of this object
558
540
  def update!(**args)
559
- @code = args[:code] if args.key?(:code)
560
- @message = args[:message] if args.key?(:message)
561
- @details = args[:details] if args.key?(:details)
541
+ @language = args[:language] if args.key?(:language)
542
+ @sentences = args[:sentences] if args.key?(:sentences)
543
+ @tokens = args[:tokens] if args.key?(:tokens)
562
544
  end
563
545
  end
564
546
 
565
- # All available features for sentiment, syntax, and semantic analysis.
566
- # Setting each one to true will enable that specific analysis for the input.
567
- class Features
547
+ # The request message for the text annotation API, which can perform multiple
548
+ # analysis types (sentiment, entities, and syntax) in one call.
549
+ class AnnotateTextRequest
568
550
  include Google::Apis::Core::Hashable
569
551
 
570
- # Extract entities.
571
- # Corresponds to the JSON property `extractEntities`
572
- # @return [Boolean]
573
- attr_accessor :extract_entities
574
- alias_method :extract_entities?, :extract_entities
552
+ # The encoding type used by the API to calculate offsets.
553
+ # Corresponds to the JSON property `encodingType`
554
+ # @return [String]
555
+ attr_accessor :encoding_type
575
556
 
576
- # Extract syntax information.
577
- # Corresponds to the JSON property `extractSyntax`
578
- # @return [Boolean]
579
- attr_accessor :extract_syntax
580
- alias_method :extract_syntax?, :extract_syntax
557
+ # ################################################################ #
558
+ # Represents the input to API methods.
559
+ # Corresponds to the JSON property `document`
560
+ # @return [Google::Apis::LanguageV1::Document]
561
+ attr_accessor :document
581
562
 
582
- # Extract document-level sentiment.
583
- # Corresponds to the JSON property `extractDocumentSentiment`
584
- # @return [Boolean]
585
- attr_accessor :extract_document_sentiment
586
- alias_method :extract_document_sentiment?, :extract_document_sentiment
563
+ # All available features for sentiment, syntax, and semantic analysis.
564
+ # Setting each one to true will enable that specific analysis for the input.
565
+ # Corresponds to the JSON property `features`
566
+ # @return [Google::Apis::LanguageV1::Features]
567
+ attr_accessor :features
587
568
 
588
569
  def initialize(**args)
589
570
  update!(**args)
@@ -591,26 +572,48 @@ module Google
591
572
 
592
573
  # Update properties of this object
593
574
  def update!(**args)
594
- @extract_entities = args[:extract_entities] if args.key?(:extract_entities)
595
- @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax)
596
- @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment)
575
+ @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
576
+ @document = args[:document] if args.key?(:document)
577
+ @features = args[:features] if args.key?(:features)
597
578
  end
598
579
  end
599
580
 
600
- # Represents a mention for an entity in the text. Currently, proper noun
601
- # mentions are supported.
602
- class EntityMention
581
+ # The text annotations response message.
582
+ class AnnotateTextResponse
603
583
  include Google::Apis::Core::Hashable
604
584
 
605
- # Represents an output piece of text.
606
- # Corresponds to the JSON property `text`
607
- # @return [Google::Apis::LanguageV1::TextSpan]
608
- attr_accessor :text
585
+ # Entities, along with their semantic information, in the input document.
586
+ # Populated if the user enables
587
+ # AnnotateTextRequest.Features.extract_entities.
588
+ # Corresponds to the JSON property `entities`
589
+ # @return [Array<Google::Apis::LanguageV1::Entity>]
590
+ attr_accessor :entities
609
591
 
610
- # The type of the entity mention.
611
- # Corresponds to the JSON property `type`
592
+ # Represents the feeling associated with the entire text or entities in
593
+ # the text.
594
+ # Corresponds to the JSON property `documentSentiment`
595
+ # @return [Google::Apis::LanguageV1::Sentiment]
596
+ attr_accessor :document_sentiment
597
+
598
+ # The language of the text, which will be the same as the language specified
599
+ # in the request or, if not specified, the automatically-detected language.
600
+ # See Document.language field for more details.
601
+ # Corresponds to the JSON property `language`
612
602
  # @return [String]
613
- attr_accessor :type
603
+ attr_accessor :language
604
+
605
+ # Sentences in the input document. Populated if the user enables
606
+ # AnnotateTextRequest.Features.extract_syntax.
607
+ # Corresponds to the JSON property `sentences`
608
+ # @return [Array<Google::Apis::LanguageV1::Sentence>]
609
+ attr_accessor :sentences
610
+
611
+ # Tokens, along with their syntactic information, in the input document.
612
+ # Populated if the user enables
613
+ # AnnotateTextRequest.Features.extract_syntax.
614
+ # Corresponds to the JSON property `tokens`
615
+ # @return [Array<Google::Apis::LanguageV1::Token>]
616
+ attr_accessor :tokens
614
617
 
615
618
  def initialize(**args)
616
619
  update!(**args)
@@ -618,46 +621,28 @@ module Google
618
621
 
619
622
  # Update properties of this object
620
623
  def update!(**args)
621
- @text = args[:text] if args.key?(:text)
622
- @type = args[:type] if args.key?(:type)
624
+ @entities = args[:entities] if args.key?(:entities)
625
+ @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
626
+ @language = args[:language] if args.key?(:language)
627
+ @sentences = args[:sentences] if args.key?(:sentences)
628
+ @tokens = args[:tokens] if args.key?(:tokens)
623
629
  end
624
630
  end
625
631
 
626
- # ################################################################ #
627
- # Represents the input to API methods.
628
- class Document
632
+ # The sentiment analysis request message.
633
+ class AnalyzeSentimentRequest
629
634
  include Google::Apis::Core::Hashable
630
635
 
631
- # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
632
- # returns an `INVALID_ARGUMENT` error.
633
- # Corresponds to the JSON property `type`
634
- # @return [String]
635
- attr_accessor :type
636
-
637
- # The content of the input in string format.
638
- # Corresponds to the JSON property `content`
639
- # @return [String]
640
- attr_accessor :content
641
-
642
- # The Google Cloud Storage URI where the file content is located.
643
- # This URI must be of the form: gs://bucket_name/object_name. For more
644
- # details, see https://cloud.google.com/storage/docs/reference-uris.
645
- # NOTE: Cloud Storage object versioning is not supported.
646
- # Corresponds to the JSON property `gcsContentUri`
636
+ # The encoding type used by the API to calculate sentence offsets.
637
+ # Corresponds to the JSON property `encodingType`
647
638
  # @return [String]
648
- attr_accessor :gcs_content_uri
639
+ attr_accessor :encoding_type
649
640
 
650
- # The language of the document (if not specified, the language is
651
- # automatically detected). Both ISO and BCP-47 language codes are
652
- # accepted.<br>
653
- # **Current Language Restrictions:**
654
- # * Only English, Spanish, and Japanese textual content are supported.
655
- # If the language (either specified by the caller or automatically detected)
656
- # is not supported by the called API method, an `INVALID_ARGUMENT` error
657
- # is returned.
658
- # Corresponds to the JSON property `language`
659
- # @return [String]
660
- attr_accessor :language
641
+ # ################################################################ #
642
+ # Represents the input to API methods.
643
+ # Corresponds to the JSON property `document`
644
+ # @return [Google::Apis::LanguageV1::Document]
645
+ attr_accessor :document
661
646
 
662
647
  def initialize(**args)
663
648
  update!(**args)
@@ -665,27 +650,30 @@ module Google
665
650
 
666
651
  # Update properties of this object
667
652
  def update!(**args)
668
- @type = args[:type] if args.key?(:type)
669
- @content = args[:content] if args.key?(:content)
670
- @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri)
671
- @language = args[:language] if args.key?(:language)
653
+ @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
654
+ @document = args[:document] if args.key?(:document)
672
655
  end
673
656
  end
674
657
 
675
- # Represents a sentence in the input document.
676
- class Sentence
658
+ # Represents dependency parse tree information for a token. (For more
659
+ # information on dependency labels, see
660
+ # http://www.aclweb.org/anthology/P13-2017
661
+ class DependencyEdge
677
662
  include Google::Apis::Core::Hashable
678
663
 
679
- # Represents an output piece of text.
680
- # Corresponds to the JSON property `text`
681
- # @return [Google::Apis::LanguageV1::TextSpan]
682
- attr_accessor :text
664
+ # The parse label for the token.
665
+ # Corresponds to the JSON property `label`
666
+ # @return [String]
667
+ attr_accessor :label
683
668
 
684
- # Represents the feeling associated with the entire text or entities in
685
- # the text.
686
- # Corresponds to the JSON property `sentiment`
687
- # @return [Google::Apis::LanguageV1::Sentiment]
688
- attr_accessor :sentiment
669
+ # Represents the head of this token in the dependency tree.
670
+ # This is the index of the token which has an arc going to this token.
671
+ # The index is the position of the token in the array of tokens returned
672
+ # by the API method. If this token is a root token, then the
673
+ # `head_token_index` is its own index.
674
+ # Corresponds to the JSON property `headTokenIndex`
675
+ # @return [Fixnum]
676
+ attr_accessor :head_token_index
689
677
 
690
678
  def initialize(**args)
691
679
  update!(**args)
@@ -693,25 +681,25 @@ module Google
693
681
 
694
682
  # Update properties of this object
695
683
  def update!(**args)
696
- @text = args[:text] if args.key?(:text)
697
- @sentiment = args[:sentiment] if args.key?(:sentiment)
684
+ @label = args[:label] if args.key?(:label)
685
+ @head_token_index = args[:head_token_index] if args.key?(:head_token_index)
698
686
  end
699
687
  end
700
688
 
701
- # The entity analysis request message.
702
- class AnalyzeEntitiesRequest
689
+ # Represents an output piece of text.
690
+ class TextSpan
703
691
  include Google::Apis::Core::Hashable
704
692
 
705
- # The encoding type used by the API to calculate offsets.
706
- # Corresponds to the JSON property `encodingType`
707
- # @return [String]
708
- attr_accessor :encoding_type
693
+ # The API calculates the beginning offset of the content in the original
694
+ # document according to the EncodingType specified in the API request.
695
+ # Corresponds to the JSON property `beginOffset`
696
+ # @return [Fixnum]
697
+ attr_accessor :begin_offset
709
698
 
710
- # ################################################################ #
711
- # Represents the input to API methods.
712
- # Corresponds to the JSON property `document`
713
- # @return [Google::Apis::LanguageV1::Document]
714
- attr_accessor :document
699
+ # The content of the output text.
700
+ # Corresponds to the JSON property `content`
701
+ # @return [String]
702
+ attr_accessor :content
715
703
 
716
704
  def initialize(**args)
717
705
  update!(**args)
@@ -719,28 +707,38 @@ module Google
719
707
 
720
708
  # Update properties of this object
721
709
  def update!(**args)
722
- @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
723
- @document = args[:document] if args.key?(:document)
710
+ @begin_offset = args[:begin_offset] if args.key?(:begin_offset)
711
+ @content = args[:content] if args.key?(:content)
724
712
  end
725
713
  end
726
714
 
727
- # Represents the feeling associated with the entire text or entities in
728
- # the text.
729
- class Sentiment
715
+ # Represents the smallest syntactic building block of the text.
716
+ class Token
730
717
  include Google::Apis::Core::Hashable
731
718
 
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
719
+ # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
720
+ # Corresponds to the JSON property `lemma`
721
+ # @return [String]
722
+ attr_accessor :lemma
737
723
 
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
724
+ # Represents part of speech information for a token. Parts of speech
725
+ # are as defined in
726
+ # http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf
727
+ # Corresponds to the JSON property `partOfSpeech`
728
+ # @return [Google::Apis::LanguageV1::PartOfSpeech]
729
+ attr_accessor :part_of_speech
730
+
731
+ # Represents an output piece of text.
732
+ # Corresponds to the JSON property `text`
733
+ # @return [Google::Apis::LanguageV1::TextSpan]
734
+ attr_accessor :text
735
+
736
+ # Represents dependency parse tree information for a token. (For more
737
+ # information on dependency labels, see
738
+ # http://www.aclweb.org/anthology/P13-2017
739
+ # Corresponds to the JSON property `dependencyEdge`
740
+ # @return [Google::Apis::LanguageV1::DependencyEdge]
741
+ attr_accessor :dependency_edge
744
742
 
745
743
  def initialize(**args)
746
744
  update!(**args)
@@ -748,8 +746,10 @@ module Google
748
746
 
749
747
  # Update properties of this object
750
748
  def update!(**args)
751
- @score = args[:score] if args.key?(:score)
752
- @magnitude = args[:magnitude] if args.key?(:magnitude)
749
+ @lemma = args[:lemma] if args.key?(:lemma)
750
+ @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech)
751
+ @text = args[:text] if args.key?(:text)
752
+ @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge)
753
753
  end
754
754
  end
755
755
  end