Package com.google.cloud.apphub.v1
Class AppHubSettings
@Generated("by gapic-generator-java")
public class AppHubSettings
extends ClientSettings<AppHubSettings>
Settings class to configure an instance of
AppHubClient.
The default instance has everything set to sensible defaults:
- The default service address (apphub.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 lookupServiceProjectAttachment:
// 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
AppHubSettings.Builder appHubSettingsBuilder = AppHubSettings.newBuilder();
appHubSettingsBuilder
.lookupServiceProjectAttachmentSettings()
.setRetrySettings(
appHubSettingsBuilder
.lookupServiceProjectAttachmentSettings()
.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());
AppHubSettings appHubSettings = appHubSettingsBuilder.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 createServiceProjectAttachment:
// 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
AppHubSettings.Builder appHubSettingsBuilder = AppHubSettings.newBuilder();
TimedRetryAlgorithm timedRetryAlgorithm =
OperationalTimedPollAlgorithm.create(
RetrySettings.newBuilder()
.setInitialRetryDelayDuration(Duration.ofMillis(500))
.setRetryDelayMultiplier(1.5)
.setMaxRetryDelayDuration(Duration.ofMillis(5000))
.setTotalTimeoutDuration(Duration.ofHours(24))
.build());
appHubSettingsBuilder
.createClusterOperationSettings()
.setPollingAlgorithm(timedRetryAlgorithm)
.build();
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final AppHubSettingscreate(AppHubStubSettings stub) Returns the object with the settings used for calls to createApplication.Returns the object with the settings used for calls to createApplication.Returns the object with the settings used for calls to createService.OperationCallSettings<CreateServiceProjectAttachmentRequest,ServiceProjectAttachment, OperationMetadata> Returns the object with the settings used for calls to createServiceProjectAttachment.Returns the object with the settings used for calls to createServiceProjectAttachment.Returns the object with the settings used for calls to createService.Returns the object with the settings used for calls to createWorkload.Returns the object with the settings used for calls to createWorkload.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 gRPC ChannelProvider for this service.Returns a builder for the default REST ChannelProvider for this service.static TransportChannelProviderOperationCallSettings<DeleteApplicationRequest,com.google.protobuf.Empty, OperationMetadata> Returns the object with the settings used for calls to deleteApplication.Returns the object with the settings used for calls to deleteApplication.OperationCallSettings<DeleteServiceRequest,com.google.protobuf.Empty, OperationMetadata> Returns the object with the settings used for calls to deleteService.OperationCallSettings<DeleteServiceProjectAttachmentRequest,com.google.protobuf.Empty, OperationMetadata> Returns the object with the settings used for calls to deleteServiceProjectAttachment.Returns the object with the settings used for calls to deleteServiceProjectAttachment.Returns the object with the settings used for calls to deleteService.OperationCallSettings<DeleteWorkloadRequest,com.google.protobuf.Empty, OperationMetadata> Returns the object with the settings used for calls to deleteWorkload.Returns the object with the settings used for calls to deleteWorkload.Returns the object with the settings used for calls to detachServiceProjectAttachment.Returns the object with the settings used for calls to getApplication.static StringReturns the default service endpoint.Returns the default service scopes.Returns the object with the settings used for calls to getDiscoveredService.Returns the object with the settings used for calls to getDiscoveredWorkload.Returns the object with the settings used for calls to getIamPolicy.Returns the object with the settings used for calls to getLocation.Returns the object with the settings used for calls to getServiceProjectAttachment.Returns the object with the settings used for calls to getService.Returns the object with the settings used for calls to getWorkload.PagedCallSettings<ListApplicationsRequest,ListApplicationsResponse, AppHubClient.ListApplicationsPagedResponse> Returns the object with the settings used for calls to listApplications.PagedCallSettings<ListDiscoveredServicesRequest,ListDiscoveredServicesResponse, AppHubClient.ListDiscoveredServicesPagedResponse> Returns the object with the settings used for calls to listDiscoveredServices.PagedCallSettings<ListDiscoveredWorkloadsRequest,ListDiscoveredWorkloadsResponse, AppHubClient.ListDiscoveredWorkloadsPagedResponse> Returns the object with the settings used for calls to listDiscoveredWorkloads.PagedCallSettings<ListLocationsRequest,ListLocationsResponse, AppHubClient.ListLocationsPagedResponse> Returns the object with the settings used for calls to listLocations.PagedCallSettings<ListServiceProjectAttachmentsRequest,ListServiceProjectAttachmentsResponse, AppHubClient.ListServiceProjectAttachmentsPagedResponse> Returns the object with the settings used for calls to listServiceProjectAttachments.Returns the object with the settings used for calls to listServices.PagedCallSettings<ListWorkloadsRequest,ListWorkloadsResponse, AppHubClient.ListWorkloadsPagedResponse> Returns the object with the settings used for calls to listWorkloads.Returns the object with the settings used for calls to lookupDiscoveredService.Returns the object with the settings used for calls to lookupDiscoveredWorkload.Returns the object with the settings used for calls to lookupServiceProjectAttachment.static AppHubSettings.BuilderReturns a new gRPC builder for this class.static AppHubSettings.BuildernewBuilder(ClientContext clientContext) Returns a new builder for this class.static AppHubSettings.BuilderReturns a new REST builder for this class.Returns the object with the settings used for calls to setIamPolicy.Returns the object with the settings used for calls to testIamPermissions.Returns a builder containing all the values of this settings class.Returns the object with the settings used for calls to updateApplication.Returns the object with the settings used for calls to updateApplication.Returns the object with the settings used for calls to updateService.Returns the object with the settings used for calls to updateService.Returns the object with the settings used for calls to updateWorkload.Returns the object with the settings used for calls to updateWorkload.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
-
AppHubSettings
- Throws:
IOException
-
-
Method Details
-
lookupServiceProjectAttachmentSettings
public UnaryCallSettings<LookupServiceProjectAttachmentRequest,LookupServiceProjectAttachmentResponse> lookupServiceProjectAttachmentSettings()Returns the object with the settings used for calls to lookupServiceProjectAttachment. -
listServiceProjectAttachmentsSettings
public PagedCallSettings<ListServiceProjectAttachmentsRequest,ListServiceProjectAttachmentsResponse, listServiceProjectAttachmentsSettings()AppHubClient.ListServiceProjectAttachmentsPagedResponse> Returns the object with the settings used for calls to listServiceProjectAttachments. -
createServiceProjectAttachmentSettings
public UnaryCallSettings<CreateServiceProjectAttachmentRequest,Operation> createServiceProjectAttachmentSettings()Returns the object with the settings used for calls to createServiceProjectAttachment. -
createServiceProjectAttachmentOperationSettings
public OperationCallSettings<CreateServiceProjectAttachmentRequest,ServiceProjectAttachment, createServiceProjectAttachmentOperationSettings()OperationMetadata> Returns the object with the settings used for calls to createServiceProjectAttachment. -
getServiceProjectAttachmentSettings
public UnaryCallSettings<GetServiceProjectAttachmentRequest,ServiceProjectAttachment> getServiceProjectAttachmentSettings()Returns the object with the settings used for calls to getServiceProjectAttachment. -
deleteServiceProjectAttachmentSettings
public UnaryCallSettings<DeleteServiceProjectAttachmentRequest,Operation> deleteServiceProjectAttachmentSettings()Returns the object with the settings used for calls to deleteServiceProjectAttachment. -
deleteServiceProjectAttachmentOperationSettings
public OperationCallSettings<DeleteServiceProjectAttachmentRequest,com.google.protobuf.Empty, deleteServiceProjectAttachmentOperationSettings()OperationMetadata> Returns the object with the settings used for calls to deleteServiceProjectAttachment. -
detachServiceProjectAttachmentSettings
public UnaryCallSettings<DetachServiceProjectAttachmentRequest,DetachServiceProjectAttachmentResponse> detachServiceProjectAttachmentSettings()Returns the object with the settings used for calls to detachServiceProjectAttachment. -
listDiscoveredServicesSettings
public PagedCallSettings<ListDiscoveredServicesRequest,ListDiscoveredServicesResponse, listDiscoveredServicesSettings()AppHubClient.ListDiscoveredServicesPagedResponse> Returns the object with the settings used for calls to listDiscoveredServices. -
getDiscoveredServiceSettings
public UnaryCallSettings<GetDiscoveredServiceRequest,DiscoveredService> getDiscoveredServiceSettings()Returns the object with the settings used for calls to getDiscoveredService. -
lookupDiscoveredServiceSettings
public UnaryCallSettings<LookupDiscoveredServiceRequest,LookupDiscoveredServiceResponse> lookupDiscoveredServiceSettings()Returns the object with the settings used for calls to lookupDiscoveredService. -
listServicesSettings
public PagedCallSettings<ListServicesRequest,ListServicesResponse, listServicesSettings()AppHubClient.ListServicesPagedResponse> Returns the object with the settings used for calls to listServices. -
createServiceSettings
Returns the object with the settings used for calls to createService. -
createServiceOperationSettings
public OperationCallSettings<CreateServiceRequest,Service, createServiceOperationSettings()OperationMetadata> Returns the object with the settings used for calls to createService. -
getServiceSettings
Returns the object with the settings used for calls to getService. -
updateServiceSettings
Returns the object with the settings used for calls to updateService. -
updateServiceOperationSettings
public OperationCallSettings<UpdateServiceRequest,Service, updateServiceOperationSettings()OperationMetadata> Returns the object with the settings used for calls to updateService. -
deleteServiceSettings
Returns the object with the settings used for calls to deleteService. -
deleteServiceOperationSettings
public OperationCallSettings<DeleteServiceRequest,com.google.protobuf.Empty, deleteServiceOperationSettings()OperationMetadata> Returns the object with the settings used for calls to deleteService. -
listDiscoveredWorkloadsSettings
public PagedCallSettings<ListDiscoveredWorkloadsRequest,ListDiscoveredWorkloadsResponse, listDiscoveredWorkloadsSettings()AppHubClient.ListDiscoveredWorkloadsPagedResponse> Returns the object with the settings used for calls to listDiscoveredWorkloads. -
getDiscoveredWorkloadSettings
public UnaryCallSettings<GetDiscoveredWorkloadRequest,DiscoveredWorkload> getDiscoveredWorkloadSettings()Returns the object with the settings used for calls to getDiscoveredWorkload. -
lookupDiscoveredWorkloadSettings
public UnaryCallSettings<LookupDiscoveredWorkloadRequest,LookupDiscoveredWorkloadResponse> lookupDiscoveredWorkloadSettings()Returns the object with the settings used for calls to lookupDiscoveredWorkload. -
listWorkloadsSettings
public PagedCallSettings<ListWorkloadsRequest,ListWorkloadsResponse, listWorkloadsSettings()AppHubClient.ListWorkloadsPagedResponse> Returns the object with the settings used for calls to listWorkloads. -
createWorkloadSettings
Returns the object with the settings used for calls to createWorkload. -
createWorkloadOperationSettings
public OperationCallSettings<CreateWorkloadRequest,Workload, createWorkloadOperationSettings()OperationMetadata> Returns the object with the settings used for calls to createWorkload. -
getWorkloadSettings
Returns the object with the settings used for calls to getWorkload. -
updateWorkloadSettings
Returns the object with the settings used for calls to updateWorkload. -
updateWorkloadOperationSettings
public OperationCallSettings<UpdateWorkloadRequest,Workload, updateWorkloadOperationSettings()OperationMetadata> Returns the object with the settings used for calls to updateWorkload. -
deleteWorkloadSettings
Returns the object with the settings used for calls to deleteWorkload. -
deleteWorkloadOperationSettings
public OperationCallSettings<DeleteWorkloadRequest,com.google.protobuf.Empty, deleteWorkloadOperationSettings()OperationMetadata> Returns the object with the settings used for calls to deleteWorkload. -
listApplicationsSettings
public PagedCallSettings<ListApplicationsRequest,ListApplicationsResponse, listApplicationsSettings()AppHubClient.ListApplicationsPagedResponse> Returns the object with the settings used for calls to listApplications. -
createApplicationSettings
Returns the object with the settings used for calls to createApplication. -
createApplicationOperationSettings
public OperationCallSettings<CreateApplicationRequest,Application, createApplicationOperationSettings()OperationMetadata> Returns the object with the settings used for calls to createApplication. -
getApplicationSettings
Returns the object with the settings used for calls to getApplication. -
updateApplicationSettings
Returns the object with the settings used for calls to updateApplication. -
updateApplicationOperationSettings
public OperationCallSettings<UpdateApplicationRequest,Application, updateApplicationOperationSettings()OperationMetadata> Returns the object with the settings used for calls to updateApplication. -
deleteApplicationSettings
Returns the object with the settings used for calls to deleteApplication. -
deleteApplicationOperationSettings
public OperationCallSettings<DeleteApplicationRequest,com.google.protobuf.Empty, deleteApplicationOperationSettings()OperationMetadata> Returns the object with the settings used for calls to deleteApplication. -
listLocationsSettings
public PagedCallSettings<ListLocationsRequest,ListLocationsResponse, listLocationsSettings()AppHubClient.ListLocationsPagedResponse> Returns the object with the settings used for calls to listLocations. -
getLocationSettings
Returns the object with the settings used for calls to getLocation. -
setIamPolicySettings
Returns the object with the settings used for calls to setIamPolicy. -
getIamPolicySettings
Returns the object with the settings used for calls to getIamPolicy. -
testIamPermissionsSettings
public UnaryCallSettings<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsSettings()Returns the object with the settings used for calls to testIamPermissions. -
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. -
defaultGrpcTransportProviderBuilder
Returns a builder for the default gRPC ChannelProvider for this service. -
defaultHttpJsonTransportProviderBuilder
@BetaApi public static InstantiatingHttpJsonChannelProvider.Builder defaultHttpJsonTransportProviderBuilder()Returns a builder for the default REST ChannelProvider for this service. -
defaultTransportChannelProvider
-
defaultApiClientHeaderProviderBuilder
-
newBuilder
Returns a new gRPC builder for this class. -
newHttpJsonBuilder
Returns a new REST 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<AppHubSettings>
-