pub struct JobServiceClient<T> { /* private fields */ }
Expand description

A service for creating and managing Vertex AI’s jobs.

Implementations§

source§

impl<T> JobServiceClient<T>
where T: GrpcService<BoxBody>, T::Error: Into<StdError>, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send,

source

pub fn new(inner: T) -> Self

source

pub fn with_origin(inner: T, origin: Uri) -> Self

source

pub fn with_interceptor<F>( inner: T, interceptor: F ) -> JobServiceClient<InterceptedService<T, F>>
where F: Interceptor, T::ResponseBody: Default, T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>, <T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,

source

pub fn send_compressed(self, encoding: CompressionEncoding) -> Self

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

source

pub fn max_decoding_message_size(self, limit: usize) -> Self

Limits the maximum size of a decoded message.

Default: 4MB

source

pub fn max_encoding_message_size(self, limit: usize) -> Self

Limits the maximum size of an encoded message.

Default: usize::MAX

source

pub async fn create_custom_job( &mut self, request: impl IntoRequest<CreateCustomJobRequest> ) -> Result<Response<CustomJob>, Status>

Creates a CustomJob. A created CustomJob right away will be attempted to be run.

source

pub async fn get_custom_job( &mut self, request: impl IntoRequest<GetCustomJobRequest> ) -> Result<Response<CustomJob>, Status>

Gets a CustomJob.

source

pub async fn list_custom_jobs( &mut self, request: impl IntoRequest<ListCustomJobsRequest> ) -> Result<Response<ListCustomJobsResponse>, Status>

Lists CustomJobs in a Location.

source

pub async fn delete_custom_job( &mut self, request: impl IntoRequest<DeleteCustomJobRequest> ) -> Result<Response<Operation>, Status>

Deletes a CustomJob.

source

pub async fn cancel_custom_job( &mut self, request: impl IntoRequest<CancelCustomJobRequest> ) -> Result<Response<()>, Status>

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.v1beta1.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.v1beta1.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.v1beta1.CustomJob.state] is set to CANCELLED.

source

pub async fn create_data_labeling_job( &mut self, request: impl IntoRequest<CreateDataLabelingJobRequest> ) -> Result<Response<DataLabelingJob>, Status>

Creates a DataLabelingJob.

source

pub async fn get_data_labeling_job( &mut self, request: impl IntoRequest<GetDataLabelingJobRequest> ) -> Result<Response<DataLabelingJob>, Status>

Gets a DataLabelingJob.

source

pub async fn list_data_labeling_jobs( &mut self, request: impl IntoRequest<ListDataLabelingJobsRequest> ) -> Result<Response<ListDataLabelingJobsResponse>, Status>

Lists DataLabelingJobs in a Location.

source

pub async fn delete_data_labeling_job( &mut self, request: impl IntoRequest<DeleteDataLabelingJobRequest> ) -> Result<Response<Operation>, Status>

Deletes a DataLabelingJob.

source

pub async fn cancel_data_labeling_job( &mut self, request: impl IntoRequest<CancelDataLabelingJobRequest> ) -> Result<Response<()>, Status>

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

source

pub async fn create_hyperparameter_tuning_job( &mut self, request: impl IntoRequest<CreateHyperparameterTuningJobRequest> ) -> Result<Response<HyperparameterTuningJob>, Status>

Creates a HyperparameterTuningJob

source

pub async fn get_hyperparameter_tuning_job( &mut self, request: impl IntoRequest<GetHyperparameterTuningJobRequest> ) -> Result<Response<HyperparameterTuningJob>, Status>

Gets a HyperparameterTuningJob

source

pub async fn list_hyperparameter_tuning_jobs( &mut self, request: impl IntoRequest<ListHyperparameterTuningJobsRequest> ) -> Result<Response<ListHyperparameterTuningJobsResponse>, Status>

Lists HyperparameterTuningJobs in a Location.

source

pub async fn delete_hyperparameter_tuning_job( &mut self, request: impl IntoRequest<DeleteHyperparameterTuningJobRequest> ) -> Result<Response<Operation>, Status>

Deletes a HyperparameterTuningJob.

source

pub async fn cancel_hyperparameter_tuning_job( &mut self, request: impl IntoRequest<CancelHyperparameterTuningJobRequest> ) -> Result<Response<()>, Status>

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.v1beta1.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.v1beta1.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.v1beta1.HyperparameterTuningJob.state] is set to CANCELLED.

source

pub async fn create_nas_job( &mut self, request: impl IntoRequest<CreateNasJobRequest> ) -> Result<Response<NasJob>, Status>

Creates a NasJob

source

pub async fn get_nas_job( &mut self, request: impl IntoRequest<GetNasJobRequest> ) -> Result<Response<NasJob>, Status>

Gets a NasJob

source

pub async fn list_nas_jobs( &mut self, request: impl IntoRequest<ListNasJobsRequest> ) -> Result<Response<ListNasJobsResponse>, Status>

