#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TypedAttributeValueRange {
pub start_mode: crate::types::RangeMode,
pub start_value: ::std::option::Option<crate::types::TypedAttributeValue>,
pub end_mode: crate::types::RangeMode,
pub end_value: ::std::option::Option<crate::types::TypedAttributeValue>,
}
impl TypedAttributeValueRange {
pub fn start_mode(&self) -> &crate::types::RangeMode {
&self.start_mode
}
pub fn start_value(&self) -> ::std::option::Option<&crate::types::TypedAttributeValue> {
self.start_value.as_ref()
}
pub fn end_mode(&self) -> &crate::types::RangeMode {
&self.end_mode
}
pub fn end_value(&self) -> ::std::option::Option<&crate::types::TypedAttributeValue> {
self.end_value.as_ref()
}
}
impl TypedAttributeValueRange {
pub fn builder() -> crate::types::builders::TypedAttributeValueRangeBuilder {
crate::types::builders::TypedAttributeValueRangeBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct TypedAttributeValueRangeBuilder {
pub(crate) start_mode: ::std::option::Option<crate::types::RangeMode>,
pub(crate) start_value: ::std::option::Option<crate::types::TypedAttributeValue>,
pub(crate) end_mode: ::std::option::Option<crate::types::RangeMode>,
pub(crate) end_value: ::std::option::Option<crate::types::TypedAttributeValue>,
}
impl TypedAttributeValueRangeBuilder {
pub fn start_mode(mut self, input: crate::types::RangeMode) -> Self {
self.start_mode = ::std::option::Option::Some(input);
self
}
pub fn set_start_mode(mut self, input: ::std::option::Option<crate::types::RangeMode>) -> Self {
self.start_mode = input;
self
}
pub fn get_start_mode(&self) -> &::std::option::Option<crate::types::RangeMode> {
&self.start_mode
}
pub fn start_value(mut self, input: crate::types::TypedAttributeValue) -> Self {
self.start_value = ::std::option::Option::Some(input);
self
}
pub fn set_start_value(mut self, input: ::std::option::Option<crate::types::TypedAttributeValue>) -> Self {
self.start_value = input;
self
}
pub fn get_start_value(&self) -> &::std::option::Option<crate::types::TypedAttributeValue> {
&self.start_value
}
pub fn end_mode(mut self, input: crate::types::RangeMode) -> Self {
self.end_mode = ::std::option::Option::Some(input);
self
}
pub fn set_end_mode(mut self, input: ::std::option::Option<crate::types::RangeMode>) -> Self {
self.end_mode = input;
self
}
pub fn get_end_mode(&self) -> &::std::option::Option<crate::types::RangeMode> {
&self.end_mode
}
pub fn end_value(mut self, input: crate::types::TypedAttributeValue) -> Self {
self.end_value = ::std::option::Option::Some(input);
self
}
pub fn set_end_value(mut self, input: ::std::option::Option<crate::types::TypedAttributeValue>) -> Self {
self.end_value = input;
self
}
pub fn get_end_value(&self) -> &::std::option::Option<crate::types::TypedAttributeValue> {
&self.end_value
}
pub fn build(self) -> ::std::result::Result<crate::types::TypedAttributeValueRange, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::TypedAttributeValueRange {
start_mode: self.start_mode.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"start_mode",
"start_mode was not specified but it is required when building TypedAttributeValueRange",
)
})?,
start_value: self.start_value,
end_mode: self.end_mode.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"end_mode",
"end_mode was not specified but it is required when building TypedAttributeValueRange",
)
})?,
end_value: self.end_value,
})
}
}