google-apis-translate_v3 0.32.0 → 0.34.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1cb80a0b53d828c45db73470214d59d6d3f0b22e0568346b3f7721cf97bf2946
4
- data.tar.gz: 86936a03b28a10876b7de206daa475fe18af4954356100a869ebed197dc1dd4c
3
+ metadata.gz: 595f41a610e0d9d6c78eaeeb01d7837d7a397436eefae844de8bb2b3199e0fe5
4
+ data.tar.gz: 0df901eac4656752a05c854ad1341d08354b2dc18967c92abe6bee74f0764e29
5
5
  SHA512:
6
- metadata.gz: 1edba2f0ef52464eaafe8b04255a96d7f06c666c51a6c682a30853d00952f8b9c1bcbdc347031c9411d36d71406cf112923697212ecf37dbf89b37982cb07543
7
- data.tar.gz: fd40e5910f98c8d162d11e171d9cd00be81c4886fb0396d77a2bbb71be23d35634e2d21f1153e3085823365424111bee366eb25fde4144288480bdba3fdfcc69
6
+ metadata.gz: c555a0574511b01636ec527cfe9c9632e83297465399ae3612621f6102f5d1665035449fad450873e20aa489d86a1cdc7cc7334e7bf1fcb623a135ccaa41343e
7
+ data.tar.gz: 355046dd9d4c01b49966869db273ef48c0f5a0a87a6d38991f725fc1b8ef05341c2b80a36ed7d8a7c196a43a29b7fa6eb1e2e8edff1b03cb96f66ae24b4f9f0b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Release history for google-apis-translate_v3
2
2
 
3
+ ### v0.34.0 (2024-01-22)
4
+
5
+ * Regenerated using generator version 0.13.0
6
+
7
+ ### v0.33.0 (2023-12-10)
8
+
9
+ * Regenerated from discovery document revision 20231201
10
+
3
11
  ### v0.32.0 (2023-10-01)
4
12
 
5
13
  * Regenerated from discovery document revision 20230922
@@ -22,6 +22,224 @@ module Google
22
22
  module Apis
23
23
  module TranslateV3
24
24
 
