aws_sdk_redshift/operation/authorize_cluster_security_group_ingress/
_authorize_cluster_security_group_ingress_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AuthorizeClusterSecurityGroupIngressInput {
7 pub cluster_security_group_name: ::std::option::Option<::std::string::String>,
9 pub cidrip: ::std::option::Option<::std::string::String>,
11 pub ec2_security_group_name: ::std::option::Option<::std::string::String>,
13 pub ec2_security_group_owner_id: ::std::option::Option<::std::string::String>,
16}
17impl AuthorizeClusterSecurityGroupIngressInput {
18 pub fn cluster_security_group_name(&self) -> ::std::option::Option<&str> {
20 self.cluster_security_group_name.as_deref()
21 }
22 pub fn cidrip(&self) -> ::std::option::Option<&str> {
24 self.cidrip.as_deref()
25 }
26 pub fn ec2_security_group_name(&self) -> ::std::option::Option<&str> {
28 self.ec2_security_group_name.as_deref()
29 }
30 pub fn ec2_security_group_owner_id(&self) -> ::std::option::Option<&str> {
33 self.ec2_security_group_owner_id.as_deref()
34 }
35}
36impl AuthorizeClusterSecurityGroupIngressInput {
37 pub fn builder() -> crate::operation::authorize_cluster_security_group_ingress::builders::AuthorizeClusterSecurityGroupIngressInputBuilder {
39 crate::operation::authorize_cluster_security_group_ingress::builders::AuthorizeClusterSecurityGroupIngressInputBuilder::default()
40 }
41}
42
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
45#[non_exhaustive]
46pub struct AuthorizeClusterSecurityGroupIngressInputBuilder {
47 pub(crate) cluster_security_group_name: ::std::option::Option<::std::string::String>,
48 pub(crate) cidrip: ::std::option::Option<::std::string::String>,
49 pub(crate) ec2_security_group_name: ::std::option::Option<::std::string::String>,
50 pub(crate) ec2_security_group_owner_id: ::std::option::Option<::std::string::String>,
51}
52impl AuthorizeClusterSecurityGroupIngressInputBuilder {
53 pub fn cluster_security_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
56 self.cluster_security_group_name = ::std::option::Option::Some(input.into());
57 self
58 }
59 pub fn set_cluster_security_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
61 self.cluster_security_group_name = input;
62 self
63 }
64 pub fn get_cluster_security_group_name(&self) -> &::std::option::Option<::std::string::String> {
66 &self.cluster_security_group_name
67 }
68 pub fn cidrip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70 self.cidrip = ::std::option::Option::Some(input.into());
71 self
72 }
73 pub fn set_cidrip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75 self.cidrip = input;
76 self
77 }
78 pub fn get_cidrip(&self) -> &::std::option::Option<::std::string::String> {
80 &self.cidrip
81 }
82 pub fn ec2_security_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84 self.ec2_security_group_name = ::std::option::Option::Some(input.into());
85 self
86 }
87 pub fn set_ec2_security_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89 self.ec2_security_group_name = input;
90 self
91 }
92 pub fn get_ec2_security_group_name(&self) -> &::std::option::Option<::std::string::String> {
94 &self.ec2_security_group_name
95 }
96 pub fn ec2_security_group_owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99 self.ec2_security_group_owner_id = ::std::option::Option::Some(input.into());
100 self
101 }
102 pub fn set_ec2_security_group_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105 self.ec2_security_group_owner_id = input;
106 self
107 }
108 pub fn get_ec2_security_group_owner_id(&self) -> &::std::option::Option<::std::string::String> {
111 &self.ec2_security_group_owner_id
112 }
113 pub fn build(
115 self,
116 ) -> ::std::result::Result<
117 crate::operation::authorize_cluster_security_group_ingress::AuthorizeClusterSecurityGroupIngressInput,
118 ::aws_smithy_types::error::operation::BuildError,
119 > {
120 ::std::result::Result::Ok(
121 crate::operation::authorize_cluster_security_group_ingress::AuthorizeClusterSecurityGroupIngressInput {
122 cluster_security_group_name: self.cluster_security_group_name,
123 cidrip: self.cidrip,
124 ec2_security_group_name: self.ec2_security_group_name,
125 ec2_security_group_owner_id: self.ec2_security_group_owner_id,
126 },
127 )
128 }
129}