#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BotVersionReplicaSortBy {
pub attribute: crate::types::BotVersionReplicaSortAttribute,
pub order: crate::types::SortOrder,
}
impl BotVersionReplicaSortBy {
pub fn attribute(&self) -> &crate::types::BotVersionReplicaSortAttribute {
&self.attribute
}
pub fn order(&self) -> &crate::types::SortOrder {
&self.order
}
}
impl BotVersionReplicaSortBy {
pub fn builder() -> crate::types::builders::BotVersionReplicaSortByBuilder {
crate::types::builders::BotVersionReplicaSortByBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct BotVersionReplicaSortByBuilder {
pub(crate) attribute: ::std::option::Option<crate::types::BotVersionReplicaSortAttribute>,
pub(crate) order: ::std::option::Option<crate::types::SortOrder>,
}
impl BotVersionReplicaSortByBuilder {
pub fn attribute(mut self, input: crate::types::BotVersionReplicaSortAttribute) -> Self {
self.attribute = ::std::option::Option::Some(input);
self
}
pub fn set_attribute(mut self, input: ::std::option::Option<crate::types::BotVersionReplicaSortAttribute>) -> Self {
self.attribute = input;
self
}
pub fn get_attribute(&self) -> &::std::option::Option<crate::types::BotVersionReplicaSortAttribute> {
&self.attribute
}
pub fn order(mut self, input: crate::types::SortOrder) -> Self {
self.order = ::std::option::Option::Some(input);
self
}
pub fn set_order(mut self, input: ::std::option::Option<crate::types::SortOrder>) -> Self {
self.order = input;
self
}
pub fn get_order(&self) -> &::std::option::Option<crate::types::SortOrder> {
&self.order
}
pub fn build(self) -> ::std::result::Result<crate::types::BotVersionReplicaSortBy, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::BotVersionReplicaSortBy {
attribute: self.attribute.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"attribute",
"attribute was not specified but it is required when building BotVersionReplicaSortBy",
)
})?,
order: self.order.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"order",
"order was not specified but it is required when building BotVersionReplicaSortBy",
)
})?,
})
}
}