google-api-client 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/api_names.yaml +395 -0
  4. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  5. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +254 -254
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +65 -65
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +220 -220
  8. data/generated/google/apis/admin_directory_v1.rb +1 -1
  9. data/generated/google/apis/admin_directory_v1/classes.rb +106 -0
  10. data/generated/google/apis/admin_directory_v1/representations.rb +37 -0
  11. data/generated/google/apis/admin_reports_v1.rb +3 -3
  12. data/generated/google/apis/admin_reports_v1/service.rb +6 -6
  13. data/generated/google/apis/adsense_v1_4.rb +1 -1
  14. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  15. data/generated/google/apis/analytics_v3.rb +1 -1
  16. data/generated/google/apis/analytics_v3/service.rb +39 -0
  17. data/generated/google/apis/analyticsreporting_v4/classes.rb +920 -920
  18. data/generated/google/apis/analyticsreporting_v4/representations.rb +197 -197
  19. data/generated/google/apis/analyticsreporting_v4/service.rb +4 -4
  20. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  21. data/generated/google/apis/androidenterprise_v1/classes.rb +8 -13
  22. data/generated/google/apis/androidenterprise_v1/service.rb +3 -3
  23. data/generated/google/apis/appengine_v1beta5.rb +1 -1
  24. data/generated/google/apis/appengine_v1beta5/classes.rb +115 -5
  25. data/generated/google/apis/appengine_v1beta5/representations.rb +37 -0
  26. data/generated/google/apis/appengine_v1beta5/service.rb +12 -9
  27. data/generated/google/apis/appstate_v1.rb +1 -1
  28. data/generated/google/apis/bigquery_v2.rb +1 -1
  29. data/generated/google/apis/bigquery_v2/classes.rb +32 -37
  30. data/generated/google/apis/bigquery_v2/service.rb +10 -2
  31. data/generated/google/apis/calendar_v3.rb +1 -1
  32. data/generated/google/apis/calendar_v3/classes.rb +205 -0
  33. data/generated/google/apis/calendar_v3/representations.rb +97 -0
  34. data/generated/google/apis/classroom_v1.rb +22 -25
  35. data/generated/google/apis/classroom_v1/classes.rb +998 -907
  36. data/generated/google/apis/classroom_v1/representations.rb +240 -240
  37. data/generated/google/apis/classroom_v1/service.rb +1269 -1061
  38. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  39. data/generated/google/apis/cloudbuild_v1/classes.rb +164 -163
  40. data/generated/google/apis/cloudbuild_v1/representations.rb +31 -31
  41. data/generated/google/apis/cloudbuild_v1/service.rb +114 -114
  42. data/generated/google/apis/clouddebugger_v2.rb +1 -1
  43. data/generated/google/apis/clouddebugger_v2/classes.rb +687 -687
  44. data/generated/google/apis/clouddebugger_v2/representations.rb +147 -147
  45. data/generated/google/apis/clouddebugger_v2/service.rb +132 -132
  46. data/generated/google/apis/cloudkms_v1.rb +1 -1
  47. data/generated/google/apis/cloudkms_v1/classes.rb +231 -248
  48. data/generated/google/apis/cloudkms_v1/representations.rb +74 -74
  49. data/generated/google/apis/cloudkms_v1/service.rb +228 -228
  50. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  51. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  52. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +738 -128
  53. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +245 -23
  54. data/generated/google/apis/cloudresourcemanager_v1/service.rb +1293 -249
  55. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  56. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +982 -372
  57. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +293 -71
  58. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +626 -277
  59. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  60. data/generated/google/apis/cloudtrace_v1/classes.rb +19 -19
  61. data/generated/google/apis/cloudtrace_v1/representations.rb +2 -2
  62. data/generated/google/apis/cloudtrace_v1/service.rb +30 -30
  63. data/generated/google/apis/compute_beta.rb +1 -1
  64. data/generated/google/apis/compute_beta/classes.rb +116 -0
  65. data/generated/google/apis/compute_beta/representations.rb +48 -0
  66. data/generated/google/apis/compute_beta/service.rb +46 -1
  67. data/generated/google/apis/compute_v1.rb +1 -1
  68. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  69. data/generated/google/apis/dataflow_v1b3/classes.rb +3276 -3320
  70. data/generated/google/apis/dataflow_v1b3/representations.rb +779 -781
  71. data/generated/google/apis/dataflow_v1b3/service.rb +225 -225
  72. data/generated/google/apis/dataproc_v1.rb +1 -1
  73. data/generated/google/apis/dataproc_v1/classes.rb +1221 -1207
  74. data/generated/google/apis/dataproc_v1/representations.rb +255 -253
  75. data/generated/google/apis/dataproc_v1/service.rb +100 -100
  76. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  77. data/generated/google/apis/deploymentmanager_v2/classes.rb +5 -5
  78. data/generated/google/apis/dns_v1.rb +1 -1
  79. data/generated/google/apis/dns_v2beta1.rb +1 -1
  80. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  81. data/generated/google/apis/drive_v2.rb +1 -1
  82. data/generated/google/apis/drive_v2/classes.rb +3 -1
  83. data/generated/google/apis/drive_v3.rb +1 -1
  84. data/generated/google/apis/drive_v3/classes.rb +3 -1
  85. data/generated/google/apis/fusiontables_v2.rb +1 -1
  86. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  87. data/generated/google/apis/games_management_v1management.rb +1 -1
  88. data/generated/google/apis/games_v1.rb +1 -1
  89. data/generated/google/apis/genomics_v1.rb +7 -7
  90. data/generated/google/apis/genomics_v1/classes.rb +959 -959
  91. data/generated/google/apis/genomics_v1/representations.rb +238 -238
  92. data/generated/google/apis/genomics_v1/service.rb +996 -996
  93. data/generated/google/apis/iam_v1.rb +1 -1
  94. data/generated/google/apis/iam_v1/classes.rb +440 -440
  95. data/generated/google/apis/iam_v1/representations.rb +94 -94
  96. data/generated/google/apis/iam_v1/service.rb +170 -173
  97. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  98. data/generated/google/apis/identitytoolkit_v3/classes.rb +55 -0
  99. data/generated/google/apis/identitytoolkit_v3/representations.rb +8 -0
  100. data/generated/google/apis/kgsearch_v1/service.rb +4 -4
  101. data/generated/google/apis/language_v1beta1.rb +1 -1
  102. data/generated/google/apis/language_v1beta1/classes.rb +427 -427
  103. data/generated/google/apis/language_v1beta1/representations.rb +113 -113
  104. data/generated/google/apis/language_v1beta1/service.rb +25 -24
  105. data/generated/google/apis/licensing_v1.rb +2 -2
  106. data/generated/google/apis/licensing_v1/classes.rb +14 -2
  107. data/generated/google/apis/licensing_v1/representations.rb +2 -0
  108. data/generated/google/apis/licensing_v1/service.rb +1 -1
  109. data/generated/google/apis/logging_v2beta1.rb +1 -1
  110. data/generated/google/apis/logging_v2beta1/classes.rb +864 -864
  111. data/generated/google/apis/logging_v2beta1/representations.rb +168 -168
  112. data/generated/google/apis/logging_v2beta1/service.rb +261 -261
  113. data/generated/google/apis/manufacturers_v1.rb +1 -1
  114. data/generated/google/apis/manufacturers_v1/classes.rb +452 -105
  115. data/generated/google/apis/manufacturers_v1/representations.rb +138 -18
  116. data/generated/google/apis/manufacturers_v1/service.rb +11 -11
  117. data/generated/google/apis/mirror_v1.rb +1 -1
  118. data/generated/google/apis/monitoring_v3.rb +7 -7
  119. data/generated/google/apis/monitoring_v3/classes.rb +668 -670
  120. data/generated/google/apis/monitoring_v3/representations.rb +140 -140
  121. data/generated/google/apis/monitoring_v3/service.rb +208 -208
  122. data/generated/google/apis/partners_v2.rb +1 -1
  123. data/generated/google/apis/partners_v2/classes.rb +505 -505
  124. data/generated/google/apis/partners_v2/representations.rb +118 -118
  125. data/generated/google/apis/partners_v2/service.rb +275 -275
  126. data/generated/google/apis/people_v1.rb +1 -1
  127. data/generated/google/apis/people_v1/classes.rb +1037 -1031
  128. data/generated/google/apis/people_v1/representations.rb +247 -246
  129. data/generated/google/apis/people_v1/service.rb +20 -20
  130. data/generated/google/apis/plus_domains_v1.rb +1 -1
  131. data/generated/google/apis/plus_v1.rb +1 -1
  132. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  133. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +392 -392
  134. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +93 -93
  135. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +381 -381
  136. data/generated/google/apis/pubsub_v1.rb +4 -4
  137. data/generated/google/apis/pubsub_v1/classes.rb +131 -132
  138. data/generated/google/apis/pubsub_v1/representations.rb +35 -35
  139. data/generated/google/apis/pubsub_v1/service.rb +399 -408
  140. data/generated/google/apis/reseller_v1.rb +1 -1
  141. data/generated/google/apis/reseller_v1/classes.rb +9 -0
  142. data/generated/google/apis/reseller_v1/representations.rb +1 -0
  143. data/generated/google/apis/script_v1.rb +9 -9
  144. data/generated/google/apis/script_v1/classes.rb +110 -110
  145. data/generated/google/apis/script_v1/representations.rb +26 -26
  146. data/generated/google/apis/sheets_v4.rb +4 -4
  147. data/generated/google/apis/sheets_v4/classes.rb +4329 -4329
  148. data/generated/google/apis/sheets_v4/representations.rb +856 -856
  149. data/generated/google/apis/sheets_v4/service.rb +106 -106
  150. data/generated/google/apis/slides_v1.rb +4 -4
  151. data/generated/google/apis/slides_v1/classes.rb +2923 -2841
  152. data/generated/google/apis/slides_v1/representations.rb +722 -691
  153. data/generated/google/apis/slides_v1/service.rb +58 -15
  154. data/generated/google/apis/speech_v1beta1.rb +1 -1
  155. data/generated/google/apis/speech_v1beta1/classes.rb +191 -191
  156. data/generated/google/apis/speech_v1beta1/representations.rb +57 -57
  157. data/generated/google/apis/speech_v1beta1/service.rb +70 -70
  158. data/generated/google/apis/storage_v1.rb +1 -1
  159. data/generated/google/apis/storage_v1/classes.rb +151 -0
  160. data/generated/google/apis/storage_v1/representations.rb +45 -0
  161. data/generated/google/apis/storage_v1/service.rb +248 -0
  162. data/generated/google/apis/vision_v1.rb +1 -1
  163. data/generated/google/apis/vision_v1/classes.rb +1227 -1221
  164. data/generated/google/apis/vision_v1/representations.rb +217 -215
  165. data/generated/google/apis/webmasters_v3.rb +1 -1
  166. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  167. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  168. data/generated/google/apis/youtube_partner_v1/classes.rb +78 -0
  169. data/generated/google/apis/youtube_partner_v1/representations.rb +34 -0
  170. data/generated/google/apis/youtube_partner_v1/service.rb +40 -0
  171. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  172. data/generated/google/apis/youtubereporting_v1/classes.rb +65 -65
  173. data/generated/google/apis/youtubereporting_v1/representations.rb +18 -18
  174. data/generated/google/apis/youtubereporting_v1/service.rb +111 -111
  175. data/lib/google/apis/version.rb +1 -1
  176. 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 = '20170203'
