Class ModelServiceSettings
java.lang.Object
com.google.api.gax.rpc.ClientSettings<ModelServiceSettings>
com.google.cloud.aiplatform.v1beta1.ModelServiceSettings
@BetaApi
@Generated("by gapic-generator-java")
public class ModelServiceSettings
extends ClientSettings<ModelServiceSettings>
Settings class to configure an instance of
ModelServiceClient.
The default instance has everything set to sensible defaults:
- The default service address (aiplatform.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 getModel:
// 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
ModelServiceSettings.Builder modelServiceSettingsBuilder = ModelServiceSettings.newBuilder();
modelServiceSettingsBuilder
.getModelSettings()
.setRetrySettings(
modelServiceSettingsBuilder
.getModelSettings()
.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());
ModelServiceSettings modelServiceSettings = modelServiceSettingsBuilder.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 uploadModel:
// 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
ModelServiceSettings.Builder modelServiceSettingsBuilder = ModelServiceSettings.newBuilder();
TimedRetryAlgorithm timedRetryAlgorithm =
OperationalTimedPollAlgorithm.create(
RetrySettings.newBuilder()
.setInitialRetryDelayDuration(Duration.ofMillis(500))
.setRetryDelayMultiplier(1.5)
.setMaxRetryDelayDuration(Duration.ofMillis(5000))
.setTotalTimeoutDuration(Duration.ofHours(24))
.build());
modelServiceSettingsBuilder
.createClusterOperationSettings()
.setPollingAlgorithm(timedRetryAlgorithm)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for ModelServiceSettings. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedModelServiceSettings(ModelServiceSettings.Builder settingsBuilder) -
Method Summary
Modifier and TypeMethodDescriptionReturns the object with the settings used for calls to batchImportEvaluatedAnnotations.Returns the object with the settings used for calls to batchImportModelEvaluationSlices.Returns the object with the settings used for calls to copyModel.Returns the object with the settings used for calls to copyModel.static final ModelServiceSettingsReturns 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 ChannelProvider for this service.static TransportChannelProviderOperationCallSettings<DeleteModelRequest,com.google.protobuf.Empty, DeleteOperationMetadata> Returns the object with the settings used for calls to deleteModel.Returns the object with the settings used for calls to deleteModel.OperationCallSettings<DeleteModelVersionRequest,com.google.protobuf.Empty, DeleteOperationMetadata> Returns the object with the settings used for calls to deleteModelVersion.Returns the object with the settings used for calls to deleteModelVersion.Returns the object with the settings used for calls to exportModel.Returns the object with the settings used for calls to exportModel.static StringReturns the default service endpoint.Returns the default service scopes.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 getModelEvaluation.Returns the object with the settings used for calls to getModelEvaluationSlice.Returns the object with the settings used for calls to getModel.Returns the object with the settings used for calls to importModelEvaluation.PagedCallSettings<ListLocationsRequest,ListLocationsResponse, ModelServiceClient.ListLocationsPagedResponse> Returns the object with the settings used for calls to listLocations.PagedCallSettings<ListModelEvaluationSlicesRequest,ListModelEvaluationSlicesResponse, ModelServiceClient.ListModelEvaluationSlicesPagedResponse> Returns the object with the settings used for calls to listModelEvaluationSlices.PagedCallSettings<ListModelEvaluationsRequest,ListModelEvaluationsResponse, ModelServiceClient.ListModelEvaluationsPagedResponse> Returns the object with the settings used for calls to listModelEvaluations.Returns the object with the settings used for calls to listModels.PagedCallSettings<ListModelVersionCheckpointsRequest,ListModelVersionCheckpointsResponse, ModelServiceClient.ListModelVersionCheckpointsPagedResponse> Returns the object with the settings used for calls to listModelVersionCheckpoints.PagedCallSettings<ListModelVersionsRequest,ListModelVersionsResponse, ModelServiceClient.ListModelVersionsPagedResponse> Returns the object with the settings used for calls to listModelVersions.Returns the object with the settings used for calls to mergeVersionAliases.static ModelServiceSettings.BuilderReturns a new builder for this class.static ModelServiceSettings.BuildernewBuilder(ClientContext clientContext) Returns a new builder for this class.Returns the object with the settings used for calls to recommendSpec.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.OperationCallSettings<UpdateExplanationDatasetRequest,UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata> Returns the object with the settings used for calls to updateExplanationDataset.Returns the object with the settings used for calls to updateExplanationDataset.Returns the object with the settings used for calls to updateModel.Returns the object with the settings used for calls to uploadModel.Returns the object with the settings used for calls to uploadModel.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
-
ModelServiceSettings
- Throws:
IOException
-
-
Method Details
-
uploadModelSettings
Returns the object with the settings used for calls to uploadModel. -
uploadModelOperationSettings
public OperationCallSettings<UploadModelRequest,UploadModelResponse, uploadModelOperationSettings()UploadModelOperationMetadata> Returns the object with the settings used for calls to uploadModel. -
getModelSettings
Returns the object with the settings used for calls to getModel. -
listModelsSettings
public PagedCallSettings<ListModelsRequest,ListModelsResponse, listModelsSettings()ModelServiceClient.ListModelsPagedResponse> Returns the object with the settings used for calls to listModels. -
listModelVersionsSettings
public PagedCallSettings<ListModelVersionsRequest,ListModelVersionsResponse, listModelVersionsSettings()ModelServiceClient.ListModelVersionsPagedResponse> Returns the object with the settings used for calls to listModelVersions. -
listModelVersionCheckpointsSettings
public PagedCallSettings<ListModelVersionCheckpointsRequest,ListModelVersionCheckpointsResponse, listModelVersionCheckpointsSettings()ModelServiceClient.ListModelVersionCheckpointsPagedResponse> Returns the object with the settings used for calls to listModelVersionCheckpoints. -
updateModelSettings
Returns the object with the settings used for calls to updateModel. -
updateExplanationDatasetSettings
public UnaryCallSettings<UpdateExplanationDatasetRequest,Operation> updateExplanationDatasetSettings()Returns the object with the settings used for calls to updateExplanationDataset. -
updateExplanationDatasetOperationSettings
public OperationCallSettings<UpdateExplanationDatasetRequest,UpdateExplanationDatasetResponse, updateExplanationDatasetOperationSettings()UpdateExplanationDatasetOperationMetadata> Returns the object with the settings used for calls to updateExplanationDataset. -
deleteModelSettings
Returns the object with the settings used for calls to deleteModel. -
deleteModelOperationSettings
public OperationCallSettings<DeleteModelRequest,com.google.protobuf.Empty, deleteModelOperationSettings()DeleteOperationMetadata> Returns the object with the settings used for calls to deleteModel. -
deleteModelVersionSettings
Returns the object with the settings used for calls to deleteModelVersion. -
deleteModelVersionOperationSettings
public OperationCallSettings<DeleteModelVersionRequest,com.google.protobuf.Empty, deleteModelVersionOperationSettings()DeleteOperationMetadata> Returns the object with the settings used for calls to deleteModelVersion. -
mergeVersionAliasesSettings
Returns the object with the settings used for calls to mergeVersionAliases. -
exportModelSettings
Returns the object with the settings used for calls to exportModel. -
exportModelOperationSettings
public OperationCallSettings<ExportModelRequest,ExportModelResponse, exportModelOperationSettings()ExportModelOperationMetadata> Returns the object with the settings used for calls to exportModel. -
copyModelSettings
Returns the object with the settings used for calls to copyModel. -
copyModelOperationSettings
public OperationCallSettings<CopyModelRequest,CopyModelResponse, copyModelOperationSettings()CopyModelOperationMetadata> Returns the object with the settings used for calls to copyModel. -
importModelEvaluationSettings
public UnaryCallSettings<ImportModelEvaluationRequest,ModelEvaluation> importModelEvaluationSettings()Returns the object with the settings used for calls to importModelEvaluation. -
batchImportModelEvaluationSlicesSettings
public UnaryCallSettings<BatchImportModelEvaluationSlicesRequest,BatchImportModelEvaluationSlicesResponse> batchImportModelEvaluationSlicesSettings()Returns the object with the settings used for calls to batchImportModelEvaluationSlices. -
batchImportEvaluatedAnnotationsSettings
public UnaryCallSettings<BatchImportEvaluatedAnnotationsRequest,BatchImportEvaluatedAnnotationsResponse> batchImportEvaluatedAnnotationsSettings()Returns the object with the settings used for calls to batchImportEvaluatedAnnotations. -
getModelEvaluationSettings
Returns the object with the settings used for calls to getModelEvaluation. -
listModelEvaluationsSettings
public PagedCallSettings<ListModelEvaluationsRequest,ListModelEvaluationsResponse, listModelEvaluationsSettings()ModelServiceClient.ListModelEvaluationsPagedResponse> Returns the object with the settings used for calls to listModelEvaluations. -
getModelEvaluationSliceSettings
public UnaryCallSettings<GetModelEvaluationSliceRequest,ModelEvaluationSlice> getModelEvaluationSliceSettings()Returns the object with the settings used for calls to getModelEvaluationSlice. -
listModelEvaluationSlicesSettings
public PagedCallSettings<ListModelEvaluationSlicesRequest,ListModelEvaluationSlicesResponse, listModelEvaluationSlicesSettings()ModelServiceClient.ListModelEvaluationSlicesPagedResponse> Returns the object with the settings used for calls to listModelEvaluationSlices. -
recommendSpecSettings
Returns the object with the settings used for calls to recommendSpec. -
listLocationsSettings
public PagedCallSettings<ListLocationsRequest,ListLocationsResponse, listLocationsSettings()ModelServiceClient.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 ChannelProvider for this service. -
defaultTransportChannelProvider
-
defaultApiClientHeaderProviderBuilder
-
newBuilder
Returns a new 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<ModelServiceSettings>
-