pub struct TrainedmodelMethods<'a, C>where
C: 'a,{ /* private fields */ }
Expand description
A builder providing access to all methods supported on trainedmodel resources.
It is not used directly, but through the Prediction
hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_prediction1d6 as prediction1d6;
use prediction1d6::{Prediction, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http1()
.build()
);
let mut hub = Prediction::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `analyze(...)`, `delete(...)`, `get(...)`, `insert(...)`, `list(...)`, `predict(...)` and `update(...)`
// to build up your call.
let rb = hub.trainedmodels();
Implementations§
Source§impl<'a, C> TrainedmodelMethods<'a, C>
impl<'a, C> TrainedmodelMethods<'a, C>
Sourcepub fn analyze(&self, project: &str, id: &str) -> TrainedmodelAnalyzeCall<'a, C>
pub fn analyze(&self, project: &str, id: &str) -> TrainedmodelAnalyzeCall<'a, C>
Create a builder to help you perform the following task:
Get analysis of the model and the data the model was trained on.
§Arguments
project
- The project associated with the model.id
- The unique name for the predictive model.
Sourcepub fn delete(&self, project: &str, id: &str) -> TrainedmodelDeleteCall<'a, C>
pub fn delete(&self, project: &str, id: &str) -> TrainedmodelDeleteCall<'a, C>
Create a builder to help you perform the following task:
Delete a trained model.
§Arguments
project
- The project associated with the model.id
- The unique name for the predictive model.
Sourcepub fn get(&self, project: &str, id: &str) -> TrainedmodelGetCall<'a, C>
pub fn get(&self, project: &str, id: &str) -> TrainedmodelGetCall<'a, C>
Create a builder to help you perform the following task:
Check training status of your model.
§Arguments
project
- The project associated with the model.id
- The unique name for the predictive model.
Sourcepub fn insert(
&self,
request: Insert,
project: &str,
) -> TrainedmodelInsertCall<'a, C>
pub fn insert( &self, request: Insert, project: &str, ) -> TrainedmodelInsertCall<'a, C>
Create a builder to help you perform the following task:
Train a Prediction API model.
§Arguments
request
- No description provided.project
- The project associated with the model.
Sourcepub fn list(&self, project: &str) -> TrainedmodelListCall<'a, C>
pub fn list(&self, project: &str) -> TrainedmodelListCall<'a, C>
Create a builder to help you perform the following task:
List available models.
§Arguments
project
- The project associated with the model.
Sourcepub fn predict(
&self,
request: Input,
project: &str,
id: &str,
) -> TrainedmodelPredictCall<'a, C>
pub fn predict( &self, request: Input, project: &str, id: &str, ) -> TrainedmodelPredictCall<'a, C>
Create a builder to help you perform the following task:
Submit model id and request a prediction.
§Arguments
request
- No description provided.project
- The project associated with the model.id
- The unique name for the predictive model.
Sourcepub fn update(
&self,
request: Update,
project: &str,
id: &str,
) -> TrainedmodelUpdateCall<'a, C>
pub fn update( &self, request: Update, project: &str, id: &str, ) -> TrainedmodelUpdateCall<'a, C>
Create a builder to help you perform the following task:
Add new data to a trained model.
§Arguments
request
- No description provided.project
- The project associated with the model.id
- The unique name for the predictive model.
Trait Implementations§
impl<'a, C> MethodsBuilder for TrainedmodelMethods<'a, C>
Auto Trait Implementations§
impl<'a, C> Freeze for TrainedmodelMethods<'a, C>
impl<'a, C> !RefUnwindSafe for TrainedmodelMethods<'a, C>
impl<'a, C> Send for TrainedmodelMethods<'a, C>where
C: Sync,
impl<'a, C> Sync for TrainedmodelMethods<'a, C>where
C: Sync,
impl<'a, C> Unpin for TrainedmodelMethods<'a, C>
impl<'a, C> !UnwindSafe for TrainedmodelMethods<'a, C>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more