25
+ # An Adaptive MT Dataset.
26
+ class AdaptiveMtDataset
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Output only. Timestamp when this dataset was created.
30
+ # Corresponds to the JSON property `createTime`
31
+ # @return [String]
32
+ attr_accessor :create_time
33
+
34
+ # The name of the dataset to show in the interface. The name can be up to 32
35
+ # characters long and can consist only of ASCII Latin letters A-Z and a-z,
36
+ # underscores (_), and ASCII digits 0-9.
37
+ # Corresponds to the JSON property `displayName`
38
+ # @return [String]
39
+ attr_accessor :display_name
40
+
41
+ # The number of examples in the dataset.
42
+ # Corresponds to the JSON property `exampleCount`
43
+ # @return [Fixnum]
44
+ attr_accessor :example_count
45
+
46
+ # Required. The resource name of the dataset, in form of `projects/`project-
47
+ # number-or-id`/locations/`location_id`/adaptiveMtDatasets/`dataset_id``
48
+ # Corresponds to the JSON property `name`
49
+ # @return [String]
50
+ attr_accessor :name
51
+
52
+ # The BCP-47 language code of the source language.
53
+ # Corresponds to the JSON property `sourceLanguageCode`
54
+ # @return [String]
55
+ attr_accessor :source_language_code
56
+
57
+ # The BCP-47 language code of the target language.
58
+ # Corresponds to the JSON property `targetLanguageCode`
59
+ # @return [String]
60
+ attr_accessor :target_language_code
61
+
62
+ # Output only. Timestamp when this dataset was last updated.
63
+ # Corresponds to the JSON property `updateTime`
64
+ # @return [String]
65
+ attr_accessor :update_time
66
+
67
+ def initialize(**args)
68
+ update!(**args)
69
+ end
70
+
71
+ # Update properties of this object
72
+ def update!(**args)
73
+ @create_time = args[:create_time] if args.key?(:create_time)
74
+ @display_name = args[:display_name] if args.key?(:display_name)
75
+ @example_count = args[:example_count] if args.key?(:example_count)
76
+ @name = args[:name] if args.key?(:name)
77
+ @source_language_code = args[:source_language_code] if args.key?(:source_language_code)
78
+ @target_language_code = args[:target_language_code] if args.key?(:target_language_code)
79
+ @update_time = args[:update_time] if args.key?(:update_time)
80
+ end
81
+ end
82
+
83
+ # An AdaptiveMtFile.
84
+ class AdaptiveMtFile
85
+ include Google::Apis::Core::Hashable
86
+
87
+ # Output only. Timestamp when this file was created.
88
+ # Corresponds to the JSON property `createTime`
89
+ # @return [String]
90
+ attr_accessor :create_time
91
+
92
+ # The file's display name.
93
+ # Corresponds to the JSON property `displayName`
94
+ # @return [String]
95
+ attr_accessor :display_name
96
+
97
+ # The number of entries that the file contains.
98
+ # Corresponds to the JSON property `entryCount`
99
+ # @return [Fixnum]
100
+ attr_accessor :entry_count
101
+
102
+ # Required. The resource name of the file, in form of `projects/`project-number-
103
+ # or-id`/locations/`location_id`/adaptiveMtDatasets/`dataset`/files/`file``
104
+ # Corresponds to the JSON property `name`
105
+ # @return [String]
106
+ attr_accessor :name
107
+
108
+ # Output only. Timestamp when this file was last updated.
109
+ # Corresponds to the JSON property `updateTime`
110
+ # @return [String]
111
+ attr_accessor :update_time
112
+
113
+ def initialize(**args)
114
+ update!(**args)
115
+ end
116
+
117
+ # Update properties of this object
118
+ def update!(**args)
119
+ @create_time = args[:create_time] if args.key?(:create_time)
120
+ @display_name = args[:display_name] if args.key?(:display_name)
121
+ @entry_count = args[:entry_count] if args.key?(:entry_count)
122
+ @name = args[:name] if args.key?(:name)
123
+ @update_time = args[:update_time] if args.key?(:update_time)
124
+ end
125
+ end
126
+
127
+ # An AdaptiveMt sentence entry.
128
+ class AdaptiveMtSentence
129
+ include Google::Apis::Core::Hashable
130
+
131
+ # Output only. Timestamp when this sentence was created.
132
+ # Corresponds to the JSON property `createTime`
133
+ # @return [String]
134
+ attr_accessor :create_time
135
+
136
+ # Required. The resource name of the file, in form of `projects/`project-number-
137
+ # or-id`/locations/`location_id`/adaptiveMtDatasets/`dataset`/files/`file`/
138
+ # sentences/`sentence``
139
+ # Corresponds to the JSON property `name`
140
+ # @return [String]
141
+ attr_accessor :name
142
+
143
+ # Required. The source sentence.
144
+ # Corresponds to the JSON property `sourceSentence`
145
+ # @return [String]
146
+ attr_accessor :source_sentence
147
+
148
+ # Required. The target sentence.
149
+ # Corresponds to the JSON property `targetSentence`
150
+ # @return [String]
151
+ attr_accessor :target_sentence
152
+
153
+ # Output only. Timestamp when this sentence was last updated.
154
+ # Corresponds to the JSON property `updateTime`
155
+ # @return [String]
156
+ attr_accessor :update_time
157
+
158
+ def initialize(**args)
159
+ update!(**args)
160
+ end
161
+
162
+ # Update properties of this object
163
+ def update!(**args)
164
+ @create_time = args[:create_time] if args.key?(:create_time)
165
+ @name = args[:name] if args.key?(:name)
166
+ @source_sentence = args[:source_sentence] if args.key?(:source_sentence)
167
+ @target_sentence = args[:target_sentence] if args.key?(:target_sentence)
168
+ @update_time = args[:update_time] if args.key?(:update_time)
169
+ end
170
+ end
171
+
172
+ # The request for sending an AdaptiveMt translation query.
173
+ class AdaptiveMtTranslateRequest
174
+ include Google::Apis::Core::Hashable
175
+
176
+ # Required. The content of the input in string format. For now only one sentence
177
+ # per request is supported.
178
+ # Corresponds to the JSON property `content`
179
+ # @return [Array<String>]
180
+ attr_accessor :content
181
+
182
+ # Required. The resource name for the dataset to use for adaptive MT. `projects/`
183
+ # project`/locations/`location-id`/adaptiveMtDatasets/`dataset``
184
+ # Corresponds to the JSON property `dataset`
185
+ # @return [String]
186
+ attr_accessor :dataset
187
+
188
+ def initialize(**args)
189
+ update!(**args)
190
+ end
191
+
192
+ # Update properties of this object
193
+ def update!(**args)
194
+ @content = args[:content] if args.key?(:content)
195
+ @dataset = args[:dataset] if args.key?(:dataset)
196
+ end
197
+ end
198
+
199
+ # An AdaptiveMtTranslate response.
200
+ class AdaptiveMtTranslateResponse
201
+ include Google::Apis::Core::Hashable
202
+
203
+ # Output only. The translation's language code.
204
+ # Corresponds to the JSON property `languageCode`
205
+ # @return [String]
206
+ attr_accessor :language_code
207
+
208
+ # Output only. The translation.
209
+ # Corresponds to the JSON property `translations`
210
+ # @return [Array<Google::Apis::TranslateV3::AdaptiveMtTranslation>]
211
+ attr_accessor :translations
212
+
213
+ def initialize(**args)
214
+ update!(**args)
215
+ end
216
+
217
+ # Update properties of this object
218
+ def update!(**args)
219
+ @language_code = args[:language_code] if args.key?(:language_code)
220
+ @translations = args[:translations] if args.key?(:translations)
221
+ end
222
+ end
223
+
224
+ # An AdaptiveMt translation.
225
+ class AdaptiveMtTranslation
226
+ include Google::Apis::Core::Hashable
227
+
228
+ # Output only. The translated text.
229
+ # Corresponds to the JSON property `translatedText`
230
+ # @return [String]
231
+ attr_accessor :translated_text
232
+
233
+ def initialize(**args)
234
+ update!(**args)
235
+ end
236
+
237
+ # Update properties of this object
238
+ def update!(**args)
239
+ @translated_text = args[:translated_text] if args.key?(:translated_text)
240
+ end
241
+ end
242
+
25
243
  # Input configuration for BatchTranslateDocument request.
26
244
  class BatchDocumentInputConfig
27
245
  include Google::Apis::Core::Hashable
@@ -626,6 +844,38 @@ module Google
626
844
  end
627
845
  end
628
846
 
847
+ # An inlined file.
848
+ class FileInputSource
849
+ include Google::Apis::Core::Hashable
850
+
851
+ # Required. The file's byte contents.
852
+ # Corresponds to the JSON property `content`
853
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
854
+ # @return [String]
855
+ attr_accessor :content
856
+
857
+ # Required. The file's display name.
858
+ # Corresponds to the JSON property `displayName`
859
+ # @return [String]
860
+ attr_accessor :display_name
861
+
862
+ # Required. The file's mime type.
863
+ # Corresponds to the JSON property `mimeType`
864
+ # @return [String]
865
+ attr_accessor :mime_type
866
+
867
+ def initialize(**args)
868
+ update!(**args)
869
+ end
870
+
871
+ # Update properties of this object
872
+ def update!(**args)
873
+ @content = args[:content] if args.key?(:content)
874
+ @display_name = args[:display_name] if args.key?(:display_name)
875
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
876
+ end
877
+ end
878
+
629
879
  # The Google Cloud Storage location for the output content.
630
880
  class GcsDestination
631
881
  include Google::Apis::Core::Hashable
@@ -901,6 +1151,50 @@ module Google
901
1151
  end
902
1152
  end
903
1153
 
