google-apis-language_v1beta1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
1
+ # Copyright 2020 Google LLC
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
+ module Google
16
+ module Apis
17
+ module LanguageV1beta1
18
+ # Version of the google-apis-language_v1beta1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.1.1"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20200801"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,339 @@
1
+ # Copyright 2020 Google LLC
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 AnalyzeEntitiesRequest
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class AnalyzeEntitiesResponse
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class AnalyzeSentimentRequest
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class AnalyzeSentimentResponse
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class AnalyzeSyntaxRequest
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class AnalyzeSyntaxResponse
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class AnnotateTextRequest
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class AnnotateTextResponse
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class DependencyEdge
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class Document
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class Entity
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class EntityMention
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class Features
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class PartOfSpeech
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class Sentence
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class Sentiment
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class Status
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class TextSpan
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class Token
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class AnalyzeEntitiesRequest
140
+ # @private
141
+ class Representation < Google::Apis::Core::JsonRepresentation
142
+ property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
143
+
144
+ property :encoding_type, as: 'encodingType'
145
+ end
146
+ end
147
+
148
+ class AnalyzeEntitiesResponse
149
+ # @private
150
+ class Representation < Google::Apis::Core::JsonRepresentation
151
+ collection :entities, as: 'entities', class: Google::Apis::LanguageV1beta1::Entity, decorator: Google::Apis::LanguageV1beta1::Entity::Representation
152
+
153
+ property :language, as: 'language'
154
+ end
155
+ end
156
+
157
+ class AnalyzeSentimentRequest
158
+ # @private
159
+ class Representation < Google::Apis::Core::JsonRepresentation
160
+ property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
161
+
162
+ property :encoding_type, as: 'encodingType'
163
+ end
164
+ end
165
+
166
+ class AnalyzeSentimentResponse
167
+ # @private
168
+ class Representation < Google::Apis::Core::JsonRepresentation
169
+ property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation
170
+
171
+ property :language, as: 'language'
172
+ collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation
173
+
174
+ end
175
+ end
176
+
177
+ class AnalyzeSyntaxRequest
178
+ # @private
179
+ class Representation < Google::Apis::Core::JsonRepresentation
180
+ property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
181
+
182
+ property :encoding_type, as: 'encodingType'
183
+ end
184
+ end
185
+
186
+ class AnalyzeSyntaxResponse
187
+ # @private
188
+ class Representation < Google::Apis::Core::JsonRepresentation
189
+ property :language, as: 'language'
190
+ collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation
191
+
192
+ collection :tokens, as: 'tokens', class: Google::Apis::LanguageV1beta1::Token, decorator: Google::Apis::LanguageV1beta1::Token::Representation
193
+
194
+ end
195
+ end
196
+
197
+ class AnnotateTextRequest
198
+ # @private
199
+ class Representation < Google::Apis::Core::JsonRepresentation
200
+ property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
201
+
202
+ property :encoding_type, as: 'encodingType'
203
+ property :features, as: 'features', class: Google::Apis::LanguageV1beta1::Features, decorator: Google::Apis::LanguageV1beta1::Features::Representation
204
+
205
+ end
206
+ end
207
+
208
+ class AnnotateTextResponse
209
+ # @private
210
+ class Representation < Google::Apis::Core::JsonRepresentation
211
+ property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation
212
+
213
+ collection :entities, as: 'entities', class: Google::Apis::LanguageV1beta1::Entity, decorator: Google::Apis::LanguageV1beta1::Entity::Representation
214
+
215
+ property :language, as: 'language'
216
+ collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation
217
+
218
+ collection :tokens, as: 'tokens', class: Google::Apis::LanguageV1beta1::Token, decorator: Google::Apis::LanguageV1beta1::Token::Representation
219
+
220
+ end
221
+ end
222
+
223
+ class DependencyEdge
224
+ # @private
225
+ class Representation < Google::Apis::Core::JsonRepresentation
226
+ property :head_token_index, as: 'headTokenIndex'
227
+ property :label, as: 'label'
228
+ end
229
+ end
230
+
231
+ class Document
232
+ # @private
233
+ class Representation < Google::Apis::Core::JsonRepresentation
234
+ property :content, as: 'content'
235
+ property :gcs_content_uri, as: 'gcsContentUri'
236
+ property :language, as: 'language'
237
+ property :type, as: 'type'
238
+ end
239
+ end
240
+
241
+ class Entity
242
+ # @private
243
+ class Representation < Google::Apis::Core::JsonRepresentation
244
+ collection :mentions, as: 'mentions', class: Google::Apis::LanguageV1beta1::EntityMention, decorator: Google::Apis::LanguageV1beta1::EntityMention::Representation
245
+
246
+ hash :metadata, as: 'metadata'
247
+ property :name, as: 'name'
248
+ property :salience, as: 'salience'
249
+ property :type, as: 'type'
250
+ end
251
+ end
252
+
253
+ class EntityMention
254
+ # @private
255
+ class Representation < Google::Apis::Core::JsonRepresentation
256
+ property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
257
+
258
+ property :type, as: 'type'
259
+ end
260
+ end
261
+
262
+ class Features
263
+ # @private
264
+ class Representation < Google::Apis::Core::JsonRepresentation
265
+ property :extract_document_sentiment, as: 'extractDocumentSentiment'
266
+ property :extract_entities, as: 'extractEntities'
267
+ property :extract_syntax, as: 'extractSyntax'
268
+ end
269
+ end
270
+
271
+ class PartOfSpeech
272
+ # @private
273
+ class Representation < Google::Apis::Core::JsonRepresentation
274
+ property :aspect, as: 'aspect'
275
+ property :case, as: 'case'
276
+ property :form, as: 'form'
277
+ property :gender, as: 'gender'
278
+ property :mood, as: 'mood'
279
+ property :number, as: 'number'
280
+ property :person, as: 'person'
281
+ property :proper, as: 'proper'
282
+ property :reciprocity, as: 'reciprocity'
283
+ property :tag, as: 'tag'
284
+ property :tense, as: 'tense'
285
+ property :voice, as: 'voice'
286
+ end
287
+ end
288
+
289
+ class Sentence
290
+ # @private
291
+ class Representation < Google::Apis::Core::JsonRepresentation
292
+ property :sentiment, as: 'sentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation
293
+
294
+ property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
295
+
296
+ end
297
+ end
298
+
299
+ class Sentiment
300
+ # @private
301
+ class Representation < Google::Apis::Core::JsonRepresentation
302
+ property :magnitude, as: 'magnitude'
303
+ property :polarity, as: 'polarity'
304
+ property :score, as: 'score'
305
+ end
306
+ end
307
+
308
+ class Status
309
+ # @private
310
+ class Representation < Google::Apis::Core::JsonRepresentation
311
+ property :code, as: 'code'
312
+ collection :details, as: 'details'
313
+ property :message, as: 'message'
314
+ end
315
+ end
316
+
317
+ class TextSpan
318
+ # @private
319
+ class Representation < Google::Apis::Core::JsonRepresentation
320
+ property :begin_offset, as: 'beginOffset'
321
+ property :content, as: 'content'
322
+ end
323
+ end
324
+
325
+ class Token
326
+ # @private
327
+ class Representation < Google::Apis::Core::JsonRepresentation
328
+ property :dependency_edge, as: 'dependencyEdge', class: Google::Apis::LanguageV1beta1::DependencyEdge, decorator: Google::Apis::LanguageV1beta1::DependencyEdge::Representation
329
+
330
+ property :lemma, as: 'lemma'
331
+ property :part_of_speech, as: 'partOfSpeech', class: Google::Apis::LanguageV1beta1::PartOfSpeech, decorator: Google::Apis::LanguageV1beta1::PartOfSpeech::Representation
332
+
333
+ property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
334
+
335
+ end
336
+ end
337
+ end
338
+ end
339
+ end
@@ -0,0 +1,188 @@
1
+ # Copyright 2020 Google LLC
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
+ # Cloud Natural Language API
24
+ #
25
+ # Provides natural language understanding technologies, such as sentiment
26
+ # analysis, entity recognition, entity sentiment analysis, and other text
27
+ # annotations, to developers.
28
+ #
29
+ # @example
30
+ # require 'google/apis/language_v1beta1'
31
+ #
32
+ # Language = Google::Apis::LanguageV1beta1 # Alias the module
33
+ # service = Language::CloudNaturalLanguageService.new
34
+ #
35
+ # @see https://cloud.google.com/natural-language/
36
+ class CloudNaturalLanguageService < 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
+ client_name: 'google-apis-language_v1beta1',
50
+ client_version: Google::Apis::LanguageV1beta1::GEM_VERSION)
51
+ @batch_path = 'batch'
52
+ end
53
+
54
+ # Finds named entities (currently proper names and common nouns) in the text
55
+ # along with entity types, salience, mentions for each entity, and other
56
+ # properties.
57
+ # @param [Google::Apis::LanguageV1beta1::AnalyzeEntitiesRequest] analyze_entities_request_object
58
+ # @param [String] fields
59
+ # Selector specifying which fields to include in a partial response.
60
+ # @param [String] quota_user
61
+ # Available to use for quota purposes for server-side applications. Can be any
62
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
63
+ # @param [Google::Apis::RequestOptions] options
64
+ # Request-specific options
65
+ #
66
+ # @yield [result, err] Result & error if block supplied
67
+ # @yieldparam result [Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse] parsed result object
68
+ # @yieldparam err [StandardError] error object if request failed
69
+ #
70
+ # @return [Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse]
71
+ #
72
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
73
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
74
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
75
+ def analyze_document_entities(analyze_entities_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
76
+ command = make_simple_command(:post, 'v1beta1/documents:analyzeEntities', options)
77
+ command.request_representation = Google::Apis::LanguageV1beta1::AnalyzeEntitiesRequest::Representation
78
+ command.request_object = analyze_entities_request_object
79
+ command.response_representation = Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse::Representation
80
+ command.response_class = Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse
81
+ command.query['fields'] = fields unless fields.nil?
82
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
83
+ execute_or_queue_command(command, &block)
84
+ end
85
+
86
+ # Analyzes the sentiment of the provided text.
87
+ # @param [Google::Apis::LanguageV1beta1::AnalyzeSentimentRequest] analyze_sentiment_request_object
88
+ # @param [String] fields
89
+ # Selector specifying which fields to include in a partial response.
90
+ # @param [String] quota_user
91
+ # Available to use for quota purposes for server-side applications. Can be any
92
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
93
+ # @param [Google::Apis::RequestOptions] options
94
+ # Request-specific options
95
+ #
96
+ # @yield [result, err] Result & error if block supplied
97
+ # @yieldparam result [Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse] parsed result object
98
+ # @yieldparam err [StandardError] error object if request failed
99
+ #
100
+ # @return [Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse]
101
+ #
102
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
103
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
104
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
105
+ def analyze_document_sentiment(analyze_sentiment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
106
+ command = make_simple_command(:post, 'v1beta1/documents:analyzeSentiment', options)
107
+ command.request_representation = Google::Apis::LanguageV1beta1::AnalyzeSentimentRequest::Representation
108
+ command.request_object = analyze_sentiment_request_object
109
+ command.response_representation = Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse::Representation
110
+ command.response_class = Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse
111
+ command.query['fields'] = fields unless fields.nil?
112
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
113
+ execute_or_queue_command(command, &block)
114
+ end
115
+
116
+ # Analyzes the syntax of the text and provides sentence boundaries and
117
+ # tokenization along with part of speech tags, dependency trees, and other
118
+ # properties.
119
+ # @param [Google::Apis::LanguageV1beta1::AnalyzeSyntaxRequest] analyze_syntax_request_object
120
+ # @param [String] fields
121
+ # Selector specifying which fields to include in a partial response.
122
+ # @param [String] quota_user
123
+ # Available to use for quota purposes for server-side applications. Can be any
124
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
125
+ # @param [Google::Apis::RequestOptions] options
126
+ # Request-specific options
127
+ #
128
+ # @yield [result, err] Result & error if block supplied
129
+ # @yieldparam result [Google::Apis::LanguageV1beta1::AnalyzeSyntaxResponse] parsed result object
130
+ # @yieldparam err [StandardError] error object if request failed
131
+ #
132
+ # @return [Google::Apis::LanguageV1beta1::AnalyzeSyntaxResponse]
133
+ #
134
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
135
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
136
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
137
+ def analyze_document_syntax(analyze_syntax_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
138
+ command = make_simple_command(:post, 'v1beta1/documents:analyzeSyntax', options)
139
+ command.request_representation = Google::Apis::LanguageV1beta1::AnalyzeSyntaxRequest::Representation
140
+ command.request_object = analyze_syntax_request_object
141
+ command.response_representation = Google::Apis::LanguageV1beta1::AnalyzeSyntaxResponse::Representation
142
+ command.response_class = Google::Apis::LanguageV1beta1::AnalyzeSyntaxResponse
143
+ command.query['fields'] = fields unless fields.nil?
144
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
145
+ execute_or_queue_command(command, &block)
146
+ end
147
+
148
+ # A convenience method that provides all the features that analyzeSentiment,
149
+ # analyzeEntities, and analyzeSyntax provide in one call.
150
+ # @param [Google::Apis::LanguageV1beta1::AnnotateTextRequest] annotate_text_request_object
151
+ # @param [String] fields
152
+ # Selector specifying which fields to include in a partial response.
153
+ # @param [String] quota_user
154
+ # Available to use for quota purposes for server-side applications. Can be any
155
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
156
+ # @param [Google::Apis::RequestOptions] options
157
+ # Request-specific options
158
+ #
159
+ # @yield [result, err] Result & error if block supplied
160
+ # @yieldparam result [Google::Apis::LanguageV1beta1::AnnotateTextResponse] parsed result object
161
+ # @yieldparam err [StandardError] error object if request failed
162
+ #
163
+ # @return [Google::Apis::LanguageV1beta1::AnnotateTextResponse]
164
+ #
165
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
166
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
167
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
168
+ def annotate_document_text(annotate_text_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
169
+ command = make_simple_command(:post, 'v1beta1/documents:annotateText', options)
170
+ command.request_representation = Google::Apis::LanguageV1beta1::AnnotateTextRequest::Representation
171
+ command.request_object = annotate_text_request_object
172
+ command.response_representation = Google::Apis::LanguageV1beta1::AnnotateTextResponse::Representation
173
+ command.response_class = Google::Apis::LanguageV1beta1::AnnotateTextResponse
174
+ command.query['fields'] = fields unless fields.nil?
175
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
176
+ execute_or_queue_command(command, &block)
177
+ end
178
+
179
+ protected
180
+
181
+ def apply_command_defaults(command)
182
+ command.query['key'] = key unless key.nil?
183
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
184
+ end
185
+ end
186
+ end
187
+ end
188
+ end