Google Cloud Translation v3 API - Class TranslationService.TranslationServiceBase (3.5.0)

[BindServiceMethod(typeof(TranslationService), "BindService")]
public abstract class TranslationService.TranslationServiceBase

Reference documentation and code samples for the Google Cloud Translation v3 API class TranslationService.TranslationServiceBase.

Base class for server-side implementations of TranslationService

Inheritance

object > TranslationService.TranslationServiceBase

Namespace

Google.Cloud.Translate.V3

Assembly

Google.Cloud.Translate.V3.dll

Methods

AdaptiveMtTranslate(AdaptiveMtTranslateRequest, ServerCallContext)

public virtual Task<AdaptiveMtTranslateResponse> AdaptiveMtTranslate(AdaptiveMtTranslateRequest request, ServerCallContext context)

Translate text using Adaptive MT.

Parameters
NameDescription
requestAdaptiveMtTranslateRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
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
NameDescription
requestBatchTranslateDocumentRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
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
NameDescription
requestBatchTranslateTextRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
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
NameDescription
requestCreateAdaptiveMtDatasetRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskAdaptiveMtDataset

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
NameDescription
requestCreateGlossaryRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
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
NameDescription
requestDeleteAdaptiveMtDatasetRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
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
NameDescription
requestDeleteAdaptiveMtFileRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskEmpty

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
NameDescription
requestDeleteGlossaryRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
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
NameDescription
requestDetectLanguageRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskDetectLanguageResponse

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
NameDescription
requestGetAdaptiveMtDatasetRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
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
NameDescription
requestGetAdaptiveMtFileRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskAdaptiveMtFile

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
NameDescription
requestGetGlossaryRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskGlossary

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
NameDescription
requestGetSupportedLanguagesRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
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
NameDescription
requestImportAdaptiveMtFileRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskImportAdaptiveMtFileResponse

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
NameDescription
requestListAdaptiveMtDatasetsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
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
NameDescription
requestListAdaptiveMtFilesRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
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
NameDescription
requestListAdaptiveMtSentencesRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskListAdaptiveMtSentencesResponse

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
NameDescription
requestListGlossariesRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskListGlossariesResponse

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
NameDescription
requestTranslateDocumentRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
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
NameDescription
requestTranslateTextRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskTranslateTextResponse

The response to send back to the client (wrapped by a task).