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

/// <p>A version of the named managed rule group, that the rule group's vendor publishes for use by customers.</p><note>
/// <p>This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Amazon Web Services Marketplace sellers.</p>
/// <p>Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are <code>ListManagedRuleSets</code>, <code>GetManagedRuleSet</code>, <code>PutManagedRuleSetVersions</code>, and <code>UpdateManagedRuleSetVersionExpiryDate</code>.</p>
/// </note>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct VersionToPublish {
    /// <p>The Amazon Resource Name (ARN) of the vendor's rule group that's used in the published managed rule group version.</p>
    pub associated_rule_group_arn: ::std::option::Option<::std::string::String>,
    /// <p>The amount of time the vendor expects this version of the managed rule group to last, in days.</p>
    pub forecasted_lifetime: ::std::option::Option<i32>,
}
impl VersionToPublish {
    /// <p>The Amazon Resource Name (ARN) of the vendor's rule group that's used in the published managed rule group version.</p>
    pub fn associated_rule_group_arn(&self) -> ::std::option::Option<&str> {
        self.associated_rule_group_arn.as_deref()
    }
    /// <p>The amount of time the vendor expects this version of the managed rule group to last, in days.</p>
    pub fn forecasted_lifetime(&self) -> ::std::option::Option<i32> {
        self.forecasted_lifetime
    }
}
impl VersionToPublish {
    /// Creates a new builder-style object to manufacture [`VersionToPublish`](crate::types::VersionToPublish).
    pub fn builder() -> crate::types::builders::VersionToPublishBuilder {
        crate::types::builders::VersionToPublishBuilder::default()
    }
}

/// A builder for [`VersionToPublish`](crate::types::VersionToPublish).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct VersionToPublishBuilder {
    pub(crate) associated_rule_group_arn: ::std::option::Option<::std::string::String>,
    pub(crate) forecasted_lifetime: ::std::option::Option<i32>,
}
impl VersionToPublishBuilder {
    /// <p>The Amazon Resource Name (ARN) of the vendor's rule group that's used in the published managed rule group version.</p>
    pub fn associated_rule_group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.associated_rule_group_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the vendor's rule group that's used in the published managed rule group version.</p>
    pub fn set_associated_rule_group_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.associated_rule_group_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the vendor's rule group that's used in the published managed rule group version.</p>
    pub fn get_associated_rule_group_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.associated_rule_group_arn
    }
    /// <p>The amount of time the vendor expects this version of the managed rule group to last, in days.</p>
    pub fn forecasted_lifetime(mut self, input: i32) -> Self {
        self.forecasted_lifetime = ::std::option::Option::Some(input);
        self
    }
    /// <p>The amount of time the vendor expects this version of the managed rule group to last, in days.</p>
    pub fn set_forecasted_lifetime(mut self, input: ::std::option::Option<i32>) -> Self {
        self.forecasted_lifetime = input;
        self
    }
    /// <p>The amount of time the vendor expects this version of the managed rule group to last, in days.</p>
    pub fn get_forecasted_lifetime(&self) -> &::std::option::Option<i32> {
        &self.forecasted_lifetime
    }
    /// Consumes the builder and constructs a [`VersionToPublish`](crate::types::VersionToPublish).
    pub fn build(self) -> crate::types::VersionToPublish {
        crate::types::VersionToPublish {
            associated_rule_group_arn: self.associated_rule_group_arn,
            forecasted_lifetime: self.forecasted_lifetime,
        }
    }
}