1154
+ # The request for importing an AdaptiveMt file along with its sentences.
1155
+ class ImportAdaptiveMtFileRequest
1156
+ include Google::Apis::Core::Hashable
1157
+
1158
+ # An inlined file.
1159
+ # Corresponds to the JSON property `fileInputSource`
1160
+ # @return [Google::Apis::TranslateV3::FileInputSource]
1161
+ attr_accessor :file_input_source
1162
+
1163
+ # The Google Cloud Storage location for the input content.
1164
+ # Corresponds to the JSON property `gcsInputSource`
1165
+ # @return [Google::Apis::TranslateV3::GcsInputSource]
1166
+ attr_accessor :gcs_input_source
1167
+
1168
+ def initialize(**args)
1169
+ update!(**args)
1170
+ end
1171
+
1172
+ # Update properties of this object
1173
+ def update!(**args)
1174
+ @file_input_source = args[:file_input_source] if args.key?(:file_input_source)
1175
+ @gcs_input_source = args[:gcs_input_source] if args.key?(:gcs_input_source)
1176
+ end
1177
+ end
1178
+
1179
+ # The response for importing an AdaptiveMtFile
1180
+ class ImportAdaptiveMtFileResponse
1181
+ include Google::Apis::Core::Hashable
1182
+
1183
+ # An AdaptiveMtFile.
1184
+ # Corresponds to the JSON property `adaptiveMtFile`
1185
+ # @return [Google::Apis::TranslateV3::AdaptiveMtFile]
1186
+ attr_accessor :adaptive_mt_file
1187
+
1188
+ def initialize(**args)
1189
+ update!(**args)
1190
+ end
1191
+
1192
+ # Update properties of this object
1193
+ def update!(**args)
1194
+ @adaptive_mt_file = args[:adaptive_mt_file] if args.key?(:adaptive_mt_file)
1195
+ end
1196
+ end
1197
+
904
1198
  # Request message for ImportData.
905
1199
  class ImportDataRequest
906
1200
  include Google::Apis::Core::Hashable
@@ -1021,6 +1315,85 @@ module Google
1021
1315
  end
1022
1316
  end
1023
1317
 
1318
+ # A list of AdaptiveMtDatasets.
1319
+ class ListAdaptiveMtDatasetsResponse
1320
+ include Google::Apis::Core::Hashable
1321
+
1322
+ # Output only. A list of Adaptive MT datasets.
1323
+ # Corresponds to the JSON property `adaptiveMtDatasets`
1324
+ # @return [Array<Google::Apis::TranslateV3::AdaptiveMtDataset>]
1325
+ attr_accessor :adaptive_mt_datasets
1326
+
1327
+ # Optional. A token to retrieve a page of results. Pass this value in the [
1328
+ # ListAdaptiveMtDatasetsRequest.page_token] field in the subsequent call to `
1329
+ # ListAdaptiveMtDatasets` method to retrieve the next page of results.
1330
+ # Corresponds to the JSON property `nextPageToken`
1331
+ # @return [String]
1332
+ attr_accessor :next_page_token
1333
+
1334
+ def initialize(**args)
1335
+ update!(**args)
1336
+ end
1337
+
1338
+ # Update properties of this object
1339
+ def update!(**args)
1340
+ @adaptive_mt_datasets = args[:adaptive_mt_datasets] if args.key?(:adaptive_mt_datasets)
1341
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1342
+ end
1343
+ end
1344
+
1345
+ # The response for listing all AdaptiveMt files under a given dataset.
1346
+ class ListAdaptiveMtFilesResponse
1347
+ include Google::Apis::Core::Hashable
1348
+
1349
+ # Output only. The Adaptive MT files.
1350
+ # Corresponds to the JSON property `adaptiveMtFiles`
1351
+ # @return [Array<Google::Apis::TranslateV3::AdaptiveMtFile>]
1352
+ attr_accessor :adaptive_mt_files
1353
+
1354
+ # Optional. A token to retrieve a page of results. Pass this value in the
1355
+ # ListAdaptiveMtFilesRequest.page_token field in the subsequent call to `
1356
+ # ListAdaptiveMtFiles` method to retrieve the next page of results.
1357
+ # Corresponds to the JSON property `nextPageToken`
1358
+ # @return [String]
1359
+ attr_accessor :next_page_token
1360
+
1361
+ def initialize(**args)
1362
+ update!(**args)
1363
+ end
1364
+
1365
+ # Update properties of this object
1366
+ def update!(**args)
1367
+ @adaptive_mt_files = args[:adaptive_mt_files] if args.key?(:adaptive_mt_files)
1368
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1369
+ end
1370
+ end
1371
+
1372
+ # List AdaptiveMt sentences response.
1373
+ class ListAdaptiveMtSentencesResponse
1374
+ include Google::Apis::Core::Hashable
1375
+
1376
+ # Output only. The list of AdaptiveMtSentences.
1377
+ # Corresponds to the JSON property `adaptiveMtSentences`
1378
+ # @return [Array<Google::Apis::TranslateV3::AdaptiveMtSentence>]
1379
+ attr_accessor :adaptive_mt_sentences
1380
+
1381
+ # Optional.
1382
+ # Corresponds to the JSON property `nextPageToken`
1383
+ # @return [String]
1384
+ attr_accessor :next_page_token
1385
+
1386
+ def initialize(**args)
1387
+ update!(**args)
1388
+ end
1389
+
1390
+ # Update properties of this object
1391
+ def update!(**args)
1392
+ @adaptive_mt_sentences = args[:adaptive_mt_sentences] if args.key?(:adaptive_mt_sentences)
1393
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1394
+ end
1395
+ end
1396
+
1024
1397
  # Response message for ListDatasets.
1025
1398
  class ListDatasetsResponse
1026
1399
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module TranslateV3
18
18
  # Version of the google-apis-translate_v3 gem
19
- GEM_VERSION = "0.32.0"
19
+ GEM_VERSION = "0.34.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.12.0"
22
+ GENERATOR_VERSION = "0.13.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20230922"
25
+ REVISION = "20231201"
26
26
  end
27
27
  end
28
28
  end
@@ -22,6 +22,42 @@ module Google
22
22
  module Apis
23
23
  module TranslateV3
24
24
 
25
+ class AdaptiveMtDataset
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class AdaptiveMtFile
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class AdaptiveMtSentence
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class AdaptiveMtTranslateRequest
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class AdaptiveMtTranslateResponse
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class AdaptiveMtTranslation
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
25
61
  class BatchDocumentInputConfig
26
62
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
63
 
@@ -124,6 +160,12 @@ module Google
124
160
  include Google::Apis::Core::JsonObjectSupport
