aws_sdk_datazone/operation/update_rule/
_update_rule_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateRuleInput {
6    /// <p>The ID of the domain in which a rule is to be updated.</p>
7    pub domain_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the rule that is to be updated</p>
9    pub identifier: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the rule.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>The description of the rule.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The scrope of the rule.</p>
15    pub scope: ::std::option::Option<crate::types::RuleScope>,
16    /// <p>The detail of the rule.</p>
17    pub detail: ::std::option::Option<crate::types::RuleDetail>,
18    /// <p>Specifies whether to update this rule in the child domain units.</p>
19    pub include_child_domain_units: ::std::option::Option<bool>,
20}
21impl UpdateRuleInput {
22    /// <p>The ID of the domain in which a rule is to be updated.</p>
23    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
24        self.domain_identifier.as_deref()
25    }
26    /// <p>The ID of the rule that is to be updated</p>
27    pub fn identifier(&self) -> ::std::option::Option<&str> {
28        self.identifier.as_deref()
29    }
30    /// <p>The name of the rule.</p>
31    pub fn name(&self) -> ::std::option::Option<&str> {
32        self.name.as_deref()
33    }
34    /// <p>The description of the rule.</p>
35    pub fn description(&self) -> ::std::option::Option<&str> {
36        self.description.as_deref()
37    }
38    /// <p>The scrope of the rule.</p>
39    pub fn scope(&self) -> ::std::option::Option<&crate::types::RuleScope> {
40        self.scope.as_ref()
41    }
42    /// <p>The detail of the rule.</p>
43    pub fn detail(&self) -> ::std::option::Option<&crate::types::RuleDetail> {
44        self.detail.as_ref()
45    }
46    /// <p>Specifies whether to update this rule in the child domain units.</p>
47    pub fn include_child_domain_units(&self) -> ::std::option::Option<bool> {
48        self.include_child_domain_units
49    }
50}
51impl ::std::fmt::Debug for UpdateRuleInput {
52    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
53        let mut formatter = f.debug_struct("UpdateRuleInput");
54        formatter.field("domain_identifier", &self.domain_identifier);
55        formatter.field("identifier", &self.identifier);
56        formatter.field("name", &"*** Sensitive Data Redacted ***");
57        formatter.field("description", &"*** Sensitive Data Redacted ***");
58        formatter.field("scope", &self.scope);
59        formatter.field("detail", &self.detail);
60        formatter.field("include_child_domain_units", &self.include_child_domain_units);
61        formatter.finish()
62    }
63}
64impl UpdateRuleInput {
65    /// Creates a new builder-style object to manufacture [`UpdateRuleInput`](crate::operation::update_rule::UpdateRuleInput).
66    pub fn builder() -> crate::operation::update_rule::builders::UpdateRuleInputBuilder {
67        crate::operation::update_rule::builders::UpdateRuleInputBuilder::default()
68    }
69}
70
71/// A builder for [`UpdateRuleInput`](crate::operation::update_rule::UpdateRuleInput).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
73#[non_exhaustive]
74pub struct UpdateRuleInputBuilder {
75    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
76    pub(crate) identifier: ::std::option::Option<::std::string::String>,
77    pub(crate) name: ::std::option::Option<::std::string::String>,
78    pub(crate) description: ::std::option::Option<::std::string::String>,
79    pub(crate) scope: ::std::option::Option<crate::types::RuleScope>,
80    pub(crate) detail: ::std::option::Option<crate::types::RuleDetail>,
81    pub(crate) include_child_domain_units: ::std::option::Option<bool>,
82}
83impl UpdateRuleInputBuilder {
84    /// <p>The ID of the domain in which a rule is to be updated.</p>
85    /// This field is required.
86    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.domain_identifier = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The ID of the domain in which a rule is to be updated.</p>
91    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.domain_identifier = input;
93        self
94    }
95    /// <p>The ID of the domain in which a rule is to be updated.</p>
96    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
97        &self.domain_identifier
98    }
99    /// <p>The ID of the rule that is to be updated</p>
100    /// This field is required.
101    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.identifier = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The ID of the rule that is to be updated</p>
106    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.identifier = input;
108        self
109    }
110    /// <p>The ID of the rule that is to be updated</p>
111    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
112        &self.identifier
113    }
114    /// <p>The name of the rule.</p>
115    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.name = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The name of the rule.</p>
120    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.name = input;
122        self
123    }
124    /// <p>The name of the rule.</p>
125    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
126        &self.name
127    }
128    /// <p>The description of the rule.</p>
129    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        self.description = ::std::option::Option::Some(input.into());
131        self
132    }
133    /// <p>The description of the rule.</p>
134    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.description = input;
136        self
137    }
138    /// <p>The description of the rule.</p>
139    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
140        &self.description
141    }
142    /// <p>The scrope of the rule.</p>
143    pub fn scope(mut self, input: crate::types::RuleScope) -> Self {
144        self.scope = ::std::option::Option::Some(input);
145        self
146    }
147    /// <p>The scrope of the rule.</p>
148    pub fn set_scope(mut self, input: ::std::option::Option<crate::types::RuleScope>) -> Self {
149        self.scope = input;
150        self
151    }
152    /// <p>The scrope of the rule.</p>
153    pub fn get_scope(&self) -> &::std::option::Option<crate::types::RuleScope> {
154        &self.scope
155    }
156    /// <p>The detail of the rule.</p>
157    pub fn detail(mut self, input: crate::types::RuleDetail) -> Self {
158        self.detail = ::std::option::Option::Some(input);
159        self
160    }
161    /// <p>The detail of the rule.</p>
162    pub fn set_detail(mut self, input: ::std::option::Option<crate::types::RuleDetail>) -> Self {
163        self.detail = input;
164        self
165    }
166    /// <p>The detail of the rule.</p>
167    pub fn get_detail(&self) -> &::std::option::Option<crate::types::RuleDetail> {
168        &self.detail
169    }
170    /// <p>Specifies whether to update this rule in the child domain units.</p>
171    pub fn include_child_domain_units(mut self, input: bool) -> Self {
172        self.include_child_domain_units = ::std::option::Option::Some(input);
173        self
174    }
175    /// <p>Specifies whether to update this rule in the child domain units.</p>
176    pub fn set_include_child_domain_units(mut self, input: ::std::option::Option<bool>) -> Self {
177        self.include_child_domain_units = input;
178        self
179    }
180    /// <p>Specifies whether to update this rule in the child domain units.</p>
181    pub fn get_include_child_domain_units(&self) -> &::std::option::Option<bool> {
182        &self.include_child_domain_units
183    }
184    /// Consumes the builder and constructs a [`UpdateRuleInput`](crate::operation::update_rule::UpdateRuleInput).
185    pub fn build(self) -> ::std::result::Result<crate::operation::update_rule::UpdateRuleInput, ::aws_smithy_types::error::operation::BuildError> {
186        ::std::result::Result::Ok(crate::operation::update_rule::UpdateRuleInput {
187            domain_identifier: self.domain_identifier,
188            identifier: self.identifier,
189            name: self.name,
190            description: self.description,
191            scope: self.scope,
192            detail: self.detail,
193            include_child_domain_units: self.include_child_domain_units,
194        })
195    }
196}
197impl ::std::fmt::Debug for UpdateRuleInputBuilder {
198    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
199        let mut formatter = f.debug_struct("UpdateRuleInputBuilder");
200        formatter.field("domain_identifier", &self.domain_identifier);
201        formatter.field("identifier", &self.identifier);
202        formatter.field("name", &"*** Sensitive Data Redacted ***");
203        formatter.field("description", &"*** Sensitive Data Redacted ***");
204        formatter.field("scope", &self.scope);
205        formatter.field("detail", &self.detail);
206        formatter.field("include_child_domain_units", &self.include_child_domain_units);
207        formatter.finish()
208    }
209}