public class DeveloperKnowledgeStubSettings extends StubSettings<DeveloperKnowledgeStubSettings>
Settings class to configure an instance of DeveloperKnowledgeStub .
The default instance has everything set to sensible defaults:
The default service address (developerknowledge.googleapis.com) and default port (443) are
used.
Credentials are acquired automatically through Application Default Credentials.
Retries are configured for idempotent methods but not for non-idempotent methods.
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
RetrySettings
of getDocument:
// 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
DeveloperKnowledgeStubSettings . Builder developerKnowledgeSettingsBuilder =
DeveloperKnowledgeStubSettings . newBuilder ();
developerKnowledgeSettingsBuilder
. getDocumentSettings ()
. setRetrySettings (
developerKnowledgeSettingsBuilder
. getDocumentSettings ()
. getRetrySettings ()
. toBuilder ()
. setInitialRetryDelayDuration ( Duration . ofSeconds ( 1 ))
. setInitialRpcTimeoutDuration ( Duration . ofSeconds ( 5 ))
. setMaxAttempts ( 5 )
. setMaxRetryDelayDuration ( Duration . ofSeconds ( 30 ))
. setMaxRpcTimeoutDuration ( Duration . ofSeconds ( 60 ))
. setRetryDelayMultiplier ( 1.3 )
. setRpcTimeoutMultiplier ( 1.5 )
. setTotalTimeoutDuration ( Duration . ofSeconds ( 300 ))
. build ());
DeveloperKnowledgeStubSettings developerKnowledgeSettings =
developerKnowledgeSettingsBuilder . build ();
Please refer to the Client Side Retry
Guide for additional support in setting
retries.
Inheritance
java.lang.Object >
com.google.api.gax.rpc.StubSettings >
DeveloperKnowledgeStubSettings
Inherited Members
com.google.api.gax.rpc.StubSettings.getApiKey()
com.google.api.gax.rpc.StubSettings.getBackgroundExecutorProvider()
com.google.api.gax.rpc.StubSettings.getClock()
com.google.api.gax.rpc.StubSettings.getCredentialsProvider()
com.google.api.gax.rpc.StubSettings.getEndpoint()
com.google.api.gax.rpc.StubSettings.getExecutorProvider()
com.google.api.gax.rpc.StubSettings.getGdchApiAudience()
com.google.api.gax.rpc.StubSettings.getHeaderProvider()
com.google.api.gax.rpc.StubSettings.getInternalHeaderProvider()
com.google.api.gax.rpc.StubSettings.getLibraryMetadata()
com.google.api.gax.rpc.StubSettings.getMtlsEndpoint()
com.google.api.gax.rpc.StubSettings.getQuotaProjectId()
com.google.api.gax.rpc.StubSettings.getServiceName()
com.google.api.gax.rpc.StubSettings.getStreamWatchdogCheckInterval()
com.google.api.gax.rpc.StubSettings.getStreamWatchdogCheckIntervalDuration()
com.google.api.gax.rpc.StubSettings.getStreamWatchdogProvider()
com.google.api.gax.rpc.StubSettings.getTracerFactory()
com.google.api.gax.rpc.StubSettings.getTransportChannelProvider()
com.google.api.gax.rpc.StubSettings.getUniverseDomain()
com.google.api.gax.rpc.StubSettings.toBuilder()
com.google.api.gax.rpc.StubSettings.toString()
Static Methods
public static ApiClientHeaderProvider . Builder defaultApiClientHeaderProviderBuilder ()
Returns
Type
Description
com.google.api.gax.rpc.ApiClientHeaderProvider.Builder
defaultCredentialsProviderBuilder()
public static GoogleCredentialsProvider . Builder defaultCredentialsProviderBuilder ()
Returns a builder for the default credentials for this service.
Returns
Type
Description
com.google.api.gax.core.GoogleCredentialsProvider.Builder
defaultExecutorProviderBuilder()
public static InstantiatingExecutorProvider . Builder defaultExecutorProviderBuilder ()
Returns a builder for the default ExecutorProvider for this service.
Returns
Type
Description
com.google.api.gax.core.InstantiatingExecutorProvider.Builder
public static ApiClientHeaderProvider . Builder defaultGrpcApiClientHeaderProviderBuilder ()
Returns
Type
Description
com.google.api.gax.rpc.ApiClientHeaderProvider.Builder
defaultGrpcTransportProviderBuilder()
public static InstantiatingGrpcChannelProvider . Builder defaultGrpcTransportProviderBuilder ()
Returns a builder for the default gRPC ChannelProvider for this service.
Returns
Type
Description
com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.Builder
public static ApiClientHeaderProvider . Builder defaultHttpJsonApiClientHeaderProviderBuilder ()
Returns
Type
Description
com.google.api.gax.rpc.ApiClientHeaderProvider.Builder
defaultHttpJsonTransportProviderBuilder()
public static InstantiatingHttpJsonChannelProvider . Builder defaultHttpJsonTransportProviderBuilder ()
Beta
This feature is covered by the Pre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.
Returns a builder for the default REST ChannelProvider for this service.
Returns
Type
Description
com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider.Builder
defaultTransportChannelProvider()
public static TransportChannelProvider defaultTransportChannelProvider ()
Returns
Type
Description
com.google.api.gax.rpc.TransportChannelProvider
getDefaultEndpoint()
public static String getDefaultEndpoint ()
Obsolete
Use getEndpoint() instead
This feature is stable for usage in this major version, but may be deprecated in a future release.
Returns the default service endpoint.
Returns
Type
Description
String
getDefaultMtlsEndpoint()
public static String getDefaultMtlsEndpoint ()
Returns the default mTLS service endpoint.
Returns
Type
Description
String
getDefaultServiceScopes()
public static List<String> getDefaultServiceScopes ()
Returns the default service scopes.
newBuilder()
public static DeveloperKnowledgeStubSettings . Builder newBuilder ()
Returns a new gRPC builder for this class.
newBuilder(@Nullable ClientContext clientContext)
public static DeveloperKnowledgeStubSettings . Builder newBuilder ( @Nullable ClientContext clientContext )
Returns a new builder for this class.
Parameter
Name
Description
clientContext
@org.jspecify.annotations.Nullable com.google.api.gax.rpc.ClientContext
newHttpJsonBuilder()
public static DeveloperKnowledgeStubSettings . Builder newHttpJsonBuilder ()
Returns a new REST builder for this class.
Constructors
DeveloperKnowledgeStubSettings(DeveloperKnowledgeStubSettings.Builder settingsBuilder)
protected DeveloperKnowledgeStubSettings ( DeveloperKnowledgeStubSettings . Builder settingsBuilder )
Methods
answerQuerySettings()
public UnaryCallSettings<AnswerQueryRequest , AnswerQueryResponse > answerQuerySettings ()
Returns the object with the settings used for calls to answerQuery.
batchGetDocumentsSettings()
public UnaryCallSettings<BatchGetDocumentsRequest , BatchGetDocumentsResponse > batchGetDocumentsSettings ()
Returns the object with the settings used for calls to batchGetDocuments.
createStub()
public DeveloperKnowledgeStub createStub ()
getDocumentSettings()
public UnaryCallSettings<GetDocumentRequest , Document > getDocumentSettings ()
Returns the object with the settings used for calls to getDocument.
protected LibraryMetadata getLibraryMetadata ()
Returns
Type
Description
com.google.api.gax.rpc.LibraryMetadata
Overrides
com.google.api.gax.rpc.StubSettings.getLibraryMetadata()
getServiceName()
public String getServiceName ()
Returns the default service name.
Returns
Type
Description
String
Overrides
com.google.api.gax.rpc.StubSettings.getServiceName()
searchDocumentChunksSettings()
public PagedCallSettings<SearchDocumentChunksRequest , SearchDocumentChunksResponse , DeveloperKnowledgeClient . SearchDocumentChunksPagedResponse > searchDocumentChunksSettings ()
Returns the object with the settings used for calls to searchDocumentChunks.
toBuilder()
public DeveloperKnowledgeStubSettings . Builder toBuilder ()
Returns a builder containing all the values of this settings class.
Overrides
com.google.api.gax.rpc.StubSettings.toBuilder()