Skip to main content

aws_sdk_docdb/types/
_vpc_security_group_membership.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Used as a response element for queries on virtual private cloud (VPC) security group membership.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct VpcSecurityGroupMembership {
7    /// <p>The name of the VPC security group.</p>
8    pub vpc_security_group_id: ::std::option::Option<::std::string::String>,
9    /// <p>The status of the VPC security group.</p>
10    pub status: ::std::option::Option<::std::string::String>,
11}
12impl VpcSecurityGroupMembership {
13    /// <p>The name of the VPC security group.</p>
14    pub fn vpc_security_group_id(&self) -> ::std::option::Option<&str> {
15        self.vpc_security_group_id.as_deref()
16    }
17    /// <p>The status of the VPC security group.</p>
18    pub fn status(&self) -> ::std::option::Option<&str> {
19        self.status.as_deref()
20    }
21}
22impl VpcSecurityGroupMembership {
23    /// Creates a new builder-style object to manufacture [`VpcSecurityGroupMembership`](crate::types::VpcSecurityGroupMembership).
24    pub fn builder() -> crate::types::builders::VpcSecurityGroupMembershipBuilder {
25        crate::types::builders::VpcSecurityGroupMembershipBuilder::default()
26    }
27}
28
29/// A builder for [`VpcSecurityGroupMembership`](crate::types::VpcSecurityGroupMembership).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct VpcSecurityGroupMembershipBuilder {
33    pub(crate) vpc_security_group_id: ::std::option::Option<::std::string::String>,
34    pub(crate) status: ::std::option::Option<::std::string::String>,
35}
36impl VpcSecurityGroupMembershipBuilder {
37    /// <p>The name of the VPC security group.</p>
38    pub fn vpc_security_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.vpc_security_group_id = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The name of the VPC security group.</p>
43    pub fn set_vpc_security_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.vpc_security_group_id = input;
45        self
46    }
47    /// <p>The name of the VPC security group.</p>
48    pub fn get_vpc_security_group_id(&self) -> &::std::option::Option<::std::string::String> {
49        &self.vpc_security_group_id
50    }
51    /// <p>The status of the VPC security group.</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>The status of the VPC security group.</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>The status of the VPC security group.</p>
62    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
63        &self.status
64    }
65    /// Consumes the builder and constructs a [`VpcSecurityGroupMembership`](crate::types::VpcSecurityGroupMembership).
66    pub fn build(self) -> crate::types::VpcSecurityGroupMembership {
67        crate::types::VpcSecurityGroupMembership {
68            vpc_security_group_id: self.vpc_security_group_id,
69            status: self.status,
70        }
71    }
72}