@BetaApi @Generated(value="by gapic-generator-java") public class TranslationServiceSettings extends com.google.api.gax.rpc.ClientSettings<TranslationServiceSettings>
TranslationServiceClient.
The default instance has everything set to sensible defaults:
The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.
For example, to set the total timeout of translateText to 30 seconds:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
TranslationServiceSettings.Builder translationServiceSettingsBuilder =
TranslationServiceSettings.newBuilder();
translationServiceSettingsBuilder
.translateTextSettings()
.setRetrySettings(
translationServiceSettingsBuilder
.translateTextSettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
TranslationServiceSettings translationServiceSettings =
translationServiceSettingsBuilder.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
TranslationServiceSettings.Builder
Builder for TranslationServiceSettings.
|
| Modifier | Constructor and Description |
|---|---|
protected |
TranslationServiceSettings(TranslationServiceSettings.Builder settingsBuilder) |
| Modifier and Type | Method and Description |
|---|---|
com.google.api.gax.rpc.OperationCallSettings<BatchTranslateDocumentRequest,BatchTranslateDocumentResponse,BatchTranslateDocumentMetadata> |
batchTranslateDocumentOperationSettings()
Returns the object with the settings used for calls to batchTranslateDocument.
|
com.google.api.gax.rpc.UnaryCallSettings<BatchTranslateDocumentRequest,com.google.longrunning.Operation> |
batchTranslateDocumentSettings()
Returns the object with the settings used for calls to batchTranslateDocument.
|
com.google.api.gax.rpc.OperationCallSettings<BatchTranslateTextRequest,BatchTranslateResponse,BatchTranslateMetadata> |
batchTranslateTextOperationSettings()
Returns the object with the settings used for calls to batchTranslateText.
|
com.google.api.gax.rpc.UnaryCallSettings<BatchTranslateTextRequest,com.google.longrunning.Operation> |
batchTranslateTextSettings()
Returns the object with the settings used for calls to batchTranslateText.
|
static TranslationServiceSettings |
create(TranslationServiceStubSettings stub) |
com.google.api.gax.rpc.OperationCallSettings<CreateGlossaryRequest,Glossary,CreateGlossaryMetadata> |
createGlossaryOperationSettings()
Returns the object with the settings used for calls to createGlossary.
|
com.google.api.gax.rpc.UnaryCallSettings<CreateGlossaryRequest,com.google.longrunning.Operation> |
createGlossarySettings()
Returns the object with the settings used for calls to createGlossary.
|
static com.google.api.gax.rpc.ApiClientHeaderProvider.Builder |
defaultApiClientHeaderProviderBuilder() |
static com.google.api.gax.core.GoogleCredentialsProvider.Builder |
defaultCredentialsProviderBuilder()
Returns a builder for the default credentials for this service.
|
static com.google.api.gax.core.InstantiatingExecutorProvider.Builder |
defaultExecutorProviderBuilder()
Returns a builder for the default ExecutorProvider for this service.
|
static com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.Builder |
defaultGrpcTransportProviderBuilder()
Returns a builder for the default gRPC ChannelProvider for this service.
|
static com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider.Builder |
defaultHttpJsonTransportProviderBuilder()
Returns a builder for the default REST ChannelProvider for this service.
|
static com.google.api.gax.rpc.TransportChannelProvider |
defaultTransportChannelProvider() |
com.google.api.gax.rpc.OperationCallSettings<DeleteGlossaryRequest,DeleteGlossaryResponse,DeleteGlossaryMetadata> |
deleteGlossaryOperationSettings()
Returns the object with the settings used for calls to deleteGlossary.
|
com.google.api.gax.rpc.UnaryCallSettings<DeleteGlossaryRequest,com.google.longrunning.Operation> |
deleteGlossarySettings()
Returns the object with the settings used for calls to deleteGlossary.
|
com.google.api.gax.rpc.UnaryCallSettings<DetectLanguageRequest,DetectLanguageResponse> |
detectLanguageSettings()
Returns the object with the settings used for calls to detectLanguage.
|
static String |
getDefaultEndpoint()
Returns the default service endpoint.
|
static List<String> |
getDefaultServiceScopes()
Returns the default service scopes.
|
com.google.api.gax.rpc.UnaryCallSettings<GetGlossaryRequest,Glossary> |
getGlossarySettings()
Returns the object with the settings used for calls to getGlossary.
|
com.google.api.gax.rpc.UnaryCallSettings<GetSupportedLanguagesRequest,SupportedLanguages> |
getSupportedLanguagesSettings()
Returns the object with the settings used for calls to getSupportedLanguages.
|
com.google.api.gax.rpc.PagedCallSettings<ListGlossariesRequest,ListGlossariesResponse,TranslationServiceClient.ListGlossariesPagedResponse> |
listGlossariesSettings()
Returns the object with the settings used for calls to listGlossaries.
|
static TranslationServiceSettings.Builder |
newBuilder()
Returns a new gRPC builder for this class.
|
static TranslationServiceSettings.Builder |
newBuilder(com.google.api.gax.rpc.ClientContext clientContext)
Returns a new builder for this class.
|
static TranslationServiceSettings.Builder |
newHttpJsonBuilder()
Returns a new REST builder for this class.
|
TranslationServiceSettings.Builder |
toBuilder()
Returns a builder containing all the values of this settings class.
|
com.google.api.gax.rpc.UnaryCallSettings<TranslateDocumentRequest,TranslateDocumentResponse> |
translateDocumentSettings()
Returns the object with the settings used for calls to translateDocument.
|
com.google.api.gax.rpc.UnaryCallSettings<TranslateTextRequest,TranslateTextResponse> |
translateTextSettings()
Returns the object with the settings used for calls to translateText.
|
getBackgroundExecutorProvider, getClock, getCredentialsProvider, getEndpoint, getExecutorProvider, getHeaderProvider, getInternalHeaderProvider, getQuotaProjectId, getStubSettings, getTransportChannelProvider, getWatchdogCheckInterval, getWatchdogProvider, toStringprotected TranslationServiceSettings(TranslationServiceSettings.Builder settingsBuilder) throws IOException
IOExceptionpublic com.google.api.gax.rpc.UnaryCallSettings<TranslateTextRequest,TranslateTextResponse> translateTextSettings()
public com.google.api.gax.rpc.UnaryCallSettings<DetectLanguageRequest,DetectLanguageResponse> detectLanguageSettings()
public com.google.api.gax.rpc.UnaryCallSettings<GetSupportedLanguagesRequest,SupportedLanguages> getSupportedLanguagesSettings()
public com.google.api.gax.rpc.UnaryCallSettings<TranslateDocumentRequest,TranslateDocumentResponse> translateDocumentSettings()
public com.google.api.gax.rpc.UnaryCallSettings<BatchTranslateTextRequest,com.google.longrunning.Operation> batchTranslateTextSettings()
public com.google.api.gax.rpc.OperationCallSettings<BatchTranslateTextRequest,BatchTranslateResponse,BatchTranslateMetadata> batchTranslateTextOperationSettings()
public com.google.api.gax.rpc.UnaryCallSettings<BatchTranslateDocumentRequest,com.google.longrunning.Operation> batchTranslateDocumentSettings()
public com.google.api.gax.rpc.OperationCallSettings<BatchTranslateDocumentRequest,BatchTranslateDocumentResponse,BatchTranslateDocumentMetadata> batchTranslateDocumentOperationSettings()
public com.google.api.gax.rpc.UnaryCallSettings<CreateGlossaryRequest,com.google.longrunning.Operation> createGlossarySettings()
public com.google.api.gax.rpc.OperationCallSettings<CreateGlossaryRequest,Glossary,CreateGlossaryMetadata> createGlossaryOperationSettings()
public com.google.api.gax.rpc.PagedCallSettings<ListGlossariesRequest,ListGlossariesResponse,TranslationServiceClient.ListGlossariesPagedResponse> listGlossariesSettings()
public com.google.api.gax.rpc.UnaryCallSettings<GetGlossaryRequest,Glossary> getGlossarySettings()
public com.google.api.gax.rpc.UnaryCallSettings<DeleteGlossaryRequest,com.google.longrunning.Operation> deleteGlossarySettings()
public com.google.api.gax.rpc.OperationCallSettings<DeleteGlossaryRequest,DeleteGlossaryResponse,DeleteGlossaryMetadata> deleteGlossaryOperationSettings()
public static final TranslationServiceSettings create(TranslationServiceStubSettings stub) throws IOException
IOExceptionpublic static com.google.api.gax.core.InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder()
public static String getDefaultEndpoint()
public static List<String> getDefaultServiceScopes()
public static com.google.api.gax.core.GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder()
public static com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()
@BetaApi public static com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider.Builder defaultHttpJsonTransportProviderBuilder()
public static com.google.api.gax.rpc.TransportChannelProvider defaultTransportChannelProvider()
@BetaApi(value="The surface for customizing headers is not stable yet and may change in the future.") public static com.google.api.gax.rpc.ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder()
public static TranslationServiceSettings.Builder newBuilder()
@BetaApi public static TranslationServiceSettings.Builder newHttpJsonBuilder()
public static TranslationServiceSettings.Builder newBuilder(com.google.api.gax.rpc.ClientContext clientContext)
public TranslationServiceSettings.Builder toBuilder()
toBuilder in class com.google.api.gax.rpc.ClientSettings<TranslationServiceSettings>Copyright © 2023 Google LLC. All rights reserved.