28
+ REVISION = '20170308'
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'
@@ -1067,6 +1067,14 @@ module Google
1067
1067
  class VerifyAssertionRequest
1068
1068
  include Google::Apis::Core::Hashable
1069
1069
 
1070
+ # When it's true, automatically creates a new account if the user doesn't exist.
1071
+ # When it's false, allows existing user to sign in normally and throws exception
1072
+ # if the user doesn't exist.
1073
+ # Corresponds to the JSON property `autoCreate`
1074
+ # @return [Boolean]
1075
+ attr_accessor :auto_create
1076
+ alias_method :auto_create?, :auto_create
1077
+
1070
1078
  # GCP project number of the requesting delegated app. Currently only intended
1071
1079
  # for Firebase V1 migration.
1072
1080
  # Corresponds to the JSON property `delegatedProjectNumber`
@@ -1129,6 +1137,7 @@ module Google
1129
1137
 
1130
1138
  # Update properties of this object
1131
1139
  def update!(**args)
1140
+ @auto_create = args[:auto_create] if args.key?(:auto_create)
1132
1141
  @delegated_project_number = args[:delegated_project_number] if args.key?(:delegated_project_number)
1133
1142
  @id_token = args[:id_token] if args.key?(:id_token)
1134
1143
  @instance_id = args[:instance_id] if args.key?(:instance_id)
@@ -1305,6 +1314,30 @@ module Google
1305
1314
  class Relyingparty
1306
1315
  include Google::Apis::Core::Hashable
1307
1316
 
1317
+ # whether or not to install the android app on the device where the link is
1318
+ # opened
1319
+ # Corresponds to the JSON property `androidInstallApp`
1320
+ # @return [Boolean]
1321
+ attr_accessor :android_install_app
1322
+ alias_method :android_install_app?, :android_install_app
1323
+
1324
+ # minimum version of the app. if the version on the device is lower than this
1325
+ # version then the user is taken to the play store to upgrade the app
1326
+ # Corresponds to the JSON property `androidMinimumVersion`
1327
+ # @return [String]
1328
+ attr_accessor :android_minimum_version
1329
+
1330
+ # android package name of the android app to handle the action code
1331
+ # Corresponds to the JSON property `androidPackageName`
1332
+ # @return [String]
1333
+ attr_accessor :android_package_name
1334
+
1335
+ # whether or not the app can handle the oob code without first going to web
1336
+ # Corresponds to the JSON property `canHandleCodeInApp`
1337
+ # @return [Boolean]
1338
+ attr_accessor :can_handle_code_in_app
1339
+ alias_method :can_handle_code_in_app?, :can_handle_code_in_app
1340
+
1308
1341
  # The recaptcha response from the user.
1309
1342
  # Corresponds to the JSON property `captchaResp`
1310
1343
  # @return [String]
@@ -1315,11 +1348,26 @@ module Google
1315
1348
  # @return [String]
1316
1349
  attr_accessor :challenge
1317
1350
 
1351
+ # The url to continue to the Gitkit app
1352
+ # Corresponds to the JSON property `continueUrl`
1353
+ # @return [String]
1354
+ attr_accessor :continue_url
1355
+
1318
1356
  # The email of the user.
1319
1357
  # Corresponds to the JSON property `email`
1320
1358
  # @return [String]
1321
1359
  attr_accessor :email
1322
1360
 
