aws_sdk_datazone/operation/update_rule/
_update_rule_input.rs

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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct UpdateRuleInput {
    /// <p>The ID of the domain in which a rule is to be updated.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the rule that is to be updated</p>
    pub identifier: ::std::option::Option<::std::string::String>,
    /// <p>The name of the rule.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the rule.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The scrope of the rule.</p>
    pub scope: ::std::option::Option<crate::types::RuleScope>,
    /// <p>The detail of the rule.</p>
    pub detail: ::std::option::Option<crate::types::RuleDetail>,
    /// <p>Specifies whether to update this rule in the child domain units.</p>
    pub include_child_domain_units: ::std::option::Option<bool>,
}
impl UpdateRuleInput {
    /// <p>The ID of the domain in which a rule is to be updated.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The ID of the rule that is to be updated</p>
    pub fn identifier(&self) -> ::std::option::Option<&str> {
        self.identifier.as_deref()
    }
    /// <p>The name of the rule.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description of the rule.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The scrope of the rule.</p>
    pub fn scope(&self) -> ::std::option::Option<&crate::types::RuleScope> {
        self.scope.as_ref()
    }
    /// <p>The detail of the rule.</p>
    pub fn detail(&self) -> ::std::option::Option<&crate::types::RuleDetail> {
        self.detail.as_ref()
    }
    /// <p>Specifies whether to update this rule in the child domain units.</p>
    pub fn include_child_domain_units(&self) -> ::std::option::Option<bool> {
        self.include_child_domain_units
    }
}
impl ::std::fmt::Debug for UpdateRuleInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateRuleInput");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("identifier", &self.identifier);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("scope", &self.scope);
        formatter.field("detail", &self.detail);
        formatter.field("include_child_domain_units", &self.include_child_domain_units);
        formatter.finish()
    }
}
impl UpdateRuleInput {
    /// Creates a new builder-style object to manufacture [`UpdateRuleInput`](crate::operation::update_rule::UpdateRuleInput).
    pub fn builder() -> crate::operation::update_rule::builders::UpdateRuleInputBuilder {
        crate::operation::update_rule::builders::UpdateRuleInputBuilder::default()
    }
}

/// A builder for [`UpdateRuleInput`](crate::operation::update_rule::UpdateRuleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateRuleInputBuilder {
    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) identifier: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) scope: ::std::option::Option<crate::types::RuleScope>,
    pub(crate) detail: ::std::option::Option<crate::types::RuleDetail>,
    pub(crate) include_child_domain_units: ::std::option::Option<bool>,
}
impl UpdateRuleInputBuilder {
    /// <p>The ID of the domain in which a rule is to be updated.</p>
    /// This field is required.
    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the domain in which a rule is to be updated.</p>
    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_identifier = input;
        self
    }
    /// <p>The ID of the domain in which a rule is to be updated.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The ID of the rule that is to be updated</p>
    /// This field is required.
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the rule that is to be updated</p>
    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identifier = input;
        self
    }
    /// <p>The ID of the rule that is to be updated</p>
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.identifier
    }
    /// <p>The name of the rule.</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 rule.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the rule.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description of the rule.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the rule.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the rule.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The scrope of the rule.</p>
    pub fn scope(mut self, input: crate::types::RuleScope) -> Self {
        self.scope = ::std::option::Option::Some(input);
        self
    }
    /// <p>The scrope of the rule.</p>
    pub fn set_scope(mut self, input: ::std::option::Option<crate::types::RuleScope>) -> Self {
        self.scope = input;
        self
    }
    /// <p>The scrope of the rule.</p>
    pub fn get_scope(&self) -> &::std::option::Option<crate::types::RuleScope> {
        &self.scope
    }
    /// <p>The detail of the rule.</p>
    pub fn detail(mut self, input: crate::types::RuleDetail) -> Self {
        self.detail = ::std::option::Option::Some(input);
        self
    }
    /// <p>The detail of the rule.</p>
    pub fn set_detail(mut self, input: ::std::option::Option<crate::types::RuleDetail>) -> Self {
        self.detail = input;
        self
    }
    /// <p>The detail of the rule.</p>
    pub fn get_detail(&self) -> &::std::option::Option<crate::types::RuleDetail> {
        &self.detail
    }
    /// <p>Specifies whether to update this rule in the child domain units.</p>
    pub fn include_child_domain_units(mut self, input: bool) -> Self {
        self.include_child_domain_units = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether to update this rule in the child domain units.</p>
    pub fn set_include_child_domain_units(mut self, input: ::std::option::Option<bool>) -> Self {
        self.include_child_domain_units = input;
        self
    }
    /// <p>Specifies whether to update this rule in the child domain units.</p>
    pub fn get_include_child_domain_units(&self) -> &::std::option::Option<bool> {
        &self.include_child_domain_units
    }
    /// Consumes the builder and constructs a [`UpdateRuleInput`](crate::operation::update_rule::UpdateRuleInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_rule::UpdateRuleInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_rule::UpdateRuleInput {
            domain_identifier: self.domain_identifier,
            identifier: self.identifier,
            name: self.name,
            description: self.description,
            scope: self.scope,
            detail: self.detail,
            include_child_domain_units: self.include_child_domain_units,
        })
    }
}
impl ::std::fmt::Debug for UpdateRuleInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateRuleInputBuilder");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("identifier", &self.identifier);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("scope", &self.scope);
        formatter.field("detail", &self.detail);
        formatter.field("include_child_domain_units", &self.include_child_domain_units);
        formatter.finish()
    }
}