aws_sdk_accessanalyzer/operation/apply_archive_rule/
_apply_archive_rule_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Retroactively applies an archive rule.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ApplyArchiveRuleInput {
7    /// <p>The Amazon resource name (ARN) of the analyzer.</p>
8    pub analyzer_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the rule to apply.</p>
10    pub rule_name: ::std::option::Option<::std::string::String>,
11    /// <p>A client token.</p>
12    pub client_token: ::std::option::Option<::std::string::String>,
13}
14impl ApplyArchiveRuleInput {
15    /// <p>The Amazon resource name (ARN) of the analyzer.</p>
16    pub fn analyzer_arn(&self) -> ::std::option::Option<&str> {
17        self.analyzer_arn.as_deref()
18    }
19    /// <p>The name of the rule to apply.</p>
20    pub fn rule_name(&self) -> ::std::option::Option<&str> {
21        self.rule_name.as_deref()
22    }
23    /// <p>A client token.</p>
24    pub fn client_token(&self) -> ::std::option::Option<&str> {
25        self.client_token.as_deref()
26    }
27}
28impl ApplyArchiveRuleInput {
29    /// Creates a new builder-style object to manufacture [`ApplyArchiveRuleInput`](crate::operation::apply_archive_rule::ApplyArchiveRuleInput).
30    pub fn builder() -> crate::operation::apply_archive_rule::builders::ApplyArchiveRuleInputBuilder {
31        crate::operation::apply_archive_rule::builders::ApplyArchiveRuleInputBuilder::default()
32    }
33}
34
35/// A builder for [`ApplyArchiveRuleInput`](crate::operation::apply_archive_rule::ApplyArchiveRuleInput).
36#[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    /// <p>The Amazon resource name (ARN) of the analyzer.</p>
45    /// This field is required.
46    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    /// <p>The Amazon resource name (ARN) of the analyzer.</p>
51    pub fn set_analyzer_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.analyzer_arn = input;
53        self
54    }
55    /// <p>The Amazon resource name (ARN) of the analyzer.</p>
56    pub fn get_analyzer_arn(&self) -> &::std::option::Option<::std::string::String> {
57        &self.analyzer_arn
58    }
59    /// <p>The name of the rule to apply.</p>
60    /// This field is required.
61    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    /// <p>The name of the rule to apply.</p>
66    pub fn set_rule_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67        self.rule_name = input;
68        self
69    }
70    /// <p>The name of the rule to apply.</p>
71    pub fn get_rule_name(&self) -> &::std::option::Option<::std::string::String> {
72        &self.rule_name
73    }
74    /// <p>A client token.</p>
75    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    /// <p>A client token.</p>
80    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.client_token = input;
82        self
83    }
84    /// <p>A client token.</p>
85    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
86        &self.client_token
87    }
88    /// Consumes the builder and constructs a [`ApplyArchiveRuleInput`](crate::operation::apply_archive_rule::ApplyArchiveRuleInput).
89    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}