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