Class TranslationServiceConnection (2.19.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
TypeDescription
Options

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

Parameter
NameDescription
request google::cloud::translation::v3::TranslateTextRequest const &
Returns
TypeDescription
StatusOr< google::cloud::translation::v3::TranslateTextResponse >

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

Parameter
NameDescription
request google::cloud::translation::v3::DetectLanguageRequest const &
Returns
TypeDescription
StatusOr< google::cloud::translation::v3::DetectLanguageResponse >

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

Parameter
NameDescription
request google::cloud::translation::v3::GetSupportedLanguagesRequest const &
Returns
TypeDescription
StatusOr< google::cloud::translation::v3::SupportedLanguages >

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

Parameter
NameDescription
request google::cloud::translation::v3::TranslateDocumentRequest const &
Returns
TypeDescription
StatusOr< google::cloud::translation::v3::TranslateDocumentResponse >

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

Parameter
NameDescription
request google::cloud::translation::v3::BatchTranslateTextRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::translation::v3::BatchTranslateResponse > >

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

Parameter
NameDescription
request google::cloud::translation::v3::BatchTranslateDocumentRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::translation::v3::BatchTranslateDocumentResponse > >

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

Parameter
NameDescription
request google::cloud::translation::v3::CreateGlossaryRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::translation::v3::Glossary > >

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

Parameter
NameDescription
request google::cloud::translation::v3::ListGlossariesRequest
Returns
TypeDescription
StreamRange< google::cloud::translation::v3::Glossary >

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

Parameter
NameDescription
request google::cloud::translation::v3::GetGlossaryRequest const &
Returns
TypeDescription
StatusOr< google::cloud::translation::v3::Glossary >

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

Parameter
NameDescription
request google::cloud::translation::v3::DeleteGlossaryRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::translation::v3::DeleteGlossaryResponse > >