Google Cloud Translation v3 API - Class TranslationServiceClientImpl (3.1.0)

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.

Inheritance

Object > TranslationServiceClient > TranslationServiceClientImpl

Namespace

Google.Cloud.Translate.V3

Assembly

Google.Cloud.Translate.V3.dll

Remarks

Provides natural language translation operations.

Constructors

TranslationServiceClientImpl(TranslationService.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
NameDescription
grpcClientTranslationService.TranslationServiceClient

The underlying gRPC client.

settingsTranslationServiceSettings

The base TranslationServiceSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

BatchTranslateDocumentOperationsClient

public override OperationsClient BatchTranslateDocumentOperationsClient { get; }

The long-running operations client for BatchTranslateDocument.

Property Value
TypeDescription
OperationsClient
Overrides

BatchTranslateTextOperationsClient

public override OperationsClient BatchTranslateTextOperationsClient { get; }

The long-running operations client for BatchTranslateText.

Property Value
TypeDescription
OperationsClient
Overrides

CreateGlossaryOperationsClient

public override OperationsClient CreateGlossaryOperationsClient { get; }

The long-running operations client for CreateGlossary.

Property Value
TypeDescription
OperationsClient
Overrides

DeleteGlossaryOperationsClient

public override OperationsClient DeleteGlossaryOperationsClient { get; }

The long-running operations client for DeleteGlossary.

Property Value
TypeDescription
OperationsClient
Overrides

GrpcClient

public override TranslationService.TranslationServiceClient GrpcClient { get; }

The underlying gRPC TranslationService client

Property Value
TypeDescription
TranslationService.TranslationServiceClient
Overrides

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

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<BatchTranslateDocumentResponse, BatchTranslateDocumentMetadata>

The RPC response.

Overrides

BatchTranslateDocumentAsync(BatchTranslateDocumentRequest, CallSettings)

public override async 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
NameDescription
requestBatchTranslateDocumentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<BatchTranslateDocumentResponse, BatchTranslateDocumentMetadata>>

A Task containing the RPC response.

Overrides

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

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<BatchTranslateResponse, BatchTranslateMetadata>

The RPC response.

Overrides

BatchTranslateTextAsync(BatchTranslateTextRequest, CallSettings)

public override async 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
NameDescription
requestBatchTranslateTextRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<BatchTranslateResponse, BatchTranslateMetadata>>

A Task containing the RPC response.

Overrides

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

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Glossary, CreateGlossaryMetadata>

The RPC response.

Overrides

CreateGlossaryAsync(CreateGlossaryRequest, CallSettings)

public override async 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
NameDescription
requestCreateGlossaryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Glossary, CreateGlossaryMetadata>>

A Task containing the RPC response.

Overrides

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

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<DeleteGlossaryResponse, DeleteGlossaryMetadata>

The RPC response.

Overrides

DeleteGlossaryAsync(DeleteGlossaryRequest, CallSettings)

public override async 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
NameDescription
requestDeleteGlossaryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<DeleteGlossaryResponse, DeleteGlossaryMetadata>>

A Task containing the RPC response.

Overrides

DetectLanguage(DetectLanguageRequest, CallSettings)

public override DetectLanguageResponse DetectLanguage(DetectLanguageRequest request, CallSettings callSettings = null)

Detects the language of text within a request.

Parameters
NameDescription
requestDetectLanguageRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DetectLanguageResponse

The RPC response.

Overrides

DetectLanguageAsync(DetectLanguageRequest, CallSettings)

public override Task<DetectLanguageResponse> DetectLanguageAsync(DetectLanguageRequest request, CallSettings callSettings = null)

Detects the language of text within a request.

Parameters
NameDescription
requestDetectLanguageRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<DetectLanguageResponse>

A Task containing the RPC response.

Overrides

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

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Glossary

The RPC response.

Overrides

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

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Glossary>

A Task containing the RPC response.

Overrides

GetSupportedLanguages(GetSupportedLanguagesRequest, CallSettings)

public override SupportedLanguages GetSupportedLanguages(GetSupportedLanguagesRequest request, CallSettings callSettings = null)

Returns a list of supported languages for translation.

Parameters
NameDescription
requestGetSupportedLanguagesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SupportedLanguages

The RPC response.

Overrides

GetSupportedLanguagesAsync(GetSupportedLanguagesRequest, CallSettings)

public override Task<SupportedLanguages> GetSupportedLanguagesAsync(GetSupportedLanguagesRequest request, CallSettings callSettings = null)

Returns a list of supported languages for translation.

Parameters
NameDescription
requestGetSupportedLanguagesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SupportedLanguages>

A Task containing the RPC response.

Overrides

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

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListGlossariesResponse, Glossary>

A pageable sequence of Glossary resources.

Overrides

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

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListGlossariesResponse, Glossary>

A pageable asynchronous sequence of Glossary resources.

Overrides

TranslateDocument(TranslateDocumentRequest, CallSettings)

public override TranslateDocumentResponse TranslateDocument(TranslateDocumentRequest request, CallSettings callSettings = null)

Translates documents in synchronous mode.

Parameters
NameDescription
requestTranslateDocumentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TranslateDocumentResponse

The RPC response.

Overrides

TranslateDocumentAsync(TranslateDocumentRequest, CallSettings)

public override Task<TranslateDocumentResponse> TranslateDocumentAsync(TranslateDocumentRequest request, CallSettings callSettings = null)

Translates documents in synchronous mode.

Parameters
NameDescription
requestTranslateDocumentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TranslateDocumentResponse>

A Task containing the RPC response.

Overrides

TranslateText(TranslateTextRequest, CallSettings)

public override TranslateTextResponse TranslateText(TranslateTextRequest request, CallSettings callSettings = null)

Translates input text and returns translated text.

Parameters
NameDescription
requestTranslateTextRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TranslateTextResponse

The RPC response.

Overrides

TranslateTextAsync(TranslateTextRequest, CallSettings)

public override Task<TranslateTextResponse> TranslateTextAsync(TranslateTextRequest request, CallSettings callSettings = null)

Translates input text and returns translated text.

Parameters
NameDescription
requestTranslateTextRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TranslateTextResponse>

A Task containing the RPC response.

Overrides