Class TranslationServiceConnection (2.17.0)

This interface defines virtual methods for each of the user-facing overload sets in TranslationServiceClient. This allows users to inject custom behavior (e.g., with a Google Mock object) when writing tests that use objects of type TranslationServiceClient.

To create a concrete instance, see MakeTranslationServiceConnection().

For mocking, see translate_v3_mocks::MockTranslationServiceConnection.

Functions

virtual options()

Returns
Type Description
Options

virtual TranslateText(google::cloud::translation::v3::TranslateTextRequest const &)

Parameter
Name Description
request google::cloud::translation::v3::TranslateTextRequest const &
Returns
Type Description
StatusOr< google::cloud::translation::v3::TranslateTextResponse >

virtual DetectLanguage(google::cloud::translation::v3::DetectLanguageRequest const &)

Parameter
Name Description
request google::cloud::translation::v3::DetectLanguageRequest const &
Returns
Type Description
StatusOr< google::cloud::translation::v3::DetectLanguageResponse >

virtual GetSupportedLanguages(google::cloud::translation::v3::GetSupportedLanguagesRequest const &)

Parameter
Name Description
request google::cloud::translation::v3::GetSupportedLanguagesRequest const &
Returns
Type Description
StatusOr< google::cloud::translation::v3::SupportedLanguages >

virtual TranslateDocument(google::cloud::translation::v3::TranslateDocumentRequest const &)

Parameter
Name Description
request google::cloud::translation::v3::TranslateDocumentRequest const &
Returns
Type Description
StatusOr< google::cloud::translation::v3::TranslateDocumentResponse >

virtual BatchTranslateText(google::cloud::translation::v3::BatchTranslateTextRequest const &)

Parameter
Name Description
request google::cloud::translation::v3::BatchTranslateTextRequest const &
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::BatchTranslateResponse > >

virtual BatchTranslateDocument(google::cloud::translation::v3::BatchTranslateDocumentRequest const &)

Parameter
Name Description
request google::cloud::translation::v3::BatchTranslateDocumentRequest const &
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::BatchTranslateDocumentResponse > >

virtual CreateGlossary(google::cloud::translation::v3::CreateGlossaryRequest const &)

Parameter
Name Description
request google::cloud::translation::v3::CreateGlossaryRequest const &
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::Glossary > >

virtual ListGlossaries(google::cloud::translation::v3::ListGlossariesRequest)

Parameter
Name Description
request google::cloud::translation::v3::ListGlossariesRequest
Returns
Type Description
StreamRange< google::cloud::translation::v3::Glossary >

virtual GetGlossary(google::cloud::translation::v3::GetGlossaryRequest const &)

Parameter
Name Description
request google::cloud::translation::v3::GetGlossaryRequest const &
Returns
Type Description
StatusOr< google::cloud::translation::v3::Glossary >

virtual DeleteGlossary(google::cloud::translation::v3::DeleteGlossaryRequest const &)

Parameter
Name Description
request google::cloud::translation::v3::DeleteGlossaryRequest const &
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::DeleteGlossaryResponse > >