Class TranslationService.TranslationServiceClient (2.4.0)

public class TranslationServiceClient : ClientBase<TranslationService.TranslationServiceClient>

Client for TranslationService

Inheritance

Object > ClientBase > ClientBase<TranslationService.TranslationServiceClient> > TranslationService.TranslationServiceClient

Namespace

Google.Cloud.Translate.V3

Assembly

Google.Cloud.Translate.V3.dll

Constructors

TranslationServiceClient()

protected TranslationServiceClient()

Protected parameterless constructor to allow creation of test doubles.

TranslationServiceClient(CallInvoker)

public TranslationServiceClient(CallInvoker callInvoker)

Creates a new client for TranslationService that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

TranslationServiceClient(Channel)

[Obsolete("This constructor overload is present for compatibility only, and will be removed in the next major version")]
public TranslationServiceClient(Channel channel)

Creates a new client using a channel.

Parameter
NameDescription
channelGrpc.Core.Channel

The channel to use to make remote calls.

TranslationServiceClient(ChannelBase)

public TranslationServiceClient(ChannelBase channel)

Creates a new client for TranslationService

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

TranslationServiceClient(ClientBase.ClientBaseConfiguration)

protected TranslationServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

The client configuration.

Methods

BatchTranslateDocument(BatchTranslateDocumentRequest, CallOptions)

