#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ActionThreshold {
pub action_threshold_value: f64,
pub action_threshold_type: crate::types::ThresholdType,
}
impl ActionThreshold {
pub fn action_threshold_value(&self) -> f64 {
self.action_threshold_value
}
pub fn action_threshold_type(&self) -> &crate::types::ThresholdType {
&self.action_threshold_type
}
}
impl ActionThreshold {
pub fn builder() -> crate::types::builders::ActionThresholdBuilder {
crate::types::builders::ActionThresholdBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ActionThresholdBuilder {
pub(crate) action_threshold_value: ::std::option::Option<f64>,
pub(crate) action_threshold_type: ::std::option::Option<crate::types::ThresholdType>,
}
impl ActionThresholdBuilder {
pub fn action_threshold_value(mut self, input: f64) -> Self {
self.action_threshold_value = ::std::option::Option::Some(input);
self
}
pub fn set_action_threshold_value(mut self, input: ::std::option::Option<f64>) -> Self {
self.action_threshold_value = input;
self
}
pub fn get_action_threshold_value(&self) -> &::std::option::Option<f64> {
&self.action_threshold_value
}
pub fn action_threshold_type(mut self, input: crate::types::ThresholdType) -> Self {
self.action_threshold_type = ::std::option::Option::Some(input);
self
}
pub fn set_action_threshold_type(mut self, input: ::std::option::Option<crate::types::ThresholdType>) -> Self {
self.action_threshold_type = input;
self
}
pub fn get_action_threshold_type(&self) -> &::std::option::Option<crate::types::ThresholdType> {
&self.action_threshold_type
}
pub fn build(self) -> ::std::result::Result<crate::types::ActionThreshold, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::ActionThreshold {
action_threshold_value: self.action_threshold_value.unwrap_or_default(),
action_threshold_type: self.action_threshold_type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"action_threshold_type",
"action_threshold_type was not specified but it is required when building ActionThreshold",
)
})?,
})
}
}