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

/// <p>Describes a rule for an IP access control group.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct IpRuleItem {
    /// <p>The IP address range, in CIDR notation.</p>
    pub ip_rule: ::std::option::Option<::std::string::String>,
    /// <p>The description.</p>
    pub rule_desc: ::std::option::Option<::std::string::String>,
}
impl IpRuleItem {
    /// <p>The IP address range, in CIDR notation.</p>
    pub fn ip_rule(&self) -> ::std::option::Option<&str> {
        self.ip_rule.as_deref()
    }
    /// <p>The description.</p>
    pub fn rule_desc(&self) -> ::std::option::Option<&str> {
        self.rule_desc.as_deref()
    }
}
impl IpRuleItem {
    /// Creates a new builder-style object to manufacture [`IpRuleItem`](crate::types::IpRuleItem).
    pub fn builder() -> crate::types::builders::IpRuleItemBuilder {
        crate::types::builders::IpRuleItemBuilder::default()
    }
}

/// A builder for [`IpRuleItem`](crate::types::IpRuleItem).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct IpRuleItemBuilder {
    pub(crate) ip_rule: ::std::option::Option<::std::string::String>,
    pub(crate) rule_desc: ::std::option::Option<::std::string::String>,
}
impl IpRuleItemBuilder {
    /// <p>The IP address range, in CIDR notation.</p>
    pub fn ip_rule(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ip_rule = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The IP address range, in CIDR notation.</p>
    pub fn set_ip_rule(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ip_rule = input;
        self
    }
    /// <p>The IP address range, in CIDR notation.</p>
    pub fn get_ip_rule(&self) -> &::std::option::Option<::std::string::String> {
        &self.ip_rule
    }
    /// <p>The description.</p>
    pub fn rule_desc(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rule_desc = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description.</p>
    pub fn set_rule_desc(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_desc = input;
        self
    }
    /// <p>The description.</p>
    pub fn get_rule_desc(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_desc
    }
    /// Consumes the builder and constructs a [`IpRuleItem`](crate::types::IpRuleItem).
    pub fn build(self) -> crate::types::IpRuleItem {
        crate::types::IpRuleItem {
            ip_rule: self.ip_rule,
            rule_desc: self.rule_desc,
        }
    }
}