Skip to main content

aws_sdk_frauddetector/types/
_variable.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The variable.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Variable {
7    /// <p>The name of the variable.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>The data type of the variable. For more information see <a href="https://docs.aws.amazon.com/frauddetector/latest/ug/create-a-variable.html#variable-types">Variable types</a>.</p>
10    pub data_type: ::std::option::Option<crate::types::DataType>,
11    /// <p>The data source of the variable.</p>
12    pub data_source: ::std::option::Option<crate::types::DataSource>,
13    /// <p>The default value of the variable.</p>
14    pub default_value: ::std::option::Option<::std::string::String>,
15    /// <p>The description of the variable.</p>
16    pub description: ::std::option::Option<::std::string::String>,
17    /// <p>The variable type of the variable.</p>
18    /// <p>Valid Values: <code>AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT </code></p>
19    pub variable_type: ::std::option::Option<::std::string::String>,
20    /// <p>The time when variable was last updated.</p>
21    pub last_updated_time: ::std::option::Option<::std::string::String>,
22    /// <p>The time when the variable was created.</p>
23    pub created_time: ::std::option::Option<::std::string::String>,
24    /// <p>The ARN of the variable.</p>
25    pub arn: ::std::option::Option<::std::string::String>,
26}
27impl Variable {
28    /// <p>The name of the variable.</p>
29    pub fn name(&self) -> ::std::option::Option<&str> {
30        self.name.as_deref()
31    }
32    /// <p>The data type of the variable. For more information see <a href="https://docs.aws.amazon.com/frauddetector/latest/ug/create-a-variable.html#variable-types">Variable types</a>.</p>
33    pub fn data_type(&self) -> ::std::option::Option<&crate::types::DataType> {
34        self.data_type.as_ref()
35    }
36    /// <p>The data source of the variable.</p>
37    pub fn data_source(&self) -> ::std::option::Option<&crate::types::DataSource> {
38        self.data_source.as_ref()
39    }
40    /// <p>The default value of the variable.</p>
41    pub fn default_value(&self) -> ::std::option::Option<&str> {
42        self.default_value.as_deref()
43    }
44    /// <p>The description of the variable.</p>
45    pub fn description(&self) -> ::std::option::Option<&str> {
46        self.description.as_deref()
47    }
48    /// <p>The variable type of the variable.</p>
49    /// <p>Valid Values: <code>AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT </code></p>
50    pub fn variable_type(&self) -> ::std::option::Option<&str> {
51        self.variable_type.as_deref()
52    }
53    /// <p>The time when variable was last updated.</p>
54    pub fn last_updated_time(&self) -> ::std::option::Option<&str> {
55        self.last_updated_time.as_deref()
56    }
57    /// <p>The time when the variable was created.</p>
58    pub fn created_time(&self) -> ::std::option::Option<&str> {
59        self.created_time.as_deref()
60    }
61    /// <p>The ARN of the variable.</p>
62    pub fn arn(&self) -> ::std::option::Option<&str> {
63        self.arn.as_deref()
64    }
65}
66impl Variable {
67    /// Creates a new builder-style object to manufacture [`Variable`](crate::types::Variable).
68    pub fn builder() -> crate::types::builders::VariableBuilder {
69        crate::types::builders::VariableBuilder::default()
70    }
71}
72
73/// A builder for [`Variable`](crate::types::Variable).
74#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
75#[non_exhaustive]
76pub struct VariableBuilder {
77    pub(crate) name: ::std::option::Option<::std::string::String>,
78    pub(crate) data_type: ::std::option::Option<crate::types::DataType>,
79    pub(crate) data_source: ::std::option::Option<crate::types::DataSource>,
80    pub(crate) default_value: ::std::option::Option<::std::string::String>,
81    pub(crate) description: ::std::option::Option<::std::string::String>,
82    pub(crate) variable_type: ::std::option::Option<::std::string::String>,
83    pub(crate) last_updated_time: ::std::option::Option<::std::string::String>,
84    pub(crate) created_time: ::std::option::Option<::std::string::String>,
85    pub(crate) arn: ::std::option::Option<::std::string::String>,
86}
87impl VariableBuilder {
88    /// <p>The name of the variable.</p>
89    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.name = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>The name of the variable.</p>
94    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.name = input;
96        self
97    }
98    /// <p>The name of the variable.</p>
99    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
100        &self.name
101    }
102    /// <p>The data type of the variable. For more information see <a href="https://docs.aws.amazon.com/frauddetector/latest/ug/create-a-variable.html#variable-types">Variable types</a>.</p>
103    pub fn data_type(mut self, input: crate::types::DataType) -> Self {
104        self.data_type = ::std::option::Option::Some(input);
105        self
106    }
107    /// <p>The data type of the variable. For more information see <a href="https://docs.aws.amazon.com/frauddetector/latest/ug/create-a-variable.html#variable-types">Variable types</a>.</p>
108    pub fn set_data_type(mut self, input: ::std::option::Option<crate::types::DataType>) -> Self {
109        self.data_type = input;
110        self
111    }
112    /// <p>The data type of the variable. For more information see <a href="https://docs.aws.amazon.com/frauddetector/latest/ug/create-a-variable.html#variable-types">Variable types</a>.</p>
113    pub fn get_data_type(&self) -> &::std::option::Option<crate::types::DataType> {
114        &self.data_type
115    }
116    /// <p>The data source of the variable.</p>
117    pub fn data_source(mut self, input: crate::types::DataSource) -> Self {
118        self.data_source = ::std::option::Option::Some(input);
119        self
120    }
121    /// <p>The data source of the variable.</p>
122    pub fn set_data_source(mut self, input: ::std::option::Option<crate::types::DataSource>) -> Self {
123        self.data_source = input;
124        self
125    }
126    /// <p>The data source of the variable.</p>
127    pub fn get_data_source(&self) -> &::std::option::Option<crate::types::DataSource> {
128        &self.data_source
129    }
130    /// <p>The default value of the variable.</p>
131    pub fn default_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132        self.default_value = ::std::option::Option::Some(input.into());
133        self
134    }
135    /// <p>The default value of the variable.</p>
136    pub fn set_default_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.default_value = input;
138        self
139    }
140    /// <p>The default value of the variable.</p>
141    pub fn get_default_value(&self) -> &::std::option::Option<::std::string::String> {
142        &self.default_value
143    }
144    /// <p>The description of the variable.</p>
145    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.description = ::std::option::Option::Some(input.into());
147        self
148    }
149    /// <p>The description of the variable.</p>
150    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.description = input;
152        self
153    }
154    /// <p>The description of the variable.</p>
155    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
156        &self.description
157    }
158    /// <p>The variable type of the variable.</p>
159    /// <p>Valid Values: <code>AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT </code></p>
160    pub fn variable_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161        self.variable_type = ::std::option::Option::Some(input.into());
162        self
163    }
164    /// <p>The variable type of the variable.</p>
165    /// <p>Valid Values: <code>AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT </code></p>
166    pub fn set_variable_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167        self.variable_type = input;
168        self
169    }
170    /// <p>The variable type of the variable.</p>
171    /// <p>Valid Values: <code>AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT </code></p>
172    pub fn get_variable_type(&self) -> &::std::option::Option<::std::string::String> {
173        &self.variable_type
174    }
175    /// <p>The time when variable was last updated.</p>
176    pub fn last_updated_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
177        self.last_updated_time = ::std::option::Option::Some(input.into());
178        self
179    }
180    /// <p>The time when variable was last updated.</p>
181    pub fn set_last_updated_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
182        self.last_updated_time = input;
183        self
184    }
185    /// <p>The time when variable was last updated.</p>
186    pub fn get_last_updated_time(&self) -> &::std::option::Option<::std::string::String> {
187        &self.last_updated_time
188    }
189    /// <p>The time when the variable was created.</p>
190    pub fn created_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
191        self.created_time = ::std::option::Option::Some(input.into());
192        self
193    }
194    /// <p>The time when the variable was created.</p>
195    pub fn set_created_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
196        self.created_time = input;
197        self
198    }
199    /// <p>The time when the variable was created.</p>
200    pub fn get_created_time(&self) -> &::std::option::Option<::std::string::String> {
201        &self.created_time
202    }
203    /// <p>The ARN of the variable.</p>
204    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
205        self.arn = ::std::option::Option::Some(input.into());
206        self
207    }
208    /// <p>The ARN of the variable.</p>
209    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210        self.arn = input;
211        self
212    }
213    /// <p>The ARN of the variable.</p>
214    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
215        &self.arn
216    }
217    /// Consumes the builder and constructs a [`Variable`](crate::types::Variable).
218    pub fn build(self) -> crate::types::Variable {
219        crate::types::Variable {
220            name: self.name,
221            data_type: self.data_type,
222            data_source: self.data_source,
223            default_value: self.default_value,
224            description: self.description,
225            variable_type: self.variable_type,
226            last_updated_time: self.last_updated_time,
227            created_time: self.created_time,
228            arn: self.arn,
229        }
230    }
231}