aws_sdk_securityhub/types/
_aws_rds_db_security_group_ip_range.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>IP range information for an RDS DB security group.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AwsRdsDbSecurityGroupIpRange {
7    /// <p>Specifies the IP range.</p>
8    pub cidr_ip: ::std::option::Option<::std::string::String>,
9    /// <p>Specifies the status of the IP range.</p>
10    pub status: ::std::option::Option<::std::string::String>,
11}
12impl AwsRdsDbSecurityGroupIpRange {
13    /// <p>Specifies the IP range.</p>
14    pub fn cidr_ip(&self) -> ::std::option::Option<&str> {
15        self.cidr_ip.as_deref()
16    }
17    /// <p>Specifies the status of the IP range.</p>
18    pub fn status(&self) -> ::std::option::Option<&str> {
19        self.status.as_deref()
20    }
21}
22impl AwsRdsDbSecurityGroupIpRange {
23    /// Creates a new builder-style object to manufacture [`AwsRdsDbSecurityGroupIpRange`](crate::types::AwsRdsDbSecurityGroupIpRange).
24    pub fn builder() -> crate::types::builders::AwsRdsDbSecurityGroupIpRangeBuilder {
25        crate::types::builders::AwsRdsDbSecurityGroupIpRangeBuilder::default()
26    }
27}
28
29/// A builder for [`AwsRdsDbSecurityGroupIpRange`](crate::types::AwsRdsDbSecurityGroupIpRange).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct AwsRdsDbSecurityGroupIpRangeBuilder {
33    pub(crate) cidr_ip: ::std::option::Option<::std::string::String>,
34    pub(crate) status: ::std::option::Option<::std::string::String>,
35}
36impl AwsRdsDbSecurityGroupIpRangeBuilder {
37    /// <p>Specifies the IP range.</p>
38    pub fn cidr_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.cidr_ip = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>Specifies the IP range.</p>
43    pub fn set_cidr_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.cidr_ip = input;
45        self
46    }
47    /// <p>Specifies the IP range.</p>
48    pub fn get_cidr_ip(&self) -> &::std::option::Option<::std::string::String> {
49        &self.cidr_ip
50    }
51    /// <p>Specifies the status of the IP range.</p>
52    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.status = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>Specifies the status of the IP range.</p>
57    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.status = input;
59        self
60    }
61    /// <p>Specifies the status of the IP range.</p>
62    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
63        &self.status
64    }
65    /// Consumes the builder and constructs a [`AwsRdsDbSecurityGroupIpRange`](crate::types::AwsRdsDbSecurityGroupIpRange).
66    pub fn build(self) -> crate::types::AwsRdsDbSecurityGroupIpRange {
67        crate::types::AwsRdsDbSecurityGroupIpRange {
68            cidr_ip: self.cidr_ip,
69            status: self.status,
70        }
71    }
72}