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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A leaf node condition which can be used to specify a ProficiencyName, ProficiencyValue and ProficiencyLimit.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Condition {
/// <p>A leaf node condition which can be used to specify a string condition.</p><note>
/// <p>The currently supported values for <code>FieldName</code> are <code>name</code> and <code>value</code>.</p>
/// </note>
pub string_condition: ::std::option::Option<crate::types::StringCondition>,
/// <p>A leaf node condition which can be used to specify a numeric condition.</p>
pub number_condition: ::std::option::Option<crate::types::NumberCondition>,
}
impl Condition {
/// <p>A leaf node condition which can be used to specify a string condition.</p><note>
/// <p>The currently supported values for <code>FieldName</code> are <code>name</code> and <code>value</code>.</p>
/// </note>
pub fn string_condition(&self) -> ::std::option::Option<&crate::types::StringCondition> {
self.string_condition.as_ref()
}
/// <p>A leaf node condition which can be used to specify a numeric condition.</p>
pub fn number_condition(&self) -> ::std::option::Option<&crate::types::NumberCondition> {
self.number_condition.as_ref()
}
}
impl Condition {
/// Creates a new builder-style object to manufacture [`Condition`](crate::types::Condition).
pub fn builder() -> crate::types::builders::ConditionBuilder {
crate::types::builders::ConditionBuilder::default()
}
}
/// A builder for [`Condition`](crate::types::Condition).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ConditionBuilder {
pub(crate) string_condition: ::std::option::Option<crate::types::StringCondition>,
pub(crate) number_condition: ::std::option::Option<crate::types::NumberCondition>,
}
impl ConditionBuilder {
/// <p>A leaf node condition which can be used to specify a string condition.</p><note>
/// <p>The currently supported values for <code>FieldName</code> are <code>name</code> and <code>value</code>.</p>
/// </note>
pub fn string_condition(mut self, input: crate::types::StringCondition) -> Self {
self.string_condition = ::std::option::Option::Some(input);
self
}
/// <p>A leaf node condition which can be used to specify a string condition.</p><note>
/// <p>The currently supported values for <code>FieldName</code> are <code>name</code> and <code>value</code>.</p>
/// </note>
pub fn set_string_condition(mut self, input: ::std::option::Option<crate::types::StringCondition>) -> Self {
self.string_condition = input;
self
}
/// <p>A leaf node condition which can be used to specify a string condition.</p><note>
/// <p>The currently supported values for <code>FieldName</code> are <code>name</code> and <code>value</code>.</p>
/// </note>
pub fn get_string_condition(&self) -> &::std::option::Option<crate::types::StringCondition> {
&self.string_condition
}
/// <p>A leaf node condition which can be used to specify a numeric condition.</p>
pub fn number_condition(mut self, input: crate::types::NumberCondition) -> Self {
self.number_condition = ::std::option::Option::Some(input);
self
}
/// <p>A leaf node condition which can be used to specify a numeric condition.</p>
pub fn set_number_condition(mut self, input: ::std::option::Option<crate::types::NumberCondition>) -> Self {
self.number_condition = input;
self
}
/// <p>A leaf node condition which can be used to specify a numeric condition.</p>
pub fn get_number_condition(&self) -> &::std::option::Option<crate::types::NumberCondition> {
&self.number_condition
}
/// Consumes the builder and constructs a [`Condition`](crate::types::Condition).
pub fn build(self) -> crate::types::Condition {
crate::types::Condition {
string_condition: self.string_condition,
number_condition: self.number_condition,
}
}
}