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.
Namespace
Google.Cloud.Translation.V2Assembly
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 | |
---|---|
Type | Description |
TranslationModel |
Methods
Build()
public override TranslationClient Build()
Builds the resulting client.
Returns | |
---|---|
Type | Description |
TranslationClient |
BuildAsync(CancellationToken)
public override Task<TranslationClient> BuildAsync(CancellationToken cancellationToken = default)
Builds the resulting client asynchronously.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken |
Returns | |
---|---|
Type | Description |
TaskTranslationClient |
GetDefaultApplicationName()
protected override string GetDefaultApplicationName()
Returns the default application name, used if no custom name is otherwise specified.
Returns | |
---|---|
Type | Description |
string |
GetScopedCredentialProvider()
protected override ScopedCredentialProvider GetScopedCredentialProvider()
Returns the scoped credential provider for this builder.
Returns | |
---|---|
Type | Description |
ScopedCredentialProvider |