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. |
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 |
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. |
model |
std::string const &
Optional. The
|
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 |
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 |
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 |
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. |
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 |
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 |
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 |
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. |
model |
std::string const &
Optional. The language detection model to 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". |
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 |
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 |
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 |
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. |
model |
std::string const &
Optional. Get supported languages of this 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 |
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 |
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 |
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 |
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 |
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 |
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 |
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. |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
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 |
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 |
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 |
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 |
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 |
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 |
ListDatasets(std::string const &, Options)
Lists datasets.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. Name of the parent project. In form of |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
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 |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
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 |
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 |
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 |
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 |
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. |
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 |
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 |
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 |
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. |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
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 |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
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 |
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 |
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 |
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 |
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. |
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 |
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 |
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 |
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. |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 > > |