Class AppHubStubSettings (0.17.0)

public class AppHubStubSettings extends StubSettings<AppHubStubSettings>

Settings class to configure an instance of AppHubStub.

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 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
 AppHubStubSettings.Builder appHubSettingsBuilder = AppHubStubSettings.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());
 AppHubStubSettings appHubSettings = appHubSettingsBuilder.build();
 

Please refer to the Client Side Retry Guide 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
 AppHubStubSettings.Builder appHubSettingsBuilder = AppHubStubSettings.newBuilder();
 TimedRetryAlgorithm timedRetryAlgorithm =
     OperationalTimedPollAlgorithm.create(
         RetrySettings.newBuilder()
             .setInitialRetryDelayDuration(Duration.ofMillis(500))
             .setRetryDelayMultiplier(1.5)
             .setMaxRetryDelay(Duration.ofMillis(5000))
             .setTotalTimeoutDuration(Duration.ofHours(24))
             .build());
 appHubSettingsBuilder
     .createClusterOperationSettings()
     .setPollingAlgorithm(timedRetryAlgorithm)
     .build();
 

Inheritance

java.lang.Object > StubSettings > AppHubStubSettings

Static Methods

defaultApiClientHeaderProviderBuilder()

public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder()
Returns
Type Description
Builder

defaultCredentialsProviderBuilder()

public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder()

Returns a builder for the default credentials for this service.

Returns
Type Description
Builder

defaultExecutorProviderBuilder()

public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder()

Returns a builder for the default ExecutorProvider for this service.

Returns
Type Description
Builder

defaultGrpcApiClientHeaderProviderBuilder()

public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder()
Returns
Type Description
Builder

defaultGrpcTransportProviderBuilder()

public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()

Returns a builder for the default gRPC ChannelProvider for this service.

Returns
Type Description
Builder

defaultHttpJsonApiClientHeaderProviderBuilder()

public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder()
Returns
Type Description
Builder

defaultHttpJsonTransportProviderBuilder()

public static InstantiatingHttpJsonChannelProvider.Builder defaultHttpJsonTransportProviderBuilder()

Returns a builder for the default REST ChannelProvider for this service.

Returns
Type Description
Builder

defaultTransportChannelProvider()

public static TransportChannelProvider defaultTransportChannelProvider()
Returns
Type Description
TransportChannelProvider

getDefaultEndpoint()

public static String getDefaultEndpoint()

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.

Returns
Type Description
List<String>

newBuilder()

public static AppHubStubSettings.Builder newBuilder()

Returns a new gRPC builder for this class.

Returns
Type Description
AppHubStubSettings.Builder

newBuilder(ClientContext clientContext)

public static AppHubStubSettings.Builder newBuilder(ClientContext clientContext)

Returns a new builder for this class.

Parameter
Name Description
clientContext ClientContext
Returns
Type Description
AppHubStubSettings.Builder

newHttpJsonBuilder()

public static AppHubStubSettings.Builder newHttpJsonBuilder()

Returns a new REST builder for this class.

Returns
Type Description
AppHubStubSettings.Builder

Constructors

AppHubStubSettings(AppHubStubSettings.Builder settingsBuilder)

protected AppHubStubSettings(AppHubStubSettings.Builder settingsBuilder)
Parameter
Name Description
settingsBuilder AppHubStubSettings.Builder

Methods

createApplicationOperationSettings()

public OperationCallSettings<CreateApplicationRequest,Application,OperationMetadata> createApplicationOperationSettings()

Returns the object with the settings used for calls to createApplication.

Returns
Type Description
OperationCallSettings<CreateApplicationRequest,Application,OperationMetadata>

createApplicationSettings()

public UnaryCallSettings<CreateApplicationRequest,Operation> createApplicationSettings()

Returns the object with the settings used for calls to createApplication.

Returns
Type Description
UnaryCallSettings<CreateApplicationRequest,Operation>

createServiceOperationSettings()

public OperationCallSettings<CreateServiceRequest,Service,OperationMetadata> createServiceOperationSettings()

Returns the object with the settings used for calls to createService.

Returns
Type Description
OperationCallSettings<CreateServiceRequest,Service,OperationMetadata>

createServiceProjectAttachmentOperationSettings()

public OperationCallSettings<CreateServiceProjectAttachmentRequest,ServiceProjectAttachment,OperationMetadata> createServiceProjectAttachmentOperationSettings()

Returns the object with the settings used for calls to createServiceProjectAttachment.

