#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PredictInput {
#[doc(hidden)]
pub ml_model_id: ::std::option::Option<::std::string::String>,
#[doc(hidden)]
pub record: ::std::option::Option<
::std::collections::HashMap<::std::string::String, ::std::string::String>,
>,
#[allow(missing_docs)] #[doc(hidden)]
pub predict_endpoint: ::std::option::Option<::std::string::String>,
}
impl PredictInput {
pub fn ml_model_id(&self) -> ::std::option::Option<&str> {
self.ml_model_id.as_deref()
}
pub fn record(
&self,
) -> ::std::option::Option<
&::std::collections::HashMap<::std::string::String, ::std::string::String>,
> {
self.record.as_ref()
}
#[allow(missing_docs)] pub fn predict_endpoint(&self) -> ::std::option::Option<&str> {
self.predict_endpoint.as_deref()
}
}
impl PredictInput {
pub fn builder() -> crate::operation::predict::builders::PredictInputBuilder {
crate::operation::predict::builders::PredictInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(
::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug,
)]
pub struct PredictInputBuilder {
pub(crate) ml_model_id: ::std::option::Option<::std::string::String>,
pub(crate) record: ::std::option::Option<
::std::collections::HashMap<::std::string::String, ::std::string::String>,
>,
pub(crate) predict_endpoint: ::std::option::Option<::std::string::String>,
}
impl PredictInputBuilder {
pub fn ml_model_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ml_model_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_ml_model_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ml_model_id = input;
self
}
pub fn record(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.record.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.record = ::std::option::Option::Some(hash_map);
self
}
pub fn set_record(
mut self,
input: ::std::option::Option<
::std::collections::HashMap<::std::string::String, ::std::string::String>,
>,
) -> Self {
self.record = input;
self
}
#[allow(missing_docs)] pub fn predict_endpoint(
mut self,
input: impl ::std::convert::Into<::std::string::String>,
) -> Self {
self.predict_endpoint = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_predict_endpoint(
mut self,
input: ::std::option::Option<::std::string::String>,
) -> Self {
self.predict_endpoint = input;
self
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::predict::PredictInput,
::aws_smithy_http::operation::error::BuildError,
> {
::std::result::Result::Ok(crate::operation::predict::PredictInput {
ml_model_id: self.ml_model_id,
record: self.record,
predict_endpoint: self.predict_endpoint,
})
}
}