1361
+ # iOS app store id to download the app if it's not already installed
1362
+ # Corresponds to the JSON property `iOSAppStoreId`
1363
+ # @return [String]
1364
+ attr_accessor :i_os_app_store_id
1365
+
1366
+ # the iOS bundle id of iOS app to handle the action code
1367
+ # Corresponds to the JSON property `iOSBundleId`
1368
+ # @return [String]
1369
+ attr_accessor :i_os_bundle_id
1370
+
1323
1371
  # The user's Gitkit login token for email change.
1324
1372
  # Corresponds to the JSON property `idToken`
1325
1373
  # @return [String]
@@ -1351,9 +1399,16 @@ module Google
1351
1399
 
1352
1400
  # Update properties of this object
1353
1401
  def update!(**args)
1402
+ @android_install_app = args[:android_install_app] if args.key?(:android_install_app)
1403
+ @android_minimum_version = args[:android_minimum_version] if args.key?(:android_minimum_version)
1404
+ @android_package_name = args[:android_package_name] if args.key?(:android_package_name)
1405
+ @can_handle_code_in_app = args[:can_handle_code_in_app] if args.key?(:can_handle_code_in_app)
1354
1406
  @captcha_resp = args[:captcha_resp] if args.key?(:captcha_resp)
1355
1407
  @challenge = args[:challenge] if args.key?(:challenge)
1408
+ @continue_url = args[:continue_url] if args.key?(:continue_url)
1356
1409
  @email = args[:email] if args.key?(:email)
1410
+ @i_os_app_store_id = args[:i_os_app_store_id] if args.key?(:i_os_app_store_id)
1411
+ @i_os_bundle_id = args[:i_os_bundle_id] if args.key?(:i_os_bundle_id)
1357
1412
  @id_token = args[:id_token] if args.key?(:id_token)
1358
1413
  @kind = args[:kind] if args.key?(:kind)
1359
1414
  @new_email = args[:new_email] if args.key?(:new_email)
@@ -498,6 +498,7 @@ module Google
498
498
  class VerifyAssertionRequest
499
499
  # @private
500
500
  class Representation < Google::Apis::Core::JsonRepresentation
501
+ property :auto_create, as: 'autoCreate'
501
502
  property :delegated_project_number, as: 'delegatedProjectNumber'
502
503
  property :id_token, as: 'idToken'
503
504
  property :instance_id, as: 'instanceId'
@@ -551,9 +552,16 @@ module Google
551
552
  class Relyingparty
552
553
  # @private
553
554
  class Representation < Google::Apis::Core::JsonRepresentation
555
+ property :android_install_app, as: 'androidInstallApp'
556
+ property :android_minimum_version, as: 'androidMinimumVersion'
557
+ property :android_package_name, as: 'androidPackageName'
558
+ property :can_handle_code_in_app, as: 'canHandleCodeInApp'
554
559
  property :captcha_resp, as: 'captchaResp'
555
560
  property :challenge, as: 'challenge'
561
+ property :continue_url, as: 'continueUrl'
556
562
  property :email, as: 'email'
563
+ property :i_os_app_store_id, as: 'iOSAppStoreId'
564
+ property :i_os_bundle_id, as: 'iOSBundleId'
557
565
  property :id_token, as: 'idToken'
558
566
  property :kind, as: 'kind'
559
567
  property :new_email, as: 'newEmail'
@@ -68,11 +68,11 @@ module Google
68
68
  # returned entities will contain one or more of these types.
69
69
  # @param [Boolean] indent
70
70
  # Enables indenting of json results.
71
- # @param [String] fields
72
- # Selector specifying which fields to include in a partial response.
73
71
  # @param [String] quota_user
74
72
  # Available to use for quota purposes for server-side applications. Can be any
75
73
  # arbitrary string assigned to a user, but should not exceed 40 characters.
74
+ # @param [String] fields
75
+ # Selector specifying which fields to include in a partial response.
76
76
  # @param [Google::Apis::RequestOptions] options
77
77
  # Request-specific options
78
78
  #
@@ -85,7 +85,7 @@ module Google
85
85
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
86
86
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
87
87
  # @raise [Google::Apis::AuthorizationError] Authorization is required
88
- 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)
88
+ def search_entities(languages: nil, ids: nil, limit: nil, prefix: nil, query: nil, types: nil, indent: nil, quota_user: nil, fields: nil, options: nil, &block)
89
89
  command = make_simple_command(:get, 'v1/entities:search', options)
90
90
  command.response_representation = Google::Apis::KgsearchV1::SearchResponse::Representation
91
91
  command.response_class = Google::Apis::KgsearchV1::SearchResponse
@@ -96,8 +96,8 @@ module Google
96
96
  command.query['query'] = query unless query.nil?
97
97
  command.query['types'] = types unless types.nil?
98
98
  command.query['indent'] = indent unless indent.nil?
99
- command.query['fields'] = fields unless fields.nil?
100
99
  command.query['quotaUser'] = quota_user unless quota_user.nil?
100
+ command.query['fields'] = fields unless fields.nil?
101
101
  execute_or_queue_command(command, &block)
102
102
  end
103
103
 
@@ -27,7 +27,7 @@ module Google
27
27
  # @see https://cloud.google.com/natural-language/
28
28
  module LanguageV1beta1
29
29
  VERSION = 'V1beta1'
30
- REVISION = '20170301'
30
+ REVISION = '20170320'
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,247 +22,29 @@ module Google
22
22
  module Apis
23
23
  module LanguageV1beta1
24
24
 
