Class WorkloadManagerSettings (0.1.0)

public class WorkloadManagerSettings extends ClientSettings<WorkloadManagerSettings>

Settings class to configure an instance of WorkloadManagerClient.

The default instance has everything set to sensible defaults:

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


 // 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
 WorkloadManagerSettings.Builder workloadManagerSettingsBuilder =
     WorkloadManagerSettings.newBuilder();
 workloadManagerSettingsBuilder
     .getEvaluationSettings()
     .setRetrySettings(
         workloadManagerSettingsBuilder
             .getEvaluationSettings()
             .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());
 WorkloadManagerSettings workloadManagerSettings = workloadManagerSettingsBuilder.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 createEvaluation:


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

Inheritance

java.lang.Object > ClientSettings > WorkloadManagerSettings

Static Methods

create(WorkloadManagerStubSettings stub)

public static final WorkloadManagerSettings create(WorkloadManagerStubSettings stub)
Parameter
Name Description
stub WorkloadManagerStubSettings
Returns
Type Description
WorkloadManagerSettings
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 WorkloadManagerSettings.Builder newBuilder()

Returns a new gRPC builder for this class.

Returns
Type Description
WorkloadManagerSettings.Builder

newBuilder(ClientContext clientContext)

public static WorkloadManagerSettings.Builder newBuilder(ClientContext clientContext)

Returns a new builder for this class.

Parameter
Name Description
clientContext ClientContext
Returns
Type Description
WorkloadManagerSettings.Builder

newHttpJsonBuilder()

public static WorkloadManagerSettings.Builder newHttpJsonBuilder()

Returns a new REST builder for this class.

Returns
Type Description
WorkloadManagerSettings.Builder

Constructors

WorkloadManagerSettings(WorkloadManagerSettings.Builder settingsBuilder)

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

Methods

createEvaluationOperationSettings()

public OperationCallSettings<CreateEvaluationRequest,Evaluation,OperationMetadata> createEvaluationOperationSettings()

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

Returns
Type Description
OperationCallSettings<CreateEvaluationRequest,Evaluation,OperationMetadata>

createEvaluationSettings()

public UnaryCallSettings<CreateEvaluationRequest,Operation> createEvaluationSettings()

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

Returns
Type Description
UnaryCallSettings<CreateEvaluationRequest,Operation>

deleteEvaluationOperationSettings()

public OperationCallSettings<DeleteEvaluationRequest,Empty,OperationMetadata> deleteEvaluationOperationSettings()

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

Returns
Type Description
OperationCallSettings<DeleteEvaluationRequest,Empty,OperationMetadata>

deleteEvaluationSettings()

public UnaryCallSettings<DeleteEvaluationRequest,Operation> deleteEvaluationSettings()

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

Returns
Type Description
UnaryCallSettings<DeleteEvaluationRequest,Operation>

deleteExecutionOperationSettings()

public OperationCallSettings<DeleteExecutionRequest,Empty,OperationMetadata> deleteExecutionOperationSettings()

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

Returns
Type Description
OperationCallSettings<DeleteExecutionRequest,Empty,OperationMetadata>

deleteExecutionSettings()

public UnaryCallSettings<DeleteExecutionRequest,Operation> deleteExecutionSettings()

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

Returns
Type Description
UnaryCallSettings<DeleteExecutionRequest,Operation>

getEvaluationSettings()

public UnaryCallSettings<GetEvaluationRequest,Evaluation> getEvaluationSettings()

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

Returns
Type Description
UnaryCallSettings<GetEvaluationRequest,Evaluation>

getExecutionSettings()

public UnaryCallSettings<GetExecutionRequest,Execution> getExecutionSettings()

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

Returns
Type Description
UnaryCallSettings<GetExecutionRequest,Execution>

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>

listEvaluationsSettings()

public PagedCallSettings<ListEvaluationsRequest,ListEvaluationsResponse,WorkloadManagerClient.ListEvaluationsPagedResponse> listEvaluationsSettings()

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

Returns
Type Description
PagedCallSettings<ListEvaluationsRequest,ListEvaluationsResponse,ListEvaluationsPagedResponse>

listExecutionResultsSettings()

public PagedCallSettings<ListExecutionResultsRequest,ListExecutionResultsResponse,WorkloadManagerClient.ListExecutionResultsPagedResponse> listExecutionResultsSettings()

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

Returns
Type Description
PagedCallSettings<ListExecutionResultsRequest,ListExecutionResultsResponse,ListExecutionResultsPagedResponse>

listExecutionsSettings()

public PagedCallSettings<ListExecutionsRequest,ListExecutionsResponse,WorkloadManagerClient.ListExecutionsPagedResponse> listExecutionsSettings()

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

Returns
Type Description
PagedCallSettings<ListExecutionsRequest,ListExecutionsResponse,ListExecutionsPagedResponse>

listLocationsSettings()

public PagedCallSettings<ListLocationsRequest,ListLocationsResponse,WorkloadManagerClient.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>

listRulesSettings()

public UnaryCallSettings<ListRulesRequest,ListRulesResponse> listRulesSettings()

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

Returns
Type Description
UnaryCallSettings<ListRulesRequest,ListRulesResponse>

listScannedResourcesSettings()

public PagedCallSettings<ListScannedResourcesRequest,ListScannedResourcesResponse,WorkloadManagerClient.ListScannedResourcesPagedResponse> listScannedResourcesSettings()

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

Returns
Type Description
PagedCallSettings<ListScannedResourcesRequest,ListScannedResourcesResponse,ListScannedResourcesPagedResponse>

runEvaluationOperationSettings()

public OperationCallSettings<RunEvaluationRequest,Execution,OperationMetadata> runEvaluationOperationSettings()

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

Returns
Type Description
OperationCallSettings<RunEvaluationRequest,Execution,OperationMetadata>

runEvaluationSettings()

public UnaryCallSettings<RunEvaluationRequest,Operation> runEvaluationSettings()

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

Returns
Type Description
UnaryCallSettings<RunEvaluationRequest,Operation>

toBuilder()

public WorkloadManagerSettings.Builder toBuilder()

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

Returns
Type Description
WorkloadManagerSettings.Builder
Overrides

updateEvaluationOperationSettings()

public OperationCallSettings<UpdateEvaluationRequest,Evaluation,OperationMetadata> updateEvaluationOperationSettings()

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

Returns
Type Description
OperationCallSettings<UpdateEvaluationRequest,Evaluation,OperationMetadata>

updateEvaluationSettings()

public UnaryCallSettings<UpdateEvaluationRequest,Operation> updateEvaluationSettings()

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

Returns
Type Description
UnaryCallSettings<UpdateEvaluationRequest,Operation>