Class TranslationServiceClient (2.29.0-rc)

Provides natural language translation operations.

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Constructors

TranslationServiceClient(TranslationServiceClient const &)

Copy and move support

Parameter
Name Description
TranslationServiceClient const &

TranslationServiceClient(TranslationServiceClient &&)

Copy and move support

Parameter
Name Description
TranslationServiceClient &&

TranslationServiceClient(std::shared_ptr< TranslationServiceConnection >, Options)

Parameters
Name Description
connection std::shared_ptr< TranslationServiceConnection >
opts Options

Operators

operator=(TranslationServiceClient const &)

Copy and move support

Parameter
Name Description
TranslationServiceClient const &
Returns
Type Description
TranslationServiceClient &

operator=(TranslationServiceClient &&)

Copy and move support

Parameter
Name Description
TranslationServiceClient &&
Returns
Type Description
TranslationServiceClient &

Functions

TranslateText(std::string const &, std::string const &, std::vector< std::string > const &, Options)

Translates input text and returns translated text.

Parameters
Name Description
parent std::string const &

Required. Project or location to make a call. Must refer to a caller's project.
Format: projects/{project-number-or-id} or projects/{project-number-or-id}/locations/{location-id}.
For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.
Non-global location is required for requests using AutoML models or custom glossaries.
Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.

target_language_code std::string const &

Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in Language Support.

contents std::vector< std::string > const &

Required. The content of the input in string format. We recommend the total content be less than 30,000 codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::TranslateTextResponse >

