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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/api_names.yaml +395 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +254 -254
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +65 -65
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +220 -220
- data/generated/google/apis/admin_directory_v1.rb +1 -1
- data/generated/google/apis/admin_directory_v1/classes.rb +106 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +37 -0
- data/generated/google/apis/admin_reports_v1.rb +3 -3
- data/generated/google/apis/admin_reports_v1/service.rb +6 -6
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/analytics_v3.rb +1 -1
- data/generated/google/apis/analytics_v3/service.rb +39 -0
- data/generated/google/apis/analyticsreporting_v4/classes.rb +920 -920
- data/generated/google/apis/analyticsreporting_v4/representations.rb +197 -197
- data/generated/google/apis/analyticsreporting_v4/service.rb +4 -4
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +8 -13
- data/generated/google/apis/androidenterprise_v1/service.rb +3 -3
- data/generated/google/apis/appengine_v1beta5.rb +1 -1
- data/generated/google/apis/appengine_v1beta5/classes.rb +115 -5
- data/generated/google/apis/appengine_v1beta5/representations.rb +37 -0
- data/generated/google/apis/appengine_v1beta5/service.rb +12 -9
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +32 -37
- data/generated/google/apis/bigquery_v2/service.rb +10 -2
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/calendar_v3/classes.rb +205 -0
- data/generated/google/apis/calendar_v3/representations.rb +97 -0
- data/generated/google/apis/classroom_v1.rb +22 -25
- data/generated/google/apis/classroom_v1/classes.rb +998 -907
- data/generated/google/apis/classroom_v1/representations.rb +240 -240
- data/generated/google/apis/classroom_v1/service.rb +1269 -1061
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +164 -163
- data/generated/google/apis/cloudbuild_v1/representations.rb +31 -31
- data/generated/google/apis/cloudbuild_v1/service.rb +114 -114
- data/generated/google/apis/clouddebugger_v2.rb +1 -1
- data/generated/google/apis/clouddebugger_v2/classes.rb +687 -687
- data/generated/google/apis/clouddebugger_v2/representations.rb +147 -147
- data/generated/google/apis/clouddebugger_v2/service.rb +132 -132
- data/generated/google/apis/cloudkms_v1.rb +1 -1
- data/generated/google/apis/cloudkms_v1/classes.rb +231 -248
- data/generated/google/apis/cloudkms_v1/representations.rb +74 -74
- data/generated/google/apis/cloudkms_v1/service.rb +228 -228
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +738 -128
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +245 -23
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +1293 -249
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +982 -372
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +293 -71
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +626 -277
- data/generated/google/apis/cloudtrace_v1.rb +1 -1
- data/generated/google/apis/cloudtrace_v1/classes.rb +19 -19
- data/generated/google/apis/cloudtrace_v1/representations.rb +2 -2
- data/generated/google/apis/cloudtrace_v1/service.rb +30 -30
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +116 -0
- data/generated/google/apis/compute_beta/representations.rb +48 -0
- data/generated/google/apis/compute_beta/service.rb +46 -1
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/dataflow_v1b3.rb +1 -1
- data/generated/google/apis/dataflow_v1b3/classes.rb +3276 -3320
- data/generated/google/apis/dataflow_v1b3/representations.rb +779 -781
- data/generated/google/apis/dataflow_v1b3/service.rb +225 -225
- data/generated/google/apis/dataproc_v1.rb +1 -1
- data/generated/google/apis/dataproc_v1/classes.rb +1221 -1207
- data/generated/google/apis/dataproc_v1/representations.rb +255 -253
- data/generated/google/apis/dataproc_v1/service.rb +100 -100
- data/generated/google/apis/deploymentmanager_v2.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2/classes.rb +5 -5
- data/generated/google/apis/dns_v1.rb +1 -1
- data/generated/google/apis/dns_v2beta1.rb +1 -1
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +3 -1
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +3 -1
- data/generated/google/apis/fusiontables_v2.rb +1 -1
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/genomics_v1.rb +7 -7
- data/generated/google/apis/genomics_v1/classes.rb +959 -959
- data/generated/google/apis/genomics_v1/representations.rb +238 -238
- data/generated/google/apis/genomics_v1/service.rb +996 -996
- data/generated/google/apis/iam_v1.rb +1 -1
- data/generated/google/apis/iam_v1/classes.rb +440 -440
- data/generated/google/apis/iam_v1/representations.rb +94 -94
- data/generated/google/apis/iam_v1/service.rb +170 -173
- data/generated/google/apis/identitytoolkit_v3.rb +1 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +55 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +8 -0
- data/generated/google/apis/kgsearch_v1/service.rb +4 -4
- data/generated/google/apis/language_v1beta1.rb +1 -1
- data/generated/google/apis/language_v1beta1/classes.rb +427 -427
- data/generated/google/apis/language_v1beta1/representations.rb +113 -113
- data/generated/google/apis/language_v1beta1/service.rb +25 -24
- data/generated/google/apis/licensing_v1.rb +2 -2
- data/generated/google/apis/licensing_v1/classes.rb +14 -2
- data/generated/google/apis/licensing_v1/representations.rb +2 -0
- data/generated/google/apis/licensing_v1/service.rb +1 -1
- data/generated/google/apis/logging_v2beta1.rb +1 -1
- data/generated/google/apis/logging_v2beta1/classes.rb +864 -864
- data/generated/google/apis/logging_v2beta1/representations.rb +168 -168
- data/generated/google/apis/logging_v2beta1/service.rb +261 -261
- data/generated/google/apis/manufacturers_v1.rb +1 -1
- data/generated/google/apis/manufacturers_v1/classes.rb +452 -105
- data/generated/google/apis/manufacturers_v1/representations.rb +138 -18
- data/generated/google/apis/manufacturers_v1/service.rb +11 -11
- data/generated/google/apis/mirror_v1.rb +1 -1
- data/generated/google/apis/monitoring_v3.rb +7 -7
- data/generated/google/apis/monitoring_v3/classes.rb +668 -670
- data/generated/google/apis/monitoring_v3/representations.rb +140 -140
- data/generated/google/apis/monitoring_v3/service.rb +208 -208
- data/generated/google/apis/partners_v2.rb +1 -1
- data/generated/google/apis/partners_v2/classes.rb +505 -505
- data/generated/google/apis/partners_v2/representations.rb +118 -118
- data/generated/google/apis/partners_v2/service.rb +275 -275
- data/generated/google/apis/people_v1.rb +1 -1
- data/generated/google/apis/people_v1/classes.rb +1037 -1031
- data/generated/google/apis/people_v1/representations.rb +247 -246
- data/generated/google/apis/people_v1/service.rb +20 -20
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +392 -392
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +93 -93
- data/generated/google/apis/proximitybeacon_v1beta1/service.rb +381 -381
- data/generated/google/apis/pubsub_v1.rb +4 -4
- data/generated/google/apis/pubsub_v1/classes.rb +131 -132
- data/generated/google/apis/pubsub_v1/representations.rb +35 -35
- data/generated/google/apis/pubsub_v1/service.rb +399 -408
- data/generated/google/apis/reseller_v1.rb +1 -1
- data/generated/google/apis/reseller_v1/classes.rb +9 -0
- data/generated/google/apis/reseller_v1/representations.rb +1 -0
- data/generated/google/apis/script_v1.rb +9 -9
- data/generated/google/apis/script_v1/classes.rb +110 -110
- data/generated/google/apis/script_v1/representations.rb +26 -26
- data/generated/google/apis/sheets_v4.rb +4 -4
- data/generated/google/apis/sheets_v4/classes.rb +4329 -4329
- data/generated/google/apis/sheets_v4/representations.rb +856 -856
- data/generated/google/apis/sheets_v4/service.rb +106 -106
- data/generated/google/apis/slides_v1.rb +4 -4
- data/generated/google/apis/slides_v1/classes.rb +2923 -2841
- data/generated/google/apis/slides_v1/representations.rb +722 -691
- data/generated/google/apis/slides_v1/service.rb +58 -15
- data/generated/google/apis/speech_v1beta1.rb +1 -1
- data/generated/google/apis/speech_v1beta1/classes.rb +191 -191
- data/generated/google/apis/speech_v1beta1/representations.rb +57 -57
- data/generated/google/apis/speech_v1beta1/service.rb +70 -70
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +151 -0
- data/generated/google/apis/storage_v1/representations.rb +45 -0
- data/generated/google/apis/storage_v1/service.rb +248 -0
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +1227 -1221
- data/generated/google/apis/vision_v1/representations.rb +217 -215
- data/generated/google/apis/webmasters_v3.rb +1 -1
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1/classes.rb +78 -0
- data/generated/google/apis/youtube_partner_v1/representations.rb +34 -0
- data/generated/google/apis/youtube_partner_v1/service.rb +40 -0
- data/generated/google/apis/youtubereporting_v1.rb +4 -4
- data/generated/google/apis/youtubereporting_v1/classes.rb +65 -65
- data/generated/google/apis/youtubereporting_v1/representations.rb +18 -18
- data/generated/google/apis/youtubereporting_v1/service.rb +111 -111
- data/lib/google/apis/version.rb +1 -1
- 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 = '
|
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,
|
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 = '
|
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
|
-
#
|
26
|
-
class
|
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
|
203
|
-
# the
|
204
|
-
#
|
205
|
-
|
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
|
-
#
|
240
|
-
|
241
|
-
|
242
|
-
|
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
|
-
|
250
|
-
|
251
|
-
|
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
|
-
#
|
254
|
-
# Corresponds to the JSON property `
|
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 :
|
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
|
-
@
|
274
|
-
@
|
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
|
-
|
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
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
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
|
-
@
|
408
|
-
@
|
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
|
449
|
-
|
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
|
-
#
|
459
|
-
#
|
460
|
-
#
|
461
|
-
|
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
|
-
@
|
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
|
524
|
-
|
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
|
-
#
|
528
|
-
#
|
529
|
-
#
|
530
|
-
|
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
|
-
#
|
533
|
-
#
|
534
|
-
# Corresponds to the JSON property `
|
535
|
-
# @return [
|
536
|
-
attr_accessor :
|
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
|
-
@
|
545
|
-
@
|
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
|
576
|
-
#
|
577
|
-
|
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
|
-
#
|
581
|
-
#
|
582
|
-
#
|
583
|
-
#
|
584
|
-
|
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
|
-
#
|
588
|
-
#
|
589
|
-
#
|
590
|
-
|
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
|
-
#
|
594
|
-
#
|
595
|
-
#
|
596
|
-
|
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 :
|
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
|
-
@
|
607
|
-
@
|
608
|
-
@
|
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
|
-
#
|
613
|
-
class
|
582
|
+
# The syntax analysis response message.
|
583
|
+
class AnalyzeSyntaxResponse
|
614
584
|
include Google::Apis::Core::Hashable
|
615
585
|
|
616
|
-
#
|
617
|
-
# Corresponds to the JSON property `
|
618
|
-
# @return [
|
619
|
-
attr_accessor :
|
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
|
-
#
|
637
|
-
# Corresponds to the JSON property `
|
638
|
-
# @return [
|
639
|
-
attr_accessor :
|
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
|
642
|
-
#
|
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 :
|
601
|
+
attr_accessor :language
|
645
602
|
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
attr_accessor :proper
|
603
|
+
def initialize(**args)
|
604
|
+
update!(**args)
|
605
|
+
end
|
650
606
|
|
651
|
-
#
|
652
|
-
|
653
|
-
|
654
|
-
|
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
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
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
|
662
|
-
# Corresponds to the JSON property `
|
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 :
|
623
|
+
attr_accessor :encoding_type
|
665
624
|
|
666
|
-
#
|
667
|
-
#
|
668
|
-
#
|
669
|
-
|
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
|
-
#
|
672
|
-
#
|
673
|
-
#
|
674
|
-
|
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
|
-
@
|
683
|
-
@
|
684
|
-
@
|
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
|
698
|
-
class
|
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
|
724
|
-
class
|
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
|
-
#
|
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
|