google-api-client 0.30.6 → 0.30.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/generated/google/apis/bigquery_v2.rb +1 -1
  4. data/generated/google/apis/bigquery_v2/classes.rb +7 -0
  5. data/generated/google/apis/bigquery_v2/representations.rb +2 -0
  6. data/generated/google/apis/bigquery_v2/service.rb +1 -1
  7. data/generated/google/apis/cloudiot_v1.rb +1 -1
  8. data/generated/google/apis/cloudiot_v1/classes.rb +2 -2
  9. data/generated/google/apis/dialogflow_v2.rb +1 -1
  10. data/generated/google/apis/dialogflow_v2/classes.rb +91 -19
  11. data/generated/google/apis/dialogflow_v2/representations.rb +32 -13
  12. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  13. data/generated/google/apis/dialogflow_v2beta1/classes.rb +91 -19
  14. data/generated/google/apis/dialogflow_v2beta1/representations.rb +33 -14
  15. data/generated/google/apis/docs_v1.rb +1 -1
  16. data/generated/google/apis/docs_v1/classes.rb +103 -0
  17. data/generated/google/apis/docs_v1/representations.rb +37 -0
  18. data/generated/google/apis/jobs_v2.rb +1 -1
  19. data/generated/google/apis/jobs_v2/classes.rb +147 -240
  20. data/generated/google/apis/jobs_v2/service.rb +24 -44
  21. data/generated/google/apis/jobs_v3.rb +1 -1
  22. data/generated/google/apis/jobs_v3/classes.rb +113 -179
  23. data/generated/google/apis/jobs_v3/service.rb +25 -50
  24. data/generated/google/apis/jobs_v3p1beta1.rb +1 -1
  25. data/generated/google/apis/jobs_v3p1beta1/classes.rb +119 -187
  26. data/generated/google/apis/jobs_v3p1beta1/service.rb +25 -50
  27. data/generated/google/apis/people_v1.rb +1 -1
  28. data/generated/google/apis/people_v1/classes.rb +105 -0
  29. data/generated/google/apis/people_v1/representations.rb +42 -0
  30. data/generated/google/apis/people_v1/service.rb +98 -0
  31. data/generated/google/apis/slides_v1.rb +1 -1
  32. data/generated/google/apis/translate_v3beta1.rb +37 -0
  33. data/generated/google/apis/translate_v3beta1/classes.rb +826 -0
  34. data/generated/google/apis/translate_v3beta1/representations.rb +404 -0
  35. data/generated/google/apis/translate_v3beta1/service.rb +706 -0
  36. data/generated/google/apis/videointelligence_v1.rb +1 -1
  37. data/generated/google/apis/videointelligence_v1/classes.rb +30 -0
  38. data/generated/google/apis/videointelligence_v1/representations.rb +10 -0
  39. data/generated/google/apis/videointelligence_v1beta2.rb +1 -1
  40. data/generated/google/apis/videointelligence_v1beta2/classes.rb +30 -0
  41. data/generated/google/apis/videointelligence_v1beta2/representations.rb +10 -0
  42. data/generated/google/apis/videointelligence_v1p1beta1.rb +1 -1
  43. data/generated/google/apis/videointelligence_v1p1beta1/classes.rb +30 -0
  44. data/generated/google/apis/videointelligence_v1p1beta1/representations.rb +10 -0
  45. data/generated/google/apis/videointelligence_v1p2beta1.rb +1 -1
  46. data/generated/google/apis/videointelligence_v1p2beta1/classes.rb +30 -0
  47. data/generated/google/apis/videointelligence_v1p2beta1/representations.rb +10 -0
  48. data/generated/google/apis/videointelligence_v1p3beta1.rb +1 -1
  49. data/generated/google/apis/videointelligence_v1p3beta1/classes.rb +30 -0
  50. data/generated/google/apis/videointelligence_v1p3beta1/representations.rb +10 -0
  51. data/lib/google/apis/version.rb +1 -1
  52. metadata +6 -2
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/slides/
26
26
  module SlidesV1
27
27
  VERSION = 'V1'
28
- REVISION = '20190702'
28
+ REVISION = '20190711'
29
29
 
30
30
  # See, edit, create, and delete all of your Google Drive files
31
31
  AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
