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