Class JobServiceClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// 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
try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
CustomJob customJob = CustomJob.newBuilder().build();
CustomJob response = jobServiceClient.createCustomJob(parent, customJob);
}
Note: close() needs to be called on the JobServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
CreateCustomJob |
Creates a CustomJob. A created CustomJob right away will be attempted to be run. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetCustomJob |
Gets a CustomJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListCustomJobs |
Lists CustomJobs in a Location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteCustomJob |
Deletes a CustomJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CancelCustomJob |
Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateDataLabelingJob |
Creates a DataLabelingJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDataLabelingJob |
Gets a DataLabelingJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListDataLabelingJobs |
Lists DataLabelingJobs in a Location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDataLabelingJob |
Deletes a DataLabelingJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CancelDataLabelingJob |
Cancels a DataLabelingJob. Success of cancellation is not guaranteed. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateHyperparameterTuningJob |
Creates a HyperparameterTuningJob |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetHyperparameterTuningJob |
Gets a HyperparameterTuningJob |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListHyperparameterTuningJobs |
Lists HyperparameterTuningJobs in a Location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteHyperparameterTuningJob |
Deletes a HyperparameterTuningJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CancelHyperparameterTuningJob |
Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to `CANCELLED`. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateNasJob |
Creates a NasJob |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetNasJob |
Gets a NasJob |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListNasJobs |
Lists NasJobs in a Location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteNasJob |
Deletes a NasJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CancelNasJob |
Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the NasJob is not deleted; instead it becomes a job with a [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to `CANCELLED`. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetNasTrialDetail |
Gets a NasTrialDetail. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListNasTrialDetails |
List top NasTrialDetails of a NasJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateBatchPredictionJob |
Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetBatchPredictionJob |
Gets a BatchPredictionJob |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListBatchPredictionJobs |
Lists BatchPredictionJobs in a Location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteBatchPredictionJob |
Deletes a BatchPredictionJob. Can only be called on jobs that already finished. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CancelBatchPredictionJob |
Cancels a BatchPredictionJob. Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already outputted by the job are not deleted. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateModelDeploymentMonitoringJob |
Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SearchModelDeploymentMonitoringStatsAnomalies |
Searches Model Monitoring Statistics generated within a given time window. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetModelDeploymentMonitoringJob |
Gets a ModelDeploymentMonitoringJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListModelDeploymentMonitoringJobs |
Lists ModelDeploymentMonitoringJobs in a Location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateModelDeploymentMonitoringJob |
Updates a ModelDeploymentMonitoringJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteModelDeploymentMonitoringJob |
Deletes a ModelDeploymentMonitoringJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
PauseModelDeploymentMonitoringJob |
Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state] to 'PAUSED'. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ResumeModelDeploymentMonitoringJob |
Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be resumed. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of JobServiceSettings to create(). For example:
To customize credentials:
// 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
JobServiceSettings jobServiceSettings =
JobServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
JobServiceClient jobServiceClient = JobServiceClient.create(jobServiceSettings);
To customize the endpoint:
// 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
JobServiceSettings jobServiceSettings =
JobServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
JobServiceClient jobServiceClient = JobServiceClient.create(jobServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJobServiceClient(JobServiceSettings settings) Constructs an instance of JobServiceClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidCancels a BatchPredictionJob.final voidCancels a BatchPredictionJob.final voidCancels a BatchPredictionJob.final UnaryCallable<CancelBatchPredictionJobRequest,com.google.protobuf.Empty> Cancels a BatchPredictionJob.final voidcancelCustomJob(CancelCustomJobRequest request) Cancels a CustomJob.final voidcancelCustomJob(CustomJobName name) Cancels a CustomJob.final voidcancelCustomJob(String name) Cancels a CustomJob.final UnaryCallable<CancelCustomJobRequest,com.google.protobuf.Empty> Cancels a CustomJob.final voidCancels a DataLabelingJob.final voidCancels a DataLabelingJob.final voidcancelDataLabelingJob(String name) Cancels a DataLabelingJob.final UnaryCallable<CancelDataLabelingJobRequest,com.google.protobuf.Empty> Cancels a DataLabelingJob.final voidCancels a HyperparameterTuningJob.final voidCancels a HyperparameterTuningJob.final voidCancels a HyperparameterTuningJob.final UnaryCallable<CancelHyperparameterTuningJobRequest,com.google.protobuf.Empty> Cancels a HyperparameterTuningJob.final voidcancelNasJob(CancelNasJobRequest request) Cancels a NasJob.final voidcancelNasJob(NasJobName name) Cancels a NasJob.final voidcancelNasJob(String name) Cancels a NasJob.final UnaryCallable<CancelNasJobRequest,com.google.protobuf.Empty> Cancels a NasJob.final voidclose()static final JobServiceClientcreate()Constructs an instance of JobServiceClient with default settings.static final JobServiceClientcreate(JobServiceSettings settings) Constructs an instance of JobServiceClient, using the given settings.static final JobServiceClientcreate(JobServiceStub stub) Constructs an instance of JobServiceClient, using the given stub for making calls.final BatchPredictionJobCreates a BatchPredictionJob.final BatchPredictionJobcreateBatchPredictionJob(LocationName parent, BatchPredictionJob batchPredictionJob) Creates a BatchPredictionJob.final BatchPredictionJobcreateBatchPredictionJob(String parent, BatchPredictionJob batchPredictionJob) Creates a BatchPredictionJob.Creates a BatchPredictionJob.final CustomJobcreateCustomJob(CreateCustomJobRequest request) Creates a CustomJob.final CustomJobcreateCustomJob(LocationName parent, CustomJob customJob) Creates a CustomJob.final CustomJobcreateCustomJob(String parent, CustomJob customJob) Creates a CustomJob.Creates a CustomJob.final DataLabelingJobCreates a DataLabelingJob.final DataLabelingJobcreateDataLabelingJob(LocationName parent, DataLabelingJob dataLabelingJob) Creates a DataLabelingJob.final DataLabelingJobcreateDataLabelingJob(String parent, DataLabelingJob dataLabelingJob) Creates a DataLabelingJob.Creates a DataLabelingJob.final HyperparameterTuningJobCreates a HyperparameterTuningJobfinal HyperparameterTuningJobcreateHyperparameterTuningJob(LocationName parent, HyperparameterTuningJob hyperparameterTuningJob) Creates a HyperparameterTuningJobfinal HyperparameterTuningJobcreateHyperparameterTuningJob(String parent, HyperparameterTuningJob hyperparameterTuningJob) Creates a HyperparameterTuningJobCreates a HyperparameterTuningJobCreates a ModelDeploymentMonitoringJob.createModelDeploymentMonitoringJob(LocationName parent, ModelDeploymentMonitoringJob modelDeploymentMonitoringJob) Creates a ModelDeploymentMonitoringJob.createModelDeploymentMonitoringJob(String parent, ModelDeploymentMonitoringJob modelDeploymentMonitoringJob) Creates a ModelDeploymentMonitoringJob.Creates a ModelDeploymentMonitoringJob.final NasJobcreateNasJob(CreateNasJobRequest request) Creates a NasJobfinal NasJobcreateNasJob(LocationName parent, NasJob nasJob) Creates a NasJobfinal NasJobcreateNasJob(String parent, NasJob nasJob) Creates a NasJobCreates a NasJobfinal OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a BatchPredictionJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a BatchPredictionJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a BatchPredictionJob.Deletes a BatchPredictionJob.final OperationCallable<DeleteBatchPredictionJobRequest,com.google.protobuf.Empty, DeleteOperationMetadata> Deletes a BatchPredictionJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a CustomJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a CustomJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteCustomJobAsync(String name) Deletes a CustomJob.Deletes a CustomJob.final OperationCallable<DeleteCustomJobRequest,com.google.protobuf.Empty, DeleteOperationMetadata> Deletes a CustomJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a DataLabelingJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a DataLabelingJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a DataLabelingJob.Deletes a DataLabelingJob.final OperationCallable<DeleteDataLabelingJobRequest,com.google.protobuf.Empty, DeleteOperationMetadata> Deletes a DataLabelingJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a HyperparameterTuningJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a HyperparameterTuningJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a HyperparameterTuningJob.Deletes a HyperparameterTuningJob.final OperationCallable<DeleteHyperparameterTuningJobRequest,com.google.protobuf.Empty, DeleteOperationMetadata> Deletes a HyperparameterTuningJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a ModelDeploymentMonitoringJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a ModelDeploymentMonitoringJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a ModelDeploymentMonitoringJob.Deletes a ModelDeploymentMonitoringJob.final OperationCallable<DeleteModelDeploymentMonitoringJobRequest,com.google.protobuf.Empty, DeleteOperationMetadata> Deletes a ModelDeploymentMonitoringJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNasJobAsync(DeleteNasJobRequest request) Deletes a NasJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNasJobAsync(NasJobName name) Deletes a NasJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNasJobAsync(String name) Deletes a NasJob.Deletes a NasJob.final OperationCallable<DeleteNasJobRequest,com.google.protobuf.Empty, DeleteOperationMetadata> Deletes a NasJob.final BatchPredictionJobGets a BatchPredictionJobfinal BatchPredictionJobGets a BatchPredictionJobfinal BatchPredictionJobgetBatchPredictionJob(String name) Gets a BatchPredictionJobGets a BatchPredictionJobfinal CustomJobgetCustomJob(CustomJobName name) Gets a CustomJob.final CustomJobgetCustomJob(GetCustomJobRequest request) Gets a CustomJob.final CustomJobgetCustomJob(String name) Gets a CustomJob.Gets a CustomJob.final DataLabelingJobGets a DataLabelingJob.final DataLabelingJobGets a DataLabelingJob.final DataLabelingJobgetDataLabelingJob(String name) Gets a DataLabelingJob.Gets a DataLabelingJob.final HyperparameterTuningJobGets a HyperparameterTuningJobfinal HyperparameterTuningJobGets a HyperparameterTuningJobfinal HyperparameterTuningJobGets a HyperparameterTuningJobGets a HyperparameterTuningJobfinal PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy for a resource.Gets the access control policy for a resource.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.Gets a ModelDeploymentMonitoringJob.Gets a ModelDeploymentMonitoringJob.Gets a ModelDeploymentMonitoringJob.Gets a ModelDeploymentMonitoringJob.final NasJobgetNasJob(GetNasJobRequest request) Gets a NasJobfinal NasJobgetNasJob(NasJobName name) Gets a NasJobfinal NasJobGets a NasJobfinal UnaryCallable<GetNasJobRequest,NasJob> Gets a NasJobfinal NasTrialDetailGets a NasTrialDetail.final NasTrialDetailGets a NasTrialDetail.final NasTrialDetailgetNasTrialDetail(String name) Gets a NasTrialDetail.Gets a NasTrialDetail.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final JobServiceSettingsgetStub()booleanbooleanLists BatchPredictionJobs in a Location.listBatchPredictionJobs(LocationName parent) Lists BatchPredictionJobs in a Location.listBatchPredictionJobs(String parent) Lists BatchPredictionJobs in a Location.Lists BatchPredictionJobs in a Location.final UnaryCallable<ListBatchPredictionJobsRequest,JobServiceClient.ListBatchPredictionJobsPagedResponse> Lists BatchPredictionJobs in a Location.listCustomJobs(ListCustomJobsRequest request) Lists CustomJobs in a Location.listCustomJobs(LocationName parent) Lists CustomJobs in a Location.listCustomJobs(String parent) Lists CustomJobs in a Location.Lists CustomJobs in a Location.Lists CustomJobs in a Location.Lists DataLabelingJobs in a Location.listDataLabelingJobs(LocationName parent) Lists DataLabelingJobs in a Location.listDataLabelingJobs(String parent) Lists DataLabelingJobs in a Location.Lists DataLabelingJobs in a Location.Lists DataLabelingJobs in a Location.Lists HyperparameterTuningJobs in a Location.Lists HyperparameterTuningJobs in a Location.listHyperparameterTuningJobs(String parent) Lists HyperparameterTuningJobs in a Location.Lists HyperparameterTuningJobs in a Location.final UnaryCallable<ListHyperparameterTuningJobsRequest,JobServiceClient.ListHyperparameterTuningJobsPagedResponse> Lists HyperparameterTuningJobs in a Location.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists ModelDeploymentMonitoringJobs in a Location.Lists ModelDeploymentMonitoringJobs in a Location.Lists ModelDeploymentMonitoringJobs in a Location.final UnaryCallable<ListModelDeploymentMonitoringJobsRequest,ListModelDeploymentMonitoringJobsResponse> Lists ModelDeploymentMonitoringJobs in a Location.final UnaryCallable<ListModelDeploymentMonitoringJobsRequest,JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse> Lists ModelDeploymentMonitoringJobs in a Location.listNasJobs(ListNasJobsRequest request) Lists NasJobs in a Location.listNasJobs(LocationName parent) Lists NasJobs in a Location.listNasJobs(String parent) Lists NasJobs in a Location.Lists NasJobs in a Location.Lists NasJobs in a Location.List top NasTrialDetails of a NasJob.listNasTrialDetails(NasJobName parent) List top NasTrialDetails of a NasJob.listNasTrialDetails(String parent) List top NasTrialDetails of a NasJob.List top NasTrialDetails of a NasJob.List top NasTrialDetails of a NasJob.final voidPauses a ModelDeploymentMonitoringJob.final voidPauses a ModelDeploymentMonitoringJob.final voidPauses a ModelDeploymentMonitoringJob.final UnaryCallable<PauseModelDeploymentMonitoringJobRequest,com.google.protobuf.Empty> Pauses a ModelDeploymentMonitoringJob.final voidResumes a paused ModelDeploymentMonitoringJob.final voidResumes a paused ModelDeploymentMonitoringJob.final voidResumes a paused ModelDeploymentMonitoringJob.final UnaryCallable<ResumeModelDeploymentMonitoringJobRequest,com.google.protobuf.Empty> Resumes a paused ModelDeploymentMonitoringJob.searchModelDeploymentMonitoringStatsAnomalies(ModelDeploymentMonitoringJobName modelDeploymentMonitoringJob, String deployedModelId) Searches Model Monitoring Statistics generated within a given time window.searchModelDeploymentMonitoringStatsAnomalies(SearchModelDeploymentMonitoringStatsAnomaliesRequest request) Searches Model Monitoring Statistics generated within a given time window.searchModelDeploymentMonitoringStatsAnomalies(String modelDeploymentMonitoringJob, String deployedModelId) Searches Model Monitoring Statistics generated within a given time window.final UnaryCallable<SearchModelDeploymentMonitoringStatsAnomaliesRequest,SearchModelDeploymentMonitoringStatsAnomaliesResponse> Searches Model Monitoring Statistics generated within a given time window.final UnaryCallable<SearchModelDeploymentMonitoringStatsAnomaliesRequest,JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse> Searches Model Monitoring Statistics generated within a given time window.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy on the specified resource.Sets the access control policy on the specified resource.voidshutdown()voidReturns permissions that a caller has on the specified resource.Returns permissions that a caller has on the specified resource.final OperationFuture<ModelDeploymentMonitoringJob,UpdateModelDeploymentMonitoringJobOperationMetadata> updateModelDeploymentMonitoringJobAsync(ModelDeploymentMonitoringJob modelDeploymentMonitoringJob, com.google.protobuf.FieldMask updateMask) Updates a ModelDeploymentMonitoringJob.final OperationFuture<ModelDeploymentMonitoringJob,UpdateModelDeploymentMonitoringJobOperationMetadata> Updates a ModelDeploymentMonitoringJob.Updates a ModelDeploymentMonitoringJob.final OperationCallable<UpdateModelDeploymentMonitoringJobRequest,ModelDeploymentMonitoringJob, UpdateModelDeploymentMonitoringJobOperationMetadata> Updates a ModelDeploymentMonitoringJob.
-
Constructor Details
-
JobServiceClient
Constructs an instance of JobServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
JobServiceClient
-
-
Method Details
-
create
Constructs an instance of JobServiceClient with default settings.- Throws:
IOException
-
create
Constructs an instance of JobServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of JobServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(JobServiceSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
createCustomJob
Creates a CustomJob. A created CustomJob right away will be attempted to be run.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); CustomJob customJob = CustomJob.newBuilder().build(); CustomJob response = jobServiceClient.createCustomJob(parent, customJob); }- Parameters:
parent- Required. The resource name of the Location to create the CustomJob in. Format: `projects/{project}/locations/{location}`customJob- Required. The CustomJob to create.- Throws:
ApiException- if the remote call fails
-
createCustomJob
Creates a CustomJob. A created CustomJob right away will be attempted to be run.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); CustomJob customJob = CustomJob.newBuilder().build(); CustomJob response = jobServiceClient.createCustomJob(parent, customJob); }- Parameters:
parent- Required. The resource name of the Location to create the CustomJob in. Format: `projects/{project}/locations/{location}`customJob- Required. The CustomJob to create.- Throws:
ApiException- if the remote call fails
-
createCustomJob
Creates a CustomJob. A created CustomJob right away will be attempted to be run.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CreateCustomJobRequest request = CreateCustomJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setCustomJob(CustomJob.newBuilder().build()) .build(); CustomJob response = jobServiceClient.createCustomJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createCustomJobCallable
Creates a CustomJob. A created CustomJob right away will be attempted to be run.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CreateCustomJobRequest request = CreateCustomJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setCustomJob(CustomJob.newBuilder().build()) .build(); ApiFuture<CustomJob> future = jobServiceClient.createCustomJobCallable().futureCall(request); // Do something. CustomJob response = future.get(); } -
getCustomJob
Gets a CustomJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); CustomJob response = jobServiceClient.getCustomJob(name); }- Parameters:
name- Required. The name of the CustomJob resource. Format: `projects/{project}/locations/{location}/customJobs/{custom_job}`- Throws:
ApiException- if the remote call fails
-
getCustomJob
Gets a CustomJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString(); CustomJob response = jobServiceClient.getCustomJob(name); }- Parameters:
name- Required. The name of the CustomJob resource. Format: `projects/{project}/locations/{location}/customJobs/{custom_job}`- Throws:
ApiException- if the remote call fails
-
getCustomJob
Gets a CustomJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetCustomJobRequest request = GetCustomJobRequest.newBuilder() .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) .build(); CustomJob response = jobServiceClient.getCustomJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getCustomJobCallable
Gets a CustomJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetCustomJobRequest request = GetCustomJobRequest.newBuilder() .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) .build(); ApiFuture<CustomJob> future = jobServiceClient.getCustomJobCallable().futureCall(request); // Do something. CustomJob response = future.get(); } -
listCustomJobs
Lists CustomJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (CustomJob element : jobServiceClient.listCustomJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list the CustomJobs from. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listCustomJobs
Lists CustomJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (CustomJob element : jobServiceClient.listCustomJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list the CustomJobs from. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listCustomJobs
public final JobServiceClient.ListCustomJobsPagedResponse listCustomJobs(ListCustomJobsRequest request) Lists CustomJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListCustomJobsRequest request = ListCustomJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); for (CustomJob element : jobServiceClient.listCustomJobs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listCustomJobsPagedCallable
public final UnaryCallable<ListCustomJobsRequest,JobServiceClient.ListCustomJobsPagedResponse> listCustomJobsPagedCallable()Lists CustomJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListCustomJobsRequest request = ListCustomJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); ApiFuture<CustomJob> future = jobServiceClient.listCustomJobsPagedCallable().futureCall(request); // Do something. for (CustomJob element : future.get().iterateAll()) { // doThingsWith(element); } } -
listCustomJobsCallable
Lists CustomJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListCustomJobsRequest request = ListCustomJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); while (true) { ListCustomJobsResponse response = jobServiceClient.listCustomJobsCallable().call(request); for (CustomJob element : response.getCustomJobsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
deleteCustomJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteCustomJobAsync(CustomJobName name) Deletes a CustomJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); jobServiceClient.deleteCustomJobAsync(name).get(); }- Parameters:
name- Required. The name of the CustomJob resource to be deleted. Format: `projects/{project}/locations/{location}/customJobs/{custom_job}`- Throws:
ApiException- if the remote call fails
-
deleteCustomJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteCustomJobAsync(String name) Deletes a CustomJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString(); jobServiceClient.deleteCustomJobAsync(name).get(); }- Parameters:
name- Required. The name of the CustomJob resource to be deleted. Format: `projects/{project}/locations/{location}/customJobs/{custom_job}`- Throws:
ApiException- if the remote call fails
-
deleteCustomJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteCustomJobAsync(DeleteCustomJobRequest request) Deletes a CustomJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteCustomJobRequest request = DeleteCustomJobRequest.newBuilder() .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) .build(); jobServiceClient.deleteCustomJobAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteCustomJobOperationCallable
public final OperationCallable<DeleteCustomJobRequest,com.google.protobuf.Empty, deleteCustomJobOperationCallable()DeleteOperationMetadata> Deletes a CustomJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteCustomJobRequest request = DeleteCustomJobRequest.newBuilder() .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) .build(); OperationFuture<Empty, DeleteOperationMetadata> future = jobServiceClient.deleteCustomJobOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteCustomJobCallable
Deletes a CustomJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteCustomJobRequest request = DeleteCustomJobRequest.newBuilder() .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) .build(); ApiFuture<Operation> future = jobServiceClient.deleteCustomJobCallable().futureCall(request); // Do something. future.get(); } -
cancelCustomJob
Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); jobServiceClient.cancelCustomJob(name); }- Parameters:
name- Required. The name of the CustomJob to cancel. Format: `projects/{project}/locations/{location}/customJobs/{custom_job}`- Throws:
ApiException- if the remote call fails
-
cancelCustomJob
Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString(); jobServiceClient.cancelCustomJob(name); }- Parameters:
name- Required. The name of the CustomJob to cancel. Format: `projects/{project}/locations/{location}/customJobs/{custom_job}`- Throws:
ApiException- if the remote call fails
-
cancelCustomJob
Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CancelCustomJobRequest request = CancelCustomJobRequest.newBuilder() .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) .build(); jobServiceClient.cancelCustomJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
cancelCustomJobCallable
public final UnaryCallable<CancelCustomJobRequest,com.google.protobuf.Empty> cancelCustomJobCallable()Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CancelCustomJobRequest request = CancelCustomJobRequest.newBuilder() .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) .build(); ApiFuture<Empty> future = jobServiceClient.cancelCustomJobCallable().futureCall(request); // Do something. future.get(); } -
createDataLabelingJob
public final DataLabelingJob createDataLabelingJob(LocationName parent, DataLabelingJob dataLabelingJob) Creates a DataLabelingJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build(); DataLabelingJob response = jobServiceClient.createDataLabelingJob(parent, dataLabelingJob); }- Parameters:
parent- Required. The parent of the DataLabelingJob. Format: `projects/{project}/locations/{location}`dataLabelingJob- Required. The DataLabelingJob to create.- Throws:
ApiException- if the remote call fails
-
createDataLabelingJob
Creates a DataLabelingJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build(); DataLabelingJob response = jobServiceClient.createDataLabelingJob(parent, dataLabelingJob); }- Parameters:
parent- Required. The parent of the DataLabelingJob. Format: `projects/{project}/locations/{location}`dataLabelingJob- Required. The DataLabelingJob to create.- Throws:
ApiException- if the remote call fails
-
createDataLabelingJob
Creates a DataLabelingJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CreateDataLabelingJobRequest request = CreateDataLabelingJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDataLabelingJob(DataLabelingJob.newBuilder().build()) .build(); DataLabelingJob response = jobServiceClient.createDataLabelingJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createDataLabelingJobCallable
public final UnaryCallable<CreateDataLabelingJobRequest,DataLabelingJob> createDataLabelingJobCallable()Creates a DataLabelingJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CreateDataLabelingJobRequest request = CreateDataLabelingJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDataLabelingJob(DataLabelingJob.newBuilder().build()) .build(); ApiFuture<DataLabelingJob> future = jobServiceClient.createDataLabelingJobCallable().futureCall(request); // Do something. DataLabelingJob response = future.get(); } -
getDataLabelingJob
Gets a DataLabelingJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); DataLabelingJob response = jobServiceClient.getDataLabelingJob(name); }- Parameters:
name- Required. The name of the DataLabelingJob. Format: `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`- Throws:
ApiException- if the remote call fails
-
getDataLabelingJob
Gets a DataLabelingJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]").toString(); DataLabelingJob response = jobServiceClient.getDataLabelingJob(name); }- Parameters:
name- Required. The name of the DataLabelingJob. Format: `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`- Throws:
ApiException- if the remote call fails
-
getDataLabelingJob
Gets a DataLabelingJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetDataLabelingJobRequest request = GetDataLabelingJobRequest.newBuilder() .setName( DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]") .toString()) .build(); DataLabelingJob response = jobServiceClient.getDataLabelingJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getDataLabelingJobCallable
Gets a DataLabelingJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetDataLabelingJobRequest request = GetDataLabelingJobRequest.newBuilder() .setName( DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]") .toString()) .build(); ApiFuture<DataLabelingJob> future = jobServiceClient.getDataLabelingJobCallable().futureCall(request); // Do something. DataLabelingJob response = future.get(); } -
listDataLabelingJobs
public final JobServiceClient.ListDataLabelingJobsPagedResponse listDataLabelingJobs(LocationName parent) Lists DataLabelingJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (DataLabelingJob element : jobServiceClient.listDataLabelingJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent of the DataLabelingJob. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listDataLabelingJobs
Lists DataLabelingJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (DataLabelingJob element : jobServiceClient.listDataLabelingJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent of the DataLabelingJob. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listDataLabelingJobs
public final JobServiceClient.ListDataLabelingJobsPagedResponse listDataLabelingJobs(ListDataLabelingJobsRequest request) Lists DataLabelingJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListDataLabelingJobsRequest request = ListDataLabelingJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .setOrderBy("orderBy-1207110587") .build(); for (DataLabelingJob element : jobServiceClient.listDataLabelingJobs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listDataLabelingJobsPagedCallable
public final UnaryCallable<ListDataLabelingJobsRequest,JobServiceClient.ListDataLabelingJobsPagedResponse> listDataLabelingJobsPagedCallable()Lists DataLabelingJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListDataLabelingJobsRequest request = ListDataLabelingJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .setOrderBy("orderBy-1207110587") .build(); ApiFuture<DataLabelingJob> future = jobServiceClient.listDataLabelingJobsPagedCallable().futureCall(request); // Do something. for (DataLabelingJob element : future.get().iterateAll()) { // doThingsWith(element); } } -
listDataLabelingJobsCallable
public final UnaryCallable<ListDataLabelingJobsRequest,ListDataLabelingJobsResponse> listDataLabelingJobsCallable()Lists DataLabelingJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListDataLabelingJobsRequest request = ListDataLabelingJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .setOrderBy("orderBy-1207110587") .build(); while (true) { ListDataLabelingJobsResponse response = jobServiceClient.listDataLabelingJobsCallable().call(request); for (DataLabelingJob element : response.getDataLabelingJobsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
deleteDataLabelingJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteDataLabelingJobAsync(DataLabelingJobName name) Deletes a DataLabelingJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); jobServiceClient.deleteDataLabelingJobAsync(name).get(); }- Parameters:
name- Required. The name of the DataLabelingJob to be deleted. Format: `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`- Throws:
ApiException- if the remote call fails
-
deleteDataLabelingJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteDataLabelingJobAsync(String name) Deletes a DataLabelingJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]").toString(); jobServiceClient.deleteDataLabelingJobAsync(name).get(); }- Parameters:
name- Required. The name of the DataLabelingJob to be deleted. Format: `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`- Throws:
ApiException- if the remote call fails
-
deleteDataLabelingJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteDataLabelingJobAsync(DeleteDataLabelingJobRequest request) Deletes a DataLabelingJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteDataLabelingJobRequest request = DeleteDataLabelingJobRequest.newBuilder() .setName( DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]") .toString()) .build(); jobServiceClient.deleteDataLabelingJobAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteDataLabelingJobOperationCallable
public final OperationCallable<DeleteDataLabelingJobRequest,com.google.protobuf.Empty, deleteDataLabelingJobOperationCallable()DeleteOperationMetadata> Deletes a DataLabelingJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteDataLabelingJobRequest request = DeleteDataLabelingJobRequest.newBuilder() .setName( DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]") .toString()) .build(); OperationFuture<Empty, DeleteOperationMetadata> future = jobServiceClient.deleteDataLabelingJobOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteDataLabelingJobCallable
Deletes a DataLabelingJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteDataLabelingJobRequest request = DeleteDataLabelingJobRequest.newBuilder() .setName( DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]") .toString()) .build(); ApiFuture<Operation> future = jobServiceClient.deleteDataLabelingJobCallable().futureCall(request); // Do something. future.get(); } -
cancelDataLabelingJob
Cancels a DataLabelingJob. Success of cancellation is not guaranteed.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DataLabelingJobName name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); jobServiceClient.cancelDataLabelingJob(name); }- Parameters:
name- Required. The name of the DataLabelingJob. Format: `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`- Throws:
ApiException- if the remote call fails
-
cancelDataLabelingJob
Cancels a DataLabelingJob. Success of cancellation is not guaranteed.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]").toString(); jobServiceClient.cancelDataLabelingJob(name); }- Parameters:
name- Required. The name of the DataLabelingJob. Format: `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`- Throws:
ApiException- if the remote call fails
-
cancelDataLabelingJob
Cancels a DataLabelingJob. Success of cancellation is not guaranteed.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CancelDataLabelingJobRequest request = CancelDataLabelingJobRequest.newBuilder() .setName( DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]") .toString()) .build(); jobServiceClient.cancelDataLabelingJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
cancelDataLabelingJobCallable
public final UnaryCallable<CancelDataLabelingJobRequest,com.google.protobuf.Empty> cancelDataLabelingJobCallable()Cancels a DataLabelingJob. Success of cancellation is not guaranteed.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CancelDataLabelingJobRequest request = CancelDataLabelingJobRequest.newBuilder() .setName( DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]") .toString()) .build(); ApiFuture<Empty> future = jobServiceClient.cancelDataLabelingJobCallable().futureCall(request); // Do something. future.get(); } -
createHyperparameterTuningJob
public final HyperparameterTuningJob createHyperparameterTuningJob(LocationName parent, HyperparameterTuningJob hyperparameterTuningJob) Creates a HyperparameterTuningJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); HyperparameterTuningJob hyperparameterTuningJob = HyperparameterTuningJob.newBuilder().build(); HyperparameterTuningJob response = jobServiceClient.createHyperparameterTuningJob(parent, hyperparameterTuningJob); }- Parameters:
parent- Required. The resource name of the Location to create the HyperparameterTuningJob in. Format: `projects/{project}/locations/{location}`hyperparameterTuningJob- Required. The HyperparameterTuningJob to create.- Throws:
ApiException- if the remote call fails
-
createHyperparameterTuningJob
public final HyperparameterTuningJob createHyperparameterTuningJob(String parent, HyperparameterTuningJob hyperparameterTuningJob) Creates a HyperparameterTuningJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); HyperparameterTuningJob hyperparameterTuningJob = HyperparameterTuningJob.newBuilder().build(); HyperparameterTuningJob response = jobServiceClient.createHyperparameterTuningJob(parent, hyperparameterTuningJob); }- Parameters:
parent- Required. The resource name of the Location to create the HyperparameterTuningJob in. Format: `projects/{project}/locations/{location}`hyperparameterTuningJob- Required. The HyperparameterTuningJob to create.- Throws:
ApiException- if the remote call fails
-
createHyperparameterTuningJob
public final HyperparameterTuningJob createHyperparameterTuningJob(CreateHyperparameterTuningJobRequest request) Creates a HyperparameterTuningJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CreateHyperparameterTuningJobRequest request = CreateHyperparameterTuningJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setHyperparameterTuningJob(HyperparameterTuningJob.newBuilder().build()) .build(); HyperparameterTuningJob response = jobServiceClient.createHyperparameterTuningJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createHyperparameterTuningJobCallable
public final UnaryCallable<CreateHyperparameterTuningJobRequest,HyperparameterTuningJob> createHyperparameterTuningJobCallable()Creates a HyperparameterTuningJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CreateHyperparameterTuningJobRequest request = CreateHyperparameterTuningJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setHyperparameterTuningJob(HyperparameterTuningJob.newBuilder().build()) .build(); ApiFuture<HyperparameterTuningJob> future = jobServiceClient.createHyperparameterTuningJobCallable().futureCall(request); // Do something. HyperparameterTuningJob response = future.get(); } -
getHyperparameterTuningJob
Gets a HyperparameterTuningJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"); HyperparameterTuningJob response = jobServiceClient.getHyperparameterTuningJob(name); }- Parameters:
name- Required. The name of the HyperparameterTuningJob resource. Format: `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`- Throws:
ApiException- if the remote call fails
-
getHyperparameterTuningJob
Gets a HyperparameterTuningJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]") .toString(); HyperparameterTuningJob response = jobServiceClient.getHyperparameterTuningJob(name); }- Parameters:
name- Required. The name of the HyperparameterTuningJob resource. Format: `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`- Throws:
ApiException- if the remote call fails
-
getHyperparameterTuningJob
public final HyperparameterTuningJob getHyperparameterTuningJob(GetHyperparameterTuningJobRequest request) Gets a HyperparameterTuningJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetHyperparameterTuningJobRequest request = GetHyperparameterTuningJobRequest.newBuilder() .setName( HyperparameterTuningJobName.of( "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]") .toString()) .build(); HyperparameterTuningJob response = jobServiceClient.getHyperparameterTuningJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getHyperparameterTuningJobCallable
public final UnaryCallable<GetHyperparameterTuningJobRequest,HyperparameterTuningJob> getHyperparameterTuningJobCallable()Gets a HyperparameterTuningJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetHyperparameterTuningJobRequest request = GetHyperparameterTuningJobRequest.newBuilder() .setName( HyperparameterTuningJobName.of( "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]") .toString()) .build(); ApiFuture<HyperparameterTuningJob> future = jobServiceClient.getHyperparameterTuningJobCallable().futureCall(request); // Do something. HyperparameterTuningJob response = future.get(); } -
listHyperparameterTuningJobs
public final JobServiceClient.ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJobs(LocationName parent) Lists HyperparameterTuningJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (HyperparameterTuningJob element : jobServiceClient.listHyperparameterTuningJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list the HyperparameterTuningJobs from. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listHyperparameterTuningJobs
public final JobServiceClient.ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJobs(String parent) Lists HyperparameterTuningJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (HyperparameterTuningJob element : jobServiceClient.listHyperparameterTuningJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list the HyperparameterTuningJobs from. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listHyperparameterTuningJobs
public final JobServiceClient.ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJobs(ListHyperparameterTuningJobsRequest request) Lists HyperparameterTuningJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListHyperparameterTuningJobsRequest request = ListHyperparameterTuningJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); for (HyperparameterTuningJob element : jobServiceClient.listHyperparameterTuningJobs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listHyperparameterTuningJobsPagedCallable
public final UnaryCallable<ListHyperparameterTuningJobsRequest,JobServiceClient.ListHyperparameterTuningJobsPagedResponse> listHyperparameterTuningJobsPagedCallable()Lists HyperparameterTuningJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListHyperparameterTuningJobsRequest request = ListHyperparameterTuningJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); ApiFuture<HyperparameterTuningJob> future = jobServiceClient.listHyperparameterTuningJobsPagedCallable().futureCall(request); // Do something. for (HyperparameterTuningJob element : future.get().iterateAll()) { // doThingsWith(element); } } -
listHyperparameterTuningJobsCallable
public final UnaryCallable<ListHyperparameterTuningJobsRequest,ListHyperparameterTuningJobsResponse> listHyperparameterTuningJobsCallable()Lists HyperparameterTuningJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListHyperparameterTuningJobsRequest request = ListHyperparameterTuningJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); while (true) { ListHyperparameterTuningJobsResponse response = jobServiceClient.listHyperparameterTuningJobsCallable().call(request); for (HyperparameterTuningJob element : response.getHyperparameterTuningJobsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
deleteHyperparameterTuningJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteHyperparameterTuningJobAsync(HyperparameterTuningJobName name) Deletes a HyperparameterTuningJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"); jobServiceClient.deleteHyperparameterTuningJobAsync(name).get(); }- Parameters:
name- Required. The name of the HyperparameterTuningJob resource to be deleted. Format: `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`- Throws:
ApiException- if the remote call fails
-
deleteHyperparameterTuningJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteHyperparameterTuningJobAsync(String name) Deletes a HyperparameterTuningJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]") .toString(); jobServiceClient.deleteHyperparameterTuningJobAsync(name).get(); }- Parameters:
name- Required. The name of the HyperparameterTuningJob resource to be deleted. Format: `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`- Throws:
ApiException- if the remote call fails
-
deleteHyperparameterTuningJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteHyperparameterTuningJobAsync(DeleteHyperparameterTuningJobRequest request) Deletes a HyperparameterTuningJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteHyperparameterTuningJobRequest request = DeleteHyperparameterTuningJobRequest.newBuilder() .setName( HyperparameterTuningJobName.of( "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]") .toString()) .build(); jobServiceClient.deleteHyperparameterTuningJobAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteHyperparameterTuningJobOperationCallable
public final OperationCallable<DeleteHyperparameterTuningJobRequest,com.google.protobuf.Empty, deleteHyperparameterTuningJobOperationCallable()DeleteOperationMetadata> Deletes a HyperparameterTuningJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteHyperparameterTuningJobRequest request = DeleteHyperparameterTuningJobRequest.newBuilder() .setName( HyperparameterTuningJobName.of( "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]") .toString()) .build(); OperationFuture<Empty, DeleteOperationMetadata> future = jobServiceClient.deleteHyperparameterTuningJobOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteHyperparameterTuningJobCallable
public final UnaryCallable<DeleteHyperparameterTuningJobRequest,Operation> deleteHyperparameterTuningJobCallable()Deletes a HyperparameterTuningJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteHyperparameterTuningJobRequest request = DeleteHyperparameterTuningJobRequest.newBuilder() .setName( HyperparameterTuningJobName.of( "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]") .toString()) .build(); ApiFuture<Operation> future = jobServiceClient.deleteHyperparameterTuningJobCallable().futureCall(request); // Do something. future.get(); } -
cancelHyperparameterTuningJob
Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to `CANCELLED`.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { HyperparameterTuningJobName name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"); jobServiceClient.cancelHyperparameterTuningJob(name); }- Parameters:
name- Required. The name of the HyperparameterTuningJob to cancel. Format: `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`- Throws:
ApiException- if the remote call fails
-
cancelHyperparameterTuningJob
Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to `CANCELLED`.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]") .toString(); jobServiceClient.cancelHyperparameterTuningJob(name); }- Parameters:
name- Required. The name of the HyperparameterTuningJob to cancel. Format: `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`- Throws:
ApiException- if the remote call fails
-
cancelHyperparameterTuningJob
Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to `CANCELLED`.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CancelHyperparameterTuningJobRequest request = CancelHyperparameterTuningJobRequest.newBuilder() .setName( HyperparameterTuningJobName.of( "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]") .toString()) .build(); jobServiceClient.cancelHyperparameterTuningJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
cancelHyperparameterTuningJobCallable
public final UnaryCallable<CancelHyperparameterTuningJobRequest,com.google.protobuf.Empty> cancelHyperparameterTuningJobCallable()Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to `CANCELLED`.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CancelHyperparameterTuningJobRequest request = CancelHyperparameterTuningJobRequest.newBuilder() .setName( HyperparameterTuningJobName.of( "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]") .toString()) .build(); ApiFuture<Empty> future = jobServiceClient.cancelHyperparameterTuningJobCallable().futureCall(request); // Do something. future.get(); } -
createNasJob
Creates a NasJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); NasJob nasJob = NasJob.newBuilder().build(); NasJob response = jobServiceClient.createNasJob(parent, nasJob); }- Parameters:
parent- Required. The resource name of the Location to create the NasJob in. Format: `projects/{project}/locations/{location}`nasJob- Required. The NasJob to create.- Throws:
ApiException- if the remote call fails
-
createNasJob
Creates a NasJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); NasJob nasJob = NasJob.newBuilder().build(); NasJob response = jobServiceClient.createNasJob(parent, nasJob); }- Parameters:
parent- Required. The resource name of the Location to create the NasJob in. Format: `projects/{project}/locations/{location}`nasJob- Required. The NasJob to create.- Throws:
ApiException- if the remote call fails
-
createNasJob
Creates a NasJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CreateNasJobRequest request = CreateNasJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setNasJob(NasJob.newBuilder().build()) .build(); NasJob response = jobServiceClient.createNasJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createNasJobCallable
Creates a NasJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CreateNasJobRequest request = CreateNasJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setNasJob(NasJob.newBuilder().build()) .build(); ApiFuture<NasJob> future = jobServiceClient.createNasJobCallable().futureCall(request); // Do something. NasJob response = future.get(); } -
getNasJob
Gets a NasJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); NasJob response = jobServiceClient.getNasJob(name); }- Parameters:
name- Required. The name of the NasJob resource. Format: `projects/{project}/locations/{location}/nasJobs/{nas_job}`- Throws:
ApiException- if the remote call fails
-
getNasJob
Gets a NasJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString(); NasJob response = jobServiceClient.getNasJob(name); }- Parameters:
name- Required. The name of the NasJob resource. Format: `projects/{project}/locations/{location}/nasJobs/{nas_job}`- Throws:
ApiException- if the remote call fails
-
getNasJob
Gets a NasJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetNasJobRequest request = GetNasJobRequest.newBuilder() .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) .build(); NasJob response = jobServiceClient.getNasJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getNasJobCallable
Gets a NasJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetNasJobRequest request = GetNasJobRequest.newBuilder() .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) .build(); ApiFuture<NasJob> future = jobServiceClient.getNasJobCallable().futureCall(request); // Do something. NasJob response = future.get(); } -
listNasJobs
Lists NasJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (NasJob element : jobServiceClient.listNasJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list the NasJobs from. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listNasJobs
Lists NasJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (NasJob element : jobServiceClient.listNasJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list the NasJobs from. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listNasJobs
Lists NasJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListNasJobsRequest request = ListNasJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); for (NasJob element : jobServiceClient.listNasJobs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listNasJobsPagedCallable
public final UnaryCallable<ListNasJobsRequest,JobServiceClient.ListNasJobsPagedResponse> listNasJobsPagedCallable()Lists NasJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListNasJobsRequest request = ListNasJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); ApiFuture<NasJob> future = jobServiceClient.listNasJobsPagedCallable().futureCall(request); // Do something. for (NasJob element : future.get().iterateAll()) { // doThingsWith(element); } } -
listNasJobsCallable
Lists NasJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListNasJobsRequest request = ListNasJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); while (true) { ListNasJobsResponse response = jobServiceClient.listNasJobsCallable().call(request); for (NasJob element : response.getNasJobsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
deleteNasJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNasJobAsync(NasJobName name) Deletes a NasJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); jobServiceClient.deleteNasJobAsync(name).get(); }- Parameters:
name- Required. The name of the NasJob resource to be deleted. Format: `projects/{project}/locations/{location}/nasJobs/{nas_job}`- Throws:
ApiException- if the remote call fails
-
deleteNasJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNasJobAsync(String name) Deletes a NasJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString(); jobServiceClient.deleteNasJobAsync(name).get(); }- Parameters:
name- Required. The name of the NasJob resource to be deleted. Format: `projects/{project}/locations/{location}/nasJobs/{nas_job}`- Throws:
ApiException- if the remote call fails
-
deleteNasJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNasJobAsync(DeleteNasJobRequest request) Deletes a NasJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteNasJobRequest request = DeleteNasJobRequest.newBuilder() .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) .build(); jobServiceClient.deleteNasJobAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteNasJobOperationCallable
public final OperationCallable<DeleteNasJobRequest,com.google.protobuf.Empty, deleteNasJobOperationCallable()DeleteOperationMetadata> Deletes a NasJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteNasJobRequest request = DeleteNasJobRequest.newBuilder() .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) .build(); OperationFuture<Empty, DeleteOperationMetadata> future = jobServiceClient.deleteNasJobOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteNasJobCallable
Deletes a NasJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteNasJobRequest request = DeleteNasJobRequest.newBuilder() .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) .build(); ApiFuture<Operation> future = jobServiceClient.deleteNasJobCallable().futureCall(request); // Do something. future.get(); } -
cancelNasJob
Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the NasJob is not deleted; instead it becomes a job with a [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to `CANCELLED`.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); jobServiceClient.cancelNasJob(name); }- Parameters:
name- Required. The name of the NasJob to cancel. Format: `projects/{project}/locations/{location}/nasJobs/{nas_job}`- Throws:
ApiException- if the remote call fails
-
cancelNasJob
Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the NasJob is not deleted; instead it becomes a job with a [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to `CANCELLED`.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString(); jobServiceClient.cancelNasJob(name); }- Parameters:
name- Required. The name of the NasJob to cancel. Format: `projects/{project}/locations/{location}/nasJobs/{nas_job}`- Throws:
ApiException- if the remote call fails
-
cancelNasJob
Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the NasJob is not deleted; instead it becomes a job with a [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to `CANCELLED`.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CancelNasJobRequest request = CancelNasJobRequest.newBuilder() .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) .build(); jobServiceClient.cancelNasJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
cancelNasJobCallable
Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the NasJob is not deleted; instead it becomes a job with a [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to `CANCELLED`.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CancelNasJobRequest request = CancelNasJobRequest.newBuilder() .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) .build(); ApiFuture<Empty> future = jobServiceClient.cancelNasJobCallable().futureCall(request); // Do something. future.get(); } -
getNasTrialDetail
Gets a NasTrialDetail.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { NasTrialDetailName name = NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]"); NasTrialDetail response = jobServiceClient.getNasTrialDetail(name); }- Parameters:
name- Required. The name of the NasTrialDetail resource. Format: `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`- Throws:
ApiException- if the remote call fails
-
getNasTrialDetail
Gets a NasTrialDetail.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]") .toString(); NasTrialDetail response = jobServiceClient.getNasTrialDetail(name); }- Parameters:
name- Required. The name of the NasTrialDetail resource. Format: `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`- Throws:
ApiException- if the remote call fails
-
getNasTrialDetail
Gets a NasTrialDetail.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetNasTrialDetailRequest request = GetNasTrialDetailRequest.newBuilder() .setName( NasTrialDetailName.of( "[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]") .toString()) .build(); NasTrialDetail response = jobServiceClient.getNasTrialDetail(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getNasTrialDetailCallable
Gets a NasTrialDetail.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetNasTrialDetailRequest request = GetNasTrialDetailRequest.newBuilder() .setName( NasTrialDetailName.of( "[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]") .toString()) .build(); ApiFuture<NasTrialDetail> future = jobServiceClient.getNasTrialDetailCallable().futureCall(request); // Do something. NasTrialDetail response = future.get(); } -
listNasTrialDetails
public final JobServiceClient.ListNasTrialDetailsPagedResponse listNasTrialDetails(NasJobName parent) List top NasTrialDetails of a NasJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { NasJobName parent = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); for (NasTrialDetail element : jobServiceClient.listNasTrialDetails(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The name of the NasJob resource. Format: `projects/{project}/locations/{location}/nasJobs/{nas_job}`- Throws:
ApiException- if the remote call fails
-
listNasTrialDetails
List top NasTrialDetails of a NasJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String parent = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString(); for (NasTrialDetail element : jobServiceClient.listNasTrialDetails(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The name of the NasJob resource. Format: `projects/{project}/locations/{location}/nasJobs/{nas_job}`- Throws:
ApiException- if the remote call fails
-
listNasTrialDetails
public final JobServiceClient.ListNasTrialDetailsPagedResponse listNasTrialDetails(ListNasTrialDetailsRequest request) List top NasTrialDetails of a NasJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListNasTrialDetailsRequest request = ListNasTrialDetailsRequest.newBuilder() .setParent(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (NasTrialDetail element : jobServiceClient.listNasTrialDetails(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listNasTrialDetailsPagedCallable
public final UnaryCallable<ListNasTrialDetailsRequest,JobServiceClient.ListNasTrialDetailsPagedResponse> listNasTrialDetailsPagedCallable()List top NasTrialDetails of a NasJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListNasTrialDetailsRequest request = ListNasTrialDetailsRequest.newBuilder() .setParent(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<NasTrialDetail> future = jobServiceClient.listNasTrialDetailsPagedCallable().futureCall(request); // Do something. for (NasTrialDetail element : future.get().iterateAll()) { // doThingsWith(element); } } -
listNasTrialDetailsCallable
public final UnaryCallable<ListNasTrialDetailsRequest,ListNasTrialDetailsResponse> listNasTrialDetailsCallable()List top NasTrialDetails of a NasJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListNasTrialDetailsRequest request = ListNasTrialDetailsRequest.newBuilder() .setParent(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListNasTrialDetailsResponse response = jobServiceClient.listNasTrialDetailsCallable().call(request); for (NasTrialDetail element : response.getNasTrialDetailsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
createBatchPredictionJob
public final BatchPredictionJob createBatchPredictionJob(LocationName parent, BatchPredictionJob batchPredictionJob) Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); BatchPredictionJob batchPredictionJob = BatchPredictionJob.newBuilder().build(); BatchPredictionJob response = jobServiceClient.createBatchPredictionJob(parent, batchPredictionJob); }- Parameters:
parent- Required. The resource name of the Location to create the BatchPredictionJob in. Format: `projects/{project}/locations/{location}`batchPredictionJob- Required. The BatchPredictionJob to create.- Throws:
ApiException- if the remote call fails
-
createBatchPredictionJob
public final BatchPredictionJob createBatchPredictionJob(String parent, BatchPredictionJob batchPredictionJob) Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); BatchPredictionJob batchPredictionJob = BatchPredictionJob.newBuilder().build(); BatchPredictionJob response = jobServiceClient.createBatchPredictionJob(parent, batchPredictionJob); }- Parameters:
parent- Required. The resource name of the Location to create the BatchPredictionJob in. Format: `projects/{project}/locations/{location}`batchPredictionJob- Required. The BatchPredictionJob to create.- Throws:
ApiException- if the remote call fails
-
createBatchPredictionJob
Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CreateBatchPredictionJobRequest request = CreateBatchPredictionJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setBatchPredictionJob(BatchPredictionJob.newBuilder().build()) .build(); BatchPredictionJob response = jobServiceClient.createBatchPredictionJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createBatchPredictionJobCallable
public final UnaryCallable<CreateBatchPredictionJobRequest,BatchPredictionJob> createBatchPredictionJobCallable()Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CreateBatchPredictionJobRequest request = CreateBatchPredictionJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setBatchPredictionJob(BatchPredictionJob.newBuilder().build()) .build(); ApiFuture<BatchPredictionJob> future = jobServiceClient.createBatchPredictionJobCallable().futureCall(request); // Do something. BatchPredictionJob response = future.get(); } -
getBatchPredictionJob
Gets a BatchPredictionJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"); BatchPredictionJob response = jobServiceClient.getBatchPredictionJob(name); }- Parameters:
name- Required. The name of the BatchPredictionJob resource. Format: `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`- Throws:
ApiException- if the remote call fails
-
getBatchPredictionJob
Gets a BatchPredictionJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]").toString(); BatchPredictionJob response = jobServiceClient.getBatchPredictionJob(name); }- Parameters:
name- Required. The name of the BatchPredictionJob resource. Format: `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`- Throws:
ApiException- if the remote call fails
-
getBatchPredictionJob
Gets a BatchPredictionJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetBatchPredictionJobRequest request = GetBatchPredictionJobRequest.newBuilder() .setName( BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]") .toString()) .build(); BatchPredictionJob response = jobServiceClient.getBatchPredictionJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getBatchPredictionJobCallable
public final UnaryCallable<GetBatchPredictionJobRequest,BatchPredictionJob> getBatchPredictionJobCallable()Gets a BatchPredictionJobSample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetBatchPredictionJobRequest request = GetBatchPredictionJobRequest.newBuilder() .setName( BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]") .toString()) .build(); ApiFuture<BatchPredictionJob> future = jobServiceClient.getBatchPredictionJobCallable().futureCall(request); // Do something. BatchPredictionJob response = future.get(); } -
listBatchPredictionJobs
public final JobServiceClient.ListBatchPredictionJobsPagedResponse listBatchPredictionJobs(LocationName parent) Lists BatchPredictionJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (BatchPredictionJob element : jobServiceClient.listBatchPredictionJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list the BatchPredictionJobs from. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listBatchPredictionJobs
public final JobServiceClient.ListBatchPredictionJobsPagedResponse listBatchPredictionJobs(String parent) Lists BatchPredictionJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (BatchPredictionJob element : jobServiceClient.listBatchPredictionJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list the BatchPredictionJobs from. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listBatchPredictionJobs
public final JobServiceClient.ListBatchPredictionJobsPagedResponse listBatchPredictionJobs(ListBatchPredictionJobsRequest request) Lists BatchPredictionJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListBatchPredictionJobsRequest request = ListBatchPredictionJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); for (BatchPredictionJob element : jobServiceClient.listBatchPredictionJobs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listBatchPredictionJobsPagedCallable
public final UnaryCallable<ListBatchPredictionJobsRequest,JobServiceClient.ListBatchPredictionJobsPagedResponse> listBatchPredictionJobsPagedCallable()Lists BatchPredictionJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListBatchPredictionJobsRequest request = ListBatchPredictionJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); ApiFuture<BatchPredictionJob> future = jobServiceClient.listBatchPredictionJobsPagedCallable().futureCall(request); // Do something. for (BatchPredictionJob element : future.get().iterateAll()) { // doThingsWith(element); } } -
listBatchPredictionJobsCallable
public final UnaryCallable<ListBatchPredictionJobsRequest,ListBatchPredictionJobsResponse> listBatchPredictionJobsCallable()Lists BatchPredictionJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListBatchPredictionJobsRequest request = ListBatchPredictionJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); while (true) { ListBatchPredictionJobsResponse response = jobServiceClient.listBatchPredictionJobsCallable().call(request); for (BatchPredictionJob element : response.getBatchPredictionJobsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
deleteBatchPredictionJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteBatchPredictionJobAsync(BatchPredictionJobName name) Deletes a BatchPredictionJob. Can only be called on jobs that already finished.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"); jobServiceClient.deleteBatchPredictionJobAsync(name).get(); }- Parameters:
name- Required. The name of the BatchPredictionJob resource to be deleted. Format: `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`- Throws:
ApiException- if the remote call fails
-
deleteBatchPredictionJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteBatchPredictionJobAsync(String name) Deletes a BatchPredictionJob. Can only be called on jobs that already finished.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]").toString(); jobServiceClient.deleteBatchPredictionJobAsync(name).get(); }- Parameters:
name- Required. The name of the BatchPredictionJob resource to be deleted. Format: `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`- Throws:
ApiException- if the remote call fails
-
deleteBatchPredictionJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteBatchPredictionJobAsync(DeleteBatchPredictionJobRequest request) Deletes a BatchPredictionJob. Can only be called on jobs that already finished.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteBatchPredictionJobRequest request = DeleteBatchPredictionJobRequest.newBuilder() .setName( BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]") .toString()) .build(); jobServiceClient.deleteBatchPredictionJobAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteBatchPredictionJobOperationCallable
public final OperationCallable<DeleteBatchPredictionJobRequest,com.google.protobuf.Empty, deleteBatchPredictionJobOperationCallable()DeleteOperationMetadata> Deletes a BatchPredictionJob. Can only be called on jobs that already finished.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteBatchPredictionJobRequest request = DeleteBatchPredictionJobRequest.newBuilder() .setName( BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]") .toString()) .build(); OperationFuture<Empty, DeleteOperationMetadata> future = jobServiceClient.deleteBatchPredictionJobOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteBatchPredictionJobCallable
public final UnaryCallable<DeleteBatchPredictionJobRequest,Operation> deleteBatchPredictionJobCallable()Deletes a BatchPredictionJob. Can only be called on jobs that already finished.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteBatchPredictionJobRequest request = DeleteBatchPredictionJobRequest.newBuilder() .setName( BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]") .toString()) .build(); ApiFuture<Operation> future = jobServiceClient.deleteBatchPredictionJobCallable().futureCall(request); // Do something. future.get(); } -
cancelBatchPredictionJob
Cancels a BatchPredictionJob.Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already outputted by the job are not deleted.
Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { BatchPredictionJobName name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"); jobServiceClient.cancelBatchPredictionJob(name); }- Parameters:
name- Required. The name of the BatchPredictionJob to cancel. Format: `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`- Throws:
ApiException- if the remote call fails
-
cancelBatchPredictionJob
Cancels a BatchPredictionJob.Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already outputted by the job are not deleted.
Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]").toString(); jobServiceClient.cancelBatchPredictionJob(name); }- Parameters:
name- Required. The name of the BatchPredictionJob to cancel. Format: `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`- Throws:
ApiException- if the remote call fails
-
cancelBatchPredictionJob
Cancels a BatchPredictionJob.Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already outputted by the job are not deleted.
Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CancelBatchPredictionJobRequest request = CancelBatchPredictionJobRequest.newBuilder() .setName( BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]") .toString()) .build(); jobServiceClient.cancelBatchPredictionJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
cancelBatchPredictionJobCallable
public final UnaryCallable<CancelBatchPredictionJobRequest,com.google.protobuf.Empty> cancelBatchPredictionJobCallable()Cancels a BatchPredictionJob.Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already outputted by the job are not deleted.
Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CancelBatchPredictionJobRequest request = CancelBatchPredictionJobRequest.newBuilder() .setName( BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]") .toString()) .build(); ApiFuture<Empty> future = jobServiceClient.cancelBatchPredictionJobCallable().futureCall(request); // Do something. future.get(); } -
createModelDeploymentMonitoringJob
public final ModelDeploymentMonitoringJob createModelDeploymentMonitoringJob(LocationName parent, ModelDeploymentMonitoringJob modelDeploymentMonitoringJob) Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ModelDeploymentMonitoringJob modelDeploymentMonitoringJob = ModelDeploymentMonitoringJob.newBuilder().build(); ModelDeploymentMonitoringJob response = jobServiceClient.createModelDeploymentMonitoringJob(parent, modelDeploymentMonitoringJob); }- Parameters:
parent- Required. The parent of the ModelDeploymentMonitoringJob. Format: `projects/{project}/locations/{location}`modelDeploymentMonitoringJob- Required. The ModelDeploymentMonitoringJob to create- Throws:
ApiException- if the remote call fails
-
createModelDeploymentMonitoringJob
public final ModelDeploymentMonitoringJob createModelDeploymentMonitoringJob(String parent, ModelDeploymentMonitoringJob modelDeploymentMonitoringJob) Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ModelDeploymentMonitoringJob modelDeploymentMonitoringJob = ModelDeploymentMonitoringJob.newBuilder().build(); ModelDeploymentMonitoringJob response = jobServiceClient.createModelDeploymentMonitoringJob(parent, modelDeploymentMonitoringJob); }- Parameters:
parent- Required. The parent of the ModelDeploymentMonitoringJob. Format: `projects/{project}/locations/{location}`modelDeploymentMonitoringJob- Required. The ModelDeploymentMonitoringJob to create- Throws:
ApiException- if the remote call fails
-
createModelDeploymentMonitoringJob
public final ModelDeploymentMonitoringJob createModelDeploymentMonitoringJob(CreateModelDeploymentMonitoringJobRequest request) Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CreateModelDeploymentMonitoringJobRequest request = CreateModelDeploymentMonitoringJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build()) .build(); ModelDeploymentMonitoringJob response = jobServiceClient.createModelDeploymentMonitoringJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createModelDeploymentMonitoringJobCallable
public final UnaryCallable<CreateModelDeploymentMonitoringJobRequest,ModelDeploymentMonitoringJob> createModelDeploymentMonitoringJobCallable()Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { CreateModelDeploymentMonitoringJobRequest request = CreateModelDeploymentMonitoringJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build()) .build(); ApiFuture<ModelDeploymentMonitoringJob> future = jobServiceClient.createModelDeploymentMonitoringJobCallable().futureCall(request); // Do something. ModelDeploymentMonitoringJob response = future.get(); } -
searchModelDeploymentMonitoringStatsAnomalies
public final JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse searchModelDeploymentMonitoringStatsAnomalies(ModelDeploymentMonitoringJobName modelDeploymentMonitoringJob, String deployedModelId) Searches Model Monitoring Statistics generated within a given time window.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ModelDeploymentMonitoringJobName modelDeploymentMonitoringJob = ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]"); String deployedModelId = "deployedModelId-1817547906"; for (ModelMonitoringStatsAnomalies element : jobServiceClient .searchModelDeploymentMonitoringStatsAnomalies( modelDeploymentMonitoringJob, deployedModelId) .iterateAll()) { // doThingsWith(element); } }- Parameters:
modelDeploymentMonitoringJob- Required. ModelDeploymentMonitoring Job resource name. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`deployedModelId- Required. The DeployedModel ID of the [ModelDeploymentMonitoringObjectiveConfig.deployed_model_id].- Throws:
ApiException- if the remote call fails
-
searchModelDeploymentMonitoringStatsAnomalies
public final JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse searchModelDeploymentMonitoringStatsAnomalies(String modelDeploymentMonitoringJob, String deployedModelId) Searches Model Monitoring Statistics generated within a given time window.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String modelDeploymentMonitoringJob = ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString(); String deployedModelId = "deployedModelId-1817547906"; for (ModelMonitoringStatsAnomalies element : jobServiceClient .searchModelDeploymentMonitoringStatsAnomalies( modelDeploymentMonitoringJob, deployedModelId) .iterateAll()) { // doThingsWith(element); } }- Parameters:
modelDeploymentMonitoringJob- Required. ModelDeploymentMonitoring Job resource name. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`deployedModelId- Required. The DeployedModel ID of the [ModelDeploymentMonitoringObjectiveConfig.deployed_model_id].- Throws:
ApiException- if the remote call fails
-
searchModelDeploymentMonitoringStatsAnomalies
public final JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse searchModelDeploymentMonitoringStatsAnomalies(SearchModelDeploymentMonitoringStatsAnomaliesRequest request) Searches Model Monitoring Statistics generated within a given time window.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { SearchModelDeploymentMonitoringStatsAnomaliesRequest request = SearchModelDeploymentMonitoringStatsAnomaliesRequest.newBuilder() .setModelDeploymentMonitoringJob( ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString()) .setDeployedModelId("deployedModelId-1817547906") .setFeatureDisplayName("featureDisplayName-1741181545") .addAllObjectives( new ArrayList< SearchModelDeploymentMonitoringStatsAnomaliesRequest .StatsAnomaliesObjective>()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .build(); for (ModelMonitoringStatsAnomalies element : jobServiceClient.searchModelDeploymentMonitoringStatsAnomalies(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
searchModelDeploymentMonitoringStatsAnomaliesPagedCallable
public final UnaryCallable<SearchModelDeploymentMonitoringStatsAnomaliesRequest,JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse> searchModelDeploymentMonitoringStatsAnomaliesPagedCallable()Searches Model Monitoring Statistics generated within a given time window.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { SearchModelDeploymentMonitoringStatsAnomaliesRequest request = SearchModelDeploymentMonitoringStatsAnomaliesRequest.newBuilder() .setModelDeploymentMonitoringJob( ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString()) .setDeployedModelId("deployedModelId-1817547906") .setFeatureDisplayName("featureDisplayName-1741181545") .addAllObjectives( new ArrayList< SearchModelDeploymentMonitoringStatsAnomaliesRequest .StatsAnomaliesObjective>()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .build(); ApiFuture<ModelMonitoringStatsAnomalies> future = jobServiceClient .searchModelDeploymentMonitoringStatsAnomaliesPagedCallable() .futureCall(request); // Do something. for (ModelMonitoringStatsAnomalies element : future.get().iterateAll()) { // doThingsWith(element); } } -
searchModelDeploymentMonitoringStatsAnomaliesCallable
public final UnaryCallable<SearchModelDeploymentMonitoringStatsAnomaliesRequest,SearchModelDeploymentMonitoringStatsAnomaliesResponse> searchModelDeploymentMonitoringStatsAnomaliesCallable()Searches Model Monitoring Statistics generated within a given time window.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { SearchModelDeploymentMonitoringStatsAnomaliesRequest request = SearchModelDeploymentMonitoringStatsAnomaliesRequest.newBuilder() .setModelDeploymentMonitoringJob( ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString()) .setDeployedModelId("deployedModelId-1817547906") .setFeatureDisplayName("featureDisplayName-1741181545") .addAllObjectives( new ArrayList< SearchModelDeploymentMonitoringStatsAnomaliesRequest .StatsAnomaliesObjective>()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .build(); while (true) { SearchModelDeploymentMonitoringStatsAnomaliesResponse response = jobServiceClient.searchModelDeploymentMonitoringStatsAnomaliesCallable().call(request); for (ModelMonitoringStatsAnomalies element : response.getMonitoringStatsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getModelDeploymentMonitoringJob
public final ModelDeploymentMonitoringJob getModelDeploymentMonitoringJob(ModelDeploymentMonitoringJobName name) Gets a ModelDeploymentMonitoringJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ModelDeploymentMonitoringJobName name = ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]"); ModelDeploymentMonitoringJob response = jobServiceClient.getModelDeploymentMonitoringJob(name); }- Parameters:
name- Required. The resource name of the ModelDeploymentMonitoringJob. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`- Throws:
ApiException- if the remote call fails
-
getModelDeploymentMonitoringJob
Gets a ModelDeploymentMonitoringJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString(); ModelDeploymentMonitoringJob response = jobServiceClient.getModelDeploymentMonitoringJob(name); }- Parameters:
name- Required. The resource name of the ModelDeploymentMonitoringJob. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`- Throws:
ApiException- if the remote call fails
-
getModelDeploymentMonitoringJob
public final ModelDeploymentMonitoringJob getModelDeploymentMonitoringJob(GetModelDeploymentMonitoringJobRequest request) Gets a ModelDeploymentMonitoringJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetModelDeploymentMonitoringJobRequest request = GetModelDeploymentMonitoringJobRequest.newBuilder() .setName( ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString()) .build(); ModelDeploymentMonitoringJob response = jobServiceClient.getModelDeploymentMonitoringJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getModelDeploymentMonitoringJobCallable
public final UnaryCallable<GetModelDeploymentMonitoringJobRequest,ModelDeploymentMonitoringJob> getModelDeploymentMonitoringJobCallable()Gets a ModelDeploymentMonitoringJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetModelDeploymentMonitoringJobRequest request = GetModelDeploymentMonitoringJobRequest.newBuilder() .setName( ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString()) .build(); ApiFuture<ModelDeploymentMonitoringJob> future = jobServiceClient.getModelDeploymentMonitoringJobCallable().futureCall(request); // Do something. ModelDeploymentMonitoringJob response = future.get(); } -
listModelDeploymentMonitoringJobs
public final JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse listModelDeploymentMonitoringJobs(LocationName parent) Lists ModelDeploymentMonitoringJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (ModelDeploymentMonitoringJob element : jobServiceClient.listModelDeploymentMonitoringJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent of the ModelDeploymentMonitoringJob. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listModelDeploymentMonitoringJobs
public final JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse listModelDeploymentMonitoringJobs(String parent) Lists ModelDeploymentMonitoringJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (ModelDeploymentMonitoringJob element : jobServiceClient.listModelDeploymentMonitoringJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent of the ModelDeploymentMonitoringJob. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listModelDeploymentMonitoringJobs
public final JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse listModelDeploymentMonitoringJobs(ListModelDeploymentMonitoringJobsRequest request) Lists ModelDeploymentMonitoringJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListModelDeploymentMonitoringJobsRequest request = ListModelDeploymentMonitoringJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); for (ModelDeploymentMonitoringJob element : jobServiceClient.listModelDeploymentMonitoringJobs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listModelDeploymentMonitoringJobsPagedCallable
public final UnaryCallable<ListModelDeploymentMonitoringJobsRequest,JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse> listModelDeploymentMonitoringJobsPagedCallable()Lists ModelDeploymentMonitoringJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListModelDeploymentMonitoringJobsRequest request = ListModelDeploymentMonitoringJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); ApiFuture<ModelDeploymentMonitoringJob> future = jobServiceClient.listModelDeploymentMonitoringJobsPagedCallable().futureCall(request); // Do something. for (ModelDeploymentMonitoringJob element : future.get().iterateAll()) { // doThingsWith(element); } } -
listModelDeploymentMonitoringJobsCallable
public final UnaryCallable<ListModelDeploymentMonitoringJobsRequest,ListModelDeploymentMonitoringJobsResponse> listModelDeploymentMonitoringJobsCallable()Lists ModelDeploymentMonitoringJobs in a Location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListModelDeploymentMonitoringJobsRequest request = ListModelDeploymentMonitoringJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); while (true) { ListModelDeploymentMonitoringJobsResponse response = jobServiceClient.listModelDeploymentMonitoringJobsCallable().call(request); for (ModelDeploymentMonitoringJob element : response.getModelDeploymentMonitoringJobsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
updateModelDeploymentMonitoringJobAsync
public final OperationFuture<ModelDeploymentMonitoringJob,UpdateModelDeploymentMonitoringJobOperationMetadata> updateModelDeploymentMonitoringJobAsync(ModelDeploymentMonitoringJob modelDeploymentMonitoringJob, com.google.protobuf.FieldMask updateMask) Updates a ModelDeploymentMonitoringJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ModelDeploymentMonitoringJob modelDeploymentMonitoringJob = ModelDeploymentMonitoringJob.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); ModelDeploymentMonitoringJob response = jobServiceClient .updateModelDeploymentMonitoringJobAsync(modelDeploymentMonitoringJob, updateMask) .get(); }- Parameters:
modelDeploymentMonitoringJob- Required. The model monitoring configuration which replaces the resource on the server.updateMask- Required. The update mask is used to specify the fields to be overwritten in the ModelDeploymentMonitoringJob resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then only the non-empty fields present in the request will be overwritten. Set the update_mask to `*` to override all fields. For the objective config, the user can either provide the update mask for model_deployment_monitoring_objective_configs or any combination of its nested fields, such as: model_deployment_monitoring_objective_configs.objective_config.training_dataset.Updatable fields:
* `display_name` * `model_deployment_monitoring_schedule_config` * `model_monitoring_alert_config` * `logging_sampling_strategy` * `labels` * `log_ttl` * `enable_monitoring_pipeline_logs` . and * `model_deployment_monitoring_objective_configs` . or * `model_deployment_monitoring_objective_configs.objective_config.training_dataset` * `model_deployment_monitoring_objective_configs.objective_config.training_prediction_skew_detection_config` * `model_deployment_monitoring_objective_configs.objective_config.prediction_drift_detection_config`
- Throws:
ApiException- if the remote call fails
-
updateModelDeploymentMonitoringJobAsync
public final OperationFuture<ModelDeploymentMonitoringJob,UpdateModelDeploymentMonitoringJobOperationMetadata> updateModelDeploymentMonitoringJobAsync(UpdateModelDeploymentMonitoringJobRequest request) Updates a ModelDeploymentMonitoringJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { UpdateModelDeploymentMonitoringJobRequest request = UpdateModelDeploymentMonitoringJobRequest.newBuilder() .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ModelDeploymentMonitoringJob response = jobServiceClient.updateModelDeploymentMonitoringJobAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateModelDeploymentMonitoringJobOperationCallable
public final OperationCallable<UpdateModelDeploymentMonitoringJobRequest,ModelDeploymentMonitoringJob, updateModelDeploymentMonitoringJobOperationCallable()UpdateModelDeploymentMonitoringJobOperationMetadata> Updates a ModelDeploymentMonitoringJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { UpdateModelDeploymentMonitoringJobRequest request = UpdateModelDeploymentMonitoringJobRequest.newBuilder() .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); OperationFuture< ModelDeploymentMonitoringJob, UpdateModelDeploymentMonitoringJobOperationMetadata> future = jobServiceClient .updateModelDeploymentMonitoringJobOperationCallable() .futureCall(request); // Do something. ModelDeploymentMonitoringJob response = future.get(); } -
updateModelDeploymentMonitoringJobCallable
public final UnaryCallable<UpdateModelDeploymentMonitoringJobRequest,Operation> updateModelDeploymentMonitoringJobCallable()Updates a ModelDeploymentMonitoringJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { UpdateModelDeploymentMonitoringJobRequest request = UpdateModelDeploymentMonitoringJobRequest.newBuilder() .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Operation> future = jobServiceClient.updateModelDeploymentMonitoringJobCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteModelDeploymentMonitoringJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteModelDeploymentMonitoringJobAsync(ModelDeploymentMonitoringJobName name) Deletes a ModelDeploymentMonitoringJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ModelDeploymentMonitoringJobName name = ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]"); jobServiceClient.deleteModelDeploymentMonitoringJobAsync(name).get(); }- Parameters:
name- Required. The resource name of the model monitoring job to delete. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`- Throws:
ApiException- if the remote call fails
-
deleteModelDeploymentMonitoringJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteModelDeploymentMonitoringJobAsync(String name) Deletes a ModelDeploymentMonitoringJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString(); jobServiceClient.deleteModelDeploymentMonitoringJobAsync(name).get(); }- Parameters:
name- Required. The resource name of the model monitoring job to delete. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`- Throws:
ApiException- if the remote call fails
-
deleteModelDeploymentMonitoringJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteModelDeploymentMonitoringJobAsync(DeleteModelDeploymentMonitoringJobRequest request) Deletes a ModelDeploymentMonitoringJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteModelDeploymentMonitoringJobRequest request = DeleteModelDeploymentMonitoringJobRequest.newBuilder() .setName( ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString()) .build(); jobServiceClient.deleteModelDeploymentMonitoringJobAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteModelDeploymentMonitoringJobOperationCallable
public final OperationCallable<DeleteModelDeploymentMonitoringJobRequest,com.google.protobuf.Empty, deleteModelDeploymentMonitoringJobOperationCallable()DeleteOperationMetadata> Deletes a ModelDeploymentMonitoringJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteModelDeploymentMonitoringJobRequest request = DeleteModelDeploymentMonitoringJobRequest.newBuilder() .setName( ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString()) .build(); OperationFuture<Empty, DeleteOperationMetadata> future = jobServiceClient .deleteModelDeploymentMonitoringJobOperationCallable() .futureCall(request); // Do something. future.get(); } -
deleteModelDeploymentMonitoringJobCallable
public final UnaryCallable<DeleteModelDeploymentMonitoringJobRequest,Operation> deleteModelDeploymentMonitoringJobCallable()Deletes a ModelDeploymentMonitoringJob.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { DeleteModelDeploymentMonitoringJobRequest request = DeleteModelDeploymentMonitoringJobRequest.newBuilder() .setName( ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString()) .build(); ApiFuture<Operation> future = jobServiceClient.deleteModelDeploymentMonitoringJobCallable().futureCall(request); // Do something. future.get(); } -
pauseModelDeploymentMonitoringJob
Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state] to 'PAUSED'.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ModelDeploymentMonitoringJobName name = ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]"); jobServiceClient.pauseModelDeploymentMonitoringJob(name); }- Parameters:
name- Required. The resource name of the ModelDeploymentMonitoringJob to pause. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`- Throws:
ApiException- if the remote call fails
-
pauseModelDeploymentMonitoringJob
Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state] to 'PAUSED'.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString(); jobServiceClient.pauseModelDeploymentMonitoringJob(name); }- Parameters:
name- Required. The resource name of the ModelDeploymentMonitoringJob to pause. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`- Throws:
ApiException- if the remote call fails
-
pauseModelDeploymentMonitoringJob
public final void pauseModelDeploymentMonitoringJob(PauseModelDeploymentMonitoringJobRequest request) Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state] to 'PAUSED'.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { PauseModelDeploymentMonitoringJobRequest request = PauseModelDeploymentMonitoringJobRequest.newBuilder() .setName( ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString()) .build(); jobServiceClient.pauseModelDeploymentMonitoringJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
pauseModelDeploymentMonitoringJobCallable
public final UnaryCallable<PauseModelDeploymentMonitoringJobRequest,com.google.protobuf.Empty> pauseModelDeploymentMonitoringJobCallable()Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state] to 'PAUSED'.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { PauseModelDeploymentMonitoringJobRequest request = PauseModelDeploymentMonitoringJobRequest.newBuilder() .setName( ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString()) .build(); ApiFuture<Empty> future = jobServiceClient.pauseModelDeploymentMonitoringJobCallable().futureCall(request); // Do something. future.get(); } -
resumeModelDeploymentMonitoringJob
Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be resumed.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ModelDeploymentMonitoringJobName name = ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]"); jobServiceClient.resumeModelDeploymentMonitoringJob(name); }- Parameters:
name- Required. The resource name of the ModelDeploymentMonitoringJob to resume. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`- Throws:
ApiException- if the remote call fails
-
resumeModelDeploymentMonitoringJob
Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be resumed.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { String name = ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString(); jobServiceClient.resumeModelDeploymentMonitoringJob(name); }- Parameters:
name- Required. The resource name of the ModelDeploymentMonitoringJob to resume. Format: `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`- Throws:
ApiException- if the remote call fails
-
resumeModelDeploymentMonitoringJob
public final void resumeModelDeploymentMonitoringJob(ResumeModelDeploymentMonitoringJobRequest request) Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be resumed.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ResumeModelDeploymentMonitoringJobRequest request = ResumeModelDeploymentMonitoringJobRequest.newBuilder() .setName( ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString()) .build(); jobServiceClient.resumeModelDeploymentMonitoringJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
resumeModelDeploymentMonitoringJobCallable
public final UnaryCallable<ResumeModelDeploymentMonitoringJobRequest,com.google.protobuf.Empty> resumeModelDeploymentMonitoringJobCallable()Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be resumed.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ResumeModelDeploymentMonitoringJobRequest request = ResumeModelDeploymentMonitoringJobRequest.newBuilder() .setName( ModelDeploymentMonitoringJobName.of( "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]") .toString()) .build(); ApiFuture<Empty> future = jobServiceClient.resumeModelDeploymentMonitoringJobCallable().futureCall(request); // Do something. future.get(); } -
listLocations
public final JobServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : jobServiceClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,JobServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = jobServiceClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = jobServiceClient.listLocationsCallable().call(request); for (Location element : response.getLocationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLocation
Gets information about a location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = jobServiceClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = jobServiceClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
setIamPolicy
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Policy response = jobServiceClient.setIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setIamPolicyCallable
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Policy> future = jobServiceClient.setIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
getIamPolicy
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); Policy response = jobServiceClient.getIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getIamPolicyCallable
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); ApiFuture<Policy> future = jobServiceClient.getIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
testIamPermissions
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .addAllPermissions(new ArrayList<String>()) .build(); TestIamPermissionsResponse response = jobServiceClient.testIamPermissions(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
testIamPermissionsCallable
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// 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 try (JobServiceClient jobServiceClient = JobServiceClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .addAllPermissions(new ArrayList<String>()) .build(); ApiFuture<TestIamPermissionsResponse> future = jobServiceClient.testIamPermissionsCallable().futureCall(request); // Do something. TestIamPermissionsResponse response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-