Returns
Type Description
OperationCallSettings<CreateServiceProjectAttachmentRequest,ServiceProjectAttachment,OperationMetadata>

createServiceProjectAttachmentSettings()

public UnaryCallSettings<CreateServiceProjectAttachmentRequest,Operation> createServiceProjectAttachmentSettings()

Returns the object with the settings used for calls to createServiceProjectAttachment.

Returns
Type Description
UnaryCallSettings<CreateServiceProjectAttachmentRequest,Operation>

createServiceSettings()

public UnaryCallSettings<CreateServiceRequest,Operation> createServiceSettings()

Returns the object with the settings used for calls to createService.

Returns
Type Description
UnaryCallSettings<CreateServiceRequest,Operation>

createStub()

public AppHubStub createStub()
Returns
Type Description
AppHubStub
Exceptions
Type Description
IOException

createWorkloadOperationSettings()

public OperationCallSettings<CreateWorkloadRequest,Workload,OperationMetadata> createWorkloadOperationSettings()

Returns the object with the settings used for calls to createWorkload.

Returns
Type Description
OperationCallSettings<CreateWorkloadRequest,Workload,OperationMetadata>

createWorkloadSettings()

public UnaryCallSettings<CreateWorkloadRequest,Operation> createWorkloadSettings()

Returns the object with the settings used for calls to createWorkload.

Returns
Type Description
UnaryCallSettings<CreateWorkloadRequest,Operation>

deleteApplicationOperationSettings()

public OperationCallSettings<DeleteApplicationRequest,Empty,OperationMetadata> deleteApplicationOperationSettings()

Returns the object with the settings used for calls to deleteApplication.

Returns
Type Description
OperationCallSettings<DeleteApplicationRequest,Empty,OperationMetadata>

deleteApplicationSettings()

public UnaryCallSettings<DeleteApplicationRequest,Operation> deleteApplicationSettings()

Returns the object with the settings used for calls to deleteApplication.

Returns
Type Description
UnaryCallSettings<DeleteApplicationRequest,Operation>

deleteServiceOperationSettings()

public OperationCallSettings<DeleteServiceRequest,Empty,OperationMetadata> deleteServiceOperationSettings()

Returns the object with the settings used for calls to deleteService.

Returns
Type Description
OperationCallSettings<DeleteServiceRequest,Empty,OperationMetadata>

deleteServiceProjectAttachmentOperationSettings()

public OperationCallSettings<DeleteServiceProjectAttachmentRequest,Empty,OperationMetadata> deleteServiceProjectAttachmentOperationSettings()

Returns the object with the settings used for calls to deleteServiceProjectAttachment.

Returns
Type Description
OperationCallSettings<DeleteServiceProjectAttachmentRequest,Empty,OperationMetadata>

deleteServiceProjectAttachmentSettings()

public UnaryCallSettings<DeleteServiceProjectAttachmentRequest,Operation> deleteServiceProjectAttachmentSettings()

Returns the object with the settings used for calls to deleteServiceProjectAttachment.

Returns
Type Description
UnaryCallSettings<DeleteServiceProjectAttachmentRequest,Operation>

deleteServiceSettings()

public UnaryCallSettings<DeleteServiceRequest,Operation> deleteServiceSettings()

Returns the object with the settings used for calls to deleteService.

Returns
Type Description
UnaryCallSettings<DeleteServiceRequest,Operation>

deleteWorkloadOperationSettings()

public OperationCallSettings<DeleteWorkloadRequest,Empty,OperationMetadata> deleteWorkloadOperationSettings()

Returns the object with the settings used for calls to deleteWorkload.

Returns
Type Description
OperationCallSettings<DeleteWorkloadRequest,Empty,OperationMetadata>

deleteWorkloadSettings()

public UnaryCallSettings<DeleteWorkloadRequest,Operation> deleteWorkloadSettings()

Returns the object with the settings used for calls to deleteWorkload.

Returns
Type Description
UnaryCallSettings<DeleteWorkloadRequest,Operation>

detachServiceProjectAttachmentSettings()

public UnaryCallSettings<DetachServiceProjectAttachmentRequest,DetachServiceProjectAttachmentResponse> detachServiceProjectAttachmentSettings()

Returns the object with the settings used for calls to detachServiceProjectAttachment.

Returns
Type Description
UnaryCallSettings<DetachServiceProjectAttachmentRequest,DetachServiceProjectAttachmentResponse>

getApplicationSettings()

