Class DashboardsServiceSpringAutoConfiguration
java.lang.Object
com.google.cloud.monitoring.dashboard.v1.spring.DashboardsServiceSpringAutoConfiguration
@Generated("by google-cloud-spring-generator")
@BetaApi("Autogenerated Spring autoconfiguration is not yet stable")
@AutoConfiguration
@AutoConfigureAfter(GcpContextAutoConfiguration.class)
@ConditionalOnClass(com.google.cloud.monitoring.dashboard.v1.DashboardsServiceClient.class)
@ConditionalOnProperty(value="com.google.cloud.monitoring.dashboard.v1.dashboards-service.enabled",
matchIfMissing=true)
@EnableConfigurationProperties(DashboardsServiceSpringProperties.class)
public class DashboardsServiceSpringAutoConfiguration
extends Object
Auto-configuration for
DashboardsServiceClient
.
Provides auto-configuration for Spring Boot
The default instance has everything set to sensible defaults:
- The default transport provider is used.
- Credentials are acquired automatically through Application Default Credentials.
- Retries are configured for idempotent methods but not for non-idempotent methods.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DashboardsServiceSpringAutoConfiguration
(DashboardsServiceSpringProperties clientProperties, com.google.api.gax.core.CredentialsProvider credentialsProvider) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.cloud.monitoring.dashboard.v1.DashboardsServiceClient
dashboardsServiceClient
(com.google.cloud.monitoring.dashboard.v1.DashboardsServiceSettings dashboardsServiceSettings) Provides a DashboardsServiceClient bean configured with DashboardsServiceSettings.com.google.cloud.monitoring.dashboard.v1.DashboardsServiceSettings
dashboardsServiceSettings
(com.google.api.gax.rpc.TransportChannelProvider defaultTransportChannelProvider) Provides a DashboardsServiceSettings bean configured to use a DefaultCredentialsProvider and the client library's default transport channel provider (defaultDashboardsServiceTransportChannelProvider()).com.google.api.gax.rpc.TransportChannelProvider
Provides a default transport channel provider bean.
-
Constructor Details
-
DashboardsServiceSpringAutoConfiguration
protected DashboardsServiceSpringAutoConfiguration(DashboardsServiceSpringProperties clientProperties, com.google.api.gax.core.CredentialsProvider credentialsProvider) throws IOException - Throws:
IOException
-
-
Method Details
-
defaultDashboardsServiceTransportChannelProvider
@Bean @ConditionalOnMissingBean(name="defaultDashboardsServiceTransportChannelProvider") public com.google.api.gax.rpc.TransportChannelProvider defaultDashboardsServiceTransportChannelProvider()Provides a default transport channel provider bean. The default is gRPC and will default to it unless the useRest option is supported and provided to use HTTP transport instead- Returns:
- a default transport channel provider.
-
dashboardsServiceSettings
@Bean @ConditionalOnMissingBean public com.google.cloud.monitoring.dashboard.v1.DashboardsServiceSettings dashboardsServiceSettings(@Qualifier("defaultDashboardsServiceTransportChannelProvider") com.google.api.gax.rpc.TransportChannelProvider defaultTransportChannelProvider) throws IOException Provides a DashboardsServiceSettings bean configured to use a DefaultCredentialsProvider and the client library's default transport channel provider (defaultDashboardsServiceTransportChannelProvider()). It also configures the quota project ID and executor thread count, if provided through properties.Retry settings are also configured from service-level and method-level properties specified in DashboardsServiceSpringProperties. Method-level properties will take precedence over service-level properties if available, and client library defaults will be used if neither are specified.
- Parameters:
defaultTransportChannelProvider
- TransportChannelProvider to use in the settings.- Returns:
- a
DashboardsServiceSettings
bean configured withTransportChannelProvider
bean. - Throws:
IOException
-
dashboardsServiceClient
@Bean @ConditionalOnMissingBean public com.google.cloud.monitoring.dashboard.v1.DashboardsServiceClient dashboardsServiceClient(com.google.cloud.monitoring.dashboard.v1.DashboardsServiceSettings dashboardsServiceSettings) throws IOException Provides a DashboardsServiceClient bean configured with DashboardsServiceSettings.- Parameters:
dashboardsServiceSettings
- settings to configure an instance of client bean.- Returns:
- a
DashboardsServiceClient
bean configured withDashboardsServiceSettings
- Throws:
IOException
-