aws_sdk_lexmodelsv2/types/
_bot_version_replica_sort_by.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct BotVersionReplicaSortBy {
7 pub attribute: crate::types::BotVersionReplicaSortAttribute,
9 pub order: crate::types::SortOrder,
11}
12impl BotVersionReplicaSortBy {
13 pub fn attribute(&self) -> &crate::types::BotVersionReplicaSortAttribute {
15 &self.attribute
16 }
17 pub fn order(&self) -> &crate::types::SortOrder {
19 &self.order
20 }
21}
22impl BotVersionReplicaSortBy {
23 pub fn builder() -> crate::types::builders::BotVersionReplicaSortByBuilder {
25 crate::types::builders::BotVersionReplicaSortByBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct BotVersionReplicaSortByBuilder {
33 pub(crate) attribute: ::std::option::Option<crate::types::BotVersionReplicaSortAttribute>,
34 pub(crate) order: ::std::option::Option<crate::types::SortOrder>,
35}
36impl BotVersionReplicaSortByBuilder {
37 pub fn attribute(mut self, input: crate::types::BotVersionReplicaSortAttribute) -> Self {
40 self.attribute = ::std::option::Option::Some(input);
41 self
42 }
43 pub fn set_attribute(mut self, input: ::std::option::Option<crate::types::BotVersionReplicaSortAttribute>) -> Self {
45 self.attribute = input;
46 self
47 }
48 pub fn get_attribute(&self) -> &::std::option::Option<crate::types::BotVersionReplicaSortAttribute> {
50 &self.attribute
51 }
52 pub fn order(mut self, input: crate::types::SortOrder) -> Self {
55 self.order = ::std::option::Option::Some(input);
56 self
57 }
58 pub fn set_order(mut self, input: ::std::option::Option<crate::types::SortOrder>) -> Self {
60 self.order = input;
61 self
62 }
63 pub fn get_order(&self) -> &::std::option::Option<crate::types::SortOrder> {
65 &self.order
66 }
67 pub fn build(self) -> ::std::result::Result<crate::types::BotVersionReplicaSortBy, ::aws_smithy_types::error::operation::BuildError> {
72 ::std::result::Result::Ok(crate::types::BotVersionReplicaSortBy {
73 attribute: self.attribute.ok_or_else(|| {
74 ::aws_smithy_types::error::operation::BuildError::missing_field(
75 "attribute",
76 "attribute was not specified but it is required when building BotVersionReplicaSortBy",
77 )
78 })?,
79 order: self.order.ok_or_else(|| {
80 ::aws_smithy_types::error::operation::BuildError::missing_field(
81 "order",
82 "order was not specified but it is required when building BotVersionReplicaSortBy",
83 )
84 })?,
85 })
86 }
87}