Google Cloud Translation v2 API - Class TranslationClientBuilder (3.2.0)

public sealed class TranslationClientBuilder : ClientBuilderBase<TranslationClient>

Reference documentation and code samples for the Google Cloud Translation v2 API class TranslationClientBuilder.

A builder for TranslationClient, allowing simple client customization.

Inheritance

object > ClientBuilderBaseTranslationClient > TranslationClientBuilder

Namespace

GoogleGoogle.CloudGoogle.Cloud.TranslationV2

Assembly

Google.Cloud.Translation.V2.dll

Constructors

TranslationClientBuilder()

public TranslationClientBuilder()

Creates a new builder with default settings.

Properties

TranslationModel

public TranslationModel TranslationModel { get; set; }

The translation model to use, defaulting to ServiceDefault.

Property Value
TypeDescription
TranslationModel

Methods

Build()

public override TranslationClient Build()
Returns
TypeDescription
TranslationClient
Overrides
Google.Api.Gax.Rest.ClientBuilderBase<Google.Cloud.Translation.V2.TranslationClient>.Build()

BuildAsync(CancellationToken)

public override Task<TranslationClient> BuildAsync(CancellationToken cancellationToken = default)
Parameter
NameDescription
cancellationTokenCancellationToken
Returns
TypeDescription
TaskTranslationClient
Overrides
Google.Api.Gax.Rest.ClientBuilderBase<Google.Cloud.Translation.V2.TranslationClient>.BuildAsync(System.Threading.CancellationToken)

GetDefaultApplicationName()

protected override string GetDefaultApplicationName()
Returns
TypeDescription
string
Overrides
Google.Api.Gax.Rest.ClientBuilderBase<Google.Cloud.Translation.V2.TranslationClient>.GetDefaultApplicationName()

GetScopedCredentialProvider()

protected override ScopedCredentialProvider GetScopedCredentialProvider()
Returns
TypeDescription
ScopedCredentialProvider
Overrides
Google.Api.Gax.Rest.ClientBuilderBase<Google.Cloud.Translation.V2.TranslationClient>.GetScopedCredentialProvider()