125
161
  end
126
162
 
163
+ class FileInputSource
164
+ class Representation < Google::Apis::Core::JsonRepresentation; end
165
+
166
+ include Google::Apis::Core::JsonObjectSupport
167
+ end
168
+
127
169
  class GcsDestination
128
170
  class Representation < Google::Apis::Core::JsonRepresentation; end
129
171
 
@@ -184,6 +226,18 @@ module Google
184
226
  include Google::Apis::Core::JsonObjectSupport
185
227
  end
186
228
 
229
+ class ImportAdaptiveMtFileRequest
230
+ class Representation < Google::Apis::Core::JsonRepresentation; end
231
+
232
+ include Google::Apis::Core::JsonObjectSupport
233
+ end
234
+
235
+ class ImportAdaptiveMtFileResponse
236
+ class Representation < Google::Apis::Core::JsonRepresentation; end
237
+
238
+ include Google::Apis::Core::JsonObjectSupport
239
+ end
240
+
187
241
  class ImportDataRequest
188
242
  class Representation < Google::Apis::Core::JsonRepresentation; end
189
243
 
@@ -214,6 +268,24 @@ module Google
214
268
  include Google::Apis::Core::JsonObjectSupport
215
269
  end
216
270
 
271
+ class ListAdaptiveMtDatasetsResponse
272
+ class Representation < Google::Apis::Core::JsonRepresentation; end
273
+
274
+ include Google::Apis::Core::JsonObjectSupport
275
+ end
276
+
277
+ class ListAdaptiveMtFilesResponse
278
+ class Representation < Google::Apis::Core::JsonRepresentation; end
279
+
280
+ include Google::Apis::Core::JsonObjectSupport
281
+ end
282
+
283
+ class ListAdaptiveMtSentencesResponse
284
+ class Representation < Google::Apis::Core::JsonRepresentation; end
285
+
286
+ include Google::Apis::Core::JsonObjectSupport
287
+ end
288
+
217
289
  class ListDatasetsResponse
218
290
  class Representation < Google::Apis::Core::JsonRepresentation; end
219
291
 
@@ -364,6 +436,65 @@ module Google
364
436
  include Google::Apis::Core::JsonObjectSupport
365
437
  end
366
438
 
439
+ class AdaptiveMtDataset
440
+ # @private
441
+ class Representation < Google::Apis::Core::JsonRepresentation
442
+ property :create_time, as: 'createTime'
443
+ property :display_name, as: 'displayName'
444
+ property :example_count, as: 'exampleCount'
445
+ property :name, as: 'name'
446
+ property :source_language_code, as: 'sourceLanguageCode'
447
+ property :target_language_code, as: 'targetLanguageCode'
448
+ property :update_time, as: 'updateTime'
449
+ end
450
+ end
451
+
452
+ class AdaptiveMtFile
453
+ # @private
454
+ class Representation < Google::Apis::Core::JsonRepresentation
455
+ property :create_time, as: 'createTime'
456
+ property :display_name, as: 'displayName'
457
+ property :entry_count, as: 'entryCount'
458
+ property :name, as: 'name'
459
+ property :update_time, as: 'updateTime'
460
+ end
461
+ end
462
+
463
+ class AdaptiveMtSentence
464
+ # @private
465
+ class Representation < Google::Apis::Core::JsonRepresentation
466
+ property :create_time, as: 'createTime'
467
+ property :name, as: 'name'
468
+ property :source_sentence, as: 'sourceSentence'
469
+ property :target_sentence, as: 'targetSentence'
470
+ property :update_time, as: 'updateTime'
471
+ end
472
+ end
473
+
474
+ class AdaptiveMtTranslateRequest
475
+ # @private
476
+ class Representation < Google::Apis::Core::JsonRepresentation
477
+ collection :content, as: 'content'
478
+ property :dataset, as: 'dataset'
479
+ end
480
+ end
481
+
482
+ class AdaptiveMtTranslateResponse
483
+ # @private
484
+ class Representation < Google::Apis::Core::JsonRepresentation
485
+ property :language_code, as: 'languageCode'
486
+ collection :translations, as: 'translations', class: Google::Apis::TranslateV3::AdaptiveMtTranslation, decorator: Google::Apis::TranslateV3::AdaptiveMtTranslation::Representation
487
+
488
+ end
489
+ end
490
+
491
+ class AdaptiveMtTranslation
492
+ # @private
493
+ class Representation < Google::Apis::Core::JsonRepresentation
494
+ property :translated_text, as: 'translatedText'
495
+ end
496
+ end
497
+
367
498
  class BatchDocumentInputConfig
368
499
  # @private
369
500
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -531,6 +662,15 @@ module Google
531
662
  end
532
663
  end
533
664
 
665
+ class FileInputSource
666
+ # @private
667
+ class Representation < Google::Apis::Core::JsonRepresentation
668
+ property :content, :base64 => true, as: 'content'
669
+ property :display_name, as: 'displayName'
670
+ property :mime_type, as: 'mimeType'
671
+ end
672
+ end
673
+
534
674
  class GcsDestination
535
675
  # @private
536
676
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -622,6 +762,24 @@ module Google
622
762
  end
623
763
  end
624
764
 
765
+ class ImportAdaptiveMtFileRequest
766
+ # @private
767
+ class Representation < Google::Apis::Core::JsonRepresentation
768
+ property :file_input_source, as: 'fileInputSource', class: Google::Apis::TranslateV3::FileInputSource, decorator: Google::Apis::TranslateV3::FileInputSource::Representation
769
+
770
+ property :gcs_input_source, as: 'gcsInputSource', class: Google::Apis::TranslateV3::GcsInputSource, decorator: Google::Apis::TranslateV3::GcsInputSource::Representation
771
+
772
+ end
773
+ end
774
+
775
+ class ImportAdaptiveMtFileResponse
776
+ # @private
777
+ class Representation < Google::Apis::Core::JsonRepresentation
778
+ property :adaptive_mt_file, as: 'adaptiveMtFile', class: Google::Apis::TranslateV3::AdaptiveMtFile, decorator: Google::Apis::TranslateV3::AdaptiveMtFile::Representation
779
+
780
+ end
781
+ end
782
+
625
783
  class ImportDataRequest
