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