@@ -0,0 +1,37 @@
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/translate_v3beta1/service.rb'
16
+ require 'google/apis/translate_v3beta1/classes.rb'
17
+ require 'google/apis/translate_v3beta1/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # Cloud Translation API
22
+ #
23
+ # Integrates text translation into your website or application.
24
+ #
25
+ # @see https://cloud.google.com/translate/docs/quickstarts
26
+ module TranslateV3beta1
27
+ VERSION = 'V3beta1'
28
+ REVISION = '20190713'
29
+
30
+ # View and manage your data across Google Cloud Platform services
31
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
32
+
33
+ # Translate text from one language to another using Google Translate
34
+ AUTH_CLOUD_TRANSLATION = 'https://www.googleapis.com/auth/cloud-translation'
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,826 @@
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 TranslateV3beta1
24
+
25
+ # The batch translation request.
26
+ class BatchTranslateTextRequest
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Optional. Glossaries to be applied for translation.
30
+ # It's keyed by target language code.
31
+ # Corresponds to the JSON property `glossaries`
32
+ # @return [Hash<String,Google::Apis::TranslateV3beta1::TranslateTextGlossaryConfig>]
33
+ attr_accessor :glossaries
34
+
35
+ # Required. Input configurations.
36
+ # The total number of files matched should be <= 1000.
37
+ # The total content size should be <= 100M Unicode codepoints.
38
+ # The files must use UTF-8 encoding.
39
+ # Corresponds to the JSON property `inputConfigs`
40
+ # @return [Array<Google::Apis::TranslateV3beta1::InputConfig>]
41
+ attr_accessor :input_configs
42
+
43
+ # Optional. The models to use for translation. Map's key is target language
44
+ # code. Map's value is model name. Value can be a built-in general model,
45
+ # or an AutoML Translation model.
46
+ # The value format depends on model type:
47
+ # - AutoML Translation models:
48
+ # `projects/`project-id`/locations/`location-id`/models/`model-id``
49
+ # - General (built-in) models:
50
+ # `projects/`project-id`/locations/`location-id`/models/general/nmt`,
51
+ # `projects/`project-id`/locations/`location-id`/models/general/base`
52
+ # If the map is empty or a specific model is
53
+ # not requested for a language pair, then default google model (nmt) is used.
54
+ # Corresponds to the JSON property `models`
55
+ # @return [Hash<String,String>]
56
+ attr_accessor :models
57
+
58
+ # Output configuration for BatchTranslateText request.
59
+ # Corresponds to the JSON property `outputConfig`
60
+ # @return [Google::Apis::TranslateV3beta1::OutputConfig]
61
+ attr_accessor :output_config
62
+
63
+ # Required. Source language code.
64
+ # Corresponds to the JSON property `sourceLanguageCode`
65
+ # @return [String]
66
+ attr_accessor :source_language_code
67
+
68
+ # Required. Specify up to 10 language codes here.
69
+ # Corresponds to the JSON property `targetLanguageCodes`
70
+ # @return [Array<String>]
71
+ attr_accessor :target_language_codes
72
+
73
+ def initialize(**args)
74
+ update!(**args)
75
+ end
76
+
77
+ # Update properties of this object
78
+ def update!(**args)
79
+ @glossaries = args[:glossaries] if args.key?(:glossaries)
80
+ @input_configs = args[:input_configs] if args.key?(:input_configs)
81
+ @models = args[:models] if args.key?(:models)
82
+ @output_config = args[:output_config] if args.key?(:output_config)
83
+ @source_language_code = args[:source_language_code] if args.key?(:source_language_code)
84
+ @target_language_codes = args[:target_language_codes] if args.key?(:target_language_codes)
85
+ end
86
+ end
87
+
88
+ # The request message for Operations.CancelOperation.
89
+ class CancelOperationRequest
90
+ include Google::Apis::Core::Hashable
91
+
92
+ def initialize(**args)
93
+ update!(**args)
94
+ end
95
+
96
+ # Update properties of this object
97
+ def update!(**args)
98
+ end
99
+ end
100
+
101
+ # The request message for language detection.
102
+ class DetectLanguageRequest
103
+ include Google::Apis::Core::Hashable
104
+
105
+ # The content of the input stored as a string.
106
+ # Corresponds to the JSON property `content`
107
+ # @return [String]
108
+ attr_accessor :content
109
+
110
+ # Optional. The format of the source text, for example, "text/html",
111
+ # "text/plain". If left blank, the MIME type defaults to "text/html".
112
+ # Corresponds to the JSON property `mimeType`
113
+ # @return [String]
114
+ attr_accessor :mime_type
115
+
116
+ # Optional. The language detection model to be used.
117
+ # Format:
118
+ # `projects/`project-id`/locations/`location-id`/models/language-detection/`
119
+ # model-id``
120
+ # Only one language detection model is currently supported:
121
+ # `projects/`project-id`/locations/`location-id`/models/language-detection/
122
+ # default`.
123
+ # If not specified, the default model is used.
124
+ # Corresponds to the JSON property `model`
125
+ # @return [String]
126
+ attr_accessor :model
127
+
128
+ def initialize(**args)
129
+ update!(**args)
130
+ end
131
+
132
+ # Update properties of this object
133
+ def update!(**args)
134
+ @content = args[:content] if args.key?(:content)
135
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
136
+ @model = args[:model] if args.key?(:model)
137
+ end
138
+ end
139
+
140
+ # The response message for language detection.
141
+ class DetectLanguageResponse
142
+ include Google::Apis::Core::Hashable
143
+
144
+ # A list of detected languages sorted by detection confidence in descending
145
+ # order. The most probable language first.
146
+ # Corresponds to the JSON property `languages`
147
+ # @return [Array<Google::Apis::TranslateV3beta1::DetectedLanguage>]
148
+ attr_accessor :languages
149
+
150
+ def initialize(**args)
151
+ update!(**args)
152
+ end
153
+
154
+ # Update properties of this object
155
+ def update!(**args)
156
+ @languages = args[:languages] if args.key?(:languages)
157
+ end
158
+ end
159
+
160
+ # The response message for language detection.
161
+ class DetectedLanguage
162
+ include Google::Apis::Core::Hashable
163
+
164
+ # The confidence of the detection result for this language.
165
+ # Corresponds to the JSON property `confidence`
166
+ # @return [Float]
167
+ attr_accessor :confidence
168
+
169
+ # The BCP-47 language code of source content in the request, detected
170
+ # automatically.
171
+ # Corresponds to the JSON property `languageCode`
172
+ # @return [String]
173
+ attr_accessor :language_code
174
+
175
+ def initialize(**args)
176
+ update!(**args)
177
+ end
178
+
179
+ # Update properties of this object
180
+ def update!(**args)
181
+ @confidence = args[:confidence] if args.key?(:confidence)
182
+ @language_code = args[:language_code] if args.key?(:language_code)
183
+ end
184
+ end
185
+
186
+ # A generic empty message that you can re-use to avoid defining duplicated
187
+ # empty messages in your APIs. A typical example is to use it as the request
188
+ # or the response type of an API method. For instance:
189
+ # service Foo `
190
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
191
+ # `
192
+ # The JSON representation for `Empty` is empty JSON object ````.
193
+ class Empty
194
+ include Google::Apis::Core::Hashable
195
+
196
+ def initialize(**args)
197
+ update!(**args)
198
+ end
199
+
200
+ # Update properties of this object
201
+ def update!(**args)
202
+ end
203
+ end
204
+
205
+ # The Google Cloud Storage location for the output content.
206
+ class GcsDestination
207
+ include Google::Apis::Core::Hashable
208
+
209
+ # Required. There must be no files under 'output_uri_prefix'.
210
+ # 'output_uri_prefix' must end with "/" and start with "gs://", otherwise an
211
+ # INVALID_ARGUMENT (400) error is returned.
212
+ # Corresponds to the JSON property `outputUriPrefix`
213
+ # @return [String]
214
+ attr_accessor :output_uri_prefix
215
+
216
+ def initialize(**args)
217
+ update!(**args)
218
+ end
219
+
220
+ # Update properties of this object
221
+ def update!(**args)
222
+ @output_uri_prefix = args[:output_uri_prefix] if args.key?(:output_uri_prefix)
223
+ end
224
+ end
225
+
226
+ # The Google Cloud Storage location for the input content.
227
+ class GcsSource
228
+ include Google::Apis::Core::Hashable
229
+
230
+ # Required. Source data URI. For example, `gs://my_bucket/my_object`.
231
+ # Corresponds to the JSON property `inputUri`
232
+ # @return [String]
233
+ attr_accessor :input_uri
234
+
235
+ def initialize(**args)
236
+ update!(**args)
237
+ end
238
+
239
+ # Update properties of this object
240
+ def update!(**args)
241
+ @input_uri = args[:input_uri] if args.key?(:input_uri)
242
+ end
243
+ end
244
+
245
+ # Represents a glossary built from user provided data.
246
+ class Glossary
247
+ include Google::Apis::Core::Hashable
248
+
249
+ # Output only. When the glossary creation was finished.
250
+ # Corresponds to the JSON property `endTime`
251
+ # @return [String]
252
+ attr_accessor :end_time
253
+
254
+ # Output only. The number of entries defined in the glossary.
255
+ # Corresponds to the JSON property `entryCount`
256
+ # @return [Fixnum]
257
+ attr_accessor :entry_count
258
+
259
+ # Input configuration for glossaries.
260
+ # Corresponds to the JSON property `inputConfig`
261
+ # @return [Google::Apis::TranslateV3beta1::GlossaryInputConfig]
262
+ attr_accessor :input_config
263
+
264
+ # Used with equivalent term set glossaries.
265
+ # Corresponds to the JSON property `languageCodesSet`
266
+ # @return [Google::Apis::TranslateV3beta1::LanguageCodesSet]
267
+ attr_accessor :language_codes_set
268
+
269
+ # Used with unidirectional glossaries.
270
+ # Corresponds to the JSON property `languagePair`
271
+ # @return [Google::Apis::TranslateV3beta1::LanguageCodePair]
272
+ attr_accessor :language_pair
273
+
274
+ # Required. The resource name of the glossary. Glossary names have the form
275
+ # `projects/`project-id`/locations/`location-id`/glossaries/`glossary-id``.
276
+ # Corresponds to the JSON property `name`
277
+ # @return [String]
278
+ attr_accessor :name
279
+
280
+ # Output only. When CreateGlossary was called.
281
+ # Corresponds to the JSON property `submitTime`
282
+ # @return [String]
283
+ attr_accessor :submit_time
284
+
285
+ def initialize(**args)
286
+ update!(**args)
287
+ end
288
+
289
+ # Update properties of this object
290
+ def update!(**args)
291
+ @end_time = args[:end_time] if args.key?(:end_time)
292
+ @entry_count = args[:entry_count] if args.key?(:entry_count)
293
+ @input_config = args[:input_config] if args.key?(:input_config)
294
+ @language_codes_set = args[:language_codes_set] if args.key?(:language_codes_set)
295
+ @language_pair = args[:language_pair] if args.key?(:language_pair)
296
+ @name = args[:name] if args.key?(:name)
297
+ @submit_time = args[:submit_time] if args.key?(:submit_time)
298
+ end
299
+ end
300
+
301
+ # Input configuration for glossaries.
302
+ class GlossaryInputConfig
303
+ include Google::Apis::Core::Hashable
304
+
305
+ # The Google Cloud Storage location for the input content.
306
+ # Corresponds to the JSON property `gcsSource`
307
+ # @return [Google::Apis::TranslateV3beta1::GcsSource]
308
+ attr_accessor :gcs_source
309
+
310
+ def initialize(**args)
311
+ update!(**args)
312
+ end
313
+
314
+ # Update properties of this object
315
+ def update!(**args)
316
+ @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
317
+ end
318
+ end
319
+
320
+ # Input configuration for BatchTranslateText request.
321
+ class InputConfig
322
+ include Google::Apis::Core::Hashable
323
+
324
+ # The Google Cloud Storage location for the input content.
325
+ # Corresponds to the JSON property `gcsSource`
326
+ # @return [Google::Apis::TranslateV3beta1::GcsSource]
327
+ attr_accessor :gcs_source
328
+
329
+ # Optional. Can be "text/plain" or "text/html".
330
+ # For `.tsv`, "text/html" is used if mime_type is missing.
331
+ # For `.html`, this field must be "text/html" or empty.
332
+ # For `.txt`, this field must be "text/plain" or empty.
333
+ # Corresponds to the JSON property `mimeType`
334
+ # @return [String]
335
+ attr_accessor :mime_type
336
+
337
+ def initialize(**args)
338
+ update!(**args)
339
+ end
340
+
341
+ # Update properties of this object
342
+ def update!(**args)
343
+ @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
344
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
345
+ end
346
+ end
347
+
348
+ # Used with unidirectional glossaries.
349
+ class LanguageCodePair
350
+ include Google::Apis::Core::Hashable
351
+
352
+ # Required. The BCP-47 language code of the input text, for example,
353
+ # "en-US". Expected to be an exact match for GlossaryTerm.language_code.
354
+ # Corresponds to the JSON property `sourceLanguageCode`
355
+ # @return [String]
356
+ attr_accessor :source_language_code
357
+
358
+ # Required. The BCP-47 language code for translation output, for example,
359
+ # "zh-CN". Expected to be an exact match for GlossaryTerm.language_code.
360
+ # Corresponds to the JSON property `targetLanguageCode`
361
+ # @return [String]
362
+ attr_accessor :target_language_code
363
+
364
+ def initialize(**args)
365
+ update!(**args)
366
+ end
367
+
368
+ # Update properties of this object
369
+ def update!(**args)
370
+ @source_language_code = args[:source_language_code] if args.key?(:source_language_code)
371
+ @target_language_code = args[:target_language_code] if args.key?(:target_language_code)
372
+ end
373
+ end
374
+
375
+ # Used with equivalent term set glossaries.
376
+ class LanguageCodesSet
377
+ include Google::Apis::Core::Hashable
378
+
379
+ # The BCP-47 language code(s) for terms defined in the glossary.
380
+ # All entries are unique. The list contains at least two entries.
381
+ # Expected to be an exact match for GlossaryTerm.language_code.
382
+ # Corresponds to the JSON property `languageCodes`
383
+ # @return [Array<String>]
384
+ attr_accessor :language_codes
385
+
386
+ def initialize(**args)
387
+ update!(**args)
388
+ end
389
+
390
+ # Update properties of this object
391
+ def update!(**args)
392
+ @language_codes = args[:language_codes] if args.key?(:language_codes)
393
+ end
394
+ end
395
+
396
+ # Response message for ListGlossaries.
397
+ class ListGlossariesResponse
398
+ include Google::Apis::Core::Hashable
399
+
400
+ # The list of glossaries for a project.
401
+ # Corresponds to the JSON property `glossaries`
402
+ # @return [Array<Google::Apis::TranslateV3beta1::Glossary>]
403
+ attr_accessor :glossaries
404
+
405
+ # A token to retrieve a page of results. Pass this value in the
406
+ # [ListGlossariesRequest.page_token] field in the subsequent call to
407
+ # `ListGlossaries` method to retrieve the next page of results.
408
+ # Corresponds to the JSON property `nextPageToken`
409
+ # @return [String]
410
+ attr_accessor :next_page_token
411
+
412
+ def initialize(**args)
413
+ update!(**args)
414
+ end
415
+
416
+ # Update properties of this object
417
+ def update!(**args)
418
+ @glossaries = args[:glossaries] if args.key?(:glossaries)
419
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
420
+ end
421
+ end
422
+
423
+ # The response message for Operations.ListOperations.
424
+ class ListOperationsResponse
425
+ include Google::Apis::Core::Hashable
426
+
427
+ # The standard List next-page token.
428
+ # Corresponds to the JSON property `nextPageToken`
429
+ # @return [String]
430
+ attr_accessor :next_page_token
431
+
432
+ # A list of operations that matches the specified filter in the request.
433
+ # Corresponds to the JSON property `operations`
434
+ # @return [Array<Google::Apis::TranslateV3beta1::Operation>]
435
+ attr_accessor :operations
436
+
437
+ def initialize(**args)
438
+ update!(**args)
439
+ end
440
+
441
+ # Update properties of this object
442
+ def update!(**args)
443
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
444
+ @operations = args[:operations] if args.key?(:operations)
445
+ end
446
+ end
447
+
448
+ # This resource represents a long-running operation that is the result of a
449
+ # network API call.
450
+ class Operation
451
+ include Google::Apis::Core::Hashable
452
+
453
+ # If the value is `false`, it means the operation is still in progress.
454
+ # If `true`, the operation is completed, and either `error` or `response` is
455
+ # available.
456
+ # Corresponds to the JSON property `done`
457
+ # @return [Boolean]
458
+ attr_accessor :done
459
+ alias_method :done?, :done
460
+
461
+ # The `Status` type defines a logical error model that is suitable for
462
+ # different programming environments, including REST APIs and RPC APIs. It is
463
+ # used by [gRPC](https://github.com/grpc). Each `Status` message contains
464
+ # three pieces of data: error code, error message, and error details.
465
+ # You can find out more about this error model and how to work with it in the
466
+ # [API Design Guide](https://cloud.google.com/apis/design/errors).
467
+ # Corresponds to the JSON property `error`
468
+ # @return [Google::Apis::TranslateV3beta1::Status]
469
+ attr_accessor :error
470
+
471
+ # Service-specific metadata associated with the operation. It typically
472
+ # contains progress information and common metadata such as create time.
473
+ # Some services might not provide such metadata. Any method that returns a
474
+ # long-running operation should document the metadata type, if any.
475
+ # Corresponds to the JSON property `metadata`
476
+ # @return [Hash<String,Object>]
477
+ attr_accessor :metadata
478
+
479
+ # The server-assigned name, which is only unique within the same service that
480
+ # originally returns it. If you use the default HTTP mapping, the
481
+ # `name` should be a resource name ending with `operations/`unique_id``.
482
+ # Corresponds to the JSON property `name`
483
+ # @return [String]
484
+ attr_accessor :name
485
+
486
+ # The normal response of the operation in case of success. If the original
487
+ # method returns no data on success, such as `Delete`, the response is
488
+ # `google.protobuf.Empty`. If the original method is standard
489
+ # `Get`/`Create`/`Update`, the response should be the resource. For other
490
+ # methods, the response should have the type `XxxResponse`, where `Xxx`
491
+ # is the original method name. For example, if the original method name
492
+ # is `TakeSnapshot()`, the inferred response type is
493
+ # `TakeSnapshotResponse`.
494
+ # Corresponds to the JSON property `response`
495
+ # @return [Hash<String,Object>]
496
+ attr_accessor :response
497
+
498
+ def initialize(**args)
499
+ update!(**args)
500
+ end
501
+
502
+ # Update properties of this object
503
+ def update!(**args)
504
+ @done = args[:done] if args.key?(:done)
505
+ @error = args[:error] if args.key?(:error)
506
+ @metadata = args[:metadata] if args.key?(:metadata)
507
+ @name = args[:name] if args.key?(:name)
508
+ @response = args[:response] if args.key?(:response)
509
+ end
510
+ end
511
+
512
+ # Output configuration for BatchTranslateText request.
513
+ class OutputConfig
514
+ include Google::Apis::Core::Hashable
515
+
516
+ # The Google Cloud Storage location for the output content.
517
+ # Corresponds to the JSON property `gcsDestination`
518
+ # @return [Google::Apis::TranslateV3beta1::GcsDestination]
519
+ attr_accessor :gcs_destination
520
+
521
+ def initialize(**args)
522
+ update!(**args)
523
+ end
524
+
525
+ # Update properties of this object
526
+ def update!(**args)
527
+ @gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
528
+ end
529
+ end
530
+
531
+ # The `Status` type defines a logical error model that is suitable for
532
+ # different programming environments, including REST APIs and RPC APIs. It is
533
+ # used by [gRPC](https://github.com/grpc). Each `Status` message contains
534
+ # three pieces of data: error code, error message, and error details.
535
+ # You can find out more about this error model and how to work with it in the
536
+ # [API Design Guide](https://cloud.google.com/apis/design/errors).
537
+ class Status
538
+ include Google::Apis::Core::Hashable
539
+
540
+ # The status code, which should be an enum value of google.rpc.Code.
541
+ # Corresponds to the JSON property `code`
542
+ # @return [Fixnum]
543
+ attr_accessor :code
544
+
545
+ # A list of messages that carry the error details. There is a common set of
546
+ # message types for APIs to use.
547
+ # Corresponds to the JSON property `details`
548
+ # @return [Array<Hash<String,Object>>]
549
+ attr_accessor :details
550
+
551
+ # A developer-facing error message, which should be in English. Any
552
+ # user-facing error message should be localized and sent in the
553
+ # google.rpc.Status.details field, or localized by the client.
554
+ # Corresponds to the JSON property `message`
555
+ # @return [String]
556
+ attr_accessor :message
557
+
558
+ def initialize(**args)
559
+ update!(**args)
560
+ end
561
+
562
+ # Update properties of this object
563
+ def update!(**args)
564
+ @code = args[:code] if args.key?(:code)
565
+ @details = args[:details] if args.key?(:details)
566
+ @message = args[:message] if args.key?(:message)
567
+ end
568
+ end
569
+
570
+ # A single supported language response corresponds to information related
571
+ # to one supported language.
572
+ class SupportedLanguage
573
+ include Google::Apis::Core::Hashable
574
+
575
+ # Human readable name of the language localized in the display language
576
+ # specified in the request.
577
+ # Corresponds to the JSON property `displayName`
578
+ # @return [String]
579
+ attr_accessor :display_name
580
+
581
+ # Supported language code, generally consisting of its ISO 639-1
582
+ # identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes
583
+ # including language and region identifiers are returned (for example,
584
+ # 'zh-TW' and 'zh-CN')
585
+ # Corresponds to the JSON property `languageCode`
586
+ # @return [String]
587
+ attr_accessor :language_code
588
+
589
+ # Can be used as source language.
590
+ # Corresponds to the JSON property `supportSource`
591
+ # @return [Boolean]
592
+ attr_accessor :support_source
593
+ alias_method :support_source?, :support_source
594
+
595
+ # Can be used as target language.
596
+ # Corresponds to the JSON property `supportTarget`
597
+ # @return [Boolean]
598
+ attr_accessor :support_target
599
+ alias_method :support_target?, :support_target
600
+
601
+ def initialize(**args)
602
+ update!(**args)
603
+ end
604
+
605
+ # Update properties of this object
606
+ def update!(**args)
607
+ @display_name = args[:display_name] if args.key?(:display_name)
608
+ @language_code = args[:language_code] if args.key?(:language_code)
609
+ @support_source = args[:support_source] if args.key?(:support_source)
610
+ @support_target = args[:support_target] if args.key?(:support_target)
611
+ end
612
+ end
613
+
614
+ # The response message for discovering supported languages.
615
+ class SupportedLanguages
616
+ include Google::Apis::Core::Hashable
617
+
618
+ # A list of supported language responses. This list contains an entry
619
+ # for each language the Translation API supports.
620
+ # Corresponds to the JSON property `languages`
621
+ # @return [Array<Google::Apis::TranslateV3beta1::SupportedLanguage>]
622
+ attr_accessor :languages
623
+
624
+ def initialize(**args)
625
+ update!(**args)
626
+ end
627
+
628
+ # Update properties of this object
629
+ def update!(**args)
630
+ @languages = args[:languages] if args.key?(:languages)
631
+ end
632
+ end
633
+
634
+ # Configures which glossary should be used for a specific target language,
635
+ # and defines options for applying that glossary.
636
+ class TranslateTextGlossaryConfig
637
+ include Google::Apis::Core::Hashable
638
+
639
+ # Required. Specifies the glossary used for this translation. Use
640
+ # this format: projects/*/locations/*/glossaries/*
641
+ # Corresponds to the JSON property `glossary`
642
+ # @return [String]
643
+ attr_accessor :glossary
644
+
645
+ # Optional. Indicates match is case-insensitive.
646
+ # Default value is false if missing.
647
+ # Corresponds to the JSON property `ignoreCase`
648
+ # @return [Boolean]
649
+ attr_accessor :ignore_case
650
+ alias_method :ignore_case?, :ignore_case
651
+
652
+ def initialize(**args)
653
+ update!(**args)
654
+ end
655
+
656
+ # Update properties of this object
657
+ def update!(**args)
658
+ @glossary = args[:glossary] if args.key?(:glossary)
659
+ @ignore_case = args[:ignore_case] if args.key?(:ignore_case)
660
+ end
661
+ end
662
+
663
+ # The request message for synchronous translation.
664
+ class TranslateTextRequest
665
+ include Google::Apis::Core::Hashable
666
+
667
+ # Required. The content of the input in string format.
668
+ # We recommend the total content be less than 30k codepoints.
669
+ # Use BatchTranslateText for larger text.
670
+ # Corresponds to the JSON property `contents`
671
+ # @return [Array<String>]
672
+ attr_accessor :contents
673
+
674
+ # Configures which glossary should be used for a specific target language,
675
+ # and defines options for applying that glossary.
676
+ # Corresponds to the JSON property `glossaryConfig`
677
+ # @return [Google::Apis::TranslateV3beta1::TranslateTextGlossaryConfig]
678
+ attr_accessor :glossary_config
679
+
680
+ # Optional. The format of the source text, for example, "text/html",
681
+ # "text/plain". If left blank, the MIME type defaults to "text/html".
682
+ # Corresponds to the JSON property `mimeType`
683
+ # @return [String]
684
+ attr_accessor :mime_type
685
+
686
+ # Optional. The `model` type requested for this translation.
687
+ # The format depends on model type:
688
+ # - AutoML Translation models:
689
+ # `projects/`project-id`/locations/`location-id`/models/`model-id``
690
+ # - General (built-in) models:
691
+ # `projects/`project-id`/locations/`location-id`/models/general/nmt`,
692
+ # `projects/`project-id`/locations/`location-id`/models/general/base`
693
+ # For global (non-regionalized) requests, use `location-id` `global`.
694
+ # For example,
695
+ # `projects/`project-id`/locations/global/models/general/nmt`.
696
+ # If missing, the system decides which google base model to use.
697
+ # Corresponds to the JSON property `model`
698
+ # @return [String]
699
+ attr_accessor :model
700
+
701
+ # Optional. The BCP-47 language code of the input text if
702
+ # known, for example, "en-US" or "sr-Latn". Supported language codes are
703
+ # listed in Language Support. If the source language isn't specified, the API
704
+ # attempts to identify the source language automatically and returns the
705
+ # source language within the response.
706
+ # Corresponds to the JSON property `sourceLanguageCode`
707
+ # @return [String]
708
+ attr_accessor :source_language_code
709
+
710
+ # Required. The BCP-47 language code to use for translation of the input
711
+ # text, set to one of the language codes listed in Language Support.
712
+ # Corresponds to the JSON property `targetLanguageCode`
713
+ # @return [String]
714
+ attr_accessor :target_language_code
715
+
716
+ def initialize(**args)
717
+ update!(**args)
718
+ end
719
+
720
+ # Update properties of this object
721
+ def update!(**args)
722
+ @contents = args[:contents] if args.key?(:contents)
723
+ @glossary_config = args[:glossary_config] if args.key?(:glossary_config)
724
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
725
+ @model = args[:model] if args.key?(:model)
726
+ @source_language_code = args[:source_language_code] if args.key?(:source_language_code)
727
+ @target_language_code = args[:target_language_code] if args.key?(:target_language_code)
728
+ end
729
+ end
730
+
731
+ #
732
+ class TranslateTextResponse
733
+ include Google::Apis::Core::Hashable
734
+
735
+ # Text translation responses if a glossary is provided in the request.
736
+ # This can be the same as
737
+ # `translations` if no terms apply.
738
+ # This field has the same length as
739
+ # `contents`.
740
+ # Corresponds to the JSON property `glossaryTranslations`
741
+ # @return [Array<Google::Apis::TranslateV3beta1::Translation>]
742
+ attr_accessor :glossary_translations
743
+
744
+ # Text translation responses with no glossary applied.
745
+ # This field has the same length as
746
+ # `contents`.
747
+ # Corresponds to the JSON property `translations`
748
+ # @return [Array<Google::Apis::TranslateV3beta1::Translation>]
749
+ attr_accessor :translations
750
+
751
+ def initialize(**args)
752
+ update!(**args)
753
+ end
754
+
755
+ # Update properties of this object
756
+ def update!(**args)
757
+ @glossary_translations = args[:glossary_translations] if args.key?(:glossary_translations)
758
+ @translations = args[:translations] if args.key?(:translations)
759
+ end
760
+ end
761
+
762
+ # A single translation response.
763
+ class Translation
764
+ include Google::Apis::Core::Hashable
765
+
766
+ # The BCP-47 language code of source text in the initial request, detected
767
+ # automatically, if no source language was passed within the initial
768
+ # request. If the source language was passed, auto-detection of the language
769
+ # does not occur and this field is empty.
770
+ # Corresponds to the JSON property `detectedLanguageCode`
771
+ # @return [String]
772
+ attr_accessor :detected_language_code
773
+
774
+ # Configures which glossary should be used for a specific target language,
775
+ # and defines options for applying that glossary.
776
+ # Corresponds to the JSON property `glossaryConfig`
777
+ # @return [Google::Apis::TranslateV3beta1::TranslateTextGlossaryConfig]
778
+ attr_accessor :glossary_config
779
+
780
+ # Only present when `model` is present in the request.
781
+ # This is same as `model` provided in the request.
782
+ # Corresponds to the JSON property `model`
783
+ # @return [String]
784
+ attr_accessor :model
785
+
786
+ # Text translated into the target language.
787
+ # Corresponds to the JSON property `translatedText`
788
+ # @return [String]
789
+ attr_accessor :translated_text
790
+
791
+ def initialize(**args)
792
+ update!(**args)
793
+ end
794
+
795
+ # Update properties of this object
796
+ def update!(**args)
797
+ @detected_language_code = args[:detected_language_code] if args.key?(:detected_language_code)
798
+ @glossary_config = args[:glossary_config] if args.key?(:glossary_config)
799
+ @model = args[:model] if args.key?(:model)
800
+ @translated_text = args[:translated_text] if args.key?(:translated_text)
801
+ end
802
+ end
803
+
804
+ # The request message for Operations.WaitOperation.
805
+ class WaitOperationRequest
806
+ include Google::Apis::Core::Hashable
807
+
808
+ # The maximum duration to wait before timing out. If left blank, the wait
809
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
810
+ # If RPC context deadline is also specified, the shorter one will be used.
811
+ # Corresponds to the JSON property `timeout`
812
+ # @return [String]
813
+ attr_accessor :timeout
814
+
815
+ def initialize(**args)
816
+ update!(**args)
817
+ end
818
+
819
+ # Update properties of this object
820
+ def update!(**args)
821
+ @timeout = args[:timeout] if args.key?(:timeout)
822
+ end
823
+ end
824
+ end
825
+ end
826
+ end