public sealed class TranslationServiceClientImpl : TranslationServiceClient
Reference documentation and code samples for the Google Cloud Translation v3 API class TranslationServiceClientImpl.
TranslationService client wrapper implementation, for convenient use.
Namespace
Google.Cloud.Translate.V3Assembly
Google.Cloud.Translate.V3.dll
Remarks
Provides natural language translation operations.
Constructors
TranslationServiceClientImpl(TranslationServiceClient, TranslationServiceSettings, ILogger)
public TranslationServiceClientImpl(TranslationService.TranslationServiceClient grpcClient, TranslationServiceSettings settings, ILogger logger)
Constructs a client wrapper for the TranslationService service, with the specified gRPC client and settings.
Parameters | |
---|---|
Name | Description |
grpcClient | TranslationServiceTranslationServiceClient The underlying gRPC client. |
settings | TranslationServiceSettings The base TranslationServiceSettings used within this client. |
logger | ILogger Optional ILogger to use within this client. |
Properties
BatchTranslateDocumentOperationsClient
public override OperationsClient BatchTranslateDocumentOperationsClient { get; }
The long-running operations client for BatchTranslateDocument
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
BatchTranslateTextOperationsClient
public override OperationsClient BatchTranslateTextOperationsClient { get; }
The long-running operations client for BatchTranslateText
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
CreateGlossaryOperationsClient
public override OperationsClient CreateGlossaryOperationsClient { get; }
The long-running operations client for CreateGlossary
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeleteGlossaryOperationsClient
public override OperationsClient DeleteGlossaryOperationsClient { get; }
The long-running operations client for DeleteGlossary
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public override TranslationService.TranslationServiceClient GrpcClient { get; }
The underlying gRPC TranslationService client
Property Value | |
---|---|
Type | Description |
TranslationServiceTranslationServiceClient |
Methods
BatchTranslateDocument(BatchTranslateDocumentRequest, CallSettings)
public override Operation<BatchTranslateDocumentResponse, BatchTranslateDocumentMetadata> BatchTranslateDocument(BatchTranslateDocumentRequest request, CallSettings callSettings = null)
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 | BatchTranslateDocumentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBatchTranslateDocumentResponseBatchTranslateDocumentMetadata | The RPC response. |
BatchTranslateDocumentAsync(BatchTranslateDocumentRequest, CallSettings)
public override Task<Operation<BatchTranslateDocumentResponse, BatchTranslateDocumentMetadata>> BatchTranslateDocumentAsync(BatchTranslateDocumentRequest request, CallSettings callSettings = null)
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 | BatchTranslateDocumentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchTranslateDocumentResponseBatchTranslateDocumentMetadata | A Task containing the RPC response. |
BatchTranslateText(BatchTranslateTextRequest, CallSettings)
public override Operation<BatchTranslateResponse, BatchTranslateMetadata> BatchTranslateText(BatchTranslateTextRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBatchTranslateResponseBatchTranslateMetadata | The RPC response. |
BatchTranslateTextAsync(BatchTranslateTextRequest, CallSettings)
public override Task<Operation<BatchTranslateResponse, BatchTranslateMetadata>> BatchTranslateTextAsync(BatchTranslateTextRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchTranslateResponseBatchTranslateMetadata | A Task containing the RPC response. |
CreateGlossary(CreateGlossaryRequest, CallSettings)
public override Operation<Glossary, CreateGlossaryMetadata> CreateGlossary(CreateGlossaryRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationGlossaryCreateGlossaryMetadata | The RPC response. |
CreateGlossaryAsync(CreateGlossaryRequest, CallSettings)
public override Task<Operation<Glossary, CreateGlossaryMetadata>> CreateGlossaryAsync(CreateGlossaryRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationGlossaryCreateGlossaryMetadata | A Task containing the RPC response. |
DeleteGlossary(DeleteGlossaryRequest, CallSettings)
public override Operation<DeleteGlossaryResponse, DeleteGlossaryMetadata> DeleteGlossary(DeleteGlossaryRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationDeleteGlossaryResponseDeleteGlossaryMetadata | The RPC response. |
DeleteGlossaryAsync(DeleteGlossaryRequest, CallSettings)
public override Task<Operation<DeleteGlossaryResponse, DeleteGlossaryMetadata>> DeleteGlossaryAsync(DeleteGlossaryRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationDeleteGlossaryResponseDeleteGlossaryMetadata | A Task containing the RPC response. |
DetectLanguage(DetectLanguageRequest, CallSettings)
public override DetectLanguageResponse DetectLanguage(DetectLanguageRequest request, CallSettings callSettings = null)
Detects the language of text within a request.
Parameters | |
---|---|
Name | Description |
request | DetectLanguageRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DetectLanguageResponse | The RPC response. |
DetectLanguageAsync(DetectLanguageRequest, CallSettings)
public override Task<DetectLanguageResponse> DetectLanguageAsync(DetectLanguageRequest request, CallSettings callSettings = null)
Detects the language of text within a request.
Parameters | |
---|---|
Name | Description |
request | DetectLanguageRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDetectLanguageResponse | A Task containing the RPC response. |
GetGlossary(GetGlossaryRequest, CallSettings)
public override Glossary GetGlossary(GetGlossaryRequest request, CallSettings callSettings = null)
Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.
Parameters | |
---|---|
Name | Description |
request | GetGlossaryRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Glossary | The RPC response. |
GetGlossaryAsync(GetGlossaryRequest, CallSettings)
public override Task<Glossary> GetGlossaryAsync(GetGlossaryRequest request, CallSettings callSettings = null)
Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.
Parameters | |
---|---|
Name | Description |
request | GetGlossaryRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskGlossary | A Task containing the RPC response. |
GetSupportedLanguages(GetSupportedLanguagesRequest, CallSettings)
public override SupportedLanguages GetSupportedLanguages(GetSupportedLanguagesRequest request, CallSettings callSettings = null)
Returns a list of supported languages for translation.
Parameters | |
---|---|
Name | Description |
request | GetSupportedLanguagesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
SupportedLanguages | The RPC response. |
GetSupportedLanguagesAsync(GetSupportedLanguagesRequest, CallSettings)
public override Task<SupportedLanguages> GetSupportedLanguagesAsync(GetSupportedLanguagesRequest request, CallSettings callSettings = null)
Returns a list of supported languages for translation.
Parameters | |
---|---|
Name | Description |
request | GetSupportedLanguagesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskSupportedLanguages | A Task containing the RPC response. |
ListGlossaries(ListGlossariesRequest, CallSettings)
public override PagedEnumerable<ListGlossariesResponse, Glossary> ListGlossaries(ListGlossariesRequest request, CallSettings callSettings = null)
Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.
Parameters | |
---|---|
Name | Description |
request | ListGlossariesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListGlossariesResponseGlossary | A pageable sequence of Glossary resources. |
ListGlossariesAsync(ListGlossariesRequest, CallSettings)
public override PagedAsyncEnumerable<ListGlossariesResponse, Glossary> ListGlossariesAsync(ListGlossariesRequest request, CallSettings callSettings = null)
Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.
Parameters | |
---|---|
Name | Description |
request | ListGlossariesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListGlossariesResponseGlossary | A pageable asynchronous sequence of Glossary resources. |
TranslateDocument(TranslateDocumentRequest, CallSettings)
public override TranslateDocumentResponse TranslateDocument(TranslateDocumentRequest request, CallSettings callSettings = null)
Translates documents in synchronous mode.
Parameters | |
---|---|
Name | Description |
request | TranslateDocumentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TranslateDocumentResponse | The RPC response. |
TranslateDocumentAsync(TranslateDocumentRequest, CallSettings)
public override Task<TranslateDocumentResponse> TranslateDocumentAsync(TranslateDocumentRequest request, CallSettings callSettings = null)
Translates documents in synchronous mode.
Parameters | |
---|---|
Name | Description |
request | TranslateDocumentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTranslateDocumentResponse | A Task containing the RPC response. |
TranslateText(TranslateTextRequest, CallSettings)
public override TranslateTextResponse TranslateText(TranslateTextRequest request, CallSettings callSettings = null)
Translates input text and returns translated text.
Parameters | |
---|---|
Name | Description |
request | TranslateTextRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TranslateTextResponse | The RPC response. |
TranslateTextAsync(TranslateTextRequest, CallSettings)
public override Task<TranslateTextResponse> TranslateTextAsync(TranslateTextRequest request, CallSettings callSettings = null)
Translates input text and returns translated text.
Parameters | |
---|---|
Name | Description |
request | TranslateTextRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTranslateTextResponse | A Task containing the RPC response. |