pub struct PredictFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to Predict
.
Generates a prediction for the observation using the specified ML Model
.
Note: Not all response parameters will be populated. Whether a response parameter is populated depends on the type of model requested.
Implementations§
source§impl PredictFluentBuilder
impl PredictFluentBuilder
sourcepub fn as_input(&self) -> &PredictInputBuilder
pub fn as_input(&self) -> &PredictInputBuilder
Access the Predict as a reference.
sourcepub async fn send(
self
) -> Result<PredictOutput, SdkError<PredictError, HttpResponse>>
pub async fn send( self ) -> Result<PredictOutput, SdkError<PredictError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<PredictOutput, PredictError, Self>
pub fn customize( self ) -> CustomizableOperation<PredictOutput, PredictError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn ml_model_id(self, input: impl Into<String>) -> Self
pub fn ml_model_id(self, input: impl Into<String>) -> Self
A unique identifier of the MLModel
.
sourcepub fn set_ml_model_id(self, input: Option<String>) -> Self
pub fn set_ml_model_id(self, input: Option<String>) -> Self
A unique identifier of the MLModel
.
sourcepub fn get_ml_model_id(&self) -> &Option<String>
pub fn get_ml_model_id(&self) -> &Option<String>
A unique identifier of the MLModel
.
sourcepub fn record(self, k: impl Into<String>, v: impl Into<String>) -> Self
pub fn record(self, k: impl Into<String>, v: impl Into<String>) -> Self
Adds a key-value pair to Record
.
To override the contents of this collection use set_record
.
A map of variable name-value pairs that represent an observation.
sourcepub fn set_record(self, input: Option<HashMap<String, String>>) -> Self
pub fn set_record(self, input: Option<HashMap<String, String>>) -> Self
A map of variable name-value pairs that represent an observation.
sourcepub fn get_record(&self) -> &Option<HashMap<String, String>>
pub fn get_record(&self) -> &Option<HashMap<String, String>>
A map of variable name-value pairs that represent an observation.
pub fn predict_endpoint(self, input: impl Into<String>) -> Self
pub fn set_predict_endpoint(self, input: Option<String>) -> Self
pub fn get_predict_endpoint(&self) -> &Option<String>
Trait Implementations§
source§impl Clone for PredictFluentBuilder
impl Clone for PredictFluentBuilder
source§fn clone(&self) -> PredictFluentBuilder
fn clone(&self) -> PredictFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for PredictFluentBuilder
impl !RefUnwindSafe for PredictFluentBuilder
impl Send for PredictFluentBuilder
impl Sync for PredictFluentBuilder
impl Unpin for PredictFluentBuilder
impl !UnwindSafe for PredictFluentBuilder
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