Cloud Translation V3 API - Class Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub (v0.11.2)

Reference documentation and code samples for the Cloud Translation V3 API class Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.

REST service stub for the TranslationService service. Service stub contains baseline method implementations including transcoding, making the REST call, and deserialing the response.

Inherits

  • Object

Methods

#adaptive_mt_translate

def adaptive_mt_translate(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse

Baseline implementation for the adaptive_mt_translate REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#batch_translate_document

def batch_translate_document(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the batch_translate_document REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#batch_translate_text

def batch_translate_text(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the batch_translate_text REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#create_adaptive_mt_dataset

def create_adaptive_mt_dataset(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Translate::V3::AdaptiveMtDataset

Baseline implementation for the create_adaptive_mt_dataset REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#create_glossary

def create_glossary(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the create_glossary REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#delete_adaptive_mt_dataset

def delete_adaptive_mt_dataset(request_pb, options = nil) { |result, operation| ... } -> ::Google::Protobuf::Empty

Baseline implementation for the delete_adaptive_mt_dataset REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#delete_adaptive_mt_file

def delete_adaptive_mt_file(request_pb, options = nil) { |result, operation| ... } -> ::Google::Protobuf::Empty

Baseline implementation for the delete_adaptive_mt_file REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#delete_glossary

def delete_glossary(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the delete_glossary REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#detect_language

def detect_language(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Translate::V3::DetectLanguageResponse

Baseline implementation for the detect_language REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#endpoint

def endpoint() -> String

The effective endpoint

Returns
  • (String)

#get_adaptive_mt_dataset

def get_adaptive_mt_dataset(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Translate::V3::AdaptiveMtDataset

Baseline implementation for the get_adaptive_mt_dataset REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#get_adaptive_mt_file

def get_adaptive_mt_file(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Translate::V3::AdaptiveMtFile

Baseline implementation for the get_adaptive_mt_file REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#get_glossary

def get_glossary(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Translate::V3::Glossary

Baseline implementation for the get_glossary REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#get_supported_languages

def get_supported_languages(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Translate::V3::SupportedLanguages

Baseline implementation for the get_supported_languages REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#import_adaptive_mt_file

def import_adaptive_mt_file(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse

Baseline implementation for the import_adaptive_mt_file REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#initialize

def initialize(endpoint:, endpoint_template:, universe_domain:, credentials:) -> ServiceStub
Returns

#list_adaptive_mt_datasets

def list_adaptive_mt_datasets(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse

Baseline implementation for the list_adaptive_mt_datasets REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#list_adaptive_mt_files

def list_adaptive_mt_files(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse

Baseline implementation for the list_adaptive_mt_files REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#list_adaptive_mt_sentences

def list_adaptive_mt_sentences(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse

Baseline implementation for the list_adaptive_mt_sentences REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#list_glossaries

def list_glossaries(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Translate::V3::ListGlossariesResponse

Baseline implementation for the list_glossaries REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#translate_document

def translate_document(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Translate::V3::TranslateDocumentResponse

Baseline implementation for the translate_document REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#translate_text

def translate_text(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Translate::V3::TranslateTextResponse

Baseline implementation for the translate_text REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)