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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Contains information about which resources to include or exclude from a backup plan using their tags. Conditions are case sensitive.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Conditions {
/// <p>Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching."</p>
pub string_equals: ::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>>,
/// <p>Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching."</p>
pub string_not_equals: ::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>>,
/// <p>Filters the values of your tagged resources for matching tag values with the use of a wildcard character (*) anywhere in the string. For example, "prod*" or "*rod*" matches the tag value "production".</p>
pub string_like: ::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>>,
/// <p>Filters the values of your tagged resources for non-matching tag values with the use of a wildcard character (*) anywhere in the string.</p>
pub string_not_like: ::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>>,
}
impl Conditions {
/// <p>Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching."</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.string_equals.is_none()`.
pub fn string_equals(&self) -> &[crate::types::ConditionParameter] {
self.string_equals.as_deref().unwrap_or_default()
}
/// <p>Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching."</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.string_not_equals.is_none()`.
pub fn string_not_equals(&self) -> &[crate::types::ConditionParameter] {
self.string_not_equals.as_deref().unwrap_or_default()
}
/// <p>Filters the values of your tagged resources for matching tag values with the use of a wildcard character (*) anywhere in the string. For example, "prod*" or "*rod*" matches the tag value "production".</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.string_like.is_none()`.
pub fn string_like(&self) -> &[crate::types::ConditionParameter] {
self.string_like.as_deref().unwrap_or_default()
}
/// <p>Filters the values of your tagged resources for non-matching tag values with the use of a wildcard character (*) anywhere in the string.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.string_not_like.is_none()`.
pub fn string_not_like(&self) -> &[crate::types::ConditionParameter] {
self.string_not_like.as_deref().unwrap_or_default()
}
}
impl Conditions {
/// Creates a new builder-style object to manufacture [`Conditions`](crate::types::Conditions).
pub fn builder() -> crate::types::builders::ConditionsBuilder {
crate::types::builders::ConditionsBuilder::default()
}
}
/// A builder for [`Conditions`](crate::types::Conditions).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ConditionsBuilder {
pub(crate) string_equals: ::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>>,
pub(crate) string_not_equals: ::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>>,
pub(crate) string_like: ::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>>,
pub(crate) string_not_like: ::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>>,
}
impl ConditionsBuilder {
/// Appends an item to `string_equals`.
///
/// To override the contents of this collection use [`set_string_equals`](Self::set_string_equals).
///
/// <p>Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching."</p>
pub fn string_equals(mut self, input: crate::types::ConditionParameter) -> Self {
let mut v = self.string_equals.unwrap_or_default();
v.push(input);
self.string_equals = ::std::option::Option::Some(v);
self
}
/// <p>Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching."</p>
pub fn set_string_equals(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>>) -> Self {
self.string_equals = input;
self
}
/// <p>Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching."</p>
pub fn get_string_equals(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>> {
&self.string_equals
}
/// Appends an item to `string_not_equals`.
///
/// To override the contents of this collection use [`set_string_not_equals`](Self::set_string_not_equals).
///
/// <p>Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching."</p>
pub fn string_not_equals(mut self, input: crate::types::ConditionParameter) -> Self {
let mut v = self.string_not_equals.unwrap_or_default();
v.push(input);
self.string_not_equals = ::std::option::Option::Some(v);
self
}
/// <p>Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching."</p>
pub fn set_string_not_equals(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>>) -> Self {
self.string_not_equals = input;
self
}
/// <p>Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching."</p>
pub fn get_string_not_equals(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>> {
&self.string_not_equals
}
/// Appends an item to `string_like`.
///
/// To override the contents of this collection use [`set_string_like`](Self::set_string_like).
///
/// <p>Filters the values of your tagged resources for matching tag values with the use of a wildcard character (*) anywhere in the string. For example, "prod*" or "*rod*" matches the tag value "production".</p>
pub fn string_like(mut self, input: crate::types::ConditionParameter) -> Self {
let mut v = self.string_like.unwrap_or_default();
v.push(input);
self.string_like = ::std::option::Option::Some(v);
self
}
/// <p>Filters the values of your tagged resources for matching tag values with the use of a wildcard character (*) anywhere in the string. For example, "prod*" or "*rod*" matches the tag value "production".</p>
pub fn set_string_like(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>>) -> Self {
self.string_like = input;
self
}
/// <p>Filters the values of your tagged resources for matching tag values with the use of a wildcard character (*) anywhere in the string. For example, "prod*" or "*rod*" matches the tag value "production".</p>
pub fn get_string_like(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>> {
&self.string_like
}
/// Appends an item to `string_not_like`.
///
/// To override the contents of this collection use [`set_string_not_like`](Self::set_string_not_like).
///
/// <p>Filters the values of your tagged resources for non-matching tag values with the use of a wildcard character (*) anywhere in the string.</p>
pub fn string_not_like(mut self, input: crate::types::ConditionParameter) -> Self {
let mut v = self.string_not_like.unwrap_or_default();
v.push(input);
self.string_not_like = ::std::option::Option::Some(v);
self
}
/// <p>Filters the values of your tagged resources for non-matching tag values with the use of a wildcard character (*) anywhere in the string.</p>
pub fn set_string_not_like(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>>) -> Self {
self.string_not_like = input;
self
}
/// <p>Filters the values of your tagged resources for non-matching tag values with the use of a wildcard character (*) anywhere in the string.</p>
pub fn get_string_not_like(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConditionParameter>> {
&self.string_not_like
}
/// Consumes the builder and constructs a [`Conditions`](crate::types::Conditions).
pub fn build(self) -> crate::types::Conditions {
crate::types::Conditions {
string_equals: self.string_equals,
string_not_equals: self.string_not_equals,
string_like: self.string_like,
string_not_like: self.string_not_like,
}
}
}