aws_sdk_quicksight/types/
_table_row_conditional_formatting.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The conditional formatting of a table row.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct TableRowConditionalFormatting {
7    /// <p>The conditional formatting color (solid, gradient) of the background for a table row.</p>
8    pub background_color: ::std::option::Option<crate::types::ConditionalFormattingColor>,
9    /// <p>The conditional formatting color (solid, gradient) of the text for a table row.</p>
10    pub text_color: ::std::option::Option<crate::types::ConditionalFormattingColor>,
11}
12impl TableRowConditionalFormatting {
13    /// <p>The conditional formatting color (solid, gradient) of the background for a table row.</p>
14    pub fn background_color(&self) -> ::std::option::Option<&crate::types::ConditionalFormattingColor> {
15        self.background_color.as_ref()
16    }
17    /// <p>The conditional formatting color (solid, gradient) of the text for a table row.</p>
18    pub fn text_color(&self) -> ::std::option::Option<&crate::types::ConditionalFormattingColor> {
19        self.text_color.as_ref()
20    }
21}
22impl TableRowConditionalFormatting {
23    /// Creates a new builder-style object to manufacture [`TableRowConditionalFormatting`](crate::types::TableRowConditionalFormatting).
24    pub fn builder() -> crate::types::builders::TableRowConditionalFormattingBuilder {
25        crate::types::builders::TableRowConditionalFormattingBuilder::default()
26    }
27}
28
29/// A builder for [`TableRowConditionalFormatting`](crate::types::TableRowConditionalFormatting).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct TableRowConditionalFormattingBuilder {
33    pub(crate) background_color: ::std::option::Option<crate::types::ConditionalFormattingColor>,
34    pub(crate) text_color: ::std::option::Option<crate::types::ConditionalFormattingColor>,
35}
36impl TableRowConditionalFormattingBuilder {
37    /// <p>The conditional formatting color (solid, gradient) of the background for a table row.</p>
38    pub fn background_color(mut self, input: crate::types::ConditionalFormattingColor) -> Self {
39        self.background_color = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>The conditional formatting color (solid, gradient) of the background for a table row.</p>
43    pub fn set_background_color(mut self, input: ::std::option::Option<crate::types::ConditionalFormattingColor>) -> Self {
44        self.background_color = input;
45        self
46    }
47    /// <p>The conditional formatting color (solid, gradient) of the background for a table row.</p>
48    pub fn get_background_color(&self) -> &::std::option::Option<crate::types::ConditionalFormattingColor> {
49        &self.background_color
50    }
51    /// <p>The conditional formatting color (solid, gradient) of the text for a table row.</p>
52    pub fn text_color(mut self, input: crate::types::ConditionalFormattingColor) -> Self {
53        self.text_color = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>The conditional formatting color (solid, gradient) of the text for a table row.</p>
57    pub fn set_text_color(mut self, input: ::std::option::Option<crate::types::ConditionalFormattingColor>) -> Self {
58        self.text_color = input;
59        self
60    }
61    /// <p>The conditional formatting color (solid, gradient) of the text for a table row.</p>
62    pub fn get_text_color(&self) -> &::std::option::Option<crate::types::ConditionalFormattingColor> {
63        &self.text_color
64    }
65    /// Consumes the builder and constructs a [`TableRowConditionalFormatting`](crate::types::TableRowConditionalFormatting).
66    pub fn build(self) -> crate::types::TableRowConditionalFormatting {
67        crate::types::TableRowConditionalFormatting {
68            background_color: self.background_color,
69            text_color: self.text_color,
70        }
71    }
72}