Lists NasJobs in a Location.

source

pub async fn delete_nas_job( &mut self, request: impl IntoRequest<DeleteNasJobRequest> ) -> Result<Response<Operation>, Status>

Deletes a NasJob.

source

pub async fn cancel_nas_job( &mut self, request: impl IntoRequest<CancelNasJobRequest> ) -> Result<Response<()>, Status>

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.v1beta1.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.v1beta1.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.v1beta1.NasJob.state] is set to CANCELLED.

source

pub async fn get_nas_trial_detail( &mut self, request: impl IntoRequest<GetNasTrialDetailRequest> ) -> Result<Response<NasTrialDetail>, Status>

Gets a NasTrialDetail.

source

pub async fn list_nas_trial_details( &mut self, request: impl IntoRequest<ListNasTrialDetailsRequest> ) -> Result<Response<ListNasTrialDetailsResponse>, Status>

List top NasTrialDetails of a NasJob.

source

pub async fn create_batch_prediction_job( &mut self, request: impl IntoRequest<CreateBatchPredictionJobRequest> ) -> Result<Response<BatchPredictionJob>, Status>

Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.

source

pub async fn get_batch_prediction_job( &mut self, request: impl IntoRequest<GetBatchPredictionJobRequest> ) -> Result<Response<BatchPredictionJob>, Status>

Gets a BatchPredictionJob

source

pub async fn list_batch_prediction_jobs( &mut self, request: impl IntoRequest<ListBatchPredictionJobsRequest> ) -> Result<Response<ListBatchPredictionJobsResponse>, Status>

Lists BatchPredictionJobs in a Location.

source

pub async fn delete_batch_prediction_job( &mut self, request: impl IntoRequest<DeleteBatchPredictionJobRequest> ) -> Result<Response<Operation>, Status>

Deletes a BatchPredictionJob. Can only be called on jobs that already finished.

source

pub async fn cancel_batch_prediction_job( &mut self, request: impl IntoRequest<CancelBatchPredictionJobRequest> ) -> Result<Response<()>, Status>

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.v1beta1.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.v1beta1.BatchPredictionJob.state] is set to CANCELLED. Any files already outputted by the job are not deleted.

source

pub async fn create_model_deployment_monitoring_job( &mut self, request: impl IntoRequest<CreateModelDeploymentMonitoringJobRequest> ) -> Result<Response<ModelDeploymentMonitoringJob>, Status>

Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.

source

pub async fn search_model_deployment_monitoring_stats_anomalies( &mut self, request: impl IntoRequest<SearchModelDeploymentMonitoringStatsAnomaliesRequest> ) -> Result<Response<SearchModelDeploymentMonitoringStatsAnomaliesResponse>, Status>

Searches Model Monitoring Statistics generated within a given time window.

source

pub async fn get_model_deployment_monitoring_job( &mut self, request: impl IntoRequest<GetModelDeploymentMonitoringJobRequest> ) -> Result<Response<ModelDeploymentMonitoringJob>, Status>

Gets a ModelDeploymentMonitoringJob.

source

pub async fn list_model_deployment_monitoring_jobs( &mut self, request: impl IntoRequest<ListModelDeploymentMonitoringJobsRequest> ) -> Result<Response<ListModelDeploymentMonitoringJobsResponse>, Status>

Lists ModelDeploymentMonitoringJobs in a Location.

source

pub async fn update_model_deployment_monitoring_job( &mut self, request: impl IntoRequest<UpdateModelDeploymentMonitoringJobRequest> ) -> Result<Response<Operation>, Status>

Updates a ModelDeploymentMonitoringJob.

source

pub async fn delete_model_deployment_monitoring_job( &mut self, request: impl IntoRequest<DeleteModelDeploymentMonitoringJobRequest> ) -> Result<Response<Operation>, Status>

Deletes a ModelDeploymentMonitoringJob.

source

pub async fn pause_model_deployment_monitoring_job( &mut self, request: impl IntoRequest<PauseModelDeploymentMonitoringJobRequest> ) -> Result<Response<()>, Status>

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.v1beta1.ModelDeploymentMonitoringJob.state] to ‘PAUSED’.

source

pub async fn resume_model_deployment_monitoring_job( &mut self, request: impl IntoRequest<ResumeModelDeploymentMonitoringJobRequest> ) -> Result<Response<()>, Status>

Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can’t be resumed.

Trait Implementations§

source§

impl<T: Clone> Clone for JobServiceClient<T>

source§

fn clone(&self) -> JobServiceClient<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for JobServiceClient<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !Freeze for JobServiceClient<T>

§

impl<T> RefUnwindSafe for JobServiceClient<T>
where T: RefUnwindSafe,

§

impl<T> Send for JobServiceClient<T>
where T: Send,

§

impl<T> Sync for JobServiceClient<T>
where T: Sync,

§

impl<T> Unpin for JobServiceClient<T>
where T: Unpin,

§

impl<T> UnwindSafe for JobServiceClient<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more