1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The sort category for the version replicated bots.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BotVersionReplicaSortBy {
    /// <p>The attribute of the sort category for the version replicated bots.</p>
    pub attribute: crate::types::BotVersionReplicaSortAttribute,
    /// <p>The order of the sort category for the version replicated bots.</p>
    pub order: crate::types::SortOrder,
}
impl BotVersionReplicaSortBy {
    /// <p>The attribute of the sort category for the version replicated bots.</p>
    pub fn attribute(&self) -> &crate::types::BotVersionReplicaSortAttribute {
        &self.attribute
    }
    /// <p>The order of the sort category for the version replicated bots.</p>
    pub fn order(&self) -> &crate::types::SortOrder {
        &self.order
    }
}
impl BotVersionReplicaSortBy {
    /// Creates a new builder-style object to manufacture [`BotVersionReplicaSortBy`](crate::types::BotVersionReplicaSortBy).
    pub fn builder() -> crate::types::builders::BotVersionReplicaSortByBuilder {
        crate::types::builders::BotVersionReplicaSortByBuilder::default()
    }
}

/// A builder for [`BotVersionReplicaSortBy`](crate::types::BotVersionReplicaSortBy).
#[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 {
    /// <p>The attribute of the sort category for the version replicated bots.</p>
    /// This field is required.
    pub fn attribute(mut self, input: crate::types::BotVersionReplicaSortAttribute) -> Self {
        self.attribute = ::std::option::Option::Some(input);
        self
    }
    /// <p>The attribute of the sort category for the version replicated bots.</p>
    pub fn set_attribute(mut self, input: ::std::option::Option<crate::types::BotVersionReplicaSortAttribute>) -> Self {
        self.attribute = input;
        self
    }
    /// <p>The attribute of the sort category for the version replicated bots.</p>
    pub fn get_attribute(&self) -> &::std::option::Option<crate::types::BotVersionReplicaSortAttribute> {
        &self.attribute
    }
    /// <p>The order of the sort category for the version replicated bots.</p>
    /// This field is required.
    pub fn order(mut self, input: crate::types::SortOrder) -> Self {
        self.order = ::std::option::Option::Some(input);
        self
    }
    /// <p>The order of the sort category for the version replicated bots.</p>
    pub fn set_order(mut self, input: ::std::option::Option<crate::types::SortOrder>) -> Self {
        self.order = input;
        self
    }
    /// <p>The order of the sort category for the version replicated bots.</p>
    pub fn get_order(&self) -> &::std::option::Option<crate::types::SortOrder> {
        &self.order
    }
    /// Consumes the builder and constructs a [`BotVersionReplicaSortBy`](crate::types::BotVersionReplicaSortBy).
    /// This method will fail if any of the following fields are not set:
    /// - [`attribute`](crate::types::builders::BotVersionReplicaSortByBuilder::attribute)
    /// - [`order`](crate::types::builders::BotVersionReplicaSortByBuilder::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",
                )
            })?,
        })
    }
}