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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The sort configuration of a sankey diagram.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SankeyDiagramSortConfiguration {
    /// <p>The sort configuration of the weight fields.</p>
    pub weight_sort: ::std::option::Option<::std::vec::Vec<crate::types::FieldSortOptions>>,
    /// <p>The limit on the number of source nodes that are displayed in a sankey diagram.</p>
    pub source_items_limit: ::std::option::Option<crate::types::ItemsLimitConfiguration>,
    /// <p>The limit on the number of destination nodes that are displayed in a sankey diagram.</p>
    pub destination_items_limit: ::std::option::Option<crate::types::ItemsLimitConfiguration>,
}
impl SankeyDiagramSortConfiguration {
    /// <p>The sort configuration of the weight fields.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.weight_sort.is_none()`.
    pub fn weight_sort(&self) -> &[crate::types::FieldSortOptions] {
        self.weight_sort.as_deref().unwrap_or_default()
    }
    /// <p>The limit on the number of source nodes that are displayed in a sankey diagram.</p>
    pub fn source_items_limit(&self) -> ::std::option::Option<&crate::types::ItemsLimitConfiguration> {
        self.source_items_limit.as_ref()
    }
    /// <p>The limit on the number of destination nodes that are displayed in a sankey diagram.</p>
    pub fn destination_items_limit(&self) -> ::std::option::Option<&crate::types::ItemsLimitConfiguration> {
        self.destination_items_limit.as_ref()
    }
}
impl SankeyDiagramSortConfiguration {
    /// Creates a new builder-style object to manufacture [`SankeyDiagramSortConfiguration`](crate::types::SankeyDiagramSortConfiguration).
    pub fn builder() -> crate::types::builders::SankeyDiagramSortConfigurationBuilder {
        crate::types::builders::SankeyDiagramSortConfigurationBuilder::default()
    }
}

/// A builder for [`SankeyDiagramSortConfiguration`](crate::types::SankeyDiagramSortConfiguration).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SankeyDiagramSortConfigurationBuilder {
    pub(crate) weight_sort: ::std::option::Option<::std::vec::Vec<crate::types::FieldSortOptions>>,
    pub(crate) source_items_limit: ::std::option::Option<crate::types::ItemsLimitConfiguration>,
    pub(crate) destination_items_limit: ::std::option::Option<crate::types::ItemsLimitConfiguration>,
}
impl SankeyDiagramSortConfigurationBuilder {
    /// Appends an item to `weight_sort`.
    ///
    /// To override the contents of this collection use [`set_weight_sort`](Self::set_weight_sort).
    ///
    /// <p>The sort configuration of the weight fields.</p>
    pub fn weight_sort(mut self, input: crate::types::FieldSortOptions) -> Self {
        let mut v = self.weight_sort.unwrap_or_default();
        v.push(input);
        self.weight_sort = ::std::option::Option::Some(v);
        self
    }
    /// <p>The sort configuration of the weight fields.</p>
    pub fn set_weight_sort(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FieldSortOptions>>) -> Self {
        self.weight_sort = input;
        self
    }
    /// <p>The sort configuration of the weight fields.</p>
    pub fn get_weight_sort(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FieldSortOptions>> {
        &self.weight_sort
    }
    /// <p>The limit on the number of source nodes that are displayed in a sankey diagram.</p>
    pub fn source_items_limit(mut self, input: crate::types::ItemsLimitConfiguration) -> Self {
        self.source_items_limit = ::std::option::Option::Some(input);
        self
    }
    /// <p>The limit on the number of source nodes that are displayed in a sankey diagram.</p>
    pub fn set_source_items_limit(mut self, input: ::std::option::Option<crate::types::ItemsLimitConfiguration>) -> Self {
        self.source_items_limit = input;
        self
    }
    /// <p>The limit on the number of source nodes that are displayed in a sankey diagram.</p>
    pub fn get_source_items_limit(&self) -> &::std::option::Option<crate::types::ItemsLimitConfiguration> {
        &self.source_items_limit
    }
    /// <p>The limit on the number of destination nodes that are displayed in a sankey diagram.</p>
    pub fn destination_items_limit(mut self, input: crate::types::ItemsLimitConfiguration) -> Self {
        self.destination_items_limit = ::std::option::Option::Some(input);
        self
    }
    /// <p>The limit on the number of destination nodes that are displayed in a sankey diagram.</p>
    pub fn set_destination_items_limit(mut self, input: ::std::option::Option<crate::types::ItemsLimitConfiguration>) -> Self {
        self.destination_items_limit = input;
        self
    }
    /// <p>The limit on the number of destination nodes that are displayed in a sankey diagram.</p>
    pub fn get_destination_items_limit(&self) -> &::std::option::Option<crate::types::ItemsLimitConfiguration> {
        &self.destination_items_limit
    }
    /// Consumes the builder and constructs a [`SankeyDiagramSortConfiguration`](crate::types::SankeyDiagramSortConfiguration).
    pub fn build(self) -> crate::types::SankeyDiagramSortConfiguration {
        crate::types::SankeyDiagramSortConfiguration {
            weight_sort: self.weight_sort,
            source_items_limit: self.source_items_limit,
            destination_items_limit: self.destination_items_limit,
        }
    }
}