25
- # The entity analysis response message.
26
- class AnalyzeEntitiesResponse
27
- include Google::Apis::Core::Hashable
28
-
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`
33
- # @return [String]
34
- attr_accessor :language
35
-
36
- # The recognized entities in the input document.
37
- # Corresponds to the JSON property `entities`
38
- # @return [Array<Google::Apis::LanguageV1beta1::Entity>]
39
- attr_accessor :entities
40
-
41
- def initialize(**args)
42
- update!(**args)
43
- end
44
-
45
- # Update properties of this object
46
- def update!(**args)
47
- @language = args[:language] if args.key?(:language)
48
- @entities = args[:entities] if args.key?(:entities)
49
- end
50
- end
51
-
52
- # Represents a phrase in the text that is a known entity, such as
53
- # a person, an organization, or location. The API associates information, such
54
- # as salience and mentions, with entities.
55
- class Entity
56
- include Google::Apis::Core::Hashable
57
-
58
- # The mentions of this entity in the input document. The API currently
59
- # supports proper noun mentions.
60
- # Corresponds to the JSON property `mentions`
61
- # @return [Array<Google::Apis::LanguageV1beta1::EntityMention>]
62
- attr_accessor :mentions
63
-
64
- # The representative name for the entity.
65
- # Corresponds to the JSON property `name`
66
- # @return [String]
67
- attr_accessor :name
68
-
69
- # The entity type.
70
- # Corresponds to the JSON property `type`
71
- # @return [String]
72
- attr_accessor :type
73
-
74
- # Metadata associated with the entity.
75
- # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
76
- # available. The associated keys are "wikipedia_url" and "mid", respectively.
77
- # Corresponds to the JSON property `metadata`
78
- # @return [Hash<String,String>]
79
- attr_accessor :metadata
80
-
81
- # The salience score associated with the entity in the [0, 1.0] range.
82
- # The salience score for an entity provides information about the
83
- # importance or centrality of that entity to the entire document text.
84
- # Scores closer to 0 are less salient, while scores closer to 1.0 are highly
85
- # salient.
86
- # Corresponds to the JSON property `salience`
87
- # @return [Float]
88
- attr_accessor :salience
89
-
90
- def initialize(**args)
91
- update!(**args)
92
- end
93
-
94
- # Update properties of this object
95
- def update!(**args)
96
- @mentions = args[:mentions] if args.key?(:mentions)
97
- @name = args[:name] if args.key?(:name)
98
- @type = args[:type] if args.key?(:type)
99
- @metadata = args[:metadata] if args.key?(:metadata)
100
- @salience = args[:salience] if args.key?(:salience)
101
- end
102
- end
103
-
104
- # The syntax analysis response message.
105
- class AnalyzeSyntaxResponse
106
- include Google::Apis::Core::Hashable
107
-
108
- # Sentences in the input document.
109
- # Corresponds to the JSON property `sentences`
110
- # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
111
- attr_accessor :sentences
112
-
113
- # Tokens, along with their syntactic information, in the input document.
114
- # Corresponds to the JSON property `tokens`
115
- # @return [Array<Google::Apis::LanguageV1beta1::Token>]
116
- attr_accessor :tokens
117
-
118
- # The language of the text, which will be the same as the language specified
119
- # in the request or, if not specified, the automatically-detected language.
120
- # See Document.language field for more details.
121
- # Corresponds to the JSON property `language`
122
- # @return [String]
123
- attr_accessor :language
124
-
125
- def initialize(**args)
126
- update!(**args)
127
- end
128
-
129
- # Update properties of this object
130
- def update!(**args)
131
- @sentences = args[:sentences] if args.key?(:sentences)
132
- @tokens = args[:tokens] if args.key?(:tokens)
133
- @language = args[:language] if args.key?(:language)
134
- end
135
- end
136
-
137
- # The request message for the text annotation API, which can perform multiple
138
- # analysis types (sentiment, entities, and syntax) in one call.
139
- class AnnotateTextRequest
140
- include Google::Apis::Core::Hashable
141
-
142
- # The encoding type used by the API to calculate offsets.
143
- # Corresponds to the JSON property `encodingType`
144
- # @return [String]
145
- attr_accessor :encoding_type
146
-
147
- # ################################################################ #
148
- # Represents the input to API methods.
149
- # Corresponds to the JSON property `document`
150
- # @return [Google::Apis::LanguageV1beta1::Document]
151
- attr_accessor :document
152
-
153
- # All available features for sentiment, syntax, and semantic analysis.
154
- # Setting each one to true will enable that specific analysis for the input.
155
- # Corresponds to the JSON property `features`
156
- # @return [Google::Apis::LanguageV1beta1::Features]
157
- attr_accessor :features
158
-
159
- def initialize(**args)
160
- update!(**args)
161
- end
162
-
163
- # Update properties of this object
164
- def update!(**args)
165
- @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
166
- @document = args[:document] if args.key?(:document)
167
- @features = args[:features] if args.key?(:features)
168
- end
169
- end
170
-
171
- # The sentiment analysis request message.
172
- class AnalyzeSentimentRequest
173
- include Google::Apis::Core::Hashable
174
-
175
- # The encoding type used by the API to calculate sentence offsets for the
176
- # sentence sentiment.
177
- # Corresponds to the JSON property `encodingType`
178
- # @return [String]
179
- attr_accessor :encoding_type
180
-
181
- # ################################################################ #
182
- # Represents the input to API methods.
183
- # Corresponds to the JSON property `document`
184
- # @return [Google::Apis::LanguageV1beta1::Document]
185
- attr_accessor :document
186
-
187
- def initialize(**args)
188
- update!(**args)
189
- end
190
-
191
- # Update properties of this object
192
- def update!(**args)
193
- @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
194
- @document = args[:document] if args.key?(:document)
195
- end
196
- end
197
-
198
- # The text annotations response message.
199
- class AnnotateTextResponse
25
+ # Represents the smallest syntactic building block of the text.
26
+ class Token
200
27
  include Google::Apis::Core::Hashable
201
28
 
202
- # Represents the feeling associated with the entire text or entities in
203
- # the text.
204
- # Corresponds to the JSON property `documentSentiment`
205
- # @return [Google::Apis::LanguageV1beta1::Sentiment]
206
- attr_accessor :document_sentiment
207
-
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`
212
- # @return [String]
213
- attr_accessor :language
214
-
215
- # Sentences in the input document. Populated if the user enables
216
- # AnnotateTextRequest.Features.extract_syntax.
217
- # Corresponds to the JSON property `sentences`
218
- # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
219
- attr_accessor :sentences
220
-
221
- # Tokens, along with their syntactic information, in the input document.
222
- # Populated if the user enables
223
- # AnnotateTextRequest.Features.extract_syntax.
224
- # Corresponds to the JSON property `tokens`
225
- # @return [Array<Google::Apis::LanguageV1beta1::Token>]
226
- attr_accessor :tokens
227
-
228
- # Entities, along with their semantic information, in the input document.
229
- # Populated if the user enables
230
- # AnnotateTextRequest.Features.extract_entities.
231
- # Corresponds to the JSON property `entities`
232
- # @return [Array<Google::Apis::LanguageV1beta1::Entity>]
233
- attr_accessor :entities
234
-
235
- def initialize(**args)
236
- update!(**args)
237
- end
29
+ # Represents part of speech information for a token.
30
+ # Corresponds to the JSON property `partOfSpeech`
31
+ # @return [Google::Apis::LanguageV1beta1::PartOfSpeech]
32
+ attr_accessor :part_of_speech
238
33
 
239
- # Update properties of this object
240
- def update!(**args)
241
- @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
242
- @language = args[:language] if args.key?(:language)
243
- @sentences = args[:sentences] if args.key?(:sentences)
244
- @tokens = args[:tokens] if args.key?(:tokens)
245
- @entities = args[:entities] if args.key?(:entities)
246
- end
247
- end
34
+ # Represents an output piece of text.
35
+ # Corresponds to the JSON property `text`
36
+ # @return [Google::Apis::LanguageV1beta1::TextSpan]
37
+ attr_accessor :text
248
38
 
249
- # Represents dependency parse tree information for a token.
250
- class DependencyEdge
251
- include Google::Apis::Core::Hashable
39
+ # Represents dependency parse tree information for a token.
40
+ # Corresponds to the JSON property `dependencyEdge`
41
+ # @return [Google::Apis::LanguageV1beta1::DependencyEdge]
42
+ attr_accessor :dependency_edge
252
43
 
253
- # The parse label for the token.
254
- # Corresponds to the JSON property `label`
44
+ # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
45
+ # Corresponds to the JSON property `lemma`
255
46
  # @return [String]
256
- attr_accessor :label
257
-
258
- # Represents the head of this token in the dependency tree.
259
- # This is the index of the token which has an arc going to this token.
260
- # The index is the position of the token in the array of tokens returned
261
- # by the API method. If this token is a root token, then the
262
- # `head_token_index` is its own index.
263
- # Corresponds to the JSON property `headTokenIndex`
264
- # @return [Fixnum]
265
- attr_accessor :head_token_index
47
+ attr_accessor :lemma
266
48
 
267
49
  def initialize(**args)
268
50
  update!(**args)
@@ -270,8 +52,10 @@ module Google
270
52
 
271
53
  # Update properties of this object
272
54
  def update!(**args)