public virtual Operation BatchTranslateDocument(BatchTranslateDocumentRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

BatchTranslateDocument(BatchTranslateDocumentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Operation BatchTranslateDocument(BatchTranslateDocumentRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

BatchTranslateDocumentAsync(BatchTranslateDocumentRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> BatchTranslateDocumentAsync(BatchTranslateDocumentRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

BatchTranslateDocumentAsync(BatchTranslateDocumentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Operation> BatchTranslateDocumentAsync(BatchTranslateDocumentRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

BatchTranslateText(BatchTranslateTextRequest, CallOptions)

public virtual Operation BatchTranslateText(BatchTranslateTextRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

BatchTranslateText(BatchTranslateTextRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Operation BatchTranslateText(BatchTranslateTextRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

BatchTranslateTextAsync(BatchTranslateTextRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> BatchTranslateTextAsync(BatchTranslateTextRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

BatchTranslateTextAsync(BatchTranslateTextRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Operation> BatchTranslateTextAsync(BatchTranslateTextRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

CreateGlossary(CreateGlossaryRequest, CallOptions)

public virtual Operation CreateGlossary(CreateGlossaryRequest request, CallOptions options)

Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist.

Parameters
NameDescription
requestCreateGlossaryRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

CreateGlossary(CreateGlossaryRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Operation CreateGlossary(CreateGlossaryRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist.

Parameters
NameDescription
requestCreateGlossaryRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

CreateGlossaryAsync(CreateGlossaryRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> CreateGlossaryAsync(CreateGlossaryRequest request, CallOptions options)

Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist.

Parameters
NameDescription
requestCreateGlossaryRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

CreateGlossaryAsync(CreateGlossaryRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Operation> CreateGlossaryAsync(CreateGlossaryRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist.

Parameters
NameDescription
requestCreateGlossaryRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

CreateOperationsClient()

public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of Operations.OperationsClient using the same call invoker as this client.

Returns
TypeDescription
Operations.OperationsClient

A new Operations client for the same target as this client.

DeleteGlossary(DeleteGlossaryRequest, CallOptions)

public virtual Operation DeleteGlossary(DeleteGlossaryRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

DeleteGlossary(DeleteGlossaryRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Operation DeleteGlossary(DeleteGlossaryRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

DeleteGlossaryAsync(DeleteGlossaryRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> DeleteGlossaryAsync(DeleteGlossaryRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

DeleteGlossaryAsync(DeleteGlossaryRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Operation> DeleteGlossaryAsync(DeleteGlossaryRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

DetectLanguage(DetectLanguageRequest, CallOptions)

public virtual DetectLanguageResponse DetectLanguage(DetectLanguageRequest request, CallOptions options)

Detects the language of text within a request.

Parameters
NameDescription
requestDetectLanguageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
DetectLanguageResponse

The response received from the server.

DetectLanguage(DetectLanguageRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual DetectLanguageResponse DetectLanguage(DetectLanguageRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Detects the language of text within a request.

Parameters
NameDescription
requestDetectLanguageRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
DetectLanguageResponse

The response received from the server.

DetectLanguageAsync(DetectLanguageRequest, CallOptions)

public virtual AsyncUnaryCall<DetectLanguageResponse> DetectLanguageAsync(DetectLanguageRequest request, CallOptions options)

Detects the language of text within a request.

Parameters
NameDescription
requestDetectLanguageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<DetectLanguageResponse>

The call object.

DetectLanguageAsync(DetectLanguageRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<DetectLanguageResponse> DetectLanguageAsync(DetectLanguageRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Detects the language of text within a request.

Parameters
NameDescription
requestDetectLanguageRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<DetectLanguageResponse>

The call object.

GetGlossary(GetGlossaryRequest, CallOptions)

public virtual Glossary GetGlossary(GetGlossaryRequest request, CallOptions options)

Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.

Parameters
NameDescription
requestGetGlossaryRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Glossary

The response received from the server.

GetGlossary(GetGlossaryRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Glossary GetGlossary(GetGlossaryRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.

Parameters
NameDescription
requestGetGlossaryRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Glossary

The response received from the server.

GetGlossaryAsync(GetGlossaryRequest, CallOptions)

public virtual AsyncUnaryCall<Glossary> GetGlossaryAsync(GetGlossaryRequest request, CallOptions options)

Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.

Parameters
NameDescription
requestGetGlossaryRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Glossary>

The call object.

GetGlossaryAsync(GetGlossaryRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Glossary> GetGlossaryAsync(GetGlossaryRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.

Parameters
NameDescription
requestGetGlossaryRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Glossary>

The call object.

GetSupportedLanguages(GetSupportedLanguagesRequest, CallOptions)

public virtual SupportedLanguages GetSupportedLanguages(GetSupportedLanguagesRequest request, CallOptions options)

Returns a list of supported languages for translation.

Parameters
NameDescription
requestGetSupportedLanguagesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
SupportedLanguages

The response received from the server.

GetSupportedLanguages(GetSupportedLanguagesRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual SupportedLanguages GetSupportedLanguages(GetSupportedLanguagesRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Returns a list of supported languages for translation.

Parameters
NameDescription
requestGetSupportedLanguagesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
SupportedLanguages

The response received from the server.

GetSupportedLanguagesAsync(GetSupportedLanguagesRequest, CallOptions)

public virtual AsyncUnaryCall<SupportedLanguages> GetSupportedLanguagesAsync(GetSupportedLanguagesRequest request, CallOptions options)

Returns a list of supported languages for translation.

Parameters
NameDescription
requestGetSupportedLanguagesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<SupportedLanguages>

The call object.

GetSupportedLanguagesAsync(GetSupportedLanguagesRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<SupportedLanguages> GetSupportedLanguagesAsync(GetSupportedLanguagesRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Returns a list of supported languages for translation.

Parameters
NameDescription
requestGetSupportedLanguagesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<SupportedLanguages>

The call object.

ListGlossaries(ListGlossariesRequest, CallOptions)

public virtual ListGlossariesResponse ListGlossaries(ListGlossariesRequest request, CallOptions options)

Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.

Parameters
NameDescription
requestListGlossariesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListGlossariesResponse

The response received from the server.

ListGlossaries(ListGlossariesRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual ListGlossariesResponse ListGlossaries(ListGlossariesRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.

Parameters
NameDescription
requestListGlossariesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListGlossariesResponse

The response received from the server.

ListGlossariesAsync(ListGlossariesRequest, CallOptions)

public virtual AsyncUnaryCall<ListGlossariesResponse> ListGlossariesAsync(ListGlossariesRequest request, CallOptions options)

Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.

Parameters
NameDescription
requestListGlossariesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ListGlossariesResponse>

The call object.

ListGlossariesAsync(ListGlossariesRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<ListGlossariesResponse> ListGlossariesAsync(ListGlossariesRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.

Parameters
NameDescription
requestListGlossariesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<ListGlossariesResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

protected override TranslationService.TranslationServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
TranslationService.TranslationServiceClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Translate.V3.TranslationService.TranslationServiceClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

TranslateDocument(TranslateDocumentRequest, CallOptions)

public virtual TranslateDocumentResponse TranslateDocument(TranslateDocumentRequest request, CallOptions options)

Translates documents in synchronous mode.

Parameters
NameDescription
requestTranslateDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
TranslateDocumentResponse

The response received from the server.

TranslateDocument(TranslateDocumentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual TranslateDocumentResponse TranslateDocument(TranslateDocumentRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Translates documents in synchronous mode.

Parameters
NameDescription
requestTranslateDocumentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
TranslateDocumentResponse

The response received from the server.

TranslateDocumentAsync(TranslateDocumentRequest, CallOptions)

public virtual AsyncUnaryCall<TranslateDocumentResponse> TranslateDocumentAsync(TranslateDocumentRequest request, CallOptions options)

Translates documents in synchronous mode.

Parameters
NameDescription
requestTranslateDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<TranslateDocumentResponse>

The call object.

TranslateDocumentAsync(TranslateDocumentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<TranslateDocumentResponse> TranslateDocumentAsync(TranslateDocumentRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Translates documents in synchronous mode.

Parameters
NameDescription
requestTranslateDocumentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<TranslateDocumentResponse>

The call object.

TranslateText(TranslateTextRequest, CallOptions)

public virtual TranslateTextResponse TranslateText(TranslateTextRequest request, CallOptions options)

Translates input text and returns translated text.

Parameters
NameDescription
requestTranslateTextRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
TranslateTextResponse

The response received from the server.

TranslateText(TranslateTextRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual TranslateTextResponse TranslateText(TranslateTextRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Translates input text and returns translated text.

Parameters
NameDescription
requestTranslateTextRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
TranslateTextResponse

The response received from the server.

TranslateTextAsync(TranslateTextRequest, CallOptions)

public virtual AsyncUnaryCall<TranslateTextResponse> TranslateTextAsync(TranslateTextRequest request, CallOptions options)

Translates input text and returns translated text.

Parameters
NameDescription
requestTranslateTextRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<TranslateTextResponse>

The call object.

TranslateTextAsync(TranslateTextRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<TranslateTextResponse> TranslateTextAsync(TranslateTextRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Translates input text and returns translated text.

Parameters
NameDescription
requestTranslateTextRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<TranslateTextResponse>

The call object.