pub struct DetectAnomalies { /* private fields */ }Expand description
Fluent builder constructing a request to DetectAnomalies.
Detects anomalies in an image that you supply.
The response from DetectAnomalies includes a boolean prediction that the image contains one or more anomalies and a confidence value for the prediction.
Before calling DetectAnomalies, you must first start your model with the StartModel operation. You are charged for the amount of time, in minutes, that a model runs and for the number of anomaly detection units that your model uses. If you are not using a model, use the StopModel operation to stop your model.
This operation requires permissions to perform the lookoutvision:DetectAnomalies operation.
Implementations
sourceimpl DetectAnomalies
impl DetectAnomalies
sourcepub async fn send(
self
) -> Result<DetectAnomaliesOutput, SdkError<DetectAnomaliesError>>
pub async fn send(
self
) -> Result<DetectAnomaliesOutput, SdkError<DetectAnomaliesError>>
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 project_name(self, input: impl Into<String>) -> Self
pub fn project_name(self, input: impl Into<String>) -> Self
The name of the project that contains the model version that you want to use.
sourcepub fn set_project_name(self, input: Option<String>) -> Self
pub fn set_project_name(self, input: Option<String>) -> Self
The name of the project that contains the model version that you want to use.
sourcepub fn model_version(self, input: impl Into<String>) -> Self
pub fn model_version(self, input: impl Into<String>) -> Self
The version of the model that you want to use.
sourcepub fn set_model_version(self, input: Option<String>) -> Self
pub fn set_model_version(self, input: Option<String>) -> Self
The version of the model that you want to use.
sourcepub fn body(self, input: ByteStream) -> Self
pub fn body(self, input: ByteStream) -> Self
The unencrypted image bytes that you want to analyze.
sourcepub fn set_body(self, input: Option<ByteStream>) -> Self
pub fn set_body(self, input: Option<ByteStream>) -> Self
The unencrypted image bytes that you want to analyze.
sourcepub fn content_type(self, input: impl Into<String>) -> Self
pub fn content_type(self, input: impl Into<String>) -> Self
The type of the image passed in Body. Valid values are image/png (PNG format images) and image/jpeg (JPG format images).
sourcepub fn set_content_type(self, input: Option<String>) -> Self
pub fn set_content_type(self, input: Option<String>) -> Self
The type of the image passed in Body. Valid values are image/png (PNG format images) and image/jpeg (JPG format images).
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for DetectAnomalies
impl Send for DetectAnomalies
impl Sync for DetectAnomalies
impl Unpin for DetectAnomalies
impl !UnwindSafe for DetectAnomalies
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more