273
- @label = args[:label] if args.key?(:label)
274
- @head_token_index = args[:head_token_index] if args.key?(:head_token_index)
55
+ @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech)
56
+ @text = args[:text] if args.key?(:text)
57
+ @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge)
58
+ @lemma = args[:lemma] if args.key?(:lemma)
275
59
  end
276
60
  end
277
61
 
@@ -279,62 +63,25 @@ module Google
279
63
  class TextSpan
280
64
  include Google::Apis::Core::Hashable
281
65
 
66
+ # The content of the output text.
67
+ # Corresponds to the JSON property `content`
68
+ # @return [String]
69
+ attr_accessor :content
70
+
282
71
  # The API calculates the beginning offset of the content in the original
283
72
  # document according to the EncodingType specified in the API request.
284
73
  # Corresponds to the JSON property `beginOffset`
285
74
  # @return [Fixnum]
286
75
  attr_accessor :begin_offset
287
76
 
288
- # The content of the output text.
289
- # Corresponds to the JSON property `content`
290
- # @return [String]
291
- attr_accessor :content
292
-
293
77
  def initialize(**args)
294
78
  update!(**args)
295
79
  end
296
80
 
297
81
  # Update properties of this object
298
82
  def update!(**args)
299
- @begin_offset = args[:begin_offset] if args.key?(:begin_offset)
300
83
  @content = args[:content] if args.key?(:content)
301
- end
302
- end
303
-
304
- # Represents the smallest syntactic building block of the text.
305
- class Token
306
- include Google::Apis::Core::Hashable
307
-
308
- # Represents an output piece of text.
309
- # Corresponds to the JSON property `text`
310
- # @return [Google::Apis::LanguageV1beta1::TextSpan]
311
- attr_accessor :text
312
-
313
- # Represents dependency parse tree information for a token.
314
- # Corresponds to the JSON property `dependencyEdge`
315
- # @return [Google::Apis::LanguageV1beta1::DependencyEdge]
316
- attr_accessor :dependency_edge
317
-
318
- # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
319
- # Corresponds to the JSON property `lemma`
320
- # @return [String]
321
- attr_accessor :lemma
322
-
323
- # Represents part of speech information for a token.
324
- # Corresponds to the JSON property `partOfSpeech`
325
- # @return [Google::Apis::LanguageV1beta1::PartOfSpeech]
326
- attr_accessor :part_of_speech
327
-
328
- def initialize(**args)
329
- update!(**args)
330
- end
331
-
332
- # Update properties of this object
333
- def update!(**args)
334
- @text = args[:text] if args.key?(:text)
335
- @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge)
336
- @lemma = args[:lemma] if args.key?(:lemma)
337
- @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech)
84
+ @begin_offset = args[:begin_offset] if args.key?(:begin_offset)
338
85
  end
339
86
  end
340
87
 
@@ -380,6 +127,12 @@ module Google
380
127
  class Status
381
128
  include Google::Apis::Core::Hashable
382
129
 
130
+ # A list of messages that carry the error details. There will be a
131
+ # common set of message types for APIs to use.
132
+ # Corresponds to the JSON property `details`
133
+ # @return [Array<Hash<String,Object>>]
134
+ attr_accessor :details
135
+
383
136
  # The status code, which should be an enum value of google.rpc.Code.
384
137
  # Corresponds to the JSON property `code`
385
138
  # @return [Fixnum]
@@ -392,11 +145,32 @@ module Google
392
145
  # @return [String]
393
146
  attr_accessor :message
394
147
 
395
- # A list of messages that carry the error details. There will be a
396
- # common set of message types for APIs to use.
397
- # Corresponds to the JSON property `details`
398
- # @return [Array<Hash<String,Object>>]
399
- attr_accessor :details
148
+ def initialize(**args)
149
+ update!(**args)
150
+ end
151
+
152
+ # Update properties of this object
153
+ def update!(**args)
154
+ @details = args[:details] if args.key?(:details)
155
+ @code = args[:code] if args.key?(:code)
156
+ @message = args[:message] if args.key?(:message)
157
+ end
158
+ end
159
+
160
+ # Represents a mention for an entity in the text. Currently, proper noun
161
+ # mentions are supported.
162
+ class EntityMention
163
+ include Google::Apis::Core::Hashable
164
+
165
+ # Represents an output piece of text.
166
+ # Corresponds to the JSON property `text`
167
+ # @return [Google::Apis::LanguageV1beta1::TextSpan]
168
+ attr_accessor :text
169
+
170
+ # The type of the entity mention.
171
+ # Corresponds to the JSON property `type`
172
+ # @return [String]
173
+ attr_accessor :type
400
174
 
401
175
  def initialize(**args)
402
176
  update!(**args)
@@ -404,9 +178,8 @@ module Google
404
178
 
405
179
  # Update properties of this object
406
180
  def update!(**args)
407
- @code = args[:code] if args.key?(:code)
408
- @message = args[:message] if args.key?(:message)
409
- @details = args[:details] if args.key?(:details)
181
+ @text = args[:text] if args.key?(:text)
182
+ @type = args[:type] if args.key?(:type)
410
183
  end
411
184
  end
412
185
 
@@ -445,9 +218,8 @@ module Google
445
218
  end
446
219
  end
447
220
 
448
- # Represents a mention for an entity in the text. Currently, proper noun
449
- # mentions are supported.
450
- class EntityMention
221
+ # Represents a sentence in the input document.
222
+ class Sentence
451
223
  include Google::Apis::Core::Hashable
452
224
 
453
225
  # Represents an output piece of text.
@@ -455,10 +227,11 @@ module Google
455
227
  # @return [Google::Apis::LanguageV1beta1::TextSpan]
456
228
  attr_accessor :text
457
229
 
458
- # The type of the entity mention.
459
- # Corresponds to the JSON property `type`
460
- # @return [String]
461
- attr_accessor :type
230
+ # Represents the feeling associated with the entire text or entities in
231
+ # the text.
232
+ # Corresponds to the JSON property `sentiment`
233
+ # @return [Google::Apis::LanguageV1beta1::Sentiment]
234
+ attr_accessor :sentiment
462
235
 
463
236
  def initialize(**args)
464
237
  update!(**args)
@@ -467,7 +240,7 @@ module Google
467
240
  # Update properties of this object
468
241
  def update!(**args)
469
242
  @text = args[:text] if args.key?(:text)
470
- @type = args[:type] if args.key?(:type)
243
+ @sentiment = args[:sentiment] if args.key?(:sentiment)
471
244
  end
472
245
  end
473
246
 
@@ -476,6 +249,18 @@ module Google
476
249
  class Document
477
250
  include Google::Apis::Core::Hashable
478
251
 
252
+ # The language of the document (if not specified, the language is
253
+ # automatically detected). Both ISO and BCP-47 language codes are
254
+ # accepted.<br>
255
+ # **Current Language Restrictions:**
256
+ # * Only English, Spanish, and Japanese textual content are supported.
257
+ # If the language (either specified by the caller or automatically detected)
258
+ # is not supported by the called API method, an `INVALID_ARGUMENT` error
259
+ # is returned.
260
+ # Corresponds to the JSON property `language`
261
+ # @return [String]
262
+ attr_accessor :language
263
+
479
264
  # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
480
265
  # returns an `INVALID_ARGUMENT` error.
481
266
  # Corresponds to the JSON property `type`
@@ -495,45 +280,43 @@ module Google
495
280
  # @return [String]
496
281
  attr_accessor :gcs_content_uri
497
282
 
