Class WorkstationsSettings (0.46.0)

public class WorkstationsSettings extends ClientSettings<WorkstationsSettings>

Settings class to configure an instance of WorkstationsClient.

The default instance has everything set to sensible defaults:

  • The default service address (workstations.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 getWorkstationCluster:


 // 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
 WorkstationsSettings.Builder workstationsSettingsBuilder = WorkstationsSettings.newBuilder();
 workstationsSettingsBuilder
     .getWorkstationClusterSettings()
     .setRetrySettings(
         workstationsSettingsBuilder
             .getWorkstationClusterSettings()
             .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());
 WorkstationsSettings workstationsSettings = workstationsSettingsBuilder.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 createWorkstationCluster:


 // 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
 WorkstationsSettings.Builder workstationsSettingsBuilder = WorkstationsSettings.newBuilder();
 TimedRetryAlgorithm timedRetryAlgorithm =
     OperationalTimedPollAlgorithm.create(
         RetrySettings.newBuilder()
             .setInitialRetryDelayDuration(Duration.ofMillis(500))
             .setRetryDelayMultiplier(1.5)
             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
             .setTotalTimeoutDuration(Duration.ofHours(24))
             .build());
 workstationsSettingsBuilder
     .createClusterOperationSettings()
     .setPollingAlgorithm(timedRetryAlgorithm)
     .build();
 

Inheritance

java.lang.Object > ClientSettings > WorkstationsSettings

Static Methods

create(WorkstationsStubSettings stub)

public static final WorkstationsSettings create(WorkstationsStubSettings stub)
Parameter
Name Description
stub WorkstationsStubSettings
Returns
Type Description
WorkstationsSettings
Exceptions
Type Description
IOException

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

defaultGrpcTransportProviderBuilder()

public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()

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

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

getDefaultServiceScopes()

public static List<String> getDefaultServiceScopes()

Returns the default service scopes.

Returns
Type Description
List<String>

newBuilder()

public static WorkstationsSettings.Builder newBuilder()

Returns a new gRPC builder for this class.

Returns
Type Description
WorkstationsSettings.Builder

newBuilder(ClientContext clientContext)

public static WorkstationsSettings.Builder newBuilder(ClientContext clientContext)

Returns a new builder for this class.

Parameter
Name Description
clientContext ClientContext
Returns
Type Description
WorkstationsSettings.Builder

newHttpJsonBuilder()

public static WorkstationsSettings.Builder newHttpJsonBuilder()

Returns a new REST builder for this class.

Returns
Type Description
WorkstationsSettings.Builder

Constructors

WorkstationsSettings(WorkstationsSettings.Builder settingsBuilder)

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

Methods

createWorkstationClusterOperationSettings()

public OperationCallSettings<CreateWorkstationClusterRequest,WorkstationCluster,OperationMetadata> createWorkstationClusterOperationSettings()

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

createWorkstationClusterSettings()

public UnaryCallSettings<CreateWorkstationClusterRequest,Operation> createWorkstationClusterSettings()

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

createWorkstationConfigOperationSettings()

public OperationCallSettings<CreateWorkstationConfigRequest,WorkstationConfig,OperationMetadata> createWorkstationConfigOperationSettings()

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

createWorkstationConfigSettings()

public UnaryCallSettings<CreateWorkstationConfigRequest,Operation> createWorkstationConfigSettings()

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

createWorkstationOperationSettings()

public OperationCallSettings<CreateWorkstationRequest,Workstation,OperationMetadata> createWorkstationOperationSettings()

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

createWorkstationSettings()

public UnaryCallSettings<CreateWorkstationRequest,Operation> createWorkstationSettings()

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

deleteWorkstationClusterOperationSettings()

public OperationCallSettings<DeleteWorkstationClusterRequest,WorkstationCluster,OperationMetadata> deleteWorkstationClusterOperationSettings()

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

deleteWorkstationClusterSettings()

public UnaryCallSettings<DeleteWorkstationClusterRequest,Operation> deleteWorkstationClusterSettings()

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

deleteWorkstationConfigOperationSettings()

public OperationCallSettings<DeleteWorkstationConfigRequest,WorkstationConfig,OperationMetadata> deleteWorkstationConfigOperationSettings()

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

deleteWorkstationConfigSettings()

public UnaryCallSettings<DeleteWorkstationConfigRequest,Operation> deleteWorkstationConfigSettings()

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

deleteWorkstationOperationSettings()

public OperationCallSettings<DeleteWorkstationRequest,Workstation,OperationMetadata> deleteWorkstationOperationSettings()

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

deleteWorkstationSettings()

public UnaryCallSettings<DeleteWorkstationRequest,Operation> deleteWorkstationSettings()

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

generateAccessTokenSettings()

public UnaryCallSettings<GenerateAccessTokenRequest,GenerateAccessTokenResponse> generateAccessTokenSettings()

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

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>

getWorkstationClusterSettings()

public UnaryCallSettings<GetWorkstationClusterRequest,WorkstationCluster> getWorkstationClusterSettings()

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

getWorkstationConfigSettings()

public UnaryCallSettings<GetWorkstationConfigRequest,WorkstationConfig> getWorkstationConfigSettings()

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

getWorkstationSettings()

public UnaryCallSettings<GetWorkstationRequest,Workstation> getWorkstationSettings()

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

listUsableWorkstationConfigsSettings()

public PagedCallSettings<ListUsableWorkstationConfigsRequest,ListUsableWorkstationConfigsResponse,WorkstationsClient.ListUsableWorkstationConfigsPagedResponse> listUsableWorkstationConfigsSettings()

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

listUsableWorkstationsSettings()

public PagedCallSettings<ListUsableWorkstationsRequest,ListUsableWorkstationsResponse,WorkstationsClient.ListUsableWorkstationsPagedResponse> listUsableWorkstationsSettings()

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

listWorkstationClustersSettings()

public PagedCallSettings<ListWorkstationClustersRequest,ListWorkstationClustersResponse,WorkstationsClient.ListWorkstationClustersPagedResponse> listWorkstationClustersSettings()

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

listWorkstationConfigsSettings()

public PagedCallSettings<ListWorkstationConfigsRequest,ListWorkstationConfigsResponse,WorkstationsClient.ListWorkstationConfigsPagedResponse> listWorkstationConfigsSettings()

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

listWorkstationsSettings()

public PagedCallSettings<ListWorkstationsRequest,ListWorkstationsResponse,WorkstationsClient.ListWorkstationsPagedResponse> listWorkstationsSettings()

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

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>

startWorkstationOperationSettings()

public OperationCallSettings<StartWorkstationRequest,Workstation,OperationMetadata> startWorkstationOperationSettings()

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

startWorkstationSettings()

public UnaryCallSettings<StartWorkstationRequest,Operation> startWorkstationSettings()

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

stopWorkstationOperationSettings()

public OperationCallSettings<StopWorkstationRequest,Workstation,OperationMetadata> stopWorkstationOperationSettings()

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

stopWorkstationSettings()

public UnaryCallSettings<StopWorkstationRequest,Operation> stopWorkstationSettings()

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

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 WorkstationsSettings.Builder toBuilder()

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

Returns
Type Description
WorkstationsSettings.Builder
Overrides

updateWorkstationClusterOperationSettings()

public OperationCallSettings<UpdateWorkstationClusterRequest,WorkstationCluster,OperationMetadata> updateWorkstationClusterOperationSettings()

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

updateWorkstationClusterSettings()

public UnaryCallSettings<UpdateWorkstationClusterRequest,Operation> updateWorkstationClusterSettings()

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

updateWorkstationConfigOperationSettings()

public OperationCallSettings<UpdateWorkstationConfigRequest,WorkstationConfig,OperationMetadata> updateWorkstationConfigOperationSettings()

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

updateWorkstationConfigSettings()

public UnaryCallSettings<UpdateWorkstationConfigRequest,Operation> updateWorkstationConfigSettings()

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

updateWorkstationOperationSettings()

public OperationCallSettings<UpdateWorkstationRequest,Workstation,OperationMetadata> updateWorkstationOperationSettings()

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

updateWorkstationSettings()

public UnaryCallSettings<UpdateWorkstationRequest,Operation> updateWorkstationSettings()

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