aws_sdk_securityhub/types/
_aws_elb_load_balancer_source_security_group.rs

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