aws_sdk_accessanalyzer/operation/apply_archive_rule/
_apply_archive_rule_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ApplyArchiveRuleInput {
7 pub analyzer_arn: ::std::option::Option<::std::string::String>,
9 pub rule_name: ::std::option::Option<::std::string::String>,
11 pub client_token: ::std::option::Option<::std::string::String>,
13}
14impl ApplyArchiveRuleInput {
15 pub fn analyzer_arn(&self) -> ::std::option::Option<&str> {
17 self.analyzer_arn.as_deref()
18 }
19 pub fn rule_name(&self) -> ::std::option::Option<&str> {
21 self.rule_name.as_deref()
22 }
23 pub fn client_token(&self) -> ::std::option::Option<&str> {
25 self.client_token.as_deref()
26 }
27}
28impl ApplyArchiveRuleInput {
29 pub fn builder() -> crate::operation::apply_archive_rule::builders::ApplyArchiveRuleInputBuilder {
31 crate::operation::apply_archive_rule::builders::ApplyArchiveRuleInputBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct ApplyArchiveRuleInputBuilder {
39 pub(crate) analyzer_arn: ::std::option::Option<::std::string::String>,
40 pub(crate) rule_name: ::std::option::Option<::std::string::String>,
41 pub(crate) client_token: ::std::option::Option<::std::string::String>,
42}
43impl ApplyArchiveRuleInputBuilder {
44 pub fn analyzer_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.analyzer_arn = ::std::option::Option::Some(input.into());
48 self
49 }
50 pub fn set_analyzer_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.analyzer_arn = input;
53 self
54 }
55 pub fn get_analyzer_arn(&self) -> &::std::option::Option<::std::string::String> {
57 &self.analyzer_arn
58 }
59 pub fn rule_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.rule_name = ::std::option::Option::Some(input.into());
63 self
64 }
65 pub fn set_rule_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.rule_name = input;
68 self
69 }
70 pub fn get_rule_name(&self) -> &::std::option::Option<::std::string::String> {
72 &self.rule_name
73 }
74 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76 self.client_token = ::std::option::Option::Some(input.into());
77 self
78 }
79 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81 self.client_token = input;
82 self
83 }
84 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
86 &self.client_token
87 }
88 pub fn build(
90 self,
91 ) -> ::std::result::Result<crate::operation::apply_archive_rule::ApplyArchiveRuleInput, ::aws_smithy_types::error::operation::BuildError> {
92 ::std::result::Result::Ok(crate::operation::apply_archive_rule::ApplyArchiveRuleInput {
93 analyzer_arn: self.analyzer_arn,
94 rule_name: self.rule_name,
95 client_token: self.client_token,
96 })
97 }
98}