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

AutoML Server API.

The resource names are assigned by the server. The server never reuses names that it has created after the resources with those names are deleted.

An ID of a resource is the last element of the item’s resource name. For projects/{project_id}/locations/{location_id}/datasets/{dataset_id}, then the id for the item is {dataset_id}.

Currently the only supported location_id is “us-central1”.

On any input that is documented to expect a string parameter in snake_case or kebab-case, either of those cases is accepted.

Implementations§

source§

impl<T> AutoMlClient<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 ) -> AutoMlClient<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_dataset( &mut self, request: impl IntoRequest<CreateDatasetRequest> ) -> Result<Response<Dataset>, Status>

Creates a dataset.

source

pub async fn get_dataset( &mut self, request: impl IntoRequest<GetDatasetRequest> ) -> Result<Response<Dataset>, Status>

Gets a dataset.

source

pub async fn list_datasets( &mut self, request: impl IntoRequest<ListDatasetsRequest> ) -> Result<Response<ListDatasetsResponse>, Status>

Lists datasets in a project.

source

pub async fn update_dataset( &mut self, request: impl IntoRequest<UpdateDatasetRequest> ) -> Result<Response<Dataset>, Status>

Updates a dataset.

source

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

Deletes a dataset and all of its contents. Returns empty response in the [response][google.longrunning.Operation.response] field when it completes, and delete_details in the [metadata][google.longrunning.Operation.metadata] field.

source

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

Imports data into a dataset. For Tables this method can only be called on an empty Dataset.

For Tables:

  • A [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] parameter must be explicitly set. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
source

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

Exports dataset’s data to the provided output location. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.

source

pub async fn get_annotation_spec( &mut self, request: impl IntoRequest<GetAnnotationSpecRequest> ) -> Result<Response<AnnotationSpec>, Status>

Gets an annotation spec.

source

pub async fn get_table_spec( &mut self, request: impl IntoRequest<GetTableSpecRequest> ) -> Result<Response<TableSpec>, Status>

Gets a table spec.

source

pub async fn list_table_specs( &mut self, request: impl IntoRequest<ListTableSpecsRequest> ) -> Result<Response<ListTableSpecsResponse>, Status>

Lists table specs in a dataset.

source

pub async fn update_table_spec( &mut self, request: impl IntoRequest<UpdateTableSpecRequest> ) -> Result<Response<TableSpec>, Status>

Updates a table spec.

source

pub async fn get_column_spec( &mut self, request: impl IntoRequest<GetColumnSpecRequest> ) -> Result<Response<ColumnSpec>, Status>

Gets a column spec.

source

pub async fn list_column_specs( &mut self, request: impl IntoRequest<ListColumnSpecsRequest> ) -> Result<Response<ListColumnSpecsResponse>, Status>

Lists column specs in a table spec.

source

pub async fn update_column_spec( &mut self, request: impl IntoRequest<UpdateColumnSpecRequest> ) -> Result<Response<ColumnSpec>, Status>

Updates a column spec.

source

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

Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.

source

pub async fn get_model( &mut self, request: impl IntoRequest<GetModelRequest> ) -> Result<Response<Model>, Status>

Gets a model.

source

pub async fn list_models( &mut self, request: impl IntoRequest<ListModelsRequest> ) -> Result<Response<ListModelsResponse>, Status>

Lists models.

source

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

Deletes a model. Returns google.protobuf.Empty in the [response][google.longrunning.Operation.response] field when it completes, and delete_details in the [metadata][google.longrunning.Operation.metadata] field.

source

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

Deploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing

[node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) will reset the deployment state without pausing the model’s availability.

Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.

Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.

source

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

Undeploys a model. If the model is not deployed this method has no effect.

Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.

Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.

source

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

Exports a trained, “export-able”, model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in

[ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig].

Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.

source

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

Exports examples on which the model was evaluated (i.e. which were in the TEST set of the dataset the model was created from), together with their ground truth annotations and the annotations created (predicted) by the model. The examples, ground truth and predictions are exported in the state they were at the moment the model was evaluated.

This export is available only for 30 days since the model evaluation is created.

Currently only available for Tables.

Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.

source

pub async fn get_model_evaluation( &mut self, request: impl IntoRequest<GetModelEvaluationRequest> ) -> Result<Response<ModelEvaluation>, Status>

Gets a model evaluation.

source

pub async fn list_model_evaluations( &mut self, request: impl IntoRequest<ListModelEvaluationsRequest> ) -> Result<Response<ListModelEvaluationsResponse>, Status>

Lists model evaluations.

Trait Implementations§

source§

impl<T: Clone> Clone for AutoMlClient<T>

source§

fn clone(&self) -> AutoMlClient<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 AutoMlClient<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 AutoMlClient<T>

§

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

§

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

§

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

§

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

§

impl<T> UnwindSafe for AutoMlClient<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