626
784
  # @private
627
785
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -663,6 +821,33 @@ module Google
663
821
  end
664
822
  end
665
823
 
824
+ class ListAdaptiveMtDatasetsResponse
825
+ # @private
826
+ class Representation < Google::Apis::Core::JsonRepresentation
827
+ collection :adaptive_mt_datasets, as: 'adaptiveMtDatasets', class: Google::Apis::TranslateV3::AdaptiveMtDataset, decorator: Google::Apis::TranslateV3::AdaptiveMtDataset::Representation
828
+
829
+ property :next_page_token, as: 'nextPageToken'
830
+ end
831
+ end
832
+
833
+ class ListAdaptiveMtFilesResponse
834
+ # @private
835
+ class Representation < Google::Apis::Core::JsonRepresentation
836
+ collection :adaptive_mt_files, as: 'adaptiveMtFiles', class: Google::Apis::TranslateV3::AdaptiveMtFile, decorator: Google::Apis::TranslateV3::AdaptiveMtFile::Representation
837
+
838
+ property :next_page_token, as: 'nextPageToken'
839
+ end
840
+ end
841
+
842
+ class ListAdaptiveMtSentencesResponse
843
+ # @private
844
+ class Representation < Google::Apis::Core::JsonRepresentation
845
+ collection :adaptive_mt_sentences, as: 'adaptiveMtSentences', class: Google::Apis::TranslateV3::AdaptiveMtSentence, decorator: Google::Apis::TranslateV3::AdaptiveMtSentence::Representation
846
+
847
+ property :next_page_token, as: 'nextPageToken'
848
+ end
849
+ end
850
+
666
851
  class ListDatasetsResponse
667
852
  # @private
668
853
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -32,6 +32,8 @@ module Google
32
32
  #
33
33
  # @see https://cloud.google.com/translate/docs/quickstarts
34
34
  class TranslateService < Google::Apis::Core::BaseService
35
+ DEFAULT_ENDPOINT_TEMPLATE = "https://translation.$UNIVERSE_DOMAIN$/"
36
+
35
37
  # @return [String]
36
38
  # API key. Your API key identifies your project and provides you with API access,
37
39
  # quota, and reports. Required unless you provide an OAuth 2.0 token.
@@ -43,7 +45,7 @@ module Google
43
45
  attr_accessor :quota_user
44
46
 
45
47
  def initialize