498
- # The language of the document (if not specified, the language is
499
- # automatically detected). Both ISO and BCP-47 language codes are
500
- # accepted.<br>
501
- # **Current Language Restrictions:**
502
- # * Only English, Spanish, and Japanese textual content are supported.
503
- # If the language (either specified by the caller or automatically detected)
504
- # is not supported by the called API method, an `INVALID_ARGUMENT` error
505
- # is returned.
506
- # Corresponds to the JSON property `language`
507
- # @return [String]
508
- attr_accessor :language
509
-
510
283
  def initialize(**args)
511
284
  update!(**args)
512
285
  end
513
286
 
514
287
  # Update properties of this object
515
288
  def update!(**args)
289
+ @language = args[:language] if args.key?(:language)
516
290
  @type = args[:type] if args.key?(:type)
517
291
  @content = args[:content] if args.key?(:content)
518
292
  @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri)
519
- @language = args[:language] if args.key?(:language)
520
293
  end
521
294
  end
522
295
 
523
- # Represents a sentence in the input document.
524
- class Sentence
296
+ # Represents the feeling associated with the entire text or entities in
297
+ # the text.
298
+ class Sentiment
525
299
  include Google::Apis::Core::Hashable
526
300
 
527
- # Represents an output piece of text.
528
- # Corresponds to the JSON property `text`
529
- # @return [Google::Apis::LanguageV1beta1::TextSpan]
530
- attr_accessor :text
301
+ # DEPRECATED FIELD - This field is being deprecated in
302
+ # favor of score. Please refer to our documentation at
303
+ # https://cloud.google.com/natural-language/docs for more information.
304
+ # Corresponds to the JSON property `polarity`
305
+ # @return [Float]
306
+ attr_accessor :polarity
531
307
 
532
- # Represents the feeling associated with the entire text or entities in
533
- # the text.
534
- # Corresponds to the JSON property `sentiment`
535
- # @return [Google::Apis::LanguageV1beta1::Sentiment]
536
- attr_accessor :sentiment
308
+ # Sentiment score between -1.0 (negative sentiment) and 1.0
309
+ # (positive sentiment).
310
+ # Corresponds to the JSON property `score`
311
+ # @return [Float]
312
+ attr_accessor :score
313
+
314
+ # A non-negative number in the [0, +inf) range, which represents
315
+ # the absolute magnitude of sentiment regardless of score (positive or
316
+ # negative).
317
+ # Corresponds to the JSON property `magnitude`
318
+ # @return [Float]
319
+ attr_accessor :magnitude
537
320
 
538
321
  def initialize(**args)
539
322
  update!(**args)
@@ -541,8 +324,9 @@ module Google
541
324
 
542
325
  # Update properties of this object
543
326
  def update!(**args)
544
- @text = args[:text] if args.key?(:text)
545
- @sentiment = args[:sentiment] if args.key?(:sentiment)
327
+ @polarity = args[:polarity] if args.key?(:polarity)
328
+ @score = args[:score] if args.key?(:score)
329
+ @magnitude = args[:magnitude] if args.key?(:magnitude)
546
330
  end
547
331
  end
548
332
 
@@ -567,35 +351,219 @@ module Google
567
351
 
568
352
  # Update properties of this object
569
353
  def update!(**args)
570
- @document = args[:document] if args.key?(:document)
571
- @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
354
+ @document = args[:document] if args.key?(:document)
355
+ @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
356
+ end
357
+ end
358
+
359
+ # Represents part of speech information for a token.
360
+ class PartOfSpeech
361
+ include Google::Apis::Core::Hashable
362
+
363
+ # The grammatical form.
364
+ # Corresponds to the JSON property `form`
365
+ # @return [String]
366
+ attr_accessor :form
367
+
368
+ # The grammatical number.
369
+ # Corresponds to the JSON property `number`
370
+ # @return [String]
371
+ attr_accessor :number
372
+
373
+ # The grammatical voice.
374
+ # Corresponds to the JSON property `voice`
375
+ # @return [String]
376
+ attr_accessor :voice
377
+
378
+ # The grammatical aspect.
379
+ # Corresponds to the JSON property `aspect`
380
+ # @return [String]
381
+ attr_accessor :aspect
382
+
383
+ # The grammatical mood.
384
+ # Corresponds to the JSON property `mood`
385
+ # @return [String]
386
+ attr_accessor :mood
387
+
388
+ # The part of speech tag.
389
+ # Corresponds to the JSON property `tag`
390
+ # @return [String]
391
+ attr_accessor :tag
392
+
393
+ # The grammatical gender.
394
+ # Corresponds to the JSON property `gender`
395
+ # @return [String]
396
+ attr_accessor :gender
397
+
398
+ # The grammatical person.
399
+ # Corresponds to the JSON property `person`
400
+ # @return [String]
401
+ attr_accessor :person
402
+
403
+ # The grammatical properness.
404
+ # Corresponds to the JSON property `proper`
405
+ # @return [String]
406
+ attr_accessor :proper
407
+
408
+ # The grammatical case.
409
+ # Corresponds to the JSON property `case`
410
+ # @return [String]
411
+ attr_accessor :case
412
+
413
+ # The grammatical tense.
414
+ # Corresponds to the JSON property `tense`
415
+ # @return [String]
416
+ attr_accessor :tense
417
+
418
+ # The grammatical reciprocity.
419
+ # Corresponds to the JSON property `reciprocity`
420
+ # @return [String]
421
+ attr_accessor :reciprocity
422
+
423
+ def initialize(**args)
424
+ update!(**args)
425
+ end
426
+
427
+ # Update properties of this object
428
+ def update!(**args)
429
+ @form = args[:form] if args.key?(:form)
430
+ @number = args[:number] if args.key?(:number)
431
+ @voice = args[:voice] if args.key?(:voice)
432
+ @aspect = args[:aspect] if args.key?(:aspect)
433
+ @mood = args[:mood] if args.key?(:mood)
434
+ @tag = args[:tag] if args.key?(:tag)
435
+ @gender = args[:gender] if args.key?(:gender)
436
+ @person = args[:person] if args.key?(:person)
437
+ @proper = args[:proper] if args.key?(:proper)
438
+ @case = args[:case] if args.key?(:case)
439
+ @tense = args[:tense] if args.key?(:tense)
440
+ @reciprocity = args[:reciprocity] if args.key?(:reciprocity)
441
+ end
442
+ end
443
+
444
+ # The syntax analysis request message.
445
+ class AnalyzeSyntaxRequest
446
+ include Google::Apis::Core::Hashable
447
+
448
+ # The encoding type used by the API to calculate offsets.
449
+ # Corresponds to the JSON property `encodingType`
450
+ # @return [String]
451
+ attr_accessor :encoding_type
452
+
453
+ # ################################################################ #
454
+ # Represents the input to API methods.
455
+ # Corresponds to the JSON property `document`
456
+ # @return [Google::Apis::LanguageV1beta1::Document]
457
+ attr_accessor :document
458
+
459
+ def initialize(**args)
460
+ update!(**args)
461
+ end
462
+
463
+ # Update properties of this object
464
+ def update!(**args)
465
+ @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
466
+ @document = args[:document] if args.key?(:document)
467
+ end
468
+ end
469
+
470
+ # The sentiment analysis response message.
471
+ class AnalyzeSentimentResponse
472
+ include Google::Apis::Core::Hashable
473
+
474
+ # The language of the text, which will be the same as the language specified
475
+ # in the request or, if not specified, the automatically-detected language.
476
+ # Corresponds to the JSON property `language`
477
+ # @return [String]
478
+ attr_accessor :language
479
+
480
+ # The sentiment for all the sentences in the document.
481
+ # Corresponds to the JSON property `sentences`
482
+ # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
483
+ attr_accessor :sentences
484
+
485
+ # Represents the feeling associated with the entire text or entities in
486
+ # the text.
487
+ # Corresponds to the JSON property `documentSentiment`
488
+ # @return [Google::Apis::LanguageV1beta1::Sentiment]
489
+ attr_accessor :document_sentiment
490
+
491
+ def initialize(**args)
492
+ update!(**args)
493
+ end
494
+
495
+ # Update properties of this object
496
+ def update!(**args)
497
+ @language = args[:language] if args.key?(:language)
498
+ @sentences = args[:sentences] if args.key?(:sentences)
499
+ @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
500
+ end
501
+ end
502
+
503
+ # The entity analysis response message.
504
+ class AnalyzeEntitiesResponse
505
+ include Google::Apis::Core::Hashable
506
+
507
+ # The recognized entities in the input document.
508
+ # Corresponds to the JSON property `entities`
509
+ # @return [Array<Google::Apis::LanguageV1beta1::Entity>]
510
+ attr_accessor :entities
511
+
512
+ # The language of the text, which will be the same as the language specified
513
+ # in the request or, if not specified, the automatically-detected language.
514
+ # See Document.language field for more details.
515
+ # Corresponds to the JSON property `language`
516
+ # @return [String]
517
+ attr_accessor :language
518
+
519
+ def initialize(**args)
520
+ update!(**args)
521
+ end
522
+
523
+ # Update properties of this object
524
+ def update!(**args)
525
+ @entities = args[:entities] if args.key?(:entities)
526
+ @language = args[:language] if args.key?(:language)
572
527
  end