the result of the RPC. The response message type (google.cloud.translation.v3.TranslateTextResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

TranslateText(std::string const &, std::string const &, std::string const &, std::string const &, std::string const &, std::vector< std::string > const &, Options)

Translates input text and returns translated text.

Parameters
Name Description
parent std::string const &

Required. Project or location to make a call. Must refer to a caller's project.
Format: projects/{project-number-or-id} or projects/{project-number-or-id}/locations/{location-id}.
For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.
Non-global location is required for requests using AutoML models or custom glossaries.
Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.

model std::string const &

Optional. The model type requested for this translation.
The format depends on model type:

  • AutoML Translation models: projects/{project-number-or-id}/locations/{location-id}/models/{model-id}
  • General (built-in) models: projects/{project-number-or-id}/locations/{location-id}/models/general/nmt,
  • Translation LLM models: projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm,
    For global (non-regionalized) requests, use location-id``global. For example, projects/{project-number-or-id}/locations/global/models/general/nmt.
    If not provided, the default Google model (NMT) will be used
mime_type std::string const &

Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".

source_language_code std::string const &

Optional. The ISO-639 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.

target_language_code std::string const &

Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in Language Support.

contents std::vector< std::string > const &

Required. The content of the input in string format. We recommend the total content be less than 30,000 codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::TranslateTextResponse >

the result of the RPC. The response message type (google.cloud.translation.v3.TranslateTextResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

TranslateText(google::cloud::translation::v3::TranslateTextRequest const &, Options)

Translates input text and returns translated text.

Parameters
Name Description
request google::cloud::translation::v3::TranslateTextRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.TranslateTextRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::TranslateTextResponse >

the result of the RPC. The response message type (google.cloud.translation.v3.TranslateTextResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

RomanizeText(std::string const &, std::vector< std::string > const &, Options)

Romanize input text written in non-Latin scripts to Latin text.

Parameters
Name Description
parent std::string const &

Required. Project or location to make a call. Must refer to a caller's project.
Format: projects/{project-number-or-id}/locations/{location-id} or projects/{project-number-or-id}.
For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.

contents std::vector< std::string > const &

Required. The content of the input in string format.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::RomanizeTextResponse >

the result of the RPC. The response message type (google.cloud.translation.v3.RomanizeTextResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

RomanizeText(google::cloud::translation::v3::RomanizeTextRequest const &, Options)

Romanize input text written in non-Latin scripts to Latin text.

Parameters
Name Description
request google::cloud::translation::v3::RomanizeTextRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.RomanizeTextRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::RomanizeTextResponse >

the result of the RPC. The response message type (google.cloud.translation.v3.RomanizeTextResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DetectLanguage(std::string const &, std::string const &, std::string const &, std::string const &, Options)

Detects the language of text within a request.

Parameters
Name Description
parent std::string const &

Required. Project or location to make a call. Must refer to a caller's project.
Format: projects/{project-number-or-id}/locations/{location-id} or projects/{project-number-or-id}.
For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.
Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.

model std::string const &

Optional. The language detection model to be used.
Format: projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}
Only one language detection model is currently supported: projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default.
If not specified, the default model is used.

mime_type std::string const &

Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".

content std::string const &

The content of the input stored as a string.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::DetectLanguageResponse >

the result of the RPC. The response message type (google.cloud.translation.v3.DetectLanguageResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DetectLanguage(google::cloud::translation::v3::DetectLanguageRequest const &, Options)

Detects the language of text within a request.

Parameters
Name Description
request google::cloud::translation::v3::DetectLanguageRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.DetectLanguageRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::DetectLanguageResponse >

the result of the RPC. The response message type (google.cloud.translation.v3.DetectLanguageResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetSupportedLanguages(std::string const &, std::string const &, std::string const &, Options)

Returns a list of supported languages for translation.

Parameters
Name Description
parent std::string const &

Required. Project or location to make a call. Must refer to a caller's project.
Format: projects/{project-number-or-id} or projects/{project-number-or-id}/locations/{location-id}.
For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.
Non-global location is required for AutoML models.
Only models within the same region (have same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.

model std::string const &

Optional. Get supported languages of this model.
The format depends on model type:

  • AutoML Translation models: projects/{project-number-or-id}/locations/{location-id}/models/{model-id}
  • General (built-in) models: projects/{project-number-or-id}/locations/{location-id}/models/general/nmt,
    Returns languages supported by the specified model. If missing, we get supported languages of Google general NMT model.
display_language_code std::string const &

Optional. The language to use to return localized, human readable names of supported languages. If missing, then display names are not returned in a response.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::SupportedLanguages >

the result of the RPC. The response message type (google.cloud.translation.v3.SupportedLanguages) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetSupportedLanguages(google::cloud::translation::v3::GetSupportedLanguagesRequest const &, Options)

Returns a list of supported languages for translation.

Parameters
Name Description
request google::cloud::translation::v3::GetSupportedLanguagesRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.GetSupportedLanguagesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::SupportedLanguages >

the result of the RPC. The response message type (google.cloud.translation.v3.SupportedLanguages) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

TranslateDocument(google::cloud::translation::v3::TranslateDocumentRequest const &, Options)

Translates documents in synchronous mode.

Parameters
Name Description
request google::cloud::translation::v3::TranslateDocumentRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.TranslateDocumentRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::TranslateDocumentResponse >

the result of the RPC. The response message type (google.cloud.translation.v3.TranslateDocumentResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

BatchTranslateText(google::cloud::translation::v3::BatchTranslateTextRequest const &, Options)

Translates a large volume of text in asynchronous batch mode.

This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location.

This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.

Parameters
Name Description
request google::cloud::translation::v3::BatchTranslateTextRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.BatchTranslateTextRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::BatchTranslateResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.BatchTranslateResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

BatchTranslateText(NoAwaitTag, google::cloud::translation::v3::BatchTranslateTextRequest const &, Options)

Translates a large volume of text in asynchronous batch mode.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::translation::v3::BatchTranslateTextRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

BatchTranslateText(google::longrunning::Operation const &, Options)

Translates a large volume of text in asynchronous batch mode.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::BatchTranslateResponse > >

BatchTranslateDocument(std::string const &, std::string const &, std::vector< std::string > const &, std::vector< google::cloud::translation::v3::BatchDocumentInputConfig > const &, google::cloud::translation::v3::BatchDocumentOutputConfig const &, Options)

Translates a large volume of document in asynchronous batch mode.

This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location.

This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.

Parameters
Name Description
parent std::string const &

Required. Location to make a regional call.
Format: projects/{project-number-or-id}/locations/{location-id}.
The global location is not supported for batch translation.
Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.

source_language_code std::string const &

Required. The ISO-639 language code of the input document if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support.

target_language_codes std::vector< std::string > const &

Required. The ISO-639 language code to use for translation of the input document. Specify up to 10 language codes here.

input_configs std::vector< google::cloud::translation::v3::BatchDocumentInputConfig > const &

Required. Input configurations. The total number of files matched should be <= 100. The total content size to translate should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.

output_config google::cloud::translation::v3::BatchDocumentOutputConfig const &

Required. Output configuration. If 2 input configs match to the same file (that is, same input path), we don't generate output for duplicate inputs.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::BatchTranslateDocumentResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.BatchTranslateDocumentResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

BatchTranslateDocument(NoAwaitTag, std::string const &, std::string const &, std::vector< std::string > const &, std::vector< google::cloud::translation::v3::BatchDocumentInputConfig > const &, google::cloud::translation::v3::BatchDocumentOutputConfig const &, Options)

Translates a large volume of document in asynchronous batch mode.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
parent std::string const &
source_language_code std::string const &
target_language_codes std::vector< std::string > const &
input_configs std::vector< google::cloud::translation::v3::BatchDocumentInputConfig > const &
output_config google::cloud::translation::v3::BatchDocumentOutputConfig const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

BatchTranslateDocument(google::cloud::translation::v3::BatchTranslateDocumentRequest const &, Options)

Translates a large volume of document in asynchronous batch mode.

This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location.

This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.

Parameters
Name Description
request google::cloud::translation::v3::BatchTranslateDocumentRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.BatchTranslateDocumentRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::BatchTranslateDocumentResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.BatchTranslateDocumentResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

BatchTranslateDocument(NoAwaitTag, google::cloud::translation::v3::BatchTranslateDocumentRequest const &, Options)

Translates a large volume of document in asynchronous batch mode.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::translation::v3::BatchTranslateDocumentRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

BatchTranslateDocument(google::longrunning::Operation const &, Options)

Translates a large volume of document in asynchronous batch mode.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::BatchTranslateDocumentResponse > >

CreateGlossary(std::string const &, google::cloud::translation::v3::Glossary const &, Options)

Creates a glossary and returns the long-running operation.

Returns NOT_FOUND, if the project doesn't exist.

Parameters
Name Description
parent std::string const &

Required. The project name.

glossary google::cloud::translation::v3::Glossary const &

Required. The glossary to create.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::Glossary > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.Glossary proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateGlossary(NoAwaitTag, std::string const &, google::cloud::translation::v3::Glossary const &, Options)

Creates a glossary and returns the long-running operation.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
parent std::string const &
glossary google::cloud::translation::v3::Glossary const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

CreateGlossary(google::cloud::translation::v3::CreateGlossaryRequest const &, Options)

Creates a glossary and returns the long-running operation.

Returns NOT_FOUND, if the project doesn't exist.

Parameters
Name Description
request google::cloud::translation::v3::CreateGlossaryRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.CreateGlossaryRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::Glossary > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.Glossary proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateGlossary(NoAwaitTag, google::cloud::translation::v3::CreateGlossaryRequest const &, Options)

Creates a glossary and returns the long-running operation.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::translation::v3::CreateGlossaryRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

CreateGlossary(google::longrunning::Operation const &, Options)

Creates a glossary and returns the long-running operation.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::Glossary > >

UpdateGlossary(google::cloud::translation::v3::Glossary const &, google::protobuf::FieldMask const &, Options)

Updates a glossary.

A LRO is used since the update can be async if the glossary's entry file is updated.

Parameters
Name Description
glossary google::cloud::translation::v3::Glossary const &

Required. The glossary entry to update.

update_mask google::protobuf::FieldMask const &

The list of fields to be updated. Currently only display_name and 'input_config'

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::Glossary > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.Glossary proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UpdateGlossary(NoAwaitTag, google::cloud::translation::v3::Glossary const &, google::protobuf::FieldMask const &, Options)

Updates a glossary.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
glossary google::cloud::translation::v3::Glossary const &
update_mask google::protobuf::FieldMask const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

UpdateGlossary(google::cloud::translation::v3::UpdateGlossaryRequest const &, Options)

Updates a glossary.

A LRO is used since the update can be async if the glossary's entry file is updated.

Parameters
Name Description
request google::cloud::translation::v3::UpdateGlossaryRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.UpdateGlossaryRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::Glossary > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.Glossary proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UpdateGlossary(NoAwaitTag, google::cloud::translation::v3::UpdateGlossaryRequest const &, Options)

Updates a glossary.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::translation::v3::UpdateGlossaryRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

UpdateGlossary(google::longrunning::Operation const &, Options)

Updates a glossary.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::Glossary > >

ListGlossaries(std::string const &, Options)

Lists glossaries in a project.

Returns NOT_FOUND, if the project doesn't exist.

Parameters
Name Description
parent std::string const &

Required. The name of the project from which to list all of the glossaries.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::Glossary >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.Glossary, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListGlossaries(google::cloud::translation::v3::ListGlossariesRequest, Options)

Lists glossaries in a project.

Returns NOT_FOUND, if the project doesn't exist.

Parameters
Name Description
request google::cloud::translation::v3::ListGlossariesRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.ListGlossariesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::Glossary >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.Glossary, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetGlossary(std::string const &, Options)

Gets a glossary.

Returns NOT_FOUND, if the glossary doesn't exist.

Parameters
Name Description
name std::string const &

Required. The name of the glossary to retrieve.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::Glossary >

the result of the RPC. The response message type (google.cloud.translation.v3.Glossary) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetGlossary(google::cloud::translation::v3::GetGlossaryRequest const &, Options)

Gets a glossary.

Returns NOT_FOUND, if the glossary doesn't exist.

Parameters
Name Description
request google::cloud::translation::v3::GetGlossaryRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.GetGlossaryRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::Glossary >

the result of the RPC. The response message type (google.cloud.translation.v3.Glossary) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteGlossary(std::string const &, Options)

Deletes a glossary, or cancels glossary construction if the glossary isn't created yet.

Returns NOT_FOUND, if the glossary doesn't exist.

Parameters
Name Description
name std::string const &

Required. The name of the glossary to delete.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::DeleteGlossaryResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.DeleteGlossaryResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteGlossary(NoAwaitTag, std::string const &, Options)

Deletes a glossary, or cancels glossary construction if the glossary isn't created yet.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
name std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteGlossary(google::cloud::translation::v3::DeleteGlossaryRequest const &, Options)

Deletes a glossary, or cancels glossary construction if the glossary isn't created yet.

Returns NOT_FOUND, if the glossary doesn't exist.

Parameters
Name Description
request google::cloud::translation::v3::DeleteGlossaryRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.DeleteGlossaryRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::DeleteGlossaryResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.DeleteGlossaryResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteGlossary(NoAwaitTag, google::cloud::translation::v3::DeleteGlossaryRequest const &, Options)

Deletes a glossary, or cancels glossary construction if the glossary isn't created yet.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::translation::v3::DeleteGlossaryRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteGlossary(google::longrunning::Operation const &, Options)

Deletes a glossary, or cancels glossary construction if the glossary isn't created yet.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::DeleteGlossaryResponse > >

GetGlossaryEntry(std::string const &, Options)

Gets a single glossary entry by the given id.

Parameters
Name Description
name std::string const &

Required. The resource name of the glossary entry to get

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::GlossaryEntry >

the result of the RPC. The response message type (google.cloud.translation.v3.GlossaryEntry) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetGlossaryEntry(google::cloud::translation::v3::GetGlossaryEntryRequest const &, Options)

Gets a single glossary entry by the given id.

Parameters
Name Description
request google::cloud::translation::v3::GetGlossaryEntryRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.GetGlossaryEntryRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::GlossaryEntry >

the result of the RPC. The response message type (google.cloud.translation.v3.GlossaryEntry) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListGlossaryEntries(std::string const &, Options)

List the entries for the glossary.

Parameters
Name Description
parent std::string const &

Required. The parent glossary resource name for listing the glossary's entries.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::GlossaryEntry >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.GlossaryEntry, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListGlossaryEntries(google::cloud::translation::v3::ListGlossaryEntriesRequest, Options)

List the entries for the glossary.

Parameters
Name Description
request google::cloud::translation::v3::ListGlossaryEntriesRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.ListGlossaryEntriesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::GlossaryEntry >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.GlossaryEntry, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

CreateGlossaryEntry(std::string const &, google::cloud::translation::v3::GlossaryEntry const &, Options)

Creates a glossary entry.

Parameters
Name Description
parent std::string const &

Required. The resource name of the glossary to create the entry under.

glossary_entry google::cloud::translation::v3::GlossaryEntry const &

Required. The glossary entry to create

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::GlossaryEntry >

the result of the RPC. The response message type (google.cloud.translation.v3.GlossaryEntry) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateGlossaryEntry(google::cloud::translation::v3::CreateGlossaryEntryRequest const &, Options)

Creates a glossary entry.

Parameters
Name Description
request google::cloud::translation::v3::CreateGlossaryEntryRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.CreateGlossaryEntryRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::GlossaryEntry >

the result of the RPC. The response message type (google.cloud.translation.v3.GlossaryEntry) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateGlossaryEntry(google::cloud::translation::v3::GlossaryEntry const &, Options)

Updates a glossary entry.

Parameters
Name Description
glossary_entry google::cloud::translation::v3::GlossaryEntry const &

Required. The glossary entry to update.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::GlossaryEntry >

the result of the RPC. The response message type (google.cloud.translation.v3.GlossaryEntry) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateGlossaryEntry(google::cloud::translation::v3::UpdateGlossaryEntryRequest const &, Options)

Updates a glossary entry.

Parameters
Name Description
request google::cloud::translation::v3::UpdateGlossaryEntryRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.UpdateGlossaryEntryRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::GlossaryEntry >

the result of the RPC. The response message type (google.cloud.translation.v3.GlossaryEntry) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteGlossaryEntry(std::string const &, Options)

Deletes a single entry from the glossary.

Parameters
Name Description
name std::string const &

Required. The resource name of the glossary entry to delete

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteGlossaryEntry(google::cloud::translation::v3::DeleteGlossaryEntryRequest const &, Options)

Deletes a single entry from the glossary.

Parameters
Name Description
request google::cloud::translation::v3::DeleteGlossaryEntryRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.DeleteGlossaryEntryRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

CreateDataset(std::string const &, google::cloud::translation::v3::Dataset const &, Options)

Creates a Dataset.

Parameters
Name Description
parent std::string const &

Required. The project name.

dataset google::cloud::translation::v3::Dataset const &

Required. The Dataset to create.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::Dataset > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.Dataset proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateDataset(NoAwaitTag, std::string const &, google::cloud::translation::v3::Dataset const &, Options)

Creates a Dataset.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
parent std::string const &
dataset google::cloud::translation::v3::Dataset const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

CreateDataset(google::cloud::translation::v3::CreateDatasetRequest const &, Options)

Creates a Dataset.

Parameters
Name Description
request google::cloud::translation::v3::CreateDatasetRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.CreateDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::Dataset > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.Dataset proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateDataset(NoAwaitTag, google::cloud::translation::v3::CreateDatasetRequest const &, Options)

Creates a Dataset.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::translation::v3::CreateDatasetRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

CreateDataset(google::longrunning::Operation const &, Options)

Creates a Dataset.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::Dataset > >

GetDataset(std::string const &, Options)

Gets a Dataset.

Parameters
Name Description
name std::string const &

Required. The resource name of the dataset to retrieve.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::Dataset >

the result of the RPC. The response message type (google.cloud.translation.v3.Dataset) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetDataset(google::cloud::translation::v3::GetDatasetRequest const &, Options)

Gets a Dataset.

Parameters
Name Description
request google::cloud::translation::v3::GetDatasetRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.GetDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::Dataset >

the result of the RPC. The response message type (google.cloud.translation.v3.Dataset) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListDatasets(std::string const &, Options)

Lists datasets.

Parameters
Name Description
parent std::string const &

Required. Name of the parent project. In form of projects/{project-number-or-id}/locations/{location-id}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::Dataset >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.Dataset, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListDatasets(google::cloud::translation::v3::ListDatasetsRequest, Options)

Lists datasets.

Parameters
Name Description
request google::cloud::translation::v3::ListDatasetsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.ListDatasetsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::Dataset >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.Dataset, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

DeleteDataset(std::string const &, Options)

Deletes a dataset and all of its contents.

Parameters
Name Description
name std::string const &

Required. The name of the dataset to delete.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::DeleteDatasetMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.DeleteDatasetMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteDataset(NoAwaitTag, std::string const &, Options)

Deletes a dataset and all of its contents.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
name std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteDataset(google::cloud::translation::v3::DeleteDatasetRequest const &, Options)

Deletes a dataset and all of its contents.

Parameters
Name Description
request google::cloud::translation::v3::DeleteDatasetRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.DeleteDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::DeleteDatasetMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.DeleteDatasetMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteDataset(NoAwaitTag, google::cloud::translation::v3::DeleteDatasetRequest const &, Options)

Deletes a dataset and all of its contents.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::translation::v3::DeleteDatasetRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteDataset(google::longrunning::Operation const &, Options)

Deletes a dataset and all of its contents.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::DeleteDatasetMetadata > >

CreateAdaptiveMtDataset(std::string const &, google::cloud::translation::v3::AdaptiveMtDataset const &, Options)

Creates an Adaptive MT dataset.

Parameters
Name Description
parent std::string const &

Required. Name of the parent project. In form of projects/{project-number-or-id}/locations/{location-id}

adaptive_mt_dataset google::cloud::translation::v3::AdaptiveMtDataset const &

Required. The AdaptiveMtDataset to be created.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::AdaptiveMtDataset >

the result of the RPC. The response message type (google.cloud.translation.v3.AdaptiveMtDataset) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateAdaptiveMtDataset(google::cloud::translation::v3::CreateAdaptiveMtDatasetRequest const &, Options)

Creates an Adaptive MT dataset.

Parameters
Name Description
request google::cloud::translation::v3::CreateAdaptiveMtDatasetRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.CreateAdaptiveMtDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::AdaptiveMtDataset >

the result of the RPC. The response message type (google.cloud.translation.v3.AdaptiveMtDataset) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteAdaptiveMtDataset(std::string const &, Options)

Deletes an Adaptive MT dataset, including all its entries and associated metadata.

Parameters
Name Description
name std::string const &

Required. Name of the dataset. In the form of projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteAdaptiveMtDataset(google::cloud::translation::v3::DeleteAdaptiveMtDatasetRequest const &, Options)

Deletes an Adaptive MT dataset, including all its entries and associated metadata.

Parameters
Name Description
request google::cloud::translation::v3::DeleteAdaptiveMtDatasetRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.DeleteAdaptiveMtDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

GetAdaptiveMtDataset(std::string const &, Options)

Gets the Adaptive MT dataset.

Parameters
Name Description
name std::string const &

Required. Name of the dataset. In the form of projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::AdaptiveMtDataset >

the result of the RPC. The response message type (google.cloud.translation.v3.AdaptiveMtDataset) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetAdaptiveMtDataset(google::cloud::translation::v3::GetAdaptiveMtDatasetRequest const &, Options)

Gets the Adaptive MT dataset.

Parameters
Name Description
request google::cloud::translation::v3::GetAdaptiveMtDatasetRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.GetAdaptiveMtDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::AdaptiveMtDataset >

the result of the RPC. The response message type (google.cloud.translation.v3.AdaptiveMtDataset) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListAdaptiveMtDatasets(std::string const &, Options)

Lists all Adaptive MT datasets for which the caller has read permission.

Parameters
Name Description
parent std::string const &

Required. The resource name of the project from which to list the Adaptive MT datasets. projects/{project-number-or-id}/locations/{location-id}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::AdaptiveMtDataset >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.AdaptiveMtDataset, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListAdaptiveMtDatasets(google::cloud::translation::v3::ListAdaptiveMtDatasetsRequest, Options)

Lists all Adaptive MT datasets for which the caller has read permission.

Parameters
Name Description
request google::cloud::translation::v3::ListAdaptiveMtDatasetsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::AdaptiveMtDataset >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.AdaptiveMtDataset, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

AdaptiveMtTranslate(std::string const &, std::vector< std::string > const &, Options)

Translate text using Adaptive MT.

Parameters
Name Description
parent std::string const &

Required. Location to make a regional call.
Format: projects/{project-number-or-id}/locations/{location-id}.

content std::vector< std::string > const &

Required. The content of the input in string format.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::AdaptiveMtTranslateResponse >

the result of the RPC. The response message type (google.cloud.translation.v3.AdaptiveMtTranslateResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

AdaptiveMtTranslate(google::cloud::translation::v3::AdaptiveMtTranslateRequest const &, Options)

Translate text using Adaptive MT.

Parameters
Name Description
request google::cloud::translation::v3::AdaptiveMtTranslateRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.AdaptiveMtTranslateRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::AdaptiveMtTranslateResponse >

the result of the RPC. The response message type (google.cloud.translation.v3.AdaptiveMtTranslateResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetAdaptiveMtFile(std::string const &, Options)

Gets and AdaptiveMtFile.

Parameters
Name Description
name std::string const &

Required. The resource name of the file, in form of projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::AdaptiveMtFile >

the result of the RPC. The response message type (google.cloud.translation.v3.AdaptiveMtFile) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetAdaptiveMtFile(google::cloud::translation::v3::GetAdaptiveMtFileRequest const &, Options)

Gets and AdaptiveMtFile.

Parameters
Name Description
request google::cloud::translation::v3::GetAdaptiveMtFileRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.GetAdaptiveMtFileRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::AdaptiveMtFile >

the result of the RPC. The response message type (google.cloud.translation.v3.AdaptiveMtFile) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteAdaptiveMtFile(std::string const &, Options)

Deletes an AdaptiveMtFile along with its sentences.

Parameters
Name Description
name std::string const &

Required. The resource name of the file to delete, in form of projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteAdaptiveMtFile(google::cloud::translation::v3::DeleteAdaptiveMtFileRequest const &, Options)

Deletes an AdaptiveMtFile along with its sentences.

Parameters
Name Description
request google::cloud::translation::v3::DeleteAdaptiveMtFileRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.DeleteAdaptiveMtFileRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

ImportAdaptiveMtFile(std::string const &, Options)

Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.

Parameters
Name Description
parent std::string const &

Required. The resource name of the file, in form of projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::ImportAdaptiveMtFileResponse >

the result of the RPC. The response message type (google.cloud.translation.v3.ImportAdaptiveMtFileResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ImportAdaptiveMtFile(google::cloud::translation::v3::ImportAdaptiveMtFileRequest const &, Options)

Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.

Parameters
Name Description
request google::cloud::translation::v3::ImportAdaptiveMtFileRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.ImportAdaptiveMtFileRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::ImportAdaptiveMtFileResponse >

the result of the RPC. The response message type (google.cloud.translation.v3.ImportAdaptiveMtFileResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListAdaptiveMtFiles(std::string const &, Options)

Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.

Parameters
Name Description
parent std::string const &

Required. The resource name of the project from which to list the Adaptive MT files. projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::AdaptiveMtFile >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.AdaptiveMtFile, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListAdaptiveMtFiles(google::cloud::translation::v3::ListAdaptiveMtFilesRequest, Options)

Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.

Parameters
Name Description
request google::cloud::translation::v3::ListAdaptiveMtFilesRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.ListAdaptiveMtFilesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::AdaptiveMtFile >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.AdaptiveMtFile, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListAdaptiveMtSentences(std::string const &, Options)

Lists all AdaptiveMtSentences under a given file/dataset.

Parameters
Name Description
parent std::string const &

Required. The resource name of the project from which to list the Adaptive MT files. The following format lists all sentences under a file. projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file} The following format lists all sentences within a dataset. projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::AdaptiveMtSentence >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.AdaptiveMtSentence, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListAdaptiveMtSentences(google::cloud::translation::v3::ListAdaptiveMtSentencesRequest, Options)

Lists all AdaptiveMtSentences under a given file/dataset.

Parameters
Name Description
request google::cloud::translation::v3::ListAdaptiveMtSentencesRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.ListAdaptiveMtSentencesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::AdaptiveMtSentence >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.AdaptiveMtSentence, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ImportData(std::string const &, google::cloud::translation::v3::DatasetInputConfig const &, Options)

Import sentence pairs into translation Dataset.

Parameters
Name Description
dataset std::string const &

Required. Name of the dataset. In form of projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}

input_config google::cloud::translation::v3::DatasetInputConfig const &

Required. The config for the input content.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::ImportDataMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.ImportDataMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ImportData(NoAwaitTag, std::string const &, google::cloud::translation::v3::DatasetInputConfig const &, Options)

Import sentence pairs into translation Dataset.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
dataset std::string const &
input_config google::cloud::translation::v3::DatasetInputConfig const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

ImportData(google::cloud::translation::v3::ImportDataRequest const &, Options)

Import sentence pairs into translation Dataset.

Parameters
Name Description
request google::cloud::translation::v3::ImportDataRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.ImportDataRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::ImportDataMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.ImportDataMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ImportData(NoAwaitTag, google::cloud::translation::v3::ImportDataRequest const &, Options)

Import sentence pairs into translation Dataset.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::translation::v3::ImportDataRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

ImportData(google::longrunning::Operation const &, Options)

Import sentence pairs into translation Dataset.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::ImportDataMetadata > >

ExportData(std::string const &, google::cloud::translation::v3::DatasetOutputConfig const &, Options)

Exports dataset's data to the provided output location.

Parameters
Name Description
dataset std::string const &

Required. Name of the dataset. In form of projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}

output_config google::cloud::translation::v3::DatasetOutputConfig const &

Required. The config for the output content.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::ExportDataMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.ExportDataMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ExportData(NoAwaitTag, std::string const &, google::cloud::translation::v3::DatasetOutputConfig const &, Options)

Exports dataset's data to the provided output location.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
dataset std::string const &
output_config google::cloud::translation::v3::DatasetOutputConfig const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

ExportData(google::cloud::translation::v3::ExportDataRequest const &, Options)

Exports dataset's data to the provided output location.

Parameters
Name Description
request google::cloud::translation::v3::ExportDataRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.ExportDataRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::ExportDataMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.ExportDataMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ExportData(NoAwaitTag, google::cloud::translation::v3::ExportDataRequest const &, Options)

Exports dataset's data to the provided output location.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::translation::v3::ExportDataRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

ExportData(google::longrunning::Operation const &, Options)

Exports dataset's data to the provided output location.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::ExportDataMetadata > >

ListExamples(std::string const &, Options)

Lists sentence pairs in the dataset.

Parameters
Name Description
parent std::string const &

Required. Name of the parent dataset. In form of projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::Example >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.Example, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListExamples(google::cloud::translation::v3::ListExamplesRequest, Options)

Lists sentence pairs in the dataset.

Parameters
Name Description
request google::cloud::translation::v3::ListExamplesRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.ListExamplesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::Example >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.Example, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

CreateModel(std::string const &, google::cloud::translation::v3::Model const &, Options)

Creates a Model.

Parameters
Name Description
parent std::string const &

Required. The project name, in form of projects/{project}/locations/{location}

model google::cloud::translation::v3::Model const &

Required. The Model to create.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::Model > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.Model proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateModel(NoAwaitTag, std::string const &, google::cloud::translation::v3::Model const &, Options)

Creates a Model.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
parent std::string const &
model google::cloud::translation::v3::Model const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

CreateModel(google::cloud::translation::v3::CreateModelRequest const &, Options)

Creates a Model.

Parameters
Name Description
request google::cloud::translation::v3::CreateModelRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.CreateModelRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::Model > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.Model proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateModel(NoAwaitTag, google::cloud::translation::v3::CreateModelRequest const &, Options)

Creates a Model.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::translation::v3::CreateModelRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

CreateModel(google::longrunning::Operation const &, Options)

Creates a Model.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::Model > >

ListModels(std::string const &, Options)

Lists models.

Parameters
Name Description
parent std::string const &

Required. Name of the parent project. In form of projects/{project-number-or-id}/locations/{location-id}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::Model >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.Model, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListModels(google::cloud::translation::v3::ListModelsRequest, Options)

Lists models.

Parameters
Name Description
request google::cloud::translation::v3::ListModelsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.ListModelsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::translation::v3::Model >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.translation.v3.Model, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetModel(std::string const &, Options)

Gets a model.

Parameters
Name Description
name std::string const &

Required. The resource name of the model to retrieve.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::Model >

the result of the RPC. The response message type (google.cloud.translation.v3.Model) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetModel(google::cloud::translation::v3::GetModelRequest const &, Options)

Gets a model.

Parameters
Name Description
request google::cloud::translation::v3::GetModelRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.GetModelRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::translation::v3::Model >

the result of the RPC. The response message type (google.cloud.translation.v3.Model) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteModel(std::string const &, Options)

Deletes a model.

Parameters
Name Description
name std::string const &

Required. The name of the model to delete.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::DeleteModelMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.DeleteModelMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteModel(NoAwaitTag, std::string const &, Options)

Deletes a model.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
name std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteModel(google::cloud::translation::v3::DeleteModelRequest const &, Options)

Deletes a model.

Parameters
Name Description
request google::cloud::translation::v3::DeleteModelRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.translation.v3.DeleteModelRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::translation::v3::DeleteModelMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.translation.v3.DeleteModelMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteModel(NoAwaitTag, google::cloud::translation::v3::DeleteModelRequest const &, Options)

Deletes a model.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::translation::v3::DeleteModelRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteModel(google::longrunning::Operation const &, Options)

Deletes a model.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::translation::v3::DeleteModelMetadata > >