46
- super('https://translation.googleapis.com/', '',
48
+ super(DEFAULT_ENDPOINT_TEMPLATE, '',
47
49
  client_name: 'google-apis-translate_v3',
48
50
  client_version: Google::Apis::TranslateV3::GEM_VERSION)
49
51
  @batch_path = 'batch'
@@ -211,6 +213,40 @@ module Google
211
213
  execute_or_queue_command(command, &block)
212
214
  end
213
215
 
216
+ # Translate text using Adaptive MT.
217
+ # @param [String] parent
218
+ # Required. Location to make a regional call. Format: `projects/`project-number-
219
+ # or-id`/locations/`location-id``.
220
+ # @param [Google::Apis::TranslateV3::AdaptiveMtTranslateRequest] adaptive_mt_translate_request_object
221
+ # @param [String] fields
222
+ # Selector specifying which fields to include in a partial response.
223
+ # @param [String] quota_user
224
+ # Available to use for quota purposes for server-side applications. Can be any
225
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
226
+ # @param [Google::Apis::RequestOptions] options
227
+ # Request-specific options
228
+ #
229
+ # @yield [result, err] Result & error if block supplied
230
+ # @yieldparam result [Google::Apis::TranslateV3::AdaptiveMtTranslateResponse] parsed result object
231
+ # @yieldparam err [StandardError] error object if request failed
232
+ #
233
+ # @return [Google::Apis::TranslateV3::AdaptiveMtTranslateResponse]
234
+ #
235
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
236
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
237
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
238
+ def adaptive_location_mt_translate(parent, adaptive_mt_translate_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
239
+ command = make_simple_command(:post, 'v3/{+parent}:adaptiveMtTranslate', options)
240
+ command.request_representation = Google::Apis::TranslateV3::AdaptiveMtTranslateRequest::Representation
241
+ command.request_object = adaptive_mt_translate_request_object
242
+ command.response_representation = Google::Apis::TranslateV3::AdaptiveMtTranslateResponse::Representation
243
+ command.response_class = Google::Apis::TranslateV3::AdaptiveMtTranslateResponse
244
+ command.params['parent'] = parent unless parent.nil?
245
+ command.query['fields'] = fields unless fields.nil?
246
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
247
+ execute_or_queue_command(command, &block)
248
+ end
249
+
214
250
  # Translates a large volume of document in asynchronous batch mode. This
215
251
  # function provides real-time output as the inputs are being processed. If
216
252
  # caller cancels a request, the partial results (for an input file, it's all or
@@ -568,6 +604,370 @@ module Google
568
604
  execute_or_queue_command(command, &block)
569
605
  end
570
606
 
607
+ # Creates an Adaptive MT dataset.
608
+ # @param [String] parent
609
+ # Required. Name of the parent project. In form of `projects/`project-number-or-
610
+ # id`/locations/`location-id``
611
+ # @param [Google::Apis::TranslateV3::AdaptiveMtDataset] adaptive_mt_dataset_object
612
+ # @param [String] fields
613
+ # Selector specifying which fields to include in a partial response.
614
+ # @param [String] quota_user
615
+ # Available to use for quota purposes for server-side applications. Can be any
616
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
617
+ # @param [Google::Apis::RequestOptions] options
618
+ # Request-specific options
619
+ #
620
+ # @yield [result, err] Result & error if block supplied
621
+ # @yieldparam result [Google::Apis::TranslateV3::AdaptiveMtDataset] parsed result object
622
+ # @yieldparam err [StandardError] error object if request failed
623
+ #
624
+ # @return [Google::Apis::TranslateV3::AdaptiveMtDataset]
625
+ #
626
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
627
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
628
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
629
+ def create_project_location_adaptive_mt_dataset(parent, adaptive_mt_dataset_object = nil, fields: nil, quota_user: nil, options: nil, &block)
630
+ command = make_simple_command(:post, 'v3/{+parent}/adaptiveMtDatasets', options)
631
+ command.request_representation = Google::Apis::TranslateV3::AdaptiveMtDataset::Representation
632
+ command.request_object = adaptive_mt_dataset_object
633
+ command.response_representation = Google::Apis::TranslateV3::AdaptiveMtDataset::Representation
634
+ command.response_class = Google::Apis::TranslateV3::AdaptiveMtDataset
635
+ command.params['parent'] = parent unless parent.nil?
636
+ command.query['fields'] = fields unless fields.nil?
637
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
638
+ execute_or_queue_command(command, &block)
639
+ end
640
+
641
+ # Deletes an Adaptive MT dataset, including all its entries and associated
642
+ # metadata.
643
+ # @param [String] name
644
+ # Required. Name of the dataset. In the form of `projects/`project-number-or-id`/
645
+ # locations/`location-id`/adaptiveMtDatasets/`adaptive-mt-dataset-id``
646
+ # @param [String] fields
647
+ # Selector specifying which fields to include in a partial response.
648
+ # @param [String] quota_user
649
+ # Available to use for quota purposes for server-side applications. Can be any
650
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
651
+ # @param [Google::Apis::RequestOptions] options
652
+ # Request-specific options
653
+ #
654
+ # @yield [result, err] Result & error if block supplied
655
+ # @yieldparam result [Google::Apis::TranslateV3::Empty] parsed result object
656
+ # @yieldparam err [StandardError] error object if request failed
657
+ #
658
+ # @return [Google::Apis::TranslateV3::Empty]
659
+ #
660
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
661
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
662
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
663
+ def delete_project_location_adaptive_mt_dataset(name, fields: nil, quota_user: nil, options: nil, &block)
664
+ command = make_simple_command(:delete, 'v3/{+name}', options)
665
+ command.response_representation = Google::Apis::TranslateV3::Empty::Representation
666
+ command.response_class = Google::Apis::TranslateV3::Empty
667
+ command.params['name'] = name unless name.nil?
668
+ command.query['fields'] = fields unless fields.nil?
669
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
670
+ execute_or_queue_command(command, &block)
671
+ end
672
+
673
+ # Gets the Adaptive MT dataset.
674
+ # @param [String] name
675
+ # Required. Name of the dataset. In the form of `projects/`project-number-or-id`/
676
+ # locations/`location-id`/adaptiveMtDatasets/`adaptive-mt-dataset-id``
677
+ # @param [String] fields
678
+ # Selector specifying which fields to include in a partial response.
679
+ # @param [String] quota_user
680
+ # Available to use for quota purposes for server-side applications. Can be any
681
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
682
+ # @param [Google::Apis::RequestOptions] options
683
+ # Request-specific options
684
+ #
685
+ # @yield [result, err] Result & error if block supplied
686
+ # @yieldparam result [Google::Apis::TranslateV3::AdaptiveMtDataset] parsed result object
687
+ # @yieldparam err [StandardError] error object if request failed
688
+ #
689
+ # @return [Google::Apis::TranslateV3::AdaptiveMtDataset]
690
+ #
691
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
692
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
693
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
694
+ def get_project_location_adaptive_mt_dataset(name, fields: nil, quota_user: nil, options: nil, &block)
695
+ command = make_simple_command(:get, 'v3/{+name}', options)
696
+ command.response_representation = Google::Apis::TranslateV3::AdaptiveMtDataset::Representation
697
+ command.response_class = Google::Apis::TranslateV3::AdaptiveMtDataset
698
+ command.params['name'] = name unless name.nil?
699
+ command.query['fields'] = fields unless fields.nil?
700
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
701
+ execute_or_queue_command(command, &block)
702
+ end
703
+
704
+ # Imports an AdaptiveMtFile and adds all of its sentences into the
705
+ # AdaptiveMtDataset.
706
+ # @param [String] parent
707
+ # Required. The resource name of the file, in form of `projects/`project-number-
708
+ # or-id`/locations/`location_id`/adaptiveMtDatasets/`dataset``
709
+ # @param [Google::Apis::TranslateV3::ImportAdaptiveMtFileRequest] import_adaptive_mt_file_request_object
710
+ # @param [String] fields
711
+ # Selector specifying which fields to include in a partial response.
712
+ # @param [String] quota_user
713
+ # Available to use for quota purposes for server-side applications. Can be any
714
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
715
+ # @param [Google::Apis::RequestOptions] options
716
+ # Request-specific options
717
+ #
718
+ # @yield [result, err] Result & error if block supplied
719
+ # @yieldparam result [Google::Apis::TranslateV3::ImportAdaptiveMtFileResponse] parsed result object
720
+ # @yieldparam err [StandardError] error object if request failed
721
+ #
722
+ # @return [Google::Apis::TranslateV3::ImportAdaptiveMtFileResponse]
723
+ #
724
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
725
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
726
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
727
+ def import_adaptive_mt_dataset_adaptive_mt_file(parent, import_adaptive_mt_file_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
728
+ command = make_simple_command(:post, 'v3/{+parent}:importAdaptiveMtFile', options)
729
+ command.request_representation = Google::Apis::TranslateV3::ImportAdaptiveMtFileRequest::Representation
730
+ command.request_object = import_adaptive_mt_file_request_object
731
+ command.response_representation = Google::Apis::TranslateV3::ImportAdaptiveMtFileResponse::Representation
732
+ command.response_class = Google::Apis::TranslateV3::ImportAdaptiveMtFileResponse
733
+ command.params['parent'] = parent unless parent.nil?
734
+ command.query['fields'] = fields unless fields.nil?
735
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
736
+ execute_or_queue_command(command, &block)
737
+ end
738
+
739
+ # Lists all Adaptive MT datasets for which the caller has read permission.
740
+ # @param [String] parent
741
+ # Required. The resource name of the project from which to list the Adaptive MT
742
+ # datasets. `projects/`project-number-or-id`/locations/`location-id``
743
+ # @param [String] filter
744
+ # Optional. An expression for filtering the results of the request. Filter is
745
+ # not supported yet.
746
+ # @param [Fixnum] page_size
747
+ # Optional. Requested page size. The server may return fewer results than
748
+ # requested. If unspecified, the server picks an appropriate default.
749
+ # @param [String] page_token
750
+ # Optional. A token identifying a page of results the server should return.
751
+ # Typically, this is the value of ListAdaptiveMtDatasetsResponse.next_page_token
752
+ # returned from the previous call to `ListAdaptiveMtDatasets` method. The first
753
+ # page is returned if `page_token`is empty or missing.
754
+ # @param [String] fields
755
+ # Selector specifying which fields to include in a partial response.
756
+ # @param [String] quota_user
757
+ # Available to use for quota purposes for server-side applications. Can be any
758
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
759
+ # @param [Google::Apis::RequestOptions] options
760
+ # Request-specific options
761
+ #
762
+ # @yield [result, err] Result & error if block supplied
763
+ # @yieldparam result [Google::Apis::TranslateV3::ListAdaptiveMtDatasetsResponse] parsed result object
764
+ # @yieldparam err [StandardError] error object if request failed
765
+ #
766
+ # @return [Google::Apis::TranslateV3::ListAdaptiveMtDatasetsResponse]
767
+ #
768
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
769
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
770
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
771
+ def list_project_location_adaptive_mt_datasets(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
772
+ command = make_simple_command(:get, 'v3/{+parent}/adaptiveMtDatasets', options)
773
+ command.response_representation = Google::Apis::TranslateV3::ListAdaptiveMtDatasetsResponse::Representation
774
+ command.response_class = Google::Apis::TranslateV3::ListAdaptiveMtDatasetsResponse
775
+ command.params['parent'] = parent unless parent.nil?
776
+ command.query['filter'] = filter unless filter.nil?
777
+ command.query['pageSize'] = page_size unless page_size.nil?
778
+ command.query['pageToken'] = page_token unless page_token.nil?
779
+ command.query['fields'] = fields unless fields.nil?
780
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
781
+ execute_or_queue_command(command, &block)
782
+ end
783
+
784
+ # Deletes an AdaptiveMtFile along with its sentences.
785
+ # @param [String] name
786
+ # Required. The resource name of the file to delete, in form of `projects/`
787
+ # project-number-or-id`/locations/`location_id`/adaptiveMtDatasets/`dataset`/
788
+ # files/`file``
789
+ # @param [String] fields
790
+ # Selector specifying which fields to include in a partial response.
791
+ # @param [String] quota_user
792
+ # Available to use for quota purposes for server-side applications. Can be any
793
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
794
+ # @param [Google::Apis::RequestOptions] options
795
+ # Request-specific options
796
+ #
797
+ # @yield [result, err] Result & error if block supplied
798
+ # @yieldparam result [Google::Apis::TranslateV3::Empty] parsed result object
799
+ # @yieldparam err [StandardError] error object if request failed
800
+ #
801
+ # @return [Google::Apis::TranslateV3::Empty]
802
+ #
803
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
804
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
805
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
806
+ def delete_project_location_adaptive_mt_dataset_adaptive_mt_file(name, fields: nil, quota_user: nil, options: nil, &block)
807
+ command = make_simple_command(:delete, 'v3/{+name}', options)
808
+ command.response_representation = Google::Apis::TranslateV3::Empty::Representation
809
+ command.response_class = Google::Apis::TranslateV3::Empty
810
+ command.params['name'] = name unless name.nil?
811
+ command.query['fields'] = fields unless fields.nil?
812
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
813
+ execute_or_queue_command(command, &block)
814
+ end
815
+
816
+ # Gets and AdaptiveMtFile
817
+ # @param [String] name
818
+ # Required. The resource name of the file, in form of `projects/`project-number-
819
+ # or-id`/locations/`location_id`/adaptiveMtDatasets/`dataset`/files/`file``
820
+ # @param [String] fields
821
+ # Selector specifying which fields to include in a partial response.
822
+ # @param [String] quota_user
823
+ # Available to use for quota purposes for server-side applications. Can be any
824
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
825
+ # @param [Google::Apis::RequestOptions] options
826
+ # Request-specific options
827
+ #
828
+ # @yield [result, err] Result & error if block supplied
829
+ # @yieldparam result [Google::Apis::TranslateV3::AdaptiveMtFile] parsed result object
830
+ # @yieldparam err [StandardError] error object if request failed
831
+ #
832
+ # @return [Google::Apis::TranslateV3::AdaptiveMtFile]
833
+ #
834
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
835
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
836
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
837
+ def get_project_location_adaptive_mt_dataset_adaptive_mt_file(name, fields: nil, quota_user: nil, options: nil, &block)
838
+ command = make_simple_command(:get, 'v3/{+name}', options)
839
+ command.response_representation = Google::Apis::TranslateV3::AdaptiveMtFile::Representation
840
+ command.response_class = Google::Apis::TranslateV3::AdaptiveMtFile
841
+ command.params['name'] = name unless name.nil?
842
+ command.query['fields'] = fields unless fields.nil?
843
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
844
+ execute_or_queue_command(command, &block)
845
+ end
846
+
847
+ # Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.
848
+ # @param [String] parent
849
+ # Required. The resource name of the project from which to list the Adaptive MT
850
+ # files. `projects/`project`/locations/`location`/adaptiveMtDatasets/`dataset``
851
+ # @param [Fixnum] page_size
852
+ # Optional.
853
+ # @param [String] page_token
854
+ # Optional. A token identifying a page of results the server should return.
855
+ # Typically, this is the value of ListAdaptiveMtFilesResponse.next_page_token
856
+ # returned from the previous call to `ListAdaptiveMtFiles` method. The first
857
+ # page is returned if `page_token`is empty or missing.
858
+ # @param [String] fields
859
+ # Selector specifying which fields to include in a partial response.
860
+ # @param [String] quota_user
861
+ # Available to use for quota purposes for server-side applications. Can be any
862
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
863
+ # @param [Google::Apis::RequestOptions] options
864
+ # Request-specific options
865
+ #
866
+ # @yield [result, err] Result & error if block supplied
867
+ # @yieldparam result [Google::Apis::TranslateV3::ListAdaptiveMtFilesResponse] parsed result object
868
+ # @yieldparam err [StandardError] error object if request failed
869
+ #
870
+ # @return [Google::Apis::TranslateV3::ListAdaptiveMtFilesResponse]
871
+ #
872
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
873
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
874
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
875
+ def list_project_location_adaptive_mt_dataset_adaptive_mt_files(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
876
+ command = make_simple_command(:get, 'v3/{+parent}/adaptiveMtFiles', options)
877
+ command.response_representation = Google::Apis::TranslateV3::ListAdaptiveMtFilesResponse::Representation
878
+ command.response_class = Google::Apis::TranslateV3::ListAdaptiveMtFilesResponse
879
+ command.params['parent'] = parent unless parent.nil?
880
+ command.query['pageSize'] = page_size unless page_size.nil?
881
+ command.query['pageToken'] = page_token unless page_token.nil?
882
+ command.query['fields'] = fields unless fields.nil?
883
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
884
+ execute_or_queue_command(command, &block)
885
+ end
886
+
887
+ # Lists all AdaptiveMtSentences under a given file/dataset.
888
+ # @param [String] parent
889
+ # Required. The resource name of the project from which to list the Adaptive MT
890
+ # files. The following format lists all sentences under a file. `projects/`
891
+ # project`/locations/`location`/adaptiveMtDatasets/`dataset`/adaptiveMtFiles/`
892
+ # file`` The following format lists all sentences within a dataset. `projects/`
893
+ # project`/locations/`location`/adaptiveMtDatasets/`dataset``
894
+ # @param [Fixnum] page_size
895
+ # @param [String] page_token
896
+ # A token identifying a page of results the server should return. Typically,
897
+ # this is the value of ListAdaptiveMtSentencesRequest.next_page_token returned
898
+ # from the previous call to `ListTranslationMemories` method. The first page is
899
+ # returned if `page_token` is empty or missing.
900
+ # @param [String] fields
901
+ # Selector specifying which fields to include in a partial response.
902
+ # @param [String] quota_user
903
+ # Available to use for quota purposes for server-side applications. Can be any
904
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
905
+ # @param [Google::Apis::RequestOptions] options
906
+ # Request-specific options
907
+ #
908
+ # @yield [result, err] Result & error if block supplied
909
+ # @yieldparam result [Google::Apis::TranslateV3::ListAdaptiveMtSentencesResponse] parsed result object
910
+ # @yieldparam err [StandardError] error object if request failed
911
+ #
912
+ # @return [Google::Apis::TranslateV3::ListAdaptiveMtSentencesResponse]
913
+ #
914
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
915
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
916
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
917
+ def list_project_location_adaptive_mt_dataset_adaptive_mt_file_adaptive_mt_sentences(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
918
+ command = make_simple_command(:get, 'v3/{+parent}/adaptiveMtSentences', options)
919
+ command.response_representation = Google::Apis::TranslateV3::ListAdaptiveMtSentencesResponse::Representation
920
+ command.response_class = Google::Apis::TranslateV3::ListAdaptiveMtSentencesResponse
921
+ command.params['parent'] = parent unless parent.nil?
922
+ command.query['pageSize'] = page_size unless page_size.nil?
923
+ command.query['pageToken'] = page_token unless page_token.nil?
924
+ command.query['fields'] = fields unless fields.nil?
925
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
926
+ execute_or_queue_command(command, &block)
927
+ end
928
+
929
+ # Lists all AdaptiveMtSentences under a given file/dataset.
930
+ # @param [String] parent
931
+ # Required. The resource name of the project from which to list the Adaptive MT
932
+ # files. The following format lists all sentences under a file. `projects/`
933
+ # project`/locations/`location`/adaptiveMtDatasets/`dataset`/adaptiveMtFiles/`
934
+ # file`` The following format lists all sentences within a dataset. `projects/`
935
+ # project`/locations/`location`/adaptiveMtDatasets/`dataset``
936
+ # @param [Fixnum] page_size
937
+ # @param [String] page_token
938
+ # A token identifying a page of results the server should return. Typically,
939
+ # this is the value of ListAdaptiveMtSentencesRequest.next_page_token returned
940
+ # from the previous call to `ListTranslationMemories` method. The first page is
941
+ # returned if `page_token` is empty or missing.
942
+ # @param [String] fields
943
+ # Selector specifying which fields to include in a partial response.
944
+ # @param [String] quota_user
945
+ # Available to use for quota purposes for server-side applications. Can be any
946
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
947
+ # @param [Google::Apis::RequestOptions] options
948
+ # Request-specific options
949
+ #
950
+ # @yield [result, err] Result & error if block supplied
951
+ # @yieldparam result [Google::Apis::TranslateV3::ListAdaptiveMtSentencesResponse] parsed result object
952
+ # @yieldparam err [StandardError] error object if request failed
953
+ #
954
+ # @return [Google::Apis::TranslateV3::ListAdaptiveMtSentencesResponse]
955
+ #
956
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
957
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
958
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
959
+ def list_project_location_adaptive_mt_dataset_adaptive_mt_sentences(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
960
+ command = make_simple_command(:get, 'v3/{+parent}/adaptiveMtSentences', options)
961
+ command.response_representation = Google::Apis::TranslateV3::ListAdaptiveMtSentencesResponse::Representation
962
+ command.response_class = Google::Apis::TranslateV3::ListAdaptiveMtSentencesResponse
963
+ command.params['parent'] = parent unless parent.nil?
964
+ command.query['pageSize'] = page_size unless page_size.nil?
965
+ command.query['pageToken'] = page_token unless page_token.nil?
966
+ command.query['fields'] = fields unless fields.nil?
967
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
968
+ execute_or_queue_command(command, &block)
969
+ end
970
+
571
971
  # Creates a Dataset.
572
972
  # @param [String] parent
573
973
  # Required. The project name.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-translate_v3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.0
4
+ version: 0.34.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-01 00:00:00.000000000 Z
11
+ date: 2024-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.11.0
19
+ version: 0.12.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.11.0
29
+ version: 0.12.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-translate_v3/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-translate_v3/v0.32.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-translate_v3/v0.34.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-translate_v3
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.4.19
78
+ rubygems_version: 3.5.3
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Cloud Translation API V3