573
528
  end
574
529
 
575
- # Represents the feeling associated with the entire text or entities in
576
- # the text.
577
- class Sentiment
530
+ # Represents a phrase in the text that is a known entity, such as
531
+ # a person, an organization, or location. The API associates information, such
532
+ # as salience and mentions, with entities.
533
+ class Entity
578
534
  include Google::Apis::Core::Hashable
579
535
 
580
- # DEPRECATED FIELD - This field is being deprecated in
581
- # favor of score. Please refer to our documentation at
582
- # https://cloud.google.com/natural-language/docs for more information.
583
- # Corresponds to the JSON property `polarity`
584
- # @return [Float]
585
- attr_accessor :polarity
536
+ # The mentions of this entity in the input document. The API currently
537
+ # supports proper noun mentions.
538
+ # Corresponds to the JSON property `mentions`
539
+ # @return [Array<Google::Apis::LanguageV1beta1::EntityMention>]
540
+ attr_accessor :mentions
586
541
 
587
- # Sentiment score between -1.0 (negative sentiment) and 1.0
588
- # (positive sentiment).
589
- # Corresponds to the JSON property `score`
590
- # @return [Float]
591
- attr_accessor :score
542
+ # The representative name for the entity.
543
+ # Corresponds to the JSON property `name`
544
+ # @return [String]
545
+ attr_accessor :name
592
546
 
593
- # A non-negative number in the [0, +inf) range, which represents
594
- # the absolute magnitude of sentiment regardless of score (positive or
595
- # negative).
596
- # Corresponds to the JSON property `magnitude`
547
+ # The entity type.
548
+ # Corresponds to the JSON property `type`
549
+ # @return [String]
550
+ attr_accessor :type
551
+
552
+ # Metadata associated with the entity.
553
+ # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
554
+ # available. The associated keys are "wikipedia_url" and "mid", respectively.
555
+ # Corresponds to the JSON property `metadata`
556
+ # @return [Hash<String,String>]
557
+ attr_accessor :metadata
558
+
559
+ # The salience score associated with the entity in the [0, 1.0] range.
560
+ # The salience score for an entity provides information about the
561
+ # importance or centrality of that entity to the entire document text.
562
+ # Scores closer to 0 are less salient, while scores closer to 1.0 are highly
563
+ # salient.
564
+ # Corresponds to the JSON property `salience`
597
565
  # @return [Float]
598
- attr_accessor :magnitude
566
+ attr_accessor :salience
599
567
 
600
568
  def initialize(**args)
601
569
  update!(**args)
@@ -603,75 +571,68 @@ module Google
603
571
 
604
572
  # Update properties of this object
605
573
  def update!(**args)
606
- @polarity = args[:polarity] if args.key?(:polarity)
607
- @score = args[:score] if args.key?(:score)
608
- @magnitude = args[:magnitude] if args.key?(:magnitude)
574
+ @mentions = args[:mentions] if args.key?(:mentions)
575
+ @name = args[:name] if args.key?(:name)
576
+ @type = args[:type] if args.key?(:type)
577
+ @metadata = args[:metadata] if args.key?(:metadata)
578
+ @salience = args[:salience] if args.key?(:salience)
609
579
  end
610
580
  end
611
581
 
612
- # Represents part of speech information for a token.
613
- class PartOfSpeech
582
+ # The syntax analysis response message.
583
+ class AnalyzeSyntaxResponse
614
584
  include Google::Apis::Core::Hashable
615
585
 
616
- # The grammatical voice.
617
- # Corresponds to the JSON property `voice`
618
- # @return [String]
619
- attr_accessor :voice
620
-
621
- # The grammatical aspect.
622
- # Corresponds to the JSON property `aspect`
623
- # @return [String]
624
- attr_accessor :aspect
625
-
626
- # The grammatical mood.
627
- # Corresponds to the JSON property `mood`
628
- # @return [String]
629
- attr_accessor :mood
630
-
631
- # The part of speech tag.
632
- # Corresponds to the JSON property `tag`
633
- # @return [String]
634
- attr_accessor :tag
586
+ # Sentences in the input document.
587
+ # Corresponds to the JSON property `sentences`
588
+ # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
589
+ attr_accessor :sentences
635
590
 
636
- # The grammatical gender.
637
- # Corresponds to the JSON property `gender`
638
- # @return [String]
639
- attr_accessor :gender
591
+ # Tokens, along with their syntactic information, in the input document.
592
+ # Corresponds to the JSON property `tokens`
593
+ # @return [Array<Google::Apis::LanguageV1beta1::Token>]
594
+ attr_accessor :tokens
640
595
 
641
- # The grammatical person.
642
- # Corresponds to the JSON property `person`
596
+ # The language of the text, which will be the same as the language specified
597
+ # in the request or, if not specified, the automatically-detected language.
598
+ # See Document.language field for more details.
599
+ # Corresponds to the JSON property `language`
643
600
  # @return [String]
644
- attr_accessor :person
601
+ attr_accessor :language
645
602
 
646
- # The grammatical properness.
647
- # Corresponds to the JSON property `proper`
648
- # @return [String]
649
- attr_accessor :proper
603
+ def initialize(**args)
604
+ update!(**args)
605
+ end
650
606
 
651
- # The grammatical case.
652
- # Corresponds to the JSON property `case`
653
- # @return [String]
654
- attr_accessor :case
607
+ # Update properties of this object
608
+ def update!(**args)
609
+ @sentences = args[:sentences] if args.key?(:sentences)
610
+ @tokens = args[:tokens] if args.key?(:tokens)
611
+ @language = args[:language] if args.key?(:language)
612
+ end
613
+ end
655
614
 
