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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The subtotal options.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SubtotalOptions {
    /// <p>The visibility configuration for the subtotal cells.</p>
    pub totals_visibility: ::std::option::Option<crate::types::Visibility>,
    /// <p>The custom label string for the subtotal cells.</p>
    pub custom_label: ::std::option::Option<::std::string::String>,
    /// <p>The field level (all, custom, last) for the subtotal cells.</p>
    pub field_level: ::std::option::Option<crate::types::PivotTableSubtotalLevel>,
    /// <p>The optional configuration of subtotal cells.</p>
    pub field_level_options: ::std::option::Option<::std::vec::Vec<crate::types::PivotTableFieldSubtotalOptions>>,
    /// <p>The cell styling options for the subtotal cells.</p>
    pub total_cell_style: ::std::option::Option<crate::types::TableCellStyle>,
    /// <p>The cell styling options for the subtotals of value cells.</p>
    pub value_cell_style: ::std::option::Option<crate::types::TableCellStyle>,
    /// <p>The cell styling options for the subtotals of header cells.</p>
    pub metric_header_cell_style: ::std::option::Option<crate::types::TableCellStyle>,
    /// <p>The style targets options for subtotals.</p>
    pub style_targets: ::std::option::Option<::std::vec::Vec<crate::types::TableStyleTarget>>,
}
impl SubtotalOptions {
    /// <p>The visibility configuration for the subtotal cells.</p>
    pub fn totals_visibility(&self) -> ::std::option::Option<&crate::types::Visibility> {
        self.totals_visibility.as_ref()
    }
    /// <p>The custom label string for the subtotal cells.</p>
    pub fn custom_label(&self) -> ::std::option::Option<&str> {
        self.custom_label.as_deref()
    }
    /// <p>The field level (all, custom, last) for the subtotal cells.</p>
    pub fn field_level(&self) -> ::std::option::Option<&crate::types::PivotTableSubtotalLevel> {
        self.field_level.as_ref()
    }
    /// <p>The optional configuration of subtotal cells.</p>
    pub fn field_level_options(&self) -> ::std::option::Option<&[crate::types::PivotTableFieldSubtotalOptions]> {
        self.field_level_options.as_deref()
    }
    /// <p>The cell styling options for the subtotal cells.</p>
    pub fn total_cell_style(&self) -> ::std::option::Option<&crate::types::TableCellStyle> {
        self.total_cell_style.as_ref()
    }
    /// <p>The cell styling options for the subtotals of value cells.</p>
    pub fn value_cell_style(&self) -> ::std::option::Option<&crate::types::TableCellStyle> {
        self.value_cell_style.as_ref()
    }
    /// <p>The cell styling options for the subtotals of header cells.</p>
    pub fn metric_header_cell_style(&self) -> ::std::option::Option<&crate::types::TableCellStyle> {
        self.metric_header_cell_style.as_ref()
    }
    /// <p>The style targets options for subtotals.</p>
    pub fn style_targets(&self) -> ::std::option::Option<&[crate::types::TableStyleTarget]> {
        self.style_targets.as_deref()
    }
}
impl SubtotalOptions {
    /// Creates a new builder-style object to manufacture [`SubtotalOptions`](crate::types::SubtotalOptions).
    pub fn builder() -> crate::types::builders::SubtotalOptionsBuilder {
        crate::types::builders::SubtotalOptionsBuilder::default()
    }
}

