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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Retroactively applies an archive rule.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ApplyArchiveRuleInput {
    /// <p>The Amazon resource name (ARN) of the analyzer.</p>
    #[doc(hidden)]
    pub analyzer_arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the rule to apply.</p>
    #[doc(hidden)]
    pub rule_name: ::std::option::Option<::std::string::String>,
    /// <p>A client token.</p>
    #[doc(hidden)]
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl ApplyArchiveRuleInput {
    /// <p>The Amazon resource name (ARN) of the analyzer.</p>
    pub fn analyzer_arn(&self) -> ::std::option::Option<&str> {
        self.analyzer_arn.as_deref()
    }
    /// <p>The name of the rule to apply.</p>
    pub fn rule_name(&self) -> ::std::option::Option<&str> {
        self.rule_name.as_deref()
    }
    /// <p>A client token.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl ApplyArchiveRuleInput {
    /// Creates a new builder-style object to manufacture [`ApplyArchiveRuleInput`](crate::operation::apply_archive_rule::ApplyArchiveRuleInput).
    pub fn builder() -> crate::operation::apply_archive_rule::builders::ApplyArchiveRuleInputBuilder
    {
        crate::operation::apply_archive_rule::builders::ApplyArchiveRuleInputBuilder::default()
    }
}

/// A builder for [`ApplyArchiveRuleInput`](crate::operation::apply_archive_rule::ApplyArchiveRuleInput).
#[non_exhaustive]
#[derive(
    ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug,
)]
pub struct ApplyArchiveRuleInputBuilder {
    pub(crate) analyzer_arn: ::std::option::Option<::std::string::String>,
    pub(crate) rule_name: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl ApplyArchiveRuleInputBuilder {
    /// <p>The Amazon resource name (ARN) of the analyzer.</p>
    pub fn analyzer_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.analyzer_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon resource name (ARN) of the analyzer.</p>
    pub fn set_analyzer_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.analyzer_arn = input;
        self
    }
    /// <p>The name of the rule to apply.</p>
    pub fn rule_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rule_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the rule to apply.</p>
    pub fn set_rule_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_name = input;
        self
    }
    /// <p>A client token.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A client token.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// Consumes the builder and constructs a [`ApplyArchiveRuleInput`](crate::operation::apply_archive_rule::ApplyArchiveRuleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::apply_archive_rule::ApplyArchiveRuleInput,
        ::aws_smithy_http::operation::error::BuildError,
    > {
        ::std::result::Result::Ok(
            crate::operation::apply_archive_rule::ApplyArchiveRuleInput {
                analyzer_arn: self.analyzer_arn,
                rule_name: self.rule_name,
                client_token: self.client_token,
            },
        )
    }
}