google-api-client 0.9.12 → 0.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +9 -1
- data/api_names.yaml +2 -0
- data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +8 -0
- data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +1 -0
- data/generated/google/apis/adexchangebuyer_v1_4/service.rb +12 -4
- data/generated/google/apis/admin_directory_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/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +13 -5
- data/generated/google/apis/androidpublisher_v2.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 +186 -0
- data/generated/google/apis/bigquery_v2/representations.rb +77 -0
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/civicinfo_v2.rb +1 -1
- data/generated/google/apis/civicinfo_v2/classes.rb +10 -4
- data/generated/google/apis/civicinfo_v2/representations.rb +1 -0
- data/generated/google/apis/civicinfo_v2/service.rb +6 -1
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +7 -0
- data/generated/google/apis/cloudbuild_v1/representations.rb +1 -0
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/datastore_v1beta3.rb +1 -1
- data/generated/google/apis/datastore_v1beta3/classes.rb +26 -27
- data/generated/google/apis/deploymentmanager_v2.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2/classes.rb +4 -2
- data/generated/google/apis/dns_v1.rb +1 -1
- data/generated/google/apis/dns_v1/classes.rb +1 -1
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +4 -2
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/genomics_v1.rb +1 -1
- data/generated/google/apis/identitytoolkit_v3.rb +1 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +26 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +4 -0
- data/generated/google/apis/language_v1beta1.rb +36 -0
- data/generated/google/apis/language_v1beta1/classes.rb +596 -0
- data/generated/google/apis/language_v1beta1/representations.rb +289 -0
- data/generated/google/apis/language_v1beta1/service.rb +154 -0
- data/generated/google/apis/monitoring_v3.rb +1 -1
- data/generated/google/apis/monitoring_v3/classes.rb +2 -2
- data/generated/google/apis/oauth2_v2.rb +1 -1
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/speech_v1beta1.rb +34 -0
- data/generated/google/apis/speech_v1beta1/classes.rb +512 -0
- data/generated/google/apis/speech_v1beta1/representations.rb +218 -0
- data/generated/google/apis/speech_v1beta1/service.rb +268 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/service.rb +2 -1
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/google-api-client.gemspec +2 -1
- data/lib/google/apis/core/base_service.rb +10 -5
- data/lib/google/apis/version.rb +1 -1
- metadata +20 -12
@@ -0,0 +1,289 @@
|
|
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 LanguageV1beta1
|
24
|
+
|
25
|
+
class Document
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class TextSpan
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class Status
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class AnalyzeEntitiesRequest
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class EntityMention
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class AnalyzeSentimentRequest
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class AnalyzeSentimentResponse
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class DependencyEdge
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class AnnotateTextRequest
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class Sentence
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
85
|
+
class Features
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
89
|
+
end
|
90
|
+
|
91
|
+
class PartOfSpeech
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class AnnotateTextResponse
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class Entity
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
109
|
+
class Sentiment
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
113
|
+
end
|
114
|
+
|
115
|
+
class Token
|
116
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
117
|
+
|
118
|
+
include Google::Apis::Core::JsonObjectSupport
|
119
|
+
end
|
120
|
+
|
121
|
+
class AnalyzeEntitiesResponse
|
122
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
123
|
+
|
124
|
+
include Google::Apis::Core::JsonObjectSupport
|
125
|
+
end
|
126
|
+
|
127
|
+
class Document
|
128
|
+
# @private
|
129
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
130
|
+
property :language, as: 'language'
|
131
|
+
property :gcs_content_uri, as: 'gcsContentUri'
|
132
|
+
property :type, as: 'type'
|
133
|
+
property :content, as: 'content'
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
class TextSpan
|
138
|
+
# @private
|
139
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
140
|
+
property :begin_offset, as: 'beginOffset'
|
141
|
+
property :content, as: 'content'
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
class Status
|
146
|
+
# @private
|
147
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
148
|
+
property :code, as: 'code'
|
149
|
+
collection :details, as: 'details'
|
150
|
+
property :message, as: 'message'
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
class AnalyzeEntitiesRequest
|
155
|
+
# @private
|
156
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
157
|
+
property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
|
158
|
+
|
159
|
+
property :encoding_type, as: 'encodingType'
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
class EntityMention
|
164
|
+
# @private
|
165
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
166
|
+
property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
|
167
|
+
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
class AnalyzeSentimentRequest
|
172
|
+
# @private
|
173
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
174
|
+
property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
|
175
|
+
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
class AnalyzeSentimentResponse
|
180
|
+
# @private
|
181
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
182
|
+
property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation
|
183
|
+
|
184
|
+
property :language, as: 'language'
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
class DependencyEdge
|
189
|
+
# @private
|
190
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
191
|
+
property :head_token_index, as: 'headTokenIndex'
|
192
|
+
property :label, as: 'label'
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
class AnnotateTextRequest
|
197
|
+
# @private
|
198
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
199
|
+
property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
|
200
|
+
|
201
|
+
property :encoding_type, as: 'encodingType'
|
202
|
+
property :features, as: 'features', class: Google::Apis::LanguageV1beta1::Features, decorator: Google::Apis::LanguageV1beta1::Features::Representation
|
203
|
+
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
class Sentence
|
208
|
+
# @private
|
209
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
210
|
+
property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
|
211
|
+
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
class Features
|
216
|
+
# @private
|
217
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
218
|
+
property :extract_document_sentiment, as: 'extractDocumentSentiment'
|
219
|
+
property :extract_entities, as: 'extractEntities'
|
220
|
+
property :extract_syntax, as: 'extractSyntax'
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
class PartOfSpeech
|
225
|
+
# @private
|
226
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
227
|
+
property :tag, as: 'tag'
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
class AnnotateTextResponse
|
232
|
+
# @private
|
233
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
234
|
+
collection :entities, as: 'entities', class: Google::Apis::LanguageV1beta1::Entity, decorator: Google::Apis::LanguageV1beta1::Entity::Representation
|
235
|
+
|
236
|
+
property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation
|
237
|
+
|
238
|
+
property :language, as: 'language'
|
239
|
+
collection :tokens, as: 'tokens', class: Google::Apis::LanguageV1beta1::Token, decorator: Google::Apis::LanguageV1beta1::Token::Representation
|
240
|
+
|
241
|
+
collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation
|
242
|
+
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
class Entity
|
247
|
+
# @private
|
248
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
249
|
+
hash :metadata, as: 'metadata'
|
250
|
+
property :salience, as: 'salience'
|
251
|
+
property :type, as: 'type'
|
252
|
+
collection :mentions, as: 'mentions', class: Google::Apis::LanguageV1beta1::EntityMention, decorator: Google::Apis::LanguageV1beta1::EntityMention::Representation
|
253
|
+
|
254
|
+
property :name, as: 'name'
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
class Sentiment
|
259
|
+
# @private
|
260
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
261
|
+
property :polarity, as: 'polarity'
|
262
|
+
property :magnitude, as: 'magnitude'
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
class Token
|
267
|
+
# @private
|
268
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
269
|
+
property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
|
270
|
+
|
271
|
+
property :part_of_speech, as: 'partOfSpeech', class: Google::Apis::LanguageV1beta1::PartOfSpeech, decorator: Google::Apis::LanguageV1beta1::PartOfSpeech::Representation
|
272
|
+
|
273
|
+
property :dependency_edge, as: 'dependencyEdge', class: Google::Apis::LanguageV1beta1::DependencyEdge, decorator: Google::Apis::LanguageV1beta1::DependencyEdge::Representation
|
274
|
+
|
275
|
+
property :lemma, as: 'lemma'
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
class AnalyzeEntitiesResponse
|
280
|
+
# @private
|
281
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
282
|
+
collection :entities, as: 'entities', class: Google::Apis::LanguageV1beta1::Entity, decorator: Google::Apis::LanguageV1beta1::Entity::Representation
|
283
|
+
|
284
|
+
property :language, as: 'language'
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|
288
|
+
end
|
289
|
+
end
|
@@ -0,0 +1,154 @@
|
|
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 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module LanguageV1beta1
|
23
|
+
# Google Cloud Natural Language API
|
24
|
+
#
|
25
|
+
# Google Cloud Natural Language API provides natural language understanding
|
26
|
+
# technologies to developers. Examples include sentiment analysis, entity
|
27
|
+
# recognition, and text annotations.
|
28
|
+
#
|
29
|
+
# @example
|
30
|
+
# require 'google/apis/language_v1beta1'
|
31
|
+
#
|
32
|
+
# Language = Google::Apis::LanguageV1beta1 # Alias the module
|
33
|
+
# service = Language::CloudNaturalLanguageAPIService.new
|
34
|
+
#
|
35
|
+
# @see https://cloud.google.com/natural-language/
|
36
|
+
class CloudNaturalLanguageAPIService < Google::Apis::Core::BaseService
|
37
|
+
# @return [String]
|
38
|
+
# API key. Your API key identifies your project and provides you with API access,
|
39
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
40
|
+
attr_accessor :key
|
41
|
+
|
42
|
+
# @return [String]
|
43
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
44
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
45
|
+
attr_accessor :quota_user
|
46
|
+
|
47
|
+
def initialize
|
48
|
+
super('https://language.googleapis.com/', '')
|
49
|
+
end
|
50
|
+
|
51
|
+
# Analyzes the sentiment of the provided text.
|
52
|
+
# @param [Google::Apis::LanguageV1beta1::AnalyzeSentimentRequest] analyze_sentiment_request_object
|
53
|
+
# @param [String] quota_user
|
54
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
55
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
56
|
+
# @param [String] fields
|
57
|
+
# Selector specifying which fields to include in a partial response.
|
58
|
+
# @param [Google::Apis::RequestOptions] options
|
59
|
+
# Request-specific options
|
60
|
+
#
|
61
|
+
# @yield [result, err] Result & error if block supplied
|
62
|
+
# @yieldparam result [Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse] parsed result object
|
63
|
+
# @yieldparam err [StandardError] error object if request failed
|
64
|
+
#
|
65
|
+
# @return [Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse]
|
66
|
+
#
|
67
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
68
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
69
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
70
|
+
def analyze_document_sentiment(analyze_sentiment_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
71
|
+
command = make_simple_command(:post, 'v1beta1/documents:analyzeSentiment', options)
|
72
|
+
command.request_representation = Google::Apis::LanguageV1beta1::AnalyzeSentimentRequest::Representation
|
73
|
+
command.request_object = analyze_sentiment_request_object
|
74
|
+
command.response_representation = Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse::Representation
|
75
|
+
command.response_class = Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse
|
76
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
77
|
+
command.query['fields'] = fields unless fields.nil?
|
78
|
+
execute_or_queue_command(command, &block)
|
79
|
+
end
|
80
|
+
|
81
|
+
# Advanced API that analyzes the document and provides a full set of text
|
82
|
+
# annotations, including semantic, syntactic, and sentiment information. This
|
83
|
+
# API is intended for users who are familiar with machine learning and need
|
84
|
+
# in-depth text features to build upon.
|
85
|
+
# @param [Google::Apis::LanguageV1beta1::AnnotateTextRequest] annotate_text_request_object
|
86
|
+
# @param [String] quota_user
|
87
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
88
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
89
|
+
# @param [String] fields
|
90
|
+
# Selector specifying which fields to include in a partial response.
|
91
|
+
# @param [Google::Apis::RequestOptions] options
|
92
|
+
# Request-specific options
|
93
|
+
#
|
94
|
+
# @yield [result, err] Result & error if block supplied
|
95
|
+
# @yieldparam result [Google::Apis::LanguageV1beta1::AnnotateTextResponse] parsed result object
|
96
|
+
# @yieldparam err [StandardError] error object if request failed
|
97
|
+
#
|
98
|
+
# @return [Google::Apis::LanguageV1beta1::AnnotateTextResponse]
|
99
|
+
#
|
100
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
101
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
102
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
103
|
+
def annotate_document_text(annotate_text_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
104
|
+
command = make_simple_command(:post, 'v1beta1/documents:annotateText', options)
|
105
|
+
command.request_representation = Google::Apis::LanguageV1beta1::AnnotateTextRequest::Representation
|
106
|
+
command.request_object = annotate_text_request_object
|
107
|
+
command.response_representation = Google::Apis::LanguageV1beta1::AnnotateTextResponse::Representation
|
108
|
+
command.response_class = Google::Apis::LanguageV1beta1::AnnotateTextResponse
|
109
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
110
|
+
command.query['fields'] = fields unless fields.nil?
|
111
|
+
execute_or_queue_command(command, &block)
|
112
|
+
end
|
113
|
+
|
114
|
+
# Finds named entities (currently finds proper names) in the text,
|
115
|
+
# entity types, salience, mentions for each entity, and other properties.
|
116
|
+
# @param [Google::Apis::LanguageV1beta1::AnalyzeEntitiesRequest] analyze_entities_request_object
|
117
|
+
# @param [String] quota_user
|
118
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
119
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
120
|
+
# @param [String] fields
|
121
|
+
# Selector specifying which fields to include in a partial response.
|
122
|
+
# @param [Google::Apis::RequestOptions] options
|
123
|
+
# Request-specific options
|
124
|
+
#
|
125
|
+
# @yield [result, err] Result & error if block supplied
|
126
|
+
# @yieldparam result [Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse] parsed result object
|
127
|
+
# @yieldparam err [StandardError] error object if request failed
|
128
|
+
#
|
129
|
+
# @return [Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse]
|
130
|
+
#
|
131
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
132
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
133
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
134
|
+
def analyze_document_entities(analyze_entities_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
135
|
+
command = make_simple_command(:post, 'v1beta1/documents:analyzeEntities', options)
|
136
|
+
command.request_representation = Google::Apis::LanguageV1beta1::AnalyzeEntitiesRequest::Representation
|
137
|
+
command.request_object = analyze_entities_request_object
|
138
|
+
command.response_representation = Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse::Representation
|
139
|
+
command.response_class = Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse
|
140
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
141
|
+
command.query['fields'] = fields unless fields.nil?
|
142
|
+
execute_or_queue_command(command, &block)
|
143
|
+
end
|
144
|
+
|
145
|
+
protected
|
146
|
+
|
147
|
+
def apply_command_defaults(command)
|
148
|
+
command.query['key'] = key unless key.nil?
|
149
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# @see https://cloud.google.com/monitoring/api/
|
28
28
|
module MonitoringV3
|
29
29
|
VERSION = 'V3'
|
30
|
-
REVISION = '
|
30
|
+
REVISION = '20160829'
|
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'
|