@googleapis/translate 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/v3.js ADDED
@@ -0,0 +1,1318 @@
1
+ "use strict";
2
+ // Copyright 2020 Google LLC
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
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.translate_v3 = void 0;
16
+ /* eslint-disable @typescript-eslint/no-explicit-any */
17
+ /* eslint-disable @typescript-eslint/no-unused-vars */
18
+ /* eslint-disable @typescript-eslint/no-empty-interface */
19
+ /* eslint-disable @typescript-eslint/no-namespace */
20
+ /* eslint-disable no-irregular-whitespace */
21
+ const googleapis_common_1 = require("googleapis-common");
22
+ var translate_v3;
23
+ (function (translate_v3) {
24
+ /**
25
+ * Cloud Translation API
26
+ *
27
+ * Integrates text translation into your website or application.
28
+ *
29
+ * @example
30
+ * ```js
31
+ * const {google} = require('googleapis');
32
+ * const translate = google.translate('v3');
33
+ * ```
34
+ */
35
+ class Translate {
36
+ constructor(options, google) {
37
+ this.context = {
38
+ _options: options || {},
39
+ google,
40
+ };
41
+ this.projects = new Resource$Projects(this.context);
42
+ }
43
+ }
44
+ translate_v3.Translate = Translate;
45
+ class Resource$Projects {
46
+ constructor(context) {
47
+ this.context = context;
48
+ this.locations = new Resource$Projects$Locations(this.context);
49
+ }
50
+ detectLanguage(paramsOrCallback, optionsOrCallback, callback) {
51
+ let params = (paramsOrCallback ||
52
+ {});
53
+ let options = (optionsOrCallback || {});
54
+ if (typeof paramsOrCallback === 'function') {
55
+ callback = paramsOrCallback;
56
+ params = {};
57
+ options = {};
58
+ }
59
+ if (typeof optionsOrCallback === 'function') {
60
+ callback = optionsOrCallback;
61
+ options = {};
62
+ }
63
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
64
+ const parameters = {
65
+ options: Object.assign({
66
+ url: (rootUrl + '/v3/{+parent}:detectLanguage').replace(/([^:]\/)\/+/g, '$1'),
67
+ method: 'POST',
68
+ }, options),
69
+ params,
70
+ requiredParams: ['parent'],
71
+ pathParams: ['parent'],
72
+ context: this.context,
73
+ };
74
+ if (callback) {
75
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
76
+ }
77
+ else {
78
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
79
+ }
80
+ }
81
+ getSupportedLanguages(paramsOrCallback, optionsOrCallback, callback) {
82
+ let params = (paramsOrCallback ||
83
+ {});
84
+ let options = (optionsOrCallback || {});
85
+ if (typeof paramsOrCallback === 'function') {
86
+ callback = paramsOrCallback;
87
+ params = {};
88
+ options = {};
89
+ }
90
+ if (typeof optionsOrCallback === 'function') {
91
+ callback = optionsOrCallback;
92
+ options = {};
93
+ }
94
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
95
+ const parameters = {
96
+ options: Object.assign({
97
+ url: (rootUrl + '/v3/{+parent}/supportedLanguages').replace(/([^:]\/)\/+/g, '$1'),
98
+ method: 'GET',
99
+ }, options),
100
+ params,
101
+ requiredParams: ['parent'],
102
+ pathParams: ['parent'],
103
+ context: this.context,
104
+ };
105
+ if (callback) {
106
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
107
+ }
108
+ else {
109
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
110
+ }
111
+ }
112
+ romanizeText(paramsOrCallback, optionsOrCallback, callback) {
113
+ let params = (paramsOrCallback ||
114
+ {});
115
+ let options = (optionsOrCallback || {});
116
+ if (typeof paramsOrCallback === 'function') {
117
+ callback = paramsOrCallback;
118
+ params = {};
119
+ options = {};
120
+ }
121
+ if (typeof optionsOrCallback === 'function') {
122
+ callback = optionsOrCallback;
123
+ options = {};
124
+ }
125
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
126
+ const parameters = {
127
+ options: Object.assign({
128
+ url: (rootUrl + '/v3/{+parent}:romanizeText').replace(/([^:]\/)\/+/g, '$1'),
129
+ method: 'POST',
130
+ }, options),
131
+ params,
132
+ requiredParams: ['parent'],
133
+ pathParams: ['parent'],
134
+ context: this.context,
135
+ };
136
+ if (callback) {
137
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
138
+ }
139
+ else {
140
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
141
+ }
142
+ }
143
+ translateText(paramsOrCallback, optionsOrCallback, callback) {
144
+ let params = (paramsOrCallback ||
145
+ {});
146
+ let options = (optionsOrCallback || {});
147
+ if (typeof paramsOrCallback === 'function') {
148
+ callback = paramsOrCallback;
149
+ params = {};
150
+ options = {};
151
+ }
152
+ if (typeof optionsOrCallback === 'function') {
153
+ callback = optionsOrCallback;
154
+ options = {};
155
+ }
156
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
157
+ const parameters = {
158
+ options: Object.assign({
159
+ url: (rootUrl + '/v3/{+parent}:translateText').replace(/([^:]\/)\/+/g, '$1'),
160
+ method: 'POST',
161
+ }, options),
162
+ params,
163
+ requiredParams: ['parent'],
164
+ pathParams: ['parent'],
165
+ context: this.context,
166
+ };
167
+ if (callback) {
168
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
169
+ }
170
+ else {
171
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
172
+ }
173
+ }
174
+ }
175
+ translate_v3.Resource$Projects = Resource$Projects;
176
+ class Resource$Projects$Locations {
177
+ constructor(context) {
178
+ this.context = context;
179
+ this.datasets = new Resource$Projects$Locations$Datasets(this.context);
180
+ this.glossaries = new Resource$Projects$Locations$Glossaries(this.context);
181
+ this.models = new Resource$Projects$Locations$Models(this.context);
182
+ this.operations = new Resource$Projects$Locations$Operations(this.context);
183
+ }
184
+ batchTranslateDocument(paramsOrCallback, optionsOrCallback, callback) {
185
+ let params = (paramsOrCallback ||
186
+ {});
187
+ let options = (optionsOrCallback || {});
188
+ if (typeof paramsOrCallback === 'function') {
189
+ callback = paramsOrCallback;
190
+ params =
191
+ {};
192
+ options = {};
193
+ }
194
+ if (typeof optionsOrCallback === 'function') {
195
+ callback = optionsOrCallback;
196
+ options = {};
197
+ }
198
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
199
+ const parameters = {
200
+ options: Object.assign({
201
+ url: (rootUrl + '/v3/{+parent}:batchTranslateDocument').replace(/([^:]\/)\/+/g, '$1'),
202
+ method: 'POST',
203
+ }, options),
204
+ params,
205
+ requiredParams: ['parent'],
206
+ pathParams: ['parent'],
207
+ context: this.context,
208
+ };
209
+ if (callback) {
210
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
211
+ }
212
+ else {
213
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
214
+ }
215
+ }
216
+ batchTranslateText(paramsOrCallback, optionsOrCallback, callback) {
217
+ let params = (paramsOrCallback ||
218
+ {});
219
+ let options = (optionsOrCallback || {});
220
+ if (typeof paramsOrCallback === 'function') {
221
+ callback = paramsOrCallback;
222
+ params = {};
223
+ options = {};
224
+ }
225
+ if (typeof optionsOrCallback === 'function') {
226
+ callback = optionsOrCallback;
227
+ options = {};
228
+ }
229
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
230
+ const parameters = {
231
+ options: Object.assign({
232
+ url: (rootUrl + '/v3/{+parent}:batchTranslateText').replace(/([^:]\/)\/+/g, '$1'),
233
+ method: 'POST',
234
+ }, options),
235
+ params,
236
+ requiredParams: ['parent'],
237
+ pathParams: ['parent'],
238
+ context: this.context,
239
+ };
240
+ if (callback) {
241
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
242
+ }
243
+ else {
244
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
245
+ }
246
+ }
247
+ detectLanguage(paramsOrCallback, optionsOrCallback, callback) {
248
+ let params = (paramsOrCallback ||
249
+ {});
250
+ let options = (optionsOrCallback || {});
251
+ if (typeof paramsOrCallback === 'function') {
252
+ callback = paramsOrCallback;
253
+ params = {};
254
+ options = {};
255
+ }
256
+ if (typeof optionsOrCallback === 'function') {
257
+ callback = optionsOrCallback;
258
+ options = {};
259
+ }
260
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
261
+ const parameters = {
262
+ options: Object.assign({
263
+ url: (rootUrl + '/v3/{+parent}:detectLanguage').replace(/([^:]\/)\/+/g, '$1'),
264
+ method: 'POST',
265
+ }, options),
266
+ params,
267
+ requiredParams: ['parent'],
268
+ pathParams: ['parent'],
269
+ context: this.context,
270
+ };
271
+ if (callback) {
272
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
273
+ }
274
+ else {
275
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
276
+ }
277
+ }
278
+ get(paramsOrCallback, optionsOrCallback, callback) {
279
+ let params = (paramsOrCallback ||
280
+ {});
281
+ let options = (optionsOrCallback || {});
282
+ if (typeof paramsOrCallback === 'function') {
283
+ callback = paramsOrCallback;
284
+ params = {};
285
+ options = {};
286
+ }
287
+ if (typeof optionsOrCallback === 'function') {
288
+ callback = optionsOrCallback;
289
+ options = {};
290
+ }
291
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
292
+ const parameters = {
293
+ options: Object.assign({
294
+ url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'),
295
+ method: 'GET',
296
+ }, options),
297
+ params,
298
+ requiredParams: ['name'],
299
+ pathParams: ['name'],
300
+ context: this.context,
301
+ };
302
+ if (callback) {
303
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
304
+ }
305
+ else {
306
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
307
+ }
308
+ }
309
+ getSupportedLanguages(paramsOrCallback, optionsOrCallback, callback) {
310
+ let params = (paramsOrCallback ||
311
+ {});
312
+ let options = (optionsOrCallback || {});
313
+ if (typeof paramsOrCallback === 'function') {
314
+ callback = paramsOrCallback;
315
+ params = {};
316
+ options = {};
317
+ }
318
+ if (typeof optionsOrCallback === 'function') {
319
+ callback = optionsOrCallback;
320
+ options = {};
321
+ }
322
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
323
+ const parameters = {
324
+ options: Object.assign({
325
+ url: (rootUrl + '/v3/{+parent}/supportedLanguages').replace(/([^:]\/)\/+/g, '$1'),
326
+ method: 'GET',
327
+ }, options),
328
+ params,
329
+ requiredParams: ['parent'],
330
+ pathParams: ['parent'],
331
+ context: this.context,
332
+ };
333
+ if (callback) {
334
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
335
+ }
336
+ else {
337
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
338
+ }
339
+ }
340
+ list(paramsOrCallback, optionsOrCallback, callback) {
341
+ let params = (paramsOrCallback ||
342
+ {});
343
+ let options = (optionsOrCallback || {});
344
+ if (typeof paramsOrCallback === 'function') {
345
+ callback = paramsOrCallback;
346
+ params = {};
347
+ options = {};
348
+ }
349
+ if (typeof optionsOrCallback === 'function') {
350
+ callback = optionsOrCallback;
351
+ options = {};
352
+ }
353
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
354
+ const parameters = {
355
+ options: Object.assign({
356
+ url: (rootUrl + '/v3/{+name}/locations').replace(/([^:]\/)\/+/g, '$1'),
357
+ method: 'GET',
358
+ }, options),
359
+ params,
360
+ requiredParams: ['name'],
361
+ pathParams: ['name'],
362
+ context: this.context,
363
+ };
364
+ if (callback) {
365
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
366
+ }
367
+ else {
368
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
369
+ }
370
+ }
371
+ romanizeText(paramsOrCallback, optionsOrCallback, callback) {
372
+ let params = (paramsOrCallback ||
373
+ {});
374
+ let options = (optionsOrCallback || {});
375
+ if (typeof paramsOrCallback === 'function') {
376
+ callback = paramsOrCallback;
377
+ params = {};
378
+ options = {};
379
+ }
380
+ if (typeof optionsOrCallback === 'function') {
381
+ callback = optionsOrCallback;
382
+ options = {};
383
+ }
384
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
385
+ const parameters = {
386
+ options: Object.assign({
387
+ url: (rootUrl + '/v3/{+parent}:romanizeText').replace(/([^:]\/)\/+/g, '$1'),
388
+ method: 'POST',
389
+ }, options),
390
+ params,
391
+ requiredParams: ['parent'],
392
+ pathParams: ['parent'],
393
+ context: this.context,
394
+ };
395
+ if (callback) {
396
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
397
+ }
398
+ else {
399
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
400
+ }
401
+ }
402
+ translateDocument(paramsOrCallback, optionsOrCallback, callback) {
403
+ let params = (paramsOrCallback ||
404
+ {});
405
+ let options = (optionsOrCallback || {});
406
+ if (typeof paramsOrCallback === 'function') {
407
+ callback = paramsOrCallback;
408
+ params = {};
409
+ options = {};
410
+ }
411
+ if (typeof optionsOrCallback === 'function') {
412
+ callback = optionsOrCallback;
413
+ options = {};
414
+ }
415
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
416
+ const parameters = {
417
+ options: Object.assign({
418
+ url: (rootUrl + '/v3/{+parent}:translateDocument').replace(/([^:]\/)\/+/g, '$1'),
419
+ method: 'POST',
420
+ }, options),
421
+ params,
422
+ requiredParams: ['parent'],
423
+ pathParams: ['parent'],
424
+ context: this.context,
425
+ };
426
+ if (callback) {
427
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
428
+ }
429
+ else {
430
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
431
+ }
432
+ }
433
+ translateText(paramsOrCallback, optionsOrCallback, callback) {
434
+ let params = (paramsOrCallback ||
435
+ {});
436
+ let options = (optionsOrCallback || {});
437
+ if (typeof paramsOrCallback === 'function') {
438
+ callback = paramsOrCallback;
439
+ params = {};
440
+ options = {};
441
+ }
442
+ if (typeof optionsOrCallback === 'function') {
443
+ callback = optionsOrCallback;
444
+ options = {};
445
+ }
446
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
447
+ const parameters = {
448
+ options: Object.assign({
449
+ url: (rootUrl + '/v3/{+parent}:translateText').replace(/([^:]\/)\/+/g, '$1'),
450
+ method: 'POST',
451
+ }, options),
452
+ params,
453
+ requiredParams: ['parent'],
454
+ pathParams: ['parent'],
455
+ context: this.context,
456
+ };
457
+ if (callback) {
458
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
459
+ }
460
+ else {
461
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
462
+ }
463
+ }
464
+ }
465
+ translate_v3.Resource$Projects$Locations = Resource$Projects$Locations;
466
+ class Resource$Projects$Locations$Datasets {
467
+ constructor(context) {
468
+ this.context = context;
469
+ this.examples = new Resource$Projects$Locations$Datasets$Examples(this.context);
470
+ }
471
+ create(paramsOrCallback, optionsOrCallback, callback) {
472
+ let params = (paramsOrCallback ||
473
+ {});
474
+ let options = (optionsOrCallback || {});
475
+ if (typeof paramsOrCallback === 'function') {
476
+ callback = paramsOrCallback;
477
+ params = {};
478
+ options = {};
479
+ }
480
+ if (typeof optionsOrCallback === 'function') {
481
+ callback = optionsOrCallback;
482
+ options = {};
483
+ }
484
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
485
+ const parameters = {
486
+ options: Object.assign({
487
+ url: (rootUrl + '/v3/{+parent}/datasets').replace(/([^:]\/)\/+/g, '$1'),
488
+ method: 'POST',
489
+ }, options),
490
+ params,
491
+ requiredParams: ['parent'],
492
+ pathParams: ['parent'],
493
+ context: this.context,
494
+ };
495
+ if (callback) {
496
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
497
+ }
498
+ else {
499
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
500
+ }
501
+ }
502
+ delete(paramsOrCallback, optionsOrCallback, callback) {
503
+ let params = (paramsOrCallback ||
504
+ {});
505
+ let options = (optionsOrCallback || {});
506
+ if (typeof paramsOrCallback === 'function') {
507
+ callback = paramsOrCallback;
508
+ params = {};
509
+ options = {};
510
+ }
511
+ if (typeof optionsOrCallback === 'function') {
512
+ callback = optionsOrCallback;
513
+ options = {};
514
+ }
515
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
516
+ const parameters = {
517
+ options: Object.assign({
518
+ url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'),
519
+ method: 'DELETE',
520
+ }, options),
521
+ params,
522
+ requiredParams: ['name'],
523
+ pathParams: ['name'],
524
+ context: this.context,
525
+ };
526
+ if (callback) {
527
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
528
+ }
529
+ else {
530
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
531
+ }
532
+ }
533
+ exportData(paramsOrCallback, optionsOrCallback, callback) {
534
+ let params = (paramsOrCallback ||
535
+ {});
536
+ let options = (optionsOrCallback || {});
537
+ if (typeof paramsOrCallback === 'function') {
538
+ callback = paramsOrCallback;
539
+ params = {};
540
+ options = {};
541
+ }
542
+ if (typeof optionsOrCallback === 'function') {
543
+ callback = optionsOrCallback;
544
+ options = {};
545
+ }
546
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
547
+ const parameters = {
548
+ options: Object.assign({
549
+ url: (rootUrl + '/v3/{+dataset}:exportData').replace(/([^:]\/)\/+/g, '$1'),
550
+ method: 'POST',
551
+ }, options),
552
+ params,
553
+ requiredParams: ['dataset'],
554
+ pathParams: ['dataset'],
555
+ context: this.context,
556
+ };
557
+ if (callback) {
558
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
559
+ }
560
+ else {
561
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
562
+ }
563
+ }
564
+ get(paramsOrCallback, optionsOrCallback, callback) {
565
+ let params = (paramsOrCallback ||
566
+ {});
567
+ let options = (optionsOrCallback || {});
568
+ if (typeof paramsOrCallback === 'function') {
569
+ callback = paramsOrCallback;
570
+ params = {};
571
+ options = {};
572
+ }
573
+ if (typeof optionsOrCallback === 'function') {
574
+ callback = optionsOrCallback;
575
+ options = {};
576
+ }
577
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
578
+ const parameters = {
579
+ options: Object.assign({
580
+ url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'),
581
+ method: 'GET',
582
+ }, options),
583
+ params,
584
+ requiredParams: ['name'],
585
+ pathParams: ['name'],
586
+ context: this.context,
587
+ };
588
+ if (callback) {
589
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
590
+ }
591
+ else {
592
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
593
+ }
594
+ }
595
+ importData(paramsOrCallback, optionsOrCallback, callback) {
596
+ let params = (paramsOrCallback ||
597
+ {});
598
+ let options = (optionsOrCallback || {});
599
+ if (typeof paramsOrCallback === 'function') {
600
+ callback = paramsOrCallback;
601
+ params = {};
602
+ options = {};
603
+ }
604
+ if (typeof optionsOrCallback === 'function') {
605
+ callback = optionsOrCallback;
606
+ options = {};
607
+ }
608
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
609
+ const parameters = {
610
+ options: Object.assign({
611
+ url: (rootUrl + '/v3/{+dataset}:importData').replace(/([^:]\/)\/+/g, '$1'),
612
+ method: 'POST',
613
+ }, options),
614
+ params,
615
+ requiredParams: ['dataset'],
616
+ pathParams: ['dataset'],
617
+ context: this.context,
618
+ };
619
+ if (callback) {
620
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
621
+ }
622
+ else {
623
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
624
+ }
625
+ }
626
+ list(paramsOrCallback, optionsOrCallback, callback) {
627
+ let params = (paramsOrCallback ||
628
+ {});
629
+ let options = (optionsOrCallback || {});
630
+ if (typeof paramsOrCallback === 'function') {
631
+ callback = paramsOrCallback;
632
+ params = {};
633
+ options = {};
634
+ }
635
+ if (typeof optionsOrCallback === 'function') {
636
+ callback = optionsOrCallback;
637
+ options = {};
638
+ }
639
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
640
+ const parameters = {
641
+ options: Object.assign({
642
+ url: (rootUrl + '/v3/{+parent}/datasets').replace(/([^:]\/)\/+/g, '$1'),
643
+ method: 'GET',
644
+ }, options),
645
+ params,
646
+ requiredParams: ['parent'],
647
+ pathParams: ['parent'],
648
+ context: this.context,
649
+ };
650
+ if (callback) {
651
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
652
+ }
653
+ else {
654
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
655
+ }
656
+ }
657
+ }
658
+ translate_v3.Resource$Projects$Locations$Datasets = Resource$Projects$Locations$Datasets;
659
+ class Resource$Projects$Locations$Datasets$Examples {
660
+ constructor(context) {
661
+ this.context = context;
662
+ }
663
+ list(paramsOrCallback, optionsOrCallback, callback) {
664
+ let params = (paramsOrCallback ||
665
+ {});
666
+ let options = (optionsOrCallback || {});
667
+ if (typeof paramsOrCallback === 'function') {
668
+ callback = paramsOrCallback;
669
+ params =
670
+ {};
671
+ options = {};
672
+ }
673
+ if (typeof optionsOrCallback === 'function') {
674
+ callback = optionsOrCallback;
675
+ options = {};
676
+ }
677
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
678
+ const parameters = {
679
+ options: Object.assign({
680
+ url: (rootUrl + '/v3/{+parent}/examples').replace(/([^:]\/)\/+/g, '$1'),
681
+ method: 'GET',
682
+ }, options),
683
+ params,
684
+ requiredParams: ['parent'],
685
+ pathParams: ['parent'],
686
+ context: this.context,
687
+ };
688
+ if (callback) {
689
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
690
+ }
691
+ else {
692
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
693
+ }
694
+ }
695
+ }
696
+ translate_v3.Resource$Projects$Locations$Datasets$Examples = Resource$Projects$Locations$Datasets$Examples;
697
+ class Resource$Projects$Locations$Glossaries {
698
+ constructor(context) {
699
+ this.context = context;
700
+ this.glossaryEntries =
701
+ new Resource$Projects$Locations$Glossaries$Glossaryentries(this.context);
702
+ }
703
+ create(paramsOrCallback, optionsOrCallback, callback) {
704
+ let params = (paramsOrCallback ||
705
+ {});
706
+ let options = (optionsOrCallback || {});
707
+ if (typeof paramsOrCallback === 'function') {
708
+ callback = paramsOrCallback;
709
+ params = {};
710
+ options = {};
711
+ }
712
+ if (typeof optionsOrCallback === 'function') {
713
+ callback = optionsOrCallback;
714
+ options = {};
715
+ }
716
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
717
+ const parameters = {
718
+ options: Object.assign({
719
+ url: (rootUrl + '/v3/{+parent}/glossaries').replace(/([^:]\/)\/+/g, '$1'),
720
+ method: 'POST',
721
+ }, options),
722
+ params,
723
+ requiredParams: ['parent'],
724
+ pathParams: ['parent'],
725
+ context: this.context,
726
+ };
727
+ if (callback) {
728
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
729
+ }
730
+ else {
731
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
732
+ }
733
+ }
734
+ delete(paramsOrCallback, optionsOrCallback, callback) {
735
+ let params = (paramsOrCallback ||
736
+ {});
737
+ let options = (optionsOrCallback || {});
738
+ if (typeof paramsOrCallback === 'function') {
739
+ callback = paramsOrCallback;
740
+ params = {};
741
+ options = {};
742
+ }
743
+ if (typeof optionsOrCallback === 'function') {
744
+ callback = optionsOrCallback;
745
+ options = {};
746
+ }
747
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
748
+ const parameters = {
749
+ options: Object.assign({
750
+ url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'),
751
+ method: 'DELETE',
752
+ }, options),
753
+ params,
754
+ requiredParams: ['name'],
755
+ pathParams: ['name'],
756
+ context: this.context,
757
+ };
758
+ if (callback) {
759
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
760
+ }
761
+ else {
762
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
763
+ }
764
+ }
765
+ get(paramsOrCallback, optionsOrCallback, callback) {
766
+ let params = (paramsOrCallback ||
767
+ {});
768
+ let options = (optionsOrCallback || {});
769
+ if (typeof paramsOrCallback === 'function') {
770
+ callback = paramsOrCallback;
771
+ params = {};
772
+ options = {};
773
+ }
774
+ if (typeof optionsOrCallback === 'function') {
775
+ callback = optionsOrCallback;
776
+ options = {};
777
+ }
778
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
779
+ const parameters = {
780
+ options: Object.assign({
781
+ url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'),
782
+ method: 'GET',
783
+ }, options),
784
+ params,
785
+ requiredParams: ['name'],
786
+ pathParams: ['name'],
787
+ context: this.context,
788
+ };
789
+ if (callback) {
790
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
791
+ }
792
+ else {
793
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
794
+ }
795
+ }
796
+ list(paramsOrCallback, optionsOrCallback, callback) {
797
+ let params = (paramsOrCallback ||
798
+ {});
799
+ let options = (optionsOrCallback || {});
800
+ if (typeof paramsOrCallback === 'function') {
801
+ callback = paramsOrCallback;
802
+ params = {};
803
+ options = {};
804
+ }
805
+ if (typeof optionsOrCallback === 'function') {
806
+ callback = optionsOrCallback;
807
+ options = {};
808
+ }
809
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
810
+ const parameters = {
811
+ options: Object.assign({
812
+ url: (rootUrl + '/v3/{+parent}/glossaries').replace(/([^:]\/)\/+/g, '$1'),
813
+ method: 'GET',
814
+ }, options),
815
+ params,
816
+ requiredParams: ['parent'],
817
+ pathParams: ['parent'],
818
+ context: this.context,
819
+ };
820
+ if (callback) {
821
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
822
+ }
823
+ else {
824
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
825
+ }
826
+ }
827
+ patch(paramsOrCallback, optionsOrCallback, callback) {
828
+ let params = (paramsOrCallback ||
829
+ {});
830
+ let options = (optionsOrCallback || {});
831
+ if (typeof paramsOrCallback === 'function') {
832
+ callback = paramsOrCallback;
833
+ params = {};
834
+ options = {};
835
+ }
836
+ if (typeof optionsOrCallback === 'function') {
837
+ callback = optionsOrCallback;
838
+ options = {};
839
+ }
840
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
841
+ const parameters = {
842
+ options: Object.assign({
843
+ url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'),
844
+ method: 'PATCH',
845
+ }, options),
846
+ params,
847
+ requiredParams: ['name'],
848
+ pathParams: ['name'],
849
+ context: this.context,
850
+ };
851
+ if (callback) {
852
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
853
+ }
854
+ else {
855
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
856
+ }
857
+ }
858
+ }
859
+ translate_v3.Resource$Projects$Locations$Glossaries = Resource$Projects$Locations$Glossaries;
860
+ class Resource$Projects$Locations$Glossaries$Glossaryentries {
861
+ constructor(context) {
862
+ this.context = context;
863
+ }
864
+ create(paramsOrCallback, optionsOrCallback, callback) {
865
+ let params = (paramsOrCallback ||
866
+ {});
867
+ let options = (optionsOrCallback || {});
868
+ if (typeof paramsOrCallback === 'function') {
869
+ callback = paramsOrCallback;
870
+ params =
871
+ {};
872
+ options = {};
873
+ }
874
+ if (typeof optionsOrCallback === 'function') {
875
+ callback = optionsOrCallback;
876
+ options = {};
877
+ }
878
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
879
+ const parameters = {
880
+ options: Object.assign({
881
+ url: (rootUrl + '/v3/{+parent}/glossaryEntries').replace(/([^:]\/)\/+/g, '$1'),
882
+ method: 'POST',
883
+ }, options),
884
+ params,
885
+ requiredParams: ['parent'],
886
+ pathParams: ['parent'],
887
+ context: this.context,
888
+ };
889
+ if (callback) {
890
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
891
+ }
892
+ else {
893
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
894
+ }
895
+ }
896
+ delete(paramsOrCallback, optionsOrCallback, callback) {
897
+ let params = (paramsOrCallback ||
898
+ {});
899
+ let options = (optionsOrCallback || {});
900
+ if (typeof paramsOrCallback === 'function') {
901
+ callback = paramsOrCallback;
902
+ params =
903
+ {};
904
+ options = {};
905
+ }
906
+ if (typeof optionsOrCallback === 'function') {
907
+ callback = optionsOrCallback;
908
+ options = {};
909
+ }
910
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
911
+ const parameters = {
912
+ options: Object.assign({
913
+ url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'),
914
+ method: 'DELETE',
915
+ }, options),
916
+ params,
917
+ requiredParams: ['name'],
918
+ pathParams: ['name'],
919
+ context: this.context,
920
+ };
921
+ if (callback) {
922
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
923
+ }
924
+ else {
925
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
926
+ }
927
+ }
928
+ get(paramsOrCallback, optionsOrCallback, callback) {
929
+ let params = (paramsOrCallback ||
930
+ {});
931
+ let options = (optionsOrCallback || {});
932
+ if (typeof paramsOrCallback === 'function') {
933
+ callback = paramsOrCallback;
934
+ params =
935
+ {};
936
+ options = {};
937
+ }
938
+ if (typeof optionsOrCallback === 'function') {
939
+ callback = optionsOrCallback;
940
+ options = {};
941
+ }
942
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
943
+ const parameters = {
944
+ options: Object.assign({
945
+ url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'),
946
+ method: 'GET',
947
+ }, options),
948
+ params,
949
+ requiredParams: ['name'],
950
+ pathParams: ['name'],
951
+ context: this.context,
952
+ };
953
+ if (callback) {
954
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
955
+ }
956
+ else {
957
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
958
+ }
959
+ }
960
+ list(paramsOrCallback, optionsOrCallback, callback) {
961
+ let params = (paramsOrCallback ||
962
+ {});
963
+ let options = (optionsOrCallback || {});
964
+ if (typeof paramsOrCallback === 'function') {
965
+ callback = paramsOrCallback;
966
+ params =
967
+ {};
968
+ options = {};
969
+ }
970
+ if (typeof optionsOrCallback === 'function') {
971
+ callback = optionsOrCallback;
972
+ options = {};
973
+ }
974
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
975
+ const parameters = {
976
+ options: Object.assign({
977
+ url: (rootUrl + '/v3/{+parent}/glossaryEntries').replace(/([^:]\/)\/+/g, '$1'),
978
+ method: 'GET',
979
+ }, options),
980
+ params,
981
+ requiredParams: ['parent'],
982
+ pathParams: ['parent'],
983
+ context: this.context,
984
+ };
985
+ if (callback) {
986
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
987
+ }
988
+ else {
989
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
990
+ }
991
+ }
992
+ patch(paramsOrCallback, optionsOrCallback, callback) {
993
+ let params = (paramsOrCallback ||
994
+ {});
995
+ let options = (optionsOrCallback || {});
996
+ if (typeof paramsOrCallback === 'function') {
997
+ callback = paramsOrCallback;
998
+ params =
999
+ {};
1000
+ options = {};
1001
+ }
1002
+ if (typeof optionsOrCallback === 'function') {
1003
+ callback = optionsOrCallback;
1004
+ options = {};
1005
+ }
1006
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
1007
+ const parameters = {
1008
+ options: Object.assign({
1009
+ url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1010
+ method: 'PATCH',
1011
+ }, options),
1012
+ params,
1013
+ requiredParams: ['name'],
1014
+ pathParams: ['name'],
1015
+ context: this.context,
1016
+ };
1017
+ if (callback) {
1018
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1019
+ }
1020
+ else {
1021
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1022
+ }
1023
+ }
1024
+ }
1025
+ translate_v3.Resource$Projects$Locations$Glossaries$Glossaryentries = Resource$Projects$Locations$Glossaries$Glossaryentries;
1026
+ class Resource$Projects$Locations$Models {
1027
+ constructor(context) {
1028
+ this.context = context;
1029
+ }
1030
+ create(paramsOrCallback, optionsOrCallback, callback) {
1031
+ let params = (paramsOrCallback ||
1032
+ {});
1033
+ let options = (optionsOrCallback || {});
1034
+ if (typeof paramsOrCallback === 'function') {
1035
+ callback = paramsOrCallback;
1036
+ params = {};
1037
+ options = {};
1038
+ }
1039
+ if (typeof optionsOrCallback === 'function') {
1040
+ callback = optionsOrCallback;
1041
+ options = {};
1042
+ }
1043
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
1044
+ const parameters = {
1045
+ options: Object.assign({
1046
+ url: (rootUrl + '/v3/{+parent}/models').replace(/([^:]\/)\/+/g, '$1'),
1047
+ method: 'POST',
1048
+ }, options),
1049
+ params,
1050
+ requiredParams: ['parent'],
1051
+ pathParams: ['parent'],
1052
+ context: this.context,
1053
+ };
1054
+ if (callback) {
1055
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1056
+ }
1057
+ else {
1058
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1059
+ }
1060
+ }
1061
+ delete(paramsOrCallback, optionsOrCallback, callback) {
1062
+ let params = (paramsOrCallback ||
1063
+ {});
1064
+ let options = (optionsOrCallback || {});
1065
+ if (typeof paramsOrCallback === 'function') {
1066
+ callback = paramsOrCallback;
1067
+ params = {};
1068
+ options = {};
1069
+ }
1070
+ if (typeof optionsOrCallback === 'function') {
1071
+ callback = optionsOrCallback;
1072
+ options = {};
1073
+ }
1074
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
1075
+ const parameters = {
1076
+ options: Object.assign({
1077
+ url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1078
+ method: 'DELETE',
1079
+ }, options),
1080
+ params,
1081
+ requiredParams: ['name'],
1082
+ pathParams: ['name'],
1083
+ context: this.context,
1084
+ };
1085
+ if (callback) {
1086
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1087
+ }
1088
+ else {
1089
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1090
+ }
1091
+ }
1092
+ get(paramsOrCallback, optionsOrCallback, callback) {
1093
+ let params = (paramsOrCallback ||
1094
+ {});
1095
+ let options = (optionsOrCallback || {});
1096
+ if (typeof paramsOrCallback === 'function') {
1097
+ callback = paramsOrCallback;
1098
+ params = {};
1099
+ options = {};
1100
+ }
1101
+ if (typeof optionsOrCallback === 'function') {
1102
+ callback = optionsOrCallback;
1103
+ options = {};
1104
+ }
1105
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
1106
+ const parameters = {
1107
+ options: Object.assign({
1108
+ url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1109
+ method: 'GET',
1110
+ }, options),
1111
+ params,
1112
+ requiredParams: ['name'],
1113
+ pathParams: ['name'],
1114
+ context: this.context,
1115
+ };
1116
+ if (callback) {
1117
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1118
+ }
1119
+ else {
1120
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1121
+ }
1122
+ }
1123
+ list(paramsOrCallback, optionsOrCallback, callback) {
1124
+ let params = (paramsOrCallback ||
1125
+ {});
1126
+ let options = (optionsOrCallback || {});
1127
+ if (typeof paramsOrCallback === 'function') {
1128
+ callback = paramsOrCallback;
1129
+ params = {};
1130
+ options = {};
1131
+ }
1132
+ if (typeof optionsOrCallback === 'function') {
1133
+ callback = optionsOrCallback;
1134
+ options = {};
1135
+ }
1136
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
1137
+ const parameters = {
1138
+ options: Object.assign({
1139
+ url: (rootUrl + '/v3/{+parent}/models').replace(/([^:]\/)\/+/g, '$1'),
1140
+ method: 'GET',
1141
+ }, options),
1142
+ params,
1143
+ requiredParams: ['parent'],
1144
+ pathParams: ['parent'],
1145
+ context: this.context,
1146
+ };
1147
+ if (callback) {
1148
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1149
+ }
1150
+ else {
1151
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1152
+ }
1153
+ }
1154
+ }
1155
+ translate_v3.Resource$Projects$Locations$Models = Resource$Projects$Locations$Models;
1156
+ class Resource$Projects$Locations$Operations {
1157
+ constructor(context) {
1158
+ this.context = context;
1159
+ }
1160
+ cancel(paramsOrCallback, optionsOrCallback, callback) {
1161
+ let params = (paramsOrCallback ||
1162
+ {});
1163
+ let options = (optionsOrCallback || {});
1164
+ if (typeof paramsOrCallback === 'function') {
1165
+ callback = paramsOrCallback;
1166
+ params = {};
1167
+ options = {};
1168
+ }
1169
+ if (typeof optionsOrCallback === 'function') {
1170
+ callback = optionsOrCallback;
1171
+ options = {};
1172
+ }
1173
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
1174
+ const parameters = {
1175
+ options: Object.assign({
1176
+ url: (rootUrl + '/v3/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
1177
+ method: 'POST',
1178
+ }, options),
1179
+ params,
1180
+ requiredParams: ['name'],
1181
+ pathParams: ['name'],
1182
+ context: this.context,
1183
+ };
1184
+ if (callback) {
1185
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1186
+ }
1187
+ else {
1188
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1189
+ }
1190
+ }
1191
+ delete(paramsOrCallback, optionsOrCallback, callback) {
1192
+ let params = (paramsOrCallback ||
1193
+ {});
1194
+ let options = (optionsOrCallback || {});
1195
+ if (typeof paramsOrCallback === 'function') {
1196
+ callback = paramsOrCallback;
1197
+ params = {};
1198
+ options = {};
1199
+ }
1200
+ if (typeof optionsOrCallback === 'function') {
1201
+ callback = optionsOrCallback;
1202
+ options = {};
1203
+ }
1204
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
1205
+ const parameters = {
1206
+ options: Object.assign({
1207
+ url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1208
+ method: 'DELETE',
1209
+ }, options),
1210
+ params,
1211
+ requiredParams: ['name'],
1212
+ pathParams: ['name'],
1213
+ context: this.context,
1214
+ };
1215
+ if (callback) {
1216
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1217
+ }
1218
+ else {
1219
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1220
+ }
1221
+ }
1222
+ get(paramsOrCallback, optionsOrCallback, callback) {
1223
+ let params = (paramsOrCallback ||
1224
+ {});
1225
+ let options = (optionsOrCallback || {});
1226
+ if (typeof paramsOrCallback === 'function') {
1227
+ callback = paramsOrCallback;
1228
+ params = {};
1229
+ options = {};
1230
+ }
1231
+ if (typeof optionsOrCallback === 'function') {
1232
+ callback = optionsOrCallback;
1233
+ options = {};
1234
+ }
1235
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
1236
+ const parameters = {
1237
+ options: Object.assign({
1238
+ url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1239
+ method: 'GET',
1240
+ }, options),
1241
+ params,
1242
+ requiredParams: ['name'],
1243
+ pathParams: ['name'],
1244
+ context: this.context,
1245
+ };
1246
+ if (callback) {
1247
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1248
+ }
1249
+ else {
1250
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1251
+ }
1252
+ }
1253
+ list(paramsOrCallback, optionsOrCallback, callback) {
1254
+ let params = (paramsOrCallback ||
1255
+ {});
1256
+ let options = (optionsOrCallback || {});
1257
+ if (typeof paramsOrCallback === 'function') {
1258
+ callback = paramsOrCallback;
1259
+ params = {};
1260
+ options = {};
1261
+ }
1262
+ if (typeof optionsOrCallback === 'function') {
1263
+ callback = optionsOrCallback;
1264
+ options = {};
1265
+ }
1266
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
1267
+ const parameters = {
1268
+ options: Object.assign({
1269
+ url: (rootUrl + '/v3/{+name}/operations').replace(/([^:]\/)\/+/g, '$1'),
1270
+ method: 'GET',
1271
+ }, options),
1272
+ params,
1273
+ requiredParams: ['name'],
1274
+ pathParams: ['name'],
1275
+ context: this.context,
1276
+ };
1277
+ if (callback) {
1278
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1279
+ }
1280
+ else {
1281
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1282
+ }
1283
+ }
1284
+ wait(paramsOrCallback, optionsOrCallback, callback) {
1285
+ let params = (paramsOrCallback ||
1286
+ {});
1287
+ let options = (optionsOrCallback || {});
1288
+ if (typeof paramsOrCallback === 'function') {
1289
+ callback = paramsOrCallback;
1290
+ params = {};
1291
+ options = {};
1292
+ }
1293
+ if (typeof optionsOrCallback === 'function') {
1294
+ callback = optionsOrCallback;
1295
+ options = {};
1296
+ }
1297
+ const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
1298
+ const parameters = {
1299
+ options: Object.assign({
1300
+ url: (rootUrl + '/v3/{+name}:wait').replace(/([^:]\/)\/+/g, '$1'),
1301
+ method: 'POST',
1302
+ }, options),
1303
+ params,
1304
+ requiredParams: ['name'],
1305
+ pathParams: ['name'],
1306
+ context: this.context,
1307
+ };
1308
+ if (callback) {
1309
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1310
+ }
1311
+ else {
1312
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1313
+ }
1314
+ }
1315
+ }
1316
+ translate_v3.Resource$Projects$Locations$Operations = Resource$Projects$Locations$Operations;
1317
+ })(translate_v3 = exports.translate_v3 || (exports.translate_v3 = {}));
1318
+ //# sourceMappingURL=v3.js.map