public UnaryCallSettings<GetApplicationRequest,Application> getApplicationSettings()

Returns the object with the settings used for calls to getApplication.

Returns
Type Description
UnaryCallSettings<GetApplicationRequest,Application>

getDiscoveredServiceSettings()

public UnaryCallSettings<GetDiscoveredServiceRequest,DiscoveredService> getDiscoveredServiceSettings()

Returns the object with the settings used for calls to getDiscoveredService.

Returns
Type Description
UnaryCallSettings<GetDiscoveredServiceRequest,DiscoveredService>

getDiscoveredWorkloadSettings()

public UnaryCallSettings<GetDiscoveredWorkloadRequest,DiscoveredWorkload> getDiscoveredWorkloadSettings()

Returns the object with the settings used for calls to getDiscoveredWorkload.

Returns
Type Description
UnaryCallSettings<GetDiscoveredWorkloadRequest,DiscoveredWorkload>

getIamPolicySettings()

public UnaryCallSettings<GetIamPolicyRequest,Policy> getIamPolicySettings()

Returns the object with the settings used for calls to getIamPolicy.

Returns
Type Description
UnaryCallSettings<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

getLocationSettings()

public UnaryCallSettings<GetLocationRequest,Location> getLocationSettings()

Returns the object with the settings used for calls to getLocation.

Returns
Type Description
UnaryCallSettings<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

getServiceName()

public String getServiceName()

Returns the default service name.

Returns
Type Description
String
Overrides

getServiceProjectAttachmentSettings()

public UnaryCallSettings<GetServiceProjectAttachmentRequest,ServiceProjectAttachment> getServiceProjectAttachmentSettings()

Returns the object with the settings used for calls to getServiceProjectAttachment.

Returns
Type Description
UnaryCallSettings<GetServiceProjectAttachmentRequest,ServiceProjectAttachment>

getServiceSettings()

public UnaryCallSettings<GetServiceRequest,Service> getServiceSettings()

Returns the object with the settings used for calls to getService.

Returns
Type Description
UnaryCallSettings<GetServiceRequest,Service>

getWorkloadSettings()

public UnaryCallSettings<GetWorkloadRequest,Workload> getWorkloadSettings()

Returns the object with the settings used for calls to getWorkload.

Returns
Type Description
UnaryCallSettings<GetWorkloadRequest,Workload>

listApplicationsSettings()

public PagedCallSettings<ListApplicationsRequest,ListApplicationsResponse,AppHubClient.ListApplicationsPagedResponse> listApplicationsSettings()

Returns the object with the settings used for calls to listApplications.

Returns
Type Description
PagedCallSettings<ListApplicationsRequest,ListApplicationsResponse,ListApplicationsPagedResponse>

listDiscoveredServicesSettings()

public PagedCallSettings<ListDiscoveredServicesRequest,ListDiscoveredServicesResponse,AppHubClient.ListDiscoveredServicesPagedResponse> listDiscoveredServicesSettings()

Returns the object with the settings used for calls to listDiscoveredServices.

Returns
Type Description
PagedCallSettings<ListDiscoveredServicesRequest,ListDiscoveredServicesResponse,ListDiscoveredServicesPagedResponse>

listDiscoveredWorkloadsSettings()

public PagedCallSettings<ListDiscoveredWorkloadsRequest,ListDiscoveredWorkloadsResponse,AppHubClient.ListDiscoveredWorkloadsPagedResponse> listDiscoveredWorkloadsSettings()

Returns the object with the settings used for calls to listDiscoveredWorkloads.

Returns
Type Description
PagedCallSettings<ListDiscoveredWorkloadsRequest,ListDiscoveredWorkloadsResponse,ListDiscoveredWorkloadsPagedResponse>

listLocationsSettings()

public PagedCallSettings<ListLocationsRequest,ListLocationsResponse,AppHubClient.ListLocationsPagedResponse> listLocationsSettings()

Returns the object with the settings used for calls to listLocations.

Returns
Type Description
PagedCallSettings<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse,ListLocationsPagedResponse>

listServiceProjectAttachmentsSettings()

public PagedCallSettings<ListServiceProjectAttachmentsRequest,ListServiceProjectAttachmentsResponse,AppHubClient.ListServiceProjectAttachmentsPagedResponse> listServiceProjectAttachmentsSettings()

Returns the object with the settings used for calls to listServiceProjectAttachments.

