Struct google_api_proto::google::cloud::automl::v1beta1::auto_ml_client::AutoMlClient
source · 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,
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,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
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,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
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.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn create_dataset(
&mut self,
request: impl IntoRequest<CreateDatasetRequest>,
) -> Result<Response<Dataset>, Status>
pub async fn create_dataset( &mut self, request: impl IntoRequest<CreateDatasetRequest>, ) -> Result<Response<Dataset>, Status>
Creates a dataset.
sourcepub async fn get_dataset(
&mut self,
request: impl IntoRequest<GetDatasetRequest>,
) -> Result<Response<Dataset>, Status>
pub async fn get_dataset( &mut self, request: impl IntoRequest<GetDatasetRequest>, ) -> Result<Response<Dataset>, Status>
Gets a dataset.
sourcepub async fn list_datasets(
&mut self,
request: impl IntoRequest<ListDatasetsRequest>,
) -> Result<Response<ListDatasetsResponse>, Status>
pub async fn list_datasets( &mut self, request: impl IntoRequest<ListDatasetsRequest>, ) -> Result<Response<ListDatasetsResponse>, Status>
Lists datasets in a project.
sourcepub async fn update_dataset(
&mut self,
request: impl IntoRequest<UpdateDatasetRequest>,
) -> Result<Response<Dataset>, Status>
pub async fn update_dataset( &mut self, request: impl IntoRequest<UpdateDatasetRequest>, ) -> Result<Response<Dataset>, Status>
Updates a dataset.
sourcepub async fn delete_dataset(
&mut self,
request: impl IntoRequest<DeleteDatasetRequest>,
) -> Result<Response<Operation>, Status>
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.
sourcepub async fn import_data(
&mut self,
request: impl IntoRequest<ImportDataRequest>,
) -> Result<Response<Operation>, Status>
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.
sourcepub async fn export_data(
&mut self,
request: impl IntoRequest<ExportDataRequest>,
) -> Result<Response<Operation>, Status>
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.
sourcepub async fn get_annotation_spec(
&mut self,
request: impl IntoRequest<GetAnnotationSpecRequest>,
) -> Result<Response<AnnotationSpec>, Status>
pub async fn get_annotation_spec( &mut self, request: impl IntoRequest<GetAnnotationSpecRequest>, ) -> Result<Response<AnnotationSpec>, Status>
Gets an annotation spec.
sourcepub async fn get_table_spec(
&mut self,
request: impl IntoRequest<GetTableSpecRequest>,
) -> Result<Response<TableSpec>, Status>
pub async fn get_table_spec( &mut self, request: impl IntoRequest<GetTableSpecRequest>, ) -> Result<Response<TableSpec>, Status>
Gets a table spec.
sourcepub async fn list_table_specs(
&mut self,
request: impl IntoRequest<ListTableSpecsRequest>,
) -> Result<Response<ListTableSpecsResponse>, Status>
pub async fn list_table_specs( &mut self, request: impl IntoRequest<ListTableSpecsRequest>, ) -> Result<Response<ListTableSpecsResponse>, Status>
Lists table specs in a dataset.
sourcepub async fn update_table_spec(
&mut self,
request: impl IntoRequest<UpdateTableSpecRequest>,
) -> Result<Response<TableSpec>, Status>
pub async fn update_table_spec( &mut self, request: impl IntoRequest<UpdateTableSpecRequest>, ) -> Result<Response<TableSpec>, Status>
Updates a table spec.
sourcepub async fn get_column_spec(
&mut self,
request: impl IntoRequest<GetColumnSpecRequest>,
) -> Result<Response<ColumnSpec>, Status>
pub async fn get_column_spec( &mut self, request: impl IntoRequest<GetColumnSpecRequest>, ) -> Result<Response<ColumnSpec>, Status>
Gets a column spec.
sourcepub async fn list_column_specs(
&mut self,
request: impl IntoRequest<ListColumnSpecsRequest>,
) -> Result<Response<ListColumnSpecsResponse>, Status>
pub async fn list_column_specs( &mut self, request: impl IntoRequest<ListColumnSpecsRequest>, ) -> Result<Response<ListColumnSpecsResponse>, Status>
Lists column specs in a table spec.
sourcepub async fn update_column_spec(
&mut self,
request: impl IntoRequest<UpdateColumnSpecRequest>,
) -> Result<Response<ColumnSpec>, Status>
pub async fn update_column_spec( &mut self, request: impl IntoRequest<UpdateColumnSpecRequest>, ) -> Result<Response<ColumnSpec>, Status>
Updates a column spec.
sourcepub async fn create_model(
&mut self,
request: impl IntoRequest<CreateModelRequest>,
) -> Result<Response<Operation>, Status>
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.
sourcepub async fn get_model(
&mut self,
request: impl IntoRequest<GetModelRequest>,
) -> Result<Response<Model>, Status>
pub async fn get_model( &mut self, request: impl IntoRequest<GetModelRequest>, ) -> Result<Response<Model>, Status>
Gets a model.
sourcepub async fn list_models(
&mut self,
request: impl IntoRequest<ListModelsRequest>,
) -> Result<Response<ListModelsResponse>, Status>
pub async fn list_models( &mut self, request: impl IntoRequest<ListModelsRequest>, ) -> Result<Response<ListModelsResponse>, Status>
Lists models.
sourcepub async fn delete_model(
&mut self,
request: impl IntoRequest<DeleteModelRequest>,
) -> Result<Response<Operation>, Status>
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.
sourcepub async fn deploy_model(
&mut self,
request: impl IntoRequest<DeployModelRequest>,
) -> Result<Response<Operation>, Status>
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.
sourcepub async fn undeploy_model(
&mut self,
request: impl IntoRequest<UndeployModelRequest>,
) -> Result<Response<Operation>, Status>
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.
sourcepub async fn export_model(
&mut self,
request: impl IntoRequest<ExportModelRequest>,
) -> Result<Response<Operation>, Status>
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.
sourcepub async fn export_evaluated_examples(
&mut self,
request: impl IntoRequest<ExportEvaluatedExamplesRequest>,
) -> Result<Response<Operation>, Status>
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.
sourcepub async fn get_model_evaluation(
&mut self,
request: impl IntoRequest<GetModelEvaluationRequest>,
) -> Result<Response<ModelEvaluation>, Status>
pub async fn get_model_evaluation( &mut self, request: impl IntoRequest<GetModelEvaluationRequest>, ) -> Result<Response<ModelEvaluation>, Status>
Gets a model evaluation.
sourcepub async fn list_model_evaluations(
&mut self,
request: impl IntoRequest<ListModelEvaluationsRequest>,
) -> Result<Response<ListModelEvaluationsResponse>, Status>
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>
impl<T: Clone> Clone for AutoMlClient<T>
source§fn clone(&self) -> AutoMlClient<T>
fn clone(&self) -> AutoMlClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto 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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request