656
- # The grammatical tense.
657
- # Corresponds to the JSON property `tense`
658
- # @return [String]
659
- attr_accessor :tense
615
+ # The request message for the text annotation API, which can perform multiple
616
+ # analysis types (sentiment, entities, and syntax) in one call.
617
+ class AnnotateTextRequest
618
+ include Google::Apis::Core::Hashable
660
619
 
661
- # The grammatical reciprocity.
662
- # Corresponds to the JSON property `reciprocity`
620
+ # The encoding type used by the API to calculate offsets.
621
+ # Corresponds to the JSON property `encodingType`
663
622
  # @return [String]
664
- attr_accessor :reciprocity
623
+ attr_accessor :encoding_type
665
624
 
666
- # The grammatical form.
667
- # Corresponds to the JSON property `form`
668
- # @return [String]
669
- attr_accessor :form
625
+ # ################################################################ #
626
+ # Represents the input to API methods.
627
+ # Corresponds to the JSON property `document`
628
+ # @return [Google::Apis::LanguageV1beta1::Document]
629
+ attr_accessor :document
670
630
 
671
- # The grammatical number.
672
- # Corresponds to the JSON property `number`
673
- # @return [String]
674
- attr_accessor :number
631
+ # All available features for sentiment, syntax, and semantic analysis.
632
+ # Setting each one to true will enable that specific analysis for the input.
633
+ # Corresponds to the JSON property `features`
634
+ # @return [Google::Apis::LanguageV1beta1::Features]
635
+ attr_accessor :features
675
636
 
676
637
  def initialize(**args)
677
638
  update!(**args)
@@ -679,77 +640,116 @@ module Google
679
640
 
680
641
  # Update properties of this object
681
642
  def update!(**args)
682
- @voice = args[:voice] if args.key?(:voice)
683
- @aspect = args[:aspect] if args.key?(:aspect)
684
- @mood = args[:mood] if args.key?(:mood)
685
- @tag = args[:tag] if args.key?(:tag)
686
- @gender = args[:gender] if args.key?(:gender)
687
- @person = args[:person] if args.key?(:person)
688
- @proper = args[:proper] if args.key?(:proper)
689
- @case = args[:case] if args.key?(:case)
690
- @tense = args[:tense] if args.key?(:tense)
691
- @reciprocity = args[:reciprocity] if args.key?(:reciprocity)
692
- @form = args[:form] if args.key?(:form)
693
- @number = args[:number] if args.key?(:number)
643
+ @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
644
+ @document = args[:document] if args.key?(:document)
645
+ @features = args[:features] if args.key?(:features)
694
646
  end
695
647
  end
696
648
 
697
- # The syntax analysis request message.
698
- class AnalyzeSyntaxRequest
649
+ # The sentiment analysis request message.
650
+ class AnalyzeSentimentRequest
699
651
  include Google::Apis::Core::Hashable
700
652
 
653
+ # The encoding type used by the API to calculate sentence offsets for the
654
+ # sentence sentiment.
655
+ # Corresponds to the JSON property `encodingType`
656
+ # @return [String]
657
+ attr_accessor :encoding_type
658
+
701
659
  # ################################################################ #
702
660
  # Represents the input to API methods.
703
661
  # Corresponds to the JSON property `document`
704
662
  # @return [Google::Apis::LanguageV1beta1::Document]
705
663
  attr_accessor :document
706
664
 
707
- # The encoding type used by the API to calculate offsets.
708
- # Corresponds to the JSON property `encodingType`
709
- # @return [String]
710
- attr_accessor :encoding_type
711
-
712
665
  def initialize(**args)
713
666
  update!(**args)
714
667
  end
715
668
 
716
669
  # Update properties of this object
717
670
  def update!(**args)
718
- @document = args[:document] if args.key?(:document)
719
671
  @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
672
+ @document = args[:document] if args.key?(:document)
720
673
  end
721
674
  end
722
675
 
723
- # The sentiment analysis response message.
724
- class AnalyzeSentimentResponse
676
+ # The text annotations response message.
677
+ class AnnotateTextResponse
725
678
  include Google::Apis::Core::Hashable
726
679
 
727
- # Represents the feeling associated with the entire text or entities in
728
- # the text.
729
- # Corresponds to the JSON property `documentSentiment`
730
- # @return [Google::Apis::LanguageV1beta1::Sentiment]
731
- attr_accessor :document_sentiment
732
-
733
680
  # The language of the text, which will be the same as the language specified
734
681
  # in the request or, if not specified, the automatically-detected language.
682
+ # See Document.language field for more details.
735
683
  # Corresponds to the JSON property `language`
736
684
  # @return [String]
737
685
  attr_accessor :language
738
686
 
739
- # The sentiment for all the sentences in the document.
687
+ # Sentences in the input document. Populated if the user enables
688
+ # AnnotateTextRequest.Features.extract_syntax.
740
689
  # Corresponds to the JSON property `sentences`
741
690
  # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
742
691
  attr_accessor :sentences
743
692
 
693
+ # Tokens, along with their syntactic information, in the input document.
694
+ # Populated if the user enables
695
+ # AnnotateTextRequest.Features.extract_syntax.
696
+ # Corresponds to the JSON property `tokens`
697
+ # @return [Array<Google::Apis::LanguageV1beta1::Token>]
698
+ attr_accessor :tokens
699
+
700
+ # Entities, along with their semantic information, in the input document.
701
+ # Populated if the user enables
702
+ # AnnotateTextRequest.Features.extract_entities.
703
+ # Corresponds to the JSON property `entities`
704
+ # @return [Array<Google::Apis::LanguageV1beta1::Entity>]
705
+ attr_accessor :entities
706
+
707
+ # Represents the feeling associated with the entire text or entities in
708
+ # the text.
709
+ # Corresponds to the JSON property `documentSentiment`
710
+ # @return [Google::Apis::LanguageV1beta1::Sentiment]
711
+ attr_accessor :document_sentiment
712
+
744
713
  def initialize(**args)
745
714
  update!(**args)
746
715
  end
747
716
 
748
717
  # Update properties of this object
749
718
  def update!(**args)
750
- @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
751
719
  @language = args[:language] if args.key?(:language)
752
720
  @sentences = args[:sentences] if args.key?(:sentences)
721
+ @tokens = args[:tokens] if args.key?(:tokens)
722
+ @entities = args[:entities] if args.key?(:entities)
723
+ @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
724
+ end
725
+ end
726
+
727
+ # Represents dependency parse tree information for a token.
728
+ class DependencyEdge
729
+ include Google::Apis::Core::Hashable
730
+
731
+ # Represents the head of this token in the dependency tree.
732
+ # This is the index of the token which has an arc going to this token.
733
+ # The index is the position of the token in the array of tokens returned
734
+ # by the API method. If this token is a root token, then the
735
+ # `head_token_index` is its own index.
736
+ # Corresponds to the JSON property `headTokenIndex`
737
+ # @return [Fixnum]
738
+ attr_accessor :head_token_index
739
+
740
+ # The parse label for the token.
741
+ # Corresponds to the JSON property `label`
742
+ # @return [String]
743
+ attr_accessor :label
744
+
745
+ def initialize(**args)
746
+ update!(**args)
747
+ end
748
+
749
+ # Update properties of this object
750
+ def update!(**args)
751
+ @head_token_index = args[:head_token_index] if args.key?(:head_token_index)
752
+ @label = args[:label] if args.key?(:label)
753
753
  end
754
754
  end
755
755
  end