google-api-client 0.13.0 → 0.13.1

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