Package com.google.cloud.apihub.v1
Class ApiHubPluginSettings
java.lang.Object
com.google.api.gax.rpc.ClientSettings<ApiHubPluginSettings>
com.google.cloud.apihub.v1.ApiHubPluginSettings
@Generated("by gapic-generator-java")
public class ApiHubPluginSettings
extends ClientSettings<ApiHubPluginSettings>
Settings class to configure an instance of
ApiHubPluginClient.
The default instance has everything set to sensible defaults:
- The default service address (apihub.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](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) of getPlugin:
// 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
ApiHubPluginSettings.Builder apiHubPluginSettingsBuilder = ApiHubPluginSettings.newBuilder();
apiHubPluginSettingsBuilder
.getPluginSettings()
.setRetrySettings(
apiHubPluginSettingsBuilder
.getPluginSettings()
.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());
ApiHubPluginSettings apiHubPluginSettings = apiHubPluginSettingsBuilder.build();
Please refer to the [Client Side Retry
Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
retries.
To configure the RetrySettings of a Long Running Operation method, create an OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to configure the RetrySettings for deletePlugin:
// 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
ApiHubPluginSettings.Builder apiHubPluginSettingsBuilder = ApiHubPluginSettings.newBuilder();
TimedRetryAlgorithm timedRetryAlgorithm =
OperationalTimedPollAlgorithm.create(
RetrySettings.newBuilder()
.setInitialRetryDelayDuration(Duration.ofMillis(500))
.setRetryDelayMultiplier(1.5)
.setMaxRetryDelayDuration(Duration.ofMillis(5000))
.setTotalTimeoutDuration(Duration.ofHours(24))
.build());
apiHubPluginSettingsBuilder
.createClusterOperationSettings()
.setPollingAlgorithm(timedRetryAlgorithm)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for ApiHubPluginSettings. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedApiHubPluginSettings(ApiHubPluginSettings.Builder settingsBuilder) -
Method Summary
Modifier and TypeMethodDescriptionstatic final ApiHubPluginSettingsReturns the object with the settings used for calls to createPluginInstance.Returns the object with the settings used for calls to createPluginInstance.Returns the object with the settings used for calls to createPlugin.Returns a builder for the default credentials for this service.Returns a builder for the default ExecutorProvider for this service.Returns a builder for the default ChannelProvider for this service.static TransportChannelProviderOperationCallSettings<DeletePluginInstanceRequest,com.google.protobuf.Empty, OperationMetadata> Returns the object with the settings used for calls to deletePluginInstance.Returns the object with the settings used for calls to deletePluginInstance.OperationCallSettings<DeletePluginRequest,com.google.protobuf.Empty, OperationMetadata> Returns the object with the settings used for calls to deletePlugin.Returns the object with the settings used for calls to deletePlugin.OperationCallSettings<DisablePluginInstanceActionRequest,DisablePluginInstanceActionResponse, OperationMetadata> Returns the object with the settings used for calls to disablePluginInstanceAction.Returns the object with the settings used for calls to disablePluginInstanceAction.Returns the object with the settings used for calls to disablePlugin.OperationCallSettings<EnablePluginInstanceActionRequest,EnablePluginInstanceActionResponse, OperationMetadata> Returns the object with the settings used for calls to enablePluginInstanceAction.Returns the object with the settings used for calls to enablePluginInstanceAction.Returns the object with the settings used for calls to enablePlugin.OperationCallSettings<ExecutePluginInstanceActionRequest,ExecutePluginInstanceActionResponse, OperationMetadata> Returns the object with the settings used for calls to executePluginInstanceAction.Returns the object with the settings used for calls to executePluginInstanceAction.static StringReturns the default service endpoint.Returns the default service scopes.Returns the object with the settings used for calls to getLocation.Returns the object with the settings used for calls to getPluginInstance.Returns the object with the settings used for calls to getPlugin.PagedCallSettings<ListLocationsRequest,ListLocationsResponse, ApiHubPluginClient.ListLocationsPagedResponse> Returns the object with the settings used for calls to listLocations.PagedCallSettings<ListPluginInstancesRequest,ListPluginInstancesResponse, ApiHubPluginClient.ListPluginInstancesPagedResponse> Returns the object with the settings used for calls to listPluginInstances.PagedCallSettings<ListPluginsRequest,ListPluginsResponse, ApiHubPluginClient.ListPluginsPagedResponse> Returns the object with the settings used for calls to listPlugins.static ApiHubPluginSettings.BuilderReturns a new builder for this class.static ApiHubPluginSettings.BuildernewBuilder(ClientContext clientContext) Returns a new builder for this class.Returns a builder containing all the values of this settings class.Returns the object with the settings used for calls to updatePluginInstance.Methods inherited from class com.google.api.gax.rpc.ClientSettings
getApiKey, getBackgroundExecutorProvider, getClock, getCredentialsProvider, getEndpoint, getExecutorProvider, getGdchApiAudience, getHeaderProvider, getInternalHeaderProvider, getQuotaProjectId, getStubSettings, getTransportChannelProvider, getUniverseDomain, getWatchdogCheckInterval, getWatchdogCheckIntervalDuration, getWatchdogProvider, toString
-
Constructor Details
-
ApiHubPluginSettings
- Throws:
IOException
-
-
Method Details
-
getPluginSettings
Returns the object with the settings used for calls to getPlugin. -
enablePluginSettings
Returns the object with the settings used for calls to enablePlugin. -
disablePluginSettings
Returns the object with the settings used for calls to disablePlugin. -
createPluginSettings
Returns the object with the settings used for calls to createPlugin. -
listPluginsSettings
public PagedCallSettings<ListPluginsRequest,ListPluginsResponse, listPluginsSettings()ApiHubPluginClient.ListPluginsPagedResponse> Returns the object with the settings used for calls to listPlugins. -
deletePluginSettings
Returns the object with the settings used for calls to deletePlugin. -
deletePluginOperationSettings
public OperationCallSettings<DeletePluginRequest,com.google.protobuf.Empty, deletePluginOperationSettings()OperationMetadata> Returns the object with the settings used for calls to deletePlugin. -
createPluginInstanceSettings
Returns the object with the settings used for calls to createPluginInstance. -
createPluginInstanceOperationSettings
public OperationCallSettings<CreatePluginInstanceRequest,PluginInstance, createPluginInstanceOperationSettings()OperationMetadata> Returns the object with the settings used for calls to createPluginInstance. -
executePluginInstanceActionSettings
public UnaryCallSettings<ExecutePluginInstanceActionRequest,Operation> executePluginInstanceActionSettings()Returns the object with the settings used for calls to executePluginInstanceAction. -
executePluginInstanceActionOperationSettings
public OperationCallSettings<ExecutePluginInstanceActionRequest,ExecutePluginInstanceActionResponse, executePluginInstanceActionOperationSettings()OperationMetadata> Returns the object with the settings used for calls to executePluginInstanceAction. -
getPluginInstanceSettings
Returns the object with the settings used for calls to getPluginInstance. -
listPluginInstancesSettings
public PagedCallSettings<ListPluginInstancesRequest,ListPluginInstancesResponse, listPluginInstancesSettings()ApiHubPluginClient.ListPluginInstancesPagedResponse> Returns the object with the settings used for calls to listPluginInstances. -
enablePluginInstanceActionSettings
public UnaryCallSettings<EnablePluginInstanceActionRequest,Operation> enablePluginInstanceActionSettings()Returns the object with the settings used for calls to enablePluginInstanceAction. -
enablePluginInstanceActionOperationSettings
public OperationCallSettings<EnablePluginInstanceActionRequest,EnablePluginInstanceActionResponse, enablePluginInstanceActionOperationSettings()OperationMetadata> Returns the object with the settings used for calls to enablePluginInstanceAction. -
disablePluginInstanceActionSettings
public UnaryCallSettings<DisablePluginInstanceActionRequest,Operation> disablePluginInstanceActionSettings()Returns the object with the settings used for calls to disablePluginInstanceAction. -
disablePluginInstanceActionOperationSettings
public OperationCallSettings<DisablePluginInstanceActionRequest,DisablePluginInstanceActionResponse, disablePluginInstanceActionOperationSettings()OperationMetadata> Returns the object with the settings used for calls to disablePluginInstanceAction. -
updatePluginInstanceSettings
Returns the object with the settings used for calls to updatePluginInstance. -
deletePluginInstanceSettings
Returns the object with the settings used for calls to deletePluginInstance. -
deletePluginInstanceOperationSettings
public OperationCallSettings<DeletePluginInstanceRequest,com.google.protobuf.Empty, deletePluginInstanceOperationSettings()OperationMetadata> Returns the object with the settings used for calls to deletePluginInstance. -
listLocationsSettings
public PagedCallSettings<ListLocationsRequest,ListLocationsResponse, listLocationsSettings()ApiHubPluginClient.ListLocationsPagedResponse> Returns the object with the settings used for calls to listLocations. -
getLocationSettings
Returns the object with the settings used for calls to getLocation. -
create
- Throws:
IOException
-
defaultExecutorProviderBuilder
Returns a builder for the default ExecutorProvider for this service. -
getDefaultEndpoint
Returns the default service endpoint. -
getDefaultServiceScopes
Returns the default service scopes. -
defaultCredentialsProviderBuilder
Returns a builder for the default credentials for this service. -
defaultHttpJsonTransportProviderBuilder
public static InstantiatingHttpJsonChannelProvider.Builder defaultHttpJsonTransportProviderBuilder()Returns a builder for the default ChannelProvider for this service. -
defaultTransportChannelProvider
-
defaultApiClientHeaderProviderBuilder
-
newBuilder
Returns a new builder for this class. -
newBuilder
Returns a new builder for this class. -
toBuilder
Returns a builder containing all the values of this settings class.- Specified by:
toBuilderin classClientSettings<ApiHubPluginSettings>
-