Cloud Translation V3 API - Class Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub (v1.1.0)

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_dataset

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

Baseline implementation for the create_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)

#create_glossary_entry

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

Baseline implementation for the create_glossary_entry REST call

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

#create_model

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

Baseline implementation for the create_model 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_dataset

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

Baseline implementation for the delete_dataset 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)

#delete_glossary_entry

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

Baseline implementation for the delete_glossary_entry REST call

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

#delete_model

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

Baseline implementation for the delete_model 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)

#export_data

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

Baseline implementation for the export_data REST call

Parameters
  • request_pb (::Google::Cloud::Translate::V3::ExportDataRequest) — A request object representing the call parameters. Required.
  • options (::Gapic::CallOptions) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#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_dataset

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

Baseline implementation for the get_dataset REST call

Parameters
  • request_pb (::Google::Cloud::Translate::V3::GetDatasetRequest) — A request object representing the call parameters. Required.
  • options (::Gapic::CallOptions) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
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_glossary_entry

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

Baseline implementation for the get_glossary_entry REST call

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

#get_model

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

Baseline implementation for the get_model REST call

Parameters
  • request_pb (::Google::Cloud::Translate::V3::GetModelRequest) — A request object representing the call parameters. Required.
  • options (::Gapic::CallOptions) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
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)

#import_data

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

Baseline implementation for the import_data REST call

Parameters
  • request_pb (::Google::Cloud::Translate::V3::ImportDataRequest) — A request object representing the call parameters. Required.
  • options (::Gapic::CallOptions) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
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_datasets

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

Baseline implementation for the list_datasets REST call

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

#list_examples

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

Baseline implementation for the list_examples 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)

#list_glossary_entries

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

Baseline implementation for the list_glossary_entries REST call

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

#list_models

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

Baseline implementation for the list_models REST call

Parameters
  • request_pb (::Google::Cloud::Translate::V3::ListModelsRequest) — A request object representing the call parameters. Required.
  • options (::Gapic::CallOptions) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#romanize_text

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

Baseline implementation for the romanize_text 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)

#update_glossary

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

Baseline implementation for the update_glossary REST call

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

#update_glossary_entry

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

Baseline implementation for the update_glossary_entry REST call

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