google-cloud-translate-v3 0.9.0 → 0.11.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.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +72 -101
- data/lib/google/cloud/translate/v3/adaptive_mt_pb.rb +67 -0
- data/lib/google/cloud/translate/v3/common_pb.rb +46 -0
- data/lib/google/cloud/translate/v3/translation_service/client.rb +1163 -148
- data/lib/google/cloud/translate/v3/translation_service/operations.rb +28 -6
- data/lib/google/cloud/translate/v3/translation_service/paths.rb +40 -0
- data/lib/google/cloud/translate/v3/translation_service/rest/client.rb +1049 -101
- data/lib/google/cloud/translate/v3/translation_service/rest/operations.rb +33 -8
- data/lib/google/cloud/translate/v3/translation_service/rest/service_stub.rb +614 -2
- data/lib/google/cloud/translate/v3/translation_service_pb.rb +2 -1
- data/lib/google/cloud/translate/v3/translation_service_services_pb.rb +22 -0
- data/lib/google/cloud/translate/v3/version.rb +1 -1
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/cloud/translate/v3/adaptive_mt.rb +327 -0
- data/proto_docs/google/cloud/translate/v3/common.rb +61 -0
- data/proto_docs/google/cloud/translate/v3/translation_service.rb +3 -3
- metadata +9 -5
@@ -30,16 +30,28 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
def initialize endpoint:, credentials:
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
34
34
|
# These require statements are intentionally placed here to initialize
|
35
35
|
# the REST modules only when it's required.
|
36
36
|
require "gapic/rest"
|
37
37
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
39
|
+
endpoint_template: endpoint_template,
|
40
|
+
universe_domain: universe_domain,
|
41
|
+
credentials: credentials,
|
39
42
|
numeric_enums: true,
|
40
43
|
raise_faraday_errors: false
|
41
44
|
end
|
42
45
|
|
46
|
+
##
|
47
|
+
# The effective universe domain
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
def universe_domain
|
52
|
+
@client_stub.universe_domain
|
53
|
+
end
|
54
|
+
|
43
55
|
##
|
44
56
|
# Baseline implementation for the translate_text REST call
|
45
57
|
#
|
@@ -420,6 +432,386 @@ module Google
|
|
420
432
|
result
|
421
433
|
end
|
422
434
|
|
435
|
+
##
|
436
|
+
# Baseline implementation for the create_adaptive_mt_dataset REST call
|
437
|
+
#
|
438
|
+
# @param request_pb [::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest]
|
439
|
+
# A request object representing the call parameters. Required.
|
440
|
+
# @param options [::Gapic::CallOptions]
|
441
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
442
|
+
#
|
443
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
444
|
+
# @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtDataset]
|
445
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
446
|
+
#
|
447
|
+
# @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset]
|
448
|
+
# A result object deserialized from the server's reply
|
449
|
+
def create_adaptive_mt_dataset request_pb, options = nil
|
450
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
451
|
+
|
452
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_adaptive_mt_dataset_request request_pb
|
453
|
+
query_string_params = if query_string_params.any?
|
454
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
455
|
+
else
|
456
|
+
{}
|
457
|
+
end
|
458
|
+
|
459
|
+
response = @client_stub.make_http_request(
|
460
|
+
verb,
|
461
|
+
uri: uri,
|
462
|
+
body: body || "",
|
463
|
+
params: query_string_params,
|
464
|
+
options: options
|
465
|
+
)
|
466
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
467
|
+
result = ::Google::Cloud::Translate::V3::AdaptiveMtDataset.decode_json response.body, ignore_unknown_fields: true
|
468
|
+
|
469
|
+
yield result, operation if block_given?
|
470
|
+
result
|
471
|
+
end
|
472
|
+
|
473
|
+
##
|
474
|
+
# Baseline implementation for the delete_adaptive_mt_dataset REST call
|
475
|
+
#
|
476
|
+
# @param request_pb [::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest]
|
477
|
+
# A request object representing the call parameters. Required.
|
478
|
+
# @param options [::Gapic::CallOptions]
|
479
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
480
|
+
#
|
481
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
482
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
483
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
484
|
+
#
|
485
|
+
# @return [::Google::Protobuf::Empty]
|
486
|
+
# A result object deserialized from the server's reply
|
487
|
+
def delete_adaptive_mt_dataset request_pb, options = nil
|
488
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
489
|
+
|
490
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_adaptive_mt_dataset_request request_pb
|
491
|
+
query_string_params = if query_string_params.any?
|
492
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
493
|
+
else
|
494
|
+
{}
|
495
|
+
end
|
496
|
+
|
497
|
+
response = @client_stub.make_http_request(
|
498
|
+
verb,
|
499
|
+
uri: uri,
|
500
|
+
body: body || "",
|
501
|
+
params: query_string_params,
|
502
|
+
options: options
|
503
|
+
)
|
504
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
505
|
+
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
506
|
+
|
507
|
+
yield result, operation if block_given?
|
508
|
+
result
|
509
|
+
end
|
510
|
+
|
511
|
+
##
|
512
|
+
# Baseline implementation for the get_adaptive_mt_dataset REST call
|
513
|
+
#
|
514
|
+
# @param request_pb [::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest]
|
515
|
+
# A request object representing the call parameters. Required.
|
516
|
+
# @param options [::Gapic::CallOptions]
|
517
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
518
|
+
#
|
519
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
520
|
+
# @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtDataset]
|
521
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
522
|
+
#
|
523
|
+
# @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset]
|
524
|
+
# A result object deserialized from the server's reply
|
525
|
+
def get_adaptive_mt_dataset request_pb, options = nil
|
526
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
527
|
+
|
528
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_adaptive_mt_dataset_request request_pb
|
529
|
+
query_string_params = if query_string_params.any?
|
530
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
531
|
+
else
|
532
|
+
{}
|
533
|
+
end
|
534
|
+
|
535
|
+
response = @client_stub.make_http_request(
|
536
|
+
verb,
|
537
|
+
uri: uri,
|
538
|
+
body: body || "",
|
539
|
+
params: query_string_params,
|
540
|
+
options: options
|
541
|
+
)
|
542
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
543
|
+
result = ::Google::Cloud::Translate::V3::AdaptiveMtDataset.decode_json response.body, ignore_unknown_fields: true
|
544
|
+
|
545
|
+
yield result, operation if block_given?
|
546
|
+
result
|
547
|
+
end
|
548
|
+
|
549
|
+
##
|
550
|
+
# Baseline implementation for the list_adaptive_mt_datasets REST call
|
551
|
+
#
|
552
|
+
# @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest]
|
553
|
+
# A request object representing the call parameters. Required.
|
554
|
+
# @param options [::Gapic::CallOptions]
|
555
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
556
|
+
#
|
557
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
558
|
+
# @yieldparam result [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse]
|
559
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
560
|
+
#
|
561
|
+
# @return [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse]
|
562
|
+
# A result object deserialized from the server's reply
|
563
|
+
def list_adaptive_mt_datasets request_pb, options = nil
|
564
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
565
|
+
|
566
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_adaptive_mt_datasets_request request_pb
|
567
|
+
query_string_params = if query_string_params.any?
|
568
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
569
|
+
else
|
570
|
+
{}
|
571
|
+
end
|
572
|
+
|
573
|
+
response = @client_stub.make_http_request(
|
574
|
+
verb,
|
575
|
+
uri: uri,
|
576
|
+
body: body || "",
|
577
|
+
params: query_string_params,
|
578
|
+
options: options
|
579
|
+
)
|
580
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
581
|
+
result = ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse.decode_json response.body, ignore_unknown_fields: true
|
582
|
+
|
583
|
+
yield result, operation if block_given?
|
584
|
+
result
|
585
|
+
end
|
586
|
+
|
587
|
+
##
|
588
|
+
# Baseline implementation for the adaptive_mt_translate REST call
|
589
|
+
#
|
590
|
+
# @param request_pb [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest]
|
591
|
+
# A request object representing the call parameters. Required.
|
592
|
+
# @param options [::Gapic::CallOptions]
|
593
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
594
|
+
#
|
595
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
596
|
+
# @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse]
|
597
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
598
|
+
#
|
599
|
+
# @return [::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse]
|
600
|
+
# A result object deserialized from the server's reply
|
601
|
+
def adaptive_mt_translate request_pb, options = nil
|
602
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
603
|
+
|
604
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_adaptive_mt_translate_request request_pb
|
605
|
+
query_string_params = if query_string_params.any?
|
606
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
607
|
+
else
|
608
|
+
{}
|
609
|
+
end
|
610
|
+
|
611
|
+
response = @client_stub.make_http_request(
|
612
|
+
verb,
|
613
|
+
uri: uri,
|
614
|
+
body: body || "",
|
615
|
+
params: query_string_params,
|
616
|
+
options: options
|
617
|
+
)
|
618
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
619
|
+
result = ::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse.decode_json response.body, ignore_unknown_fields: true
|
620
|
+
|
621
|
+
yield result, operation if block_given?
|
622
|
+
result
|
623
|
+
end
|
624
|
+
|
625
|
+
##
|
626
|
+
# Baseline implementation for the get_adaptive_mt_file REST call
|
627
|
+
#
|
628
|
+
# @param request_pb [::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest]
|
629
|
+
# A request object representing the call parameters. Required.
|
630
|
+
# @param options [::Gapic::CallOptions]
|
631
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
632
|
+
#
|
633
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
634
|
+
# @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtFile]
|
635
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
636
|
+
#
|
637
|
+
# @return [::Google::Cloud::Translate::V3::AdaptiveMtFile]
|
638
|
+
# A result object deserialized from the server's reply
|
639
|
+
def get_adaptive_mt_file request_pb, options = nil
|
640
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
641
|
+
|
642
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_adaptive_mt_file_request request_pb
|
643
|
+
query_string_params = if query_string_params.any?
|
644
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
645
|
+
else
|
646
|
+
{}
|
647
|
+
end
|
648
|
+
|
649
|
+
response = @client_stub.make_http_request(
|
650
|
+
verb,
|
651
|
+
uri: uri,
|
652
|
+
body: body || "",
|
653
|
+
params: query_string_params,
|
654
|
+
options: options
|
655
|
+
)
|
656
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
657
|
+
result = ::Google::Cloud::Translate::V3::AdaptiveMtFile.decode_json response.body, ignore_unknown_fields: true
|
658
|
+
|
659
|
+
yield result, operation if block_given?
|
660
|
+
result
|
661
|
+
end
|
662
|
+
|
663
|
+
##
|
664
|
+
# Baseline implementation for the delete_adaptive_mt_file REST call
|
665
|
+
#
|
666
|
+
# @param request_pb [::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest]
|
667
|
+
# A request object representing the call parameters. Required.
|
668
|
+
# @param options [::Gapic::CallOptions]
|
669
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
670
|
+
#
|
671
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
672
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
673
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
674
|
+
#
|
675
|
+
# @return [::Google::Protobuf::Empty]
|
676
|
+
# A result object deserialized from the server's reply
|
677
|
+
def delete_adaptive_mt_file request_pb, options = nil
|
678
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
679
|
+
|
680
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_adaptive_mt_file_request request_pb
|
681
|
+
query_string_params = if query_string_params.any?
|
682
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
683
|
+
else
|
684
|
+
{}
|
685
|
+
end
|
686
|
+
|
687
|
+
response = @client_stub.make_http_request(
|
688
|
+
verb,
|
689
|
+
uri: uri,
|
690
|
+
body: body || "",
|
691
|
+
params: query_string_params,
|
692
|
+
options: options
|
693
|
+
)
|
694
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
695
|
+
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
696
|
+
|
697
|
+
yield result, operation if block_given?
|
698
|
+
result
|
699
|
+
end
|
700
|
+
|
701
|
+
##
|
702
|
+
# Baseline implementation for the import_adaptive_mt_file REST call
|
703
|
+
#
|
704
|
+
# @param request_pb [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest]
|
705
|
+
# A request object representing the call parameters. Required.
|
706
|
+
# @param options [::Gapic::CallOptions]
|
707
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
708
|
+
#
|
709
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
710
|
+
# @yieldparam result [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse]
|
711
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
712
|
+
#
|
713
|
+
# @return [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse]
|
714
|
+
# A result object deserialized from the server's reply
|
715
|
+
def import_adaptive_mt_file request_pb, options = nil
|
716
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
717
|
+
|
718
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_import_adaptive_mt_file_request request_pb
|
719
|
+
query_string_params = if query_string_params.any?
|
720
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
721
|
+
else
|
722
|
+
{}
|
723
|
+
end
|
724
|
+
|
725
|
+
response = @client_stub.make_http_request(
|
726
|
+
verb,
|
727
|
+
uri: uri,
|
728
|
+
body: body || "",
|
729
|
+
params: query_string_params,
|
730
|
+
options: options
|
731
|
+
)
|
732
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
733
|
+
result = ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse.decode_json response.body, ignore_unknown_fields: true
|
734
|
+
|
735
|
+
yield result, operation if block_given?
|
736
|
+
result
|
737
|
+
end
|
738
|
+
|
739
|
+
##
|
740
|
+
# Baseline implementation for the list_adaptive_mt_files REST call
|
741
|
+
#
|
742
|
+
# @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest]
|
743
|
+
# A request object representing the call parameters. Required.
|
744
|
+
# @param options [::Gapic::CallOptions]
|
745
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
746
|
+
#
|
747
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
748
|
+
# @yieldparam result [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse]
|
749
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
750
|
+
#
|
751
|
+
# @return [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse]
|
752
|
+
# A result object deserialized from the server's reply
|
753
|
+
def list_adaptive_mt_files request_pb, options = nil
|
754
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
755
|
+
|
756
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_adaptive_mt_files_request request_pb
|
757
|
+
query_string_params = if query_string_params.any?
|
758
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
759
|
+
else
|
760
|
+
{}
|
761
|
+
end
|
762
|
+
|
763
|
+
response = @client_stub.make_http_request(
|
764
|
+
verb,
|
765
|
+
uri: uri,
|
766
|
+
body: body || "",
|
767
|
+
params: query_string_params,
|
768
|
+
options: options
|
769
|
+
)
|
770
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
771
|
+
result = ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse.decode_json response.body, ignore_unknown_fields: true
|
772
|
+
|
773
|
+
yield result, operation if block_given?
|
774
|
+
result
|
775
|
+
end
|
776
|
+
|
777
|
+
##
|
778
|
+
# Baseline implementation for the list_adaptive_mt_sentences REST call
|
779
|
+
#
|
780
|
+
# @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest]
|
781
|
+
# A request object representing the call parameters. Required.
|
782
|
+
# @param options [::Gapic::CallOptions]
|
783
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
784
|
+
#
|
785
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
786
|
+
# @yieldparam result [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse]
|
787
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
788
|
+
#
|
789
|
+
# @return [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse]
|
790
|
+
# A result object deserialized from the server's reply
|
791
|
+
def list_adaptive_mt_sentences request_pb, options = nil
|
792
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
793
|
+
|
794
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_adaptive_mt_sentences_request request_pb
|
795
|
+
query_string_params = if query_string_params.any?
|
796
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
797
|
+
else
|
798
|
+
{}
|
799
|
+
end
|
800
|
+
|
801
|
+
response = @client_stub.make_http_request(
|
802
|
+
verb,
|
803
|
+
uri: uri,
|
804
|
+
body: body || "",
|
805
|
+
params: query_string_params,
|
806
|
+
options: options
|
807
|
+
)
|
808
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
809
|
+
result = ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse.decode_json response.body, ignore_unknown_fields: true
|
810
|
+
|
811
|
+
yield result, operation if block_given?
|
812
|
+
result
|
813
|
+
end
|
814
|
+
|
423
815
|
##
|
424
816
|
# @private
|
425
817
|
#
|
@@ -658,6 +1050,226 @@ module Google
|
|
658
1050
|
)
|
659
1051
|
transcoder.transcode request_pb
|
660
1052
|
end
|
1053
|
+
|
1054
|
+
##
|
1055
|
+
# @private
|
1056
|
+
#
|
1057
|
+
# GRPC transcoding helper method for the create_adaptive_mt_dataset REST call
|
1058
|
+
#
|
1059
|
+
# @param request_pb [::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest]
|
1060
|
+
# A request object representing the call parameters. Required.
|
1061
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1062
|
+
# Uri, Body, Query string parameters
|
1063
|
+
def self.transcode_create_adaptive_mt_dataset_request request_pb
|
1064
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1065
|
+
.with_bindings(
|
1066
|
+
uri_method: :post,
|
1067
|
+
uri_template: "/v3/{parent}/adaptiveMtDatasets",
|
1068
|
+
body: "adaptive_mt_dataset",
|
1069
|
+
matches: [
|
1070
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1071
|
+
]
|
1072
|
+
)
|
1073
|
+
transcoder.transcode request_pb
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
##
|
1077
|
+
# @private
|
1078
|
+
#
|
1079
|
+
# GRPC transcoding helper method for the delete_adaptive_mt_dataset REST call
|
1080
|
+
#
|
1081
|
+
# @param request_pb [::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest]
|
1082
|
+
# A request object representing the call parameters. Required.
|
1083
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1084
|
+
# Uri, Body, Query string parameters
|
1085
|
+
def self.transcode_delete_adaptive_mt_dataset_request request_pb
|
1086
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1087
|
+
.with_bindings(
|
1088
|
+
uri_method: :delete,
|
1089
|
+
uri_template: "/v3/{name}",
|
1090
|
+
matches: [
|
1091
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false]
|
1092
|
+
]
|
1093
|
+
)
|
1094
|
+
transcoder.transcode request_pb
|
1095
|
+
end
|
1096
|
+
|
1097
|
+
##
|
1098
|
+
# @private
|
1099
|
+
#
|
1100
|
+
# GRPC transcoding helper method for the get_adaptive_mt_dataset REST call
|
1101
|
+
#
|
1102
|
+
# @param request_pb [::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest]
|
1103
|
+
# A request object representing the call parameters. Required.
|
1104
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1105
|
+
# Uri, Body, Query string parameters
|
1106
|
+
def self.transcode_get_adaptive_mt_dataset_request request_pb
|
1107
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1108
|
+
.with_bindings(
|
1109
|
+
uri_method: :get,
|
1110
|
+
uri_template: "/v3/{name}",
|
1111
|
+
matches: [
|
1112
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false]
|
1113
|
+
]
|
1114
|
+
)
|
1115
|
+
transcoder.transcode request_pb
|
1116
|
+
end
|
1117
|
+
|
1118
|
+
##
|
1119
|
+
# @private
|
1120
|
+
#
|
1121
|
+
# GRPC transcoding helper method for the list_adaptive_mt_datasets REST call
|
1122
|
+
#
|
1123
|
+
# @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest]
|
1124
|
+
# A request object representing the call parameters. Required.
|
1125
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1126
|
+
# Uri, Body, Query string parameters
|
1127
|
+
def self.transcode_list_adaptive_mt_datasets_request request_pb
|
1128
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1129
|
+
.with_bindings(
|
1130
|
+
uri_method: :get,
|
1131
|
+
uri_template: "/v3/{parent}/adaptiveMtDatasets",
|
1132
|
+
matches: [
|
1133
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1134
|
+
]
|
1135
|
+
)
|
1136
|
+
transcoder.transcode request_pb
|
1137
|
+
end
|
1138
|
+
|
1139
|
+
##
|
1140
|
+
# @private
|
1141
|
+
#
|
1142
|
+
# GRPC transcoding helper method for the adaptive_mt_translate REST call
|
1143
|
+
#
|
1144
|
+
# @param request_pb [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest]
|
1145
|
+
# A request object representing the call parameters. Required.
|
1146
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1147
|
+
# Uri, Body, Query string parameters
|
1148
|
+
def self.transcode_adaptive_mt_translate_request request_pb
|
1149
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1150
|
+
.with_bindings(
|
1151
|
+
uri_method: :post,
|
1152
|
+
uri_template: "/v3/{parent}:adaptiveMtTranslate",
|
1153
|
+
body: "*",
|
1154
|
+
matches: [
|
1155
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1156
|
+
]
|
1157
|
+
)
|
1158
|
+
transcoder.transcode request_pb
|
1159
|
+
end
|
1160
|
+
|
1161
|
+
##
|
1162
|
+
# @private
|
1163
|
+
#
|
1164
|
+
# GRPC transcoding helper method for the get_adaptive_mt_file REST call
|
1165
|
+
#
|
1166
|
+
# @param request_pb [::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest]
|
1167
|
+
# A request object representing the call parameters. Required.
|
1168
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1169
|
+
# Uri, Body, Query string parameters
|
1170
|
+
def self.transcode_get_adaptive_mt_file_request request_pb
|
1171
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1172
|
+
.with_bindings(
|
1173
|
+
uri_method: :get,
|
1174
|
+
uri_template: "/v3/{name}",
|
1175
|
+
matches: [
|
1176
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+/?$}, false]
|
1177
|
+
]
|
1178
|
+
)
|
1179
|
+
transcoder.transcode request_pb
|
1180
|
+
end
|
1181
|
+
|
1182
|
+
##
|
1183
|
+
# @private
|
1184
|
+
#
|
1185
|
+
# GRPC transcoding helper method for the delete_adaptive_mt_file REST call
|
1186
|
+
#
|
1187
|
+
# @param request_pb [::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest]
|
1188
|
+
# A request object representing the call parameters. Required.
|
1189
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1190
|
+
# Uri, Body, Query string parameters
|
1191
|
+
def self.transcode_delete_adaptive_mt_file_request request_pb
|
1192
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1193
|
+
.with_bindings(
|
1194
|
+
uri_method: :delete,
|
1195
|
+
uri_template: "/v3/{name}",
|
1196
|
+
matches: [
|
1197
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+/?$}, false]
|
1198
|
+
]
|
1199
|
+
)
|
1200
|
+
transcoder.transcode request_pb
|
1201
|
+
end
|
1202
|
+
|
1203
|
+
##
|
1204
|
+
# @private
|
1205
|
+
#
|
1206
|
+
# GRPC transcoding helper method for the import_adaptive_mt_file REST call
|
1207
|
+
#
|
1208
|
+
# @param request_pb [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest]
|
1209
|
+
# A request object representing the call parameters. Required.
|
1210
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1211
|
+
# Uri, Body, Query string parameters
|
1212
|
+
def self.transcode_import_adaptive_mt_file_request request_pb
|
1213
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1214
|
+
.with_bindings(
|
1215
|
+
uri_method: :post,
|
1216
|
+
uri_template: "/v3/{parent}:importAdaptiveMtFile",
|
1217
|
+
body: "*",
|
1218
|
+
matches: [
|
1219
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false]
|
1220
|
+
]
|
1221
|
+
)
|
1222
|
+
transcoder.transcode request_pb
|
1223
|
+
end
|
1224
|
+
|
1225
|
+
##
|
1226
|
+
# @private
|
1227
|
+
#
|
1228
|
+
# GRPC transcoding helper method for the list_adaptive_mt_files REST call
|
1229
|
+
#
|
1230
|
+
# @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest]
|
1231
|
+
# A request object representing the call parameters. Required.
|
1232
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1233
|
+
# Uri, Body, Query string parameters
|
1234
|
+
def self.transcode_list_adaptive_mt_files_request request_pb
|
1235
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1236
|
+
.with_bindings(
|
1237
|
+
uri_method: :get,
|
1238
|
+
uri_template: "/v3/{parent}/adaptiveMtFiles",
|
1239
|
+
matches: [
|
1240
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false]
|
1241
|
+
]
|
1242
|
+
)
|
1243
|
+
transcoder.transcode request_pb
|
1244
|
+
end
|
1245
|
+
|
1246
|
+
##
|
1247
|
+
# @private
|
1248
|
+
#
|
1249
|
+
# GRPC transcoding helper method for the list_adaptive_mt_sentences REST call
|
1250
|
+
#
|
1251
|
+
# @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest]
|
1252
|
+
# A request object representing the call parameters. Required.
|
1253
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1254
|
+
# Uri, Body, Query string parameters
|
1255
|
+
def self.transcode_list_adaptive_mt_sentences_request request_pb
|
1256
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1257
|
+
.with_bindings(
|
1258
|
+
uri_method: :get,
|
1259
|
+
uri_template: "/v3/{parent}/adaptiveMtSentences",
|
1260
|
+
matches: [
|
1261
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+/?$}, false]
|
1262
|
+
]
|
1263
|
+
)
|
1264
|
+
.with_bindings(
|
1265
|
+
uri_method: :get,
|
1266
|
+
uri_template: "/v3/{parent}/adaptiveMtSentences",
|
1267
|
+
matches: [
|
1268
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false]
|
1269
|
+
]
|
1270
|
+
)
|
1271
|
+
transcoder.transcode request_pb
|
1272
|
+
end
|
661
1273
|
end
|
662
1274
|
end
|
663
1275
|
end
|