/// A builder for [`SubtotalOptions`](crate::types::SubtotalOptions).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SubtotalOptionsBuilder {
    pub(crate) totals_visibility: ::std::option::Option<crate::types::Visibility>,
    pub(crate) custom_label: ::std::option::Option<::std::string::String>,
    pub(crate) field_level: ::std::option::Option<crate::types::PivotTableSubtotalLevel>,
    pub(crate) field_level_options: ::std::option::Option<::std::vec::Vec<crate::types::PivotTableFieldSubtotalOptions>>,
    pub(crate) total_cell_style: ::std::option::Option<crate::types::TableCellStyle>,
    pub(crate) value_cell_style: ::std::option::Option<crate::types::TableCellStyle>,
    pub(crate) metric_header_cell_style: ::std::option::Option<crate::types::TableCellStyle>,
    pub(crate) style_targets: ::std::option::Option<::std::vec::Vec<crate::types::TableStyleTarget>>,
}
impl SubtotalOptionsBuilder {
    /// <p>The visibility configuration for the subtotal cells.</p>
    pub fn totals_visibility(mut self, input: crate::types::Visibility) -> Self {
        self.totals_visibility = ::std::option::Option::Some(input);
        self
    }
    /// <p>The visibility configuration for the subtotal cells.</p>
    pub fn set_totals_visibility(mut self, input: ::std::option::Option<crate::types::Visibility>) -> Self {
        self.totals_visibility = input;
        self
    }
    /// <p>The visibility configuration for the subtotal cells.</p>
    pub fn get_totals_visibility(&self) -> &::std::option::Option<crate::types::Visibility> {
        &self.totals_visibility
    }
    /// <p>The custom label string for the subtotal cells.</p>
    pub fn custom_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.custom_label = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The custom label string for the subtotal cells.</p>
    pub fn set_custom_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.custom_label = input;
        self
    }
    /// <p>The custom label string for the subtotal cells.</p>
    pub fn get_custom_label(&self) -> &::std::option::Option<::std::string::String> {
        &self.custom_label
    }
    /// <p>The field level (all, custom, last) for the subtotal cells.</p>
    pub fn field_level(mut self, input: crate::types::PivotTableSubtotalLevel) -> Self {
        self.field_level = ::std::option::Option::Some(input);
        self
    }
    /// <p>The field level (all, custom, last) for the subtotal cells.</p>
    pub fn set_field_level(mut self, input: ::std::option::Option<crate::types::PivotTableSubtotalLevel>) -> Self {
        self.field_level = input;
        self
    }
    /// <p>The field level (all, custom, last) for the subtotal cells.</p>
    pub fn get_field_level(&self) -> &::std::option::Option<crate::types::PivotTableSubtotalLevel> {
        &self.field_level
    }
    /// Appends an item to `field_level_options`.
    ///
    /// To override the contents of this collection use [`set_field_level_options`](Self::set_field_level_options).
    ///
    /// <p>The optional configuration of subtotal cells.</p>
    pub fn field_level_options(mut self, input: crate::types::PivotTableFieldSubtotalOptions) -> Self {
        let mut v = self.field_level_options.unwrap_or_default();
        v.push(input);
        self.field_level_options = ::std::option::Option::Some(v);
        self
    }
    /// <p>The optional configuration of subtotal cells.</p>
    pub fn set_field_level_options(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PivotTableFieldSubtotalOptions>>) -> Self {
        self.field_level_options = input;
        self
    }
    /// <p>The optional configuration of subtotal cells.</p>
    pub fn get_field_level_options(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PivotTableFieldSubtotalOptions>> {
        &self.field_level_options
    }
    /// <p>The cell styling options for the subtotal cells.</p>
    pub fn total_cell_style(mut self, input: crate::types::TableCellStyle) -> Self {
        self.total_cell_style = ::std::option::Option::Some(input);
        self
    }
    /// <p>The cell styling options for the subtotal cells.</p>
    pub fn set_total_cell_style(mut self, input: ::std::option::Option<crate::types::TableCellStyle>) -> Self {
        self.total_cell_style = input;
        self
    }
    /// <p>The cell styling options for the subtotal cells.</p>
    pub fn get_total_cell_style(&self) -> &::std::option::Option<crate::types::TableCellStyle> {
        &self.total_cell_style
    }
    /// <p>The cell styling options for the subtotals of value cells.</p>
    pub fn value_cell_style(mut self, input: crate::types::TableCellStyle) -> Self {
        self.value_cell_style = ::std::option::Option::Some(input);
        self
    }
    /// <p>The cell styling options for the subtotals of value cells.</p>
    pub fn set_value_cell_style(mut self, input: ::std::option::Option<crate::types::TableCellStyle>) -> Self {
        self.value_cell_style = input;
        self
    }
    /// <p>The cell styling options for the subtotals of value cells.</p>
    pub fn get_value_cell_style(&self) -> &::std::option::Option<crate::types::TableCellStyle> {
        &self.value_cell_style
    }
    /// <p>The cell styling options for the subtotals of header cells.</p>
    pub fn metric_header_cell_style(mut self, input: crate::types::TableCellStyle) -> Self {
        self.metric_header_cell_style = ::std::option::Option::Some(input);
        self
    }
    /// <p>The cell styling options for the subtotals of header cells.</p>
    pub fn set_metric_header_cell_style(mut self, input: ::std::option::Option<crate::types::TableCellStyle>) -> Self {
        self.metric_header_cell_style = input;
        self
    }
    /// <p>The cell styling options for the subtotals of header cells.</p>
    pub fn get_metric_header_cell_style(&self) -> &::std::option::Option<crate::types::TableCellStyle> {
        &self.metric_header_cell_style
    }
    /// Appends an item to `style_targets`.
    ///
    /// To override the contents of this collection use [`set_style_targets`](Self::set_style_targets).
    ///
    /// <p>The style targets options for subtotals.</p>
    pub fn style_targets(mut self, input: crate::types::TableStyleTarget) -> Self {
        let mut v = self.style_targets.unwrap_or_default();
        v.push(input);
        self.style_targets = ::std::option::Option::Some(v);
        self
    }
    /// <p>The style targets options for subtotals.</p>
    pub fn set_style_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TableStyleTarget>>) -> Self {
        self.style_targets = input;
        self
    }
    /// <p>The style targets options for subtotals.</p>
    pub fn get_style_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TableStyleTarget>> {
        &self.style_targets
    }
    /// Consumes the builder and constructs a [`SubtotalOptions`](crate::types::SubtotalOptions).
    pub fn build(self) -> crate::types::SubtotalOptions {
        crate::types::SubtotalOptions {
            totals_visibility: self.totals_visibility,
            custom_label: self.custom_label,
            field_level: self.field_level,
            field_level_options: self.field_level_options,
            total_cell_style: self.total_cell_style,
            value_cell_style: self.value_cell_style,
            metric_header_cell_style: self.metric_header_cell_style,
            style_targets: self.style_targets,
        }
    }
}