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