Returns
Type Description
PagedCallSettings<ListServiceProjectAttachmentsRequest,ListServiceProjectAttachmentsResponse,ListServiceProjectAttachmentsPagedResponse>

listServicesSettings()

public PagedCallSettings<ListServicesRequest,ListServicesResponse,AppHubClient.ListServicesPagedResponse> listServicesSettings()

Returns the object with the settings used for calls to listServices.

Returns
Type Description
PagedCallSettings<ListServicesRequest,ListServicesResponse,ListServicesPagedResponse>

listWorkloadsSettings()

public PagedCallSettings<ListWorkloadsRequest,ListWorkloadsResponse,AppHubClient.ListWorkloadsPagedResponse> listWorkloadsSettings()

Returns the object with the settings used for calls to listWorkloads.

Returns
Type Description
PagedCallSettings<ListWorkloadsRequest,ListWorkloadsResponse,ListWorkloadsPagedResponse>

lookupDiscoveredServiceSettings()

public UnaryCallSettings<LookupDiscoveredServiceRequest,LookupDiscoveredServiceResponse> lookupDiscoveredServiceSettings()

Returns the object with the settings used for calls to lookupDiscoveredService.

Returns
Type Description
UnaryCallSettings<LookupDiscoveredServiceRequest,LookupDiscoveredServiceResponse>

lookupDiscoveredWorkloadSettings()

public UnaryCallSettings<LookupDiscoveredWorkloadRequest,LookupDiscoveredWorkloadResponse> lookupDiscoveredWorkloadSettings()

Returns the object with the settings used for calls to lookupDiscoveredWorkload.

Returns
Type Description
UnaryCallSettings<LookupDiscoveredWorkloadRequest,LookupDiscoveredWorkloadResponse>

lookupServiceProjectAttachmentSettings()

public UnaryCallSettings<LookupServiceProjectAttachmentRequest,LookupServiceProjectAttachmentResponse> lookupServiceProjectAttachmentSettings()

Returns the object with the settings used for calls to lookupServiceProjectAttachment.

Returns
Type Description
UnaryCallSettings<LookupServiceProjectAttachmentRequest,LookupServiceProjectAttachmentResponse>

setIamPolicySettings()

public UnaryCallSettings<SetIamPolicyRequest,Policy> setIamPolicySettings()

Returns the object with the settings used for calls to setIamPolicy.

Returns
Type Description
UnaryCallSettings<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

testIamPermissionsSettings()

public UnaryCallSettings<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsSettings()

Returns the object with the settings used for calls to testIamPermissions.

Returns
Type Description
UnaryCallSettings<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>

toBuilder()

public AppHubStubSettings.Builder toBuilder()

Returns a builder containing all the values of this settings class.

Returns
Type Description
AppHubStubSettings.Builder
Overrides

updateApplicationOperationSettings()

public OperationCallSettings<UpdateApplicationRequest,Application,OperationMetadata> updateApplicationOperationSettings()

Returns the object with the settings used for calls to updateApplication.

Returns
Type Description
OperationCallSettings<UpdateApplicationRequest,Application,OperationMetadata>

updateApplicationSettings()

public UnaryCallSettings<UpdateApplicationRequest,Operation> updateApplicationSettings()

Returns the object with the settings used for calls to updateApplication.

Returns
Type Description
UnaryCallSettings<UpdateApplicationRequest,Operation>

updateServiceOperationSettings()

public OperationCallSettings<UpdateServiceRequest,Service,OperationMetadata> updateServiceOperationSettings()

Returns the object with the settings used for calls to updateService.

Returns
Type Description
OperationCallSettings<UpdateServiceRequest,Service,OperationMetadata>

updateServiceSettings()

public UnaryCallSettings<UpdateServiceRequest,Operation> updateServiceSettings()

Returns the object with the settings used for calls to updateService.

Returns
Type Description
UnaryCallSettings<UpdateServiceRequest,Operation>

updateWorkloadOperationSettings()

public OperationCallSettings<UpdateWorkloadRequest,Workload,OperationMetadata> updateWorkloadOperationSettings()

Returns the object with the settings used for calls to updateWorkload.

Returns
Type Description
OperationCallSettings<UpdateWorkloadRequest,Workload,OperationMetadata>

updateWorkloadSettings()

public UnaryCallSettings<UpdateWorkloadRequest,Operation> updateWorkloadSettings()

Returns the object with the settings used for calls to updateWorkload.

Returns
Type Description
UnaryCallSettings<UpdateWorkloadRequest,Operation>