[BindServiceMethod(typeof(TranslationService), "BindService")]
public abstract class TranslationServiceBase
Base class for server-side implementations of TranslationService
Namespace
Google.Cloud.Translate.V3Assembly
Google.Cloud.Translate.V3.dll
Methods
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 | BatchTranslateTextRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<Operation> | 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 | CreateGlossaryRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<Operation> | 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 | DeleteGlossaryRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<Operation> | 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 | DetectLanguageRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<DetectLanguageResponse> | 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 | GetGlossaryRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<Glossary> | 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 | GetSupportedLanguagesRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<SupportedLanguages> | 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 | ListGlossariesRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<ListGlossariesResponse> | 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 | TranslateTextRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<TranslateTextResponse> | The response to send back to the client (wrapped by a task). |