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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The calculated field of an analysis.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CalculatedField {
    /// <p>The data set that is used in this calculated field.</p>
    pub data_set_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The name of the calculated field.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The expression of the calculated field.</p>
    pub expression: ::std::option::Option<::std::string::String>,
}
impl CalculatedField {
    /// <p>The data set that is used in this calculated field.</p>
    pub fn data_set_identifier(&self) -> ::std::option::Option<&str> {
        self.data_set_identifier.as_deref()
    }
    /// <p>The name of the calculated field.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The expression of the calculated field.</p>
    pub fn expression(&self) -> ::std::option::Option<&str> {
        self.expression.as_deref()
    }
}
impl ::std::fmt::Debug for CalculatedField {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CalculatedField");
        formatter.field("data_set_identifier", &self.data_set_identifier);
        formatter.field("name", &self.name);
        formatter.field("expression", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl CalculatedField {
    /// Creates a new builder-style object to manufacture [`CalculatedField`](crate::types::CalculatedField).
    pub fn builder() -> crate::types::builders::CalculatedFieldBuilder {
        crate::types::builders::CalculatedFieldBuilder::default()
    }
}

/// A builder for [`CalculatedField`](crate::types::CalculatedField).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct CalculatedFieldBuilder {
    pub(crate) data_set_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) expression: ::std::option::Option<::std::string::String>,
}
impl CalculatedFieldBuilder {
    /// <p>The data set that is used in this calculated field.</p>
    pub fn data_set_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_set_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The data set that is used in this calculated field.</p>
    pub fn set_data_set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_set_identifier = input;
        self
    }
    /// <p>The data set that is used in this calculated field.</p>
    pub fn get_data_set_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_set_identifier
    }
    /// <p>The name of the calculated field.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the calculated field.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the calculated field.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The expression of the calculated field.</p>
    pub fn expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.expression = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The expression of the calculated field.</p>
    pub fn set_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.expression = input;
        self
    }
    /// <p>The expression of the calculated field.</p>
    pub fn get_expression(&self) -> &::std::option::Option<::std::string::String> {
        &self.expression
    }
    /// Consumes the builder and constructs a [`CalculatedField`](crate::types::CalculatedField).
    pub fn build(self) -> crate::types::CalculatedField {
        crate::types::CalculatedField {
            data_set_identifier: self.data_set_identifier,
            name: self.name,
            expression: self.expression,
        }
    }
}
impl ::std::fmt::Debug for CalculatedFieldBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CalculatedFieldBuilder");
        formatter.field("data_set_identifier", &self.data_set_identifier);
        formatter.field("name", &self.name);
        formatter.field("expression", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}