[BindServiceMethod(typeof(TranslationService), "BindService")]
public abstract class TranslationService.TranslationServiceBaseReference documentation and code samples for the Google Cloud Translation v3 API class TranslationService.TranslationServiceBase.
Base class for server-side implementations of TranslationService
Namespace
Google.Cloud.Translate.V3Assembly
Google.Cloud.Translate.V3.dll
Methods
AdaptiveMtTranslate(AdaptiveMtTranslateRequest, ServerCallContext)
public virtual Task<AdaptiveMtTranslateResponse> AdaptiveMtTranslate(AdaptiveMtTranslateRequest request, ServerCallContext context)Translate text using Adaptive MT.
| Parameters | |
|---|---|
| Name | Description |
request |
AdaptiveMtTranslateRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskAdaptiveMtTranslateResponse |
The response to send back to the client (wrapped by a task). |
BatchTranslateDocument(BatchTranslateDocumentRequest, ServerCallContext)
public virtual Task<Operation> BatchTranslateDocument(BatchTranslateDocumentRequest request, ServerCallContext context)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 |
BatchTranslateDocumentRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskOperation |
The response to send back to the client (wrapped by a task). |
BatchTranslateText(BatchTranslateTextRequest, ServerCallContext)
public virtual Task<Operation> BatchTranslateText(BatchTranslateTextRequest request, ServerCallContext context)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 |
BatchTranslateTextRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskOperation |
The response to send back to the client (wrapped by a task). |
CreateAdaptiveMtDataset(CreateAdaptiveMtDatasetRequest, ServerCallContext)
public virtual Task<AdaptiveMtDataset> CreateAdaptiveMtDataset(CreateAdaptiveMtDatasetRequest request, ServerCallContext context)Creates an Adaptive MT dataset.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateAdaptiveMtDatasetRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskAdaptiveMtDataset |
The response to send back to the client (wrapped by a task). |
CreateDataset(CreateDatasetRequest, ServerCallContext)
public virtual Task<Operation> CreateDataset(CreateDatasetRequest request, ServerCallContext context)Creates a Dataset.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateDatasetRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskOperation |
The response to send back to the client (wrapped by a task). |
CreateGlossary(CreateGlossaryRequest, ServerCallContext)
public virtual Task<Operation> CreateGlossary(CreateGlossaryRequest request, ServerCallContext context)Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateGlossaryRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskOperation |
The response to send back to the client (wrapped by a task). |
CreateGlossaryEntry(CreateGlossaryEntryRequest, ServerCallContext)
public virtual Task<GlossaryEntry> CreateGlossaryEntry(CreateGlossaryEntryRequest request, ServerCallContext context)Creates a glossary entry.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateGlossaryEntryRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskGlossaryEntry |
The response to send back to the client (wrapped by a task). |
CreateModel(CreateModelRequest, ServerCallContext)
public virtual Task<Operation> CreateModel(CreateModelRequest request, ServerCallContext context)Creates a Model.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateModelRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskOperation |
The response to send back to the client (wrapped by a task). |
DeleteAdaptiveMtDataset(DeleteAdaptiveMtDatasetRequest, ServerCallContext)
public virtual Task<Empty> DeleteAdaptiveMtDataset(DeleteAdaptiveMtDatasetRequest request, ServerCallContext context)Deletes an Adaptive MT dataset, including all its entries and associated metadata.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteAdaptiveMtDatasetRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskEmpty |
The response to send back to the client (wrapped by a task). |
DeleteAdaptiveMtFile(DeleteAdaptiveMtFileRequest, ServerCallContext)
public virtual Task<Empty> DeleteAdaptiveMtFile(DeleteAdaptiveMtFileRequest request, ServerCallContext context)Deletes an AdaptiveMtFile along with its sentences.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteAdaptiveMtFileRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskEmpty |
The response to send back to the client (wrapped by a task). |
DeleteDataset(DeleteDatasetRequest, ServerCallContext)
public virtual Task<Operation> DeleteDataset(DeleteDatasetRequest request, ServerCallContext context)Deletes a dataset and all of its contents.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteDatasetRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskOperation |
The response to send back to the client (wrapped by a task). |
DeleteGlossary(DeleteGlossaryRequest, ServerCallContext)
public virtual Task<Operation> DeleteGlossary(DeleteGlossaryRequest request, ServerCallContext context)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 |
DeleteGlossaryRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskOperation |
The response to send back to the client (wrapped by a task). |
DeleteGlossaryEntry(DeleteGlossaryEntryRequest, ServerCallContext)
public virtual Task<Empty> DeleteGlossaryEntry(DeleteGlossaryEntryRequest request, ServerCallContext context)Deletes a single entry from the glossary
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteGlossaryEntryRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskEmpty |
The response to send back to the client (wrapped by a task). |
DeleteModel(DeleteModelRequest, ServerCallContext)
public virtual Task<Operation> DeleteModel(DeleteModelRequest request, ServerCallContext context)Deletes a model.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteModelRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskOperation |
The response to send back to the client (wrapped by a task). |
DetectLanguage(DetectLanguageRequest, ServerCallContext)
public virtual Task<DetectLanguageResponse> DetectLanguage(DetectLanguageRequest request, ServerCallContext context)Detects the language of text within a request.
| Parameters | |
|---|---|
| Name | Description |
request |
DetectLanguageRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskDetectLanguageResponse |
The response to send back to the client (wrapped by a task). |
ExportData(ExportDataRequest, ServerCallContext)
public virtual Task<Operation> ExportData(ExportDataRequest request, ServerCallContext context)Exports dataset's data to the provided output location.
| Parameters | |
|---|---|
| Name | Description |
request |
ExportDataRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskOperation |
The response to send back to the client (wrapped by a task). |
GetAdaptiveMtDataset(GetAdaptiveMtDatasetRequest, ServerCallContext)
public virtual Task<AdaptiveMtDataset> GetAdaptiveMtDataset(GetAdaptiveMtDatasetRequest request, ServerCallContext context)Gets the Adaptive MT dataset.
| Parameters | |
|---|---|
| Name | Description |
request |
GetAdaptiveMtDatasetRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskAdaptiveMtDataset |
The response to send back to the client (wrapped by a task). |
GetAdaptiveMtFile(GetAdaptiveMtFileRequest, ServerCallContext)
public virtual Task<AdaptiveMtFile> GetAdaptiveMtFile(GetAdaptiveMtFileRequest request, ServerCallContext context)Gets and AdaptiveMtFile
| Parameters | |
|---|---|
| Name | Description |
request |
GetAdaptiveMtFileRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskAdaptiveMtFile |
The response to send back to the client (wrapped by a task). |
GetDataset(GetDatasetRequest, ServerCallContext)
public virtual Task<Dataset> GetDataset(GetDatasetRequest request, ServerCallContext context)Gets a Dataset.
| Parameters | |
|---|---|
| Name | Description |
request |
GetDatasetRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskDataset |
The response to send back to the client (wrapped by a task). |
GetGlossary(GetGlossaryRequest, ServerCallContext)
public virtual Task<Glossary> GetGlossary(GetGlossaryRequest request, ServerCallContext context)Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.
| Parameters | |
|---|---|
| Name | Description |
request |
GetGlossaryRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskGlossary |
The response to send back to the client (wrapped by a task). |
GetGlossaryEntry(GetGlossaryEntryRequest, ServerCallContext)
public virtual Task<GlossaryEntry> GetGlossaryEntry(GetGlossaryEntryRequest request, ServerCallContext context)Gets a single glossary entry by the given id.
| Parameters | |
|---|---|
| Name | Description |
request |
GetGlossaryEntryRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskGlossaryEntry |
The response to send back to the client (wrapped by a task). |
GetModel(GetModelRequest, ServerCallContext)
public virtual Task<Model> GetModel(GetModelRequest request, ServerCallContext context)Gets a model.
| Parameters | |
|---|---|
| Name | Description |
request |
GetModelRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskModel |
The response to send back to the client (wrapped by a task). |
GetSupportedLanguages(GetSupportedLanguagesRequest, ServerCallContext)
public virtual Task<SupportedLanguages> GetSupportedLanguages(GetSupportedLanguagesRequest request, ServerCallContext context)Returns a list of supported languages for translation.
| Parameters | |
|---|---|
| Name | Description |
request |
GetSupportedLanguagesRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskSupportedLanguages |
The response to send back to the client (wrapped by a task). |
ImportAdaptiveMtFile(ImportAdaptiveMtFileRequest, ServerCallContext)
public virtual Task<ImportAdaptiveMtFileResponse> ImportAdaptiveMtFile(ImportAdaptiveMtFileRequest request, ServerCallContext context)Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.
| Parameters | |
|---|---|
| Name | Description |
request |
ImportAdaptiveMtFileRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskImportAdaptiveMtFileResponse |
The response to send back to the client (wrapped by a task). |
ImportData(ImportDataRequest, ServerCallContext)
public virtual Task<Operation> ImportData(ImportDataRequest request, ServerCallContext context)Import sentence pairs into translation Dataset.
| Parameters | |
|---|---|
| Name | Description |
request |
ImportDataRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskOperation |
The response to send back to the client (wrapped by a task). |
ListAdaptiveMtDatasets(ListAdaptiveMtDatasetsRequest, ServerCallContext)
public virtual Task<ListAdaptiveMtDatasetsResponse> ListAdaptiveMtDatasets(ListAdaptiveMtDatasetsRequest request, ServerCallContext context)Lists all Adaptive MT datasets for which the caller has read permission.
| Parameters | |
|---|---|
| Name | Description |
request |
ListAdaptiveMtDatasetsRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskListAdaptiveMtDatasetsResponse |
The response to send back to the client (wrapped by a task). |
ListAdaptiveMtFiles(ListAdaptiveMtFilesRequest, ServerCallContext)
public virtual Task<ListAdaptiveMtFilesResponse> ListAdaptiveMtFiles(ListAdaptiveMtFilesRequest request, ServerCallContext context)Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.
| Parameters | |
|---|---|
| Name | Description |
request |
ListAdaptiveMtFilesRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskListAdaptiveMtFilesResponse |
The response to send back to the client (wrapped by a task). |
ListAdaptiveMtSentences(ListAdaptiveMtSentencesRequest, ServerCallContext)
public virtual Task<ListAdaptiveMtSentencesResponse> ListAdaptiveMtSentences(ListAdaptiveMtSentencesRequest request, ServerCallContext context)Lists all AdaptiveMtSentences under a given file/dataset.
| Parameters | |
|---|---|
| Name | Description |
request |
ListAdaptiveMtSentencesRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskListAdaptiveMtSentencesResponse |
The response to send back to the client (wrapped by a task). |
ListDatasets(ListDatasetsRequest, ServerCallContext)
public virtual Task<ListDatasetsResponse> ListDatasets(ListDatasetsRequest request, ServerCallContext context)Lists datasets.
| Parameters | |
|---|---|
| Name | Description |
request |
ListDatasetsRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskListDatasetsResponse |
The response to send back to the client (wrapped by a task). |
ListExamples(ListExamplesRequest, ServerCallContext)
public virtual Task<ListExamplesResponse> ListExamples(ListExamplesRequest request, ServerCallContext context)Lists sentence pairs in the dataset.
| Parameters | |
|---|---|
| Name | Description |
request |
ListExamplesRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskListExamplesResponse |
The response to send back to the client (wrapped by a task). |
ListGlossaries(ListGlossariesRequest, ServerCallContext)
public virtual Task<ListGlossariesResponse> ListGlossaries(ListGlossariesRequest request, ServerCallContext context)Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.
| Parameters | |
|---|---|
| Name | Description |
request |
ListGlossariesRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskListGlossariesResponse |
The response to send back to the client (wrapped by a task). |
ListGlossaryEntries(ListGlossaryEntriesRequest, ServerCallContext)
public virtual Task<ListGlossaryEntriesResponse> ListGlossaryEntries(ListGlossaryEntriesRequest request, ServerCallContext context)List the entries for the glossary.
| Parameters | |
|---|---|
| Name | Description |
request |
ListGlossaryEntriesRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskListGlossaryEntriesResponse |
The response to send back to the client (wrapped by a task). |
ListModels(ListModelsRequest, ServerCallContext)
public virtual Task<ListModelsResponse> ListModels(ListModelsRequest request, ServerCallContext context)Lists models.
| Parameters | |
|---|---|
| Name | Description |
request |
ListModelsRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskListModelsResponse |
The response to send back to the client (wrapped by a task). |
RomanizeText(RomanizeTextRequest, ServerCallContext)
public virtual Task<RomanizeTextResponse> RomanizeText(RomanizeTextRequest request, ServerCallContext context)Romanize input text written in non-Latin scripts to Latin text.
| Parameters | |
|---|---|
| Name | Description |
request |
RomanizeTextRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskRomanizeTextResponse |
The response to send back to the client (wrapped by a task). |
TranslateDocument(TranslateDocumentRequest, ServerCallContext)
public virtual Task<TranslateDocumentResponse> TranslateDocument(TranslateDocumentRequest request, ServerCallContext context)Translates documents in synchronous mode.
| Parameters | |
|---|---|
| Name | Description |
request |
TranslateDocumentRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskTranslateDocumentResponse |
The response to send back to the client (wrapped by a task). |
TranslateText(TranslateTextRequest, ServerCallContext)
public virtual Task<TranslateTextResponse> TranslateText(TranslateTextRequest request, ServerCallContext context)Translates input text and returns translated text.
| Parameters | |
|---|---|
| Name | Description |
request |
TranslateTextRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskTranslateTextResponse |
The response to send back to the client (wrapped by a task). |
UpdateGlossary(UpdateGlossaryRequest, ServerCallContext)
public virtual Task<Operation> UpdateGlossary(UpdateGlossaryRequest request, ServerCallContext context)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 |
UpdateGlossaryRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskOperation |
The response to send back to the client (wrapped by a task). |
UpdateGlossaryEntry(UpdateGlossaryEntryRequest, ServerCallContext)
public virtual Task<GlossaryEntry> UpdateGlossaryEntry(UpdateGlossaryEntryRequest request, ServerCallContext context)Updates a glossary entry.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateGlossaryEntryRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskGlossaryEntry |
The response to send back to the client (wrapped by a task). |