aws_sdk_kafka/types/
_serverless.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Serverless {
7 pub vpc_configs: ::std::option::Option<::std::vec::Vec<crate::types::VpcConfig>>,
9 pub client_authentication: ::std::option::Option<crate::types::ServerlessClientAuthentication>,
11}
12impl Serverless {
13 pub fn vpc_configs(&self) -> &[crate::types::VpcConfig] {
17 self.vpc_configs.as_deref().unwrap_or_default()
18 }
19 pub fn client_authentication(&self) -> ::std::option::Option<&crate::types::ServerlessClientAuthentication> {
21 self.client_authentication.as_ref()
22 }
23}
24impl Serverless {
25 pub fn builder() -> crate::types::builders::ServerlessBuilder {
27 crate::types::builders::ServerlessBuilder::default()
28 }
29}
30
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct ServerlessBuilder {
35 pub(crate) vpc_configs: ::std::option::Option<::std::vec::Vec<crate::types::VpcConfig>>,
36 pub(crate) client_authentication: ::std::option::Option<crate::types::ServerlessClientAuthentication>,
37}
38impl ServerlessBuilder {
39 pub fn vpc_configs(mut self, input: crate::types::VpcConfig) -> Self {
45 let mut v = self.vpc_configs.unwrap_or_default();
46 v.push(input);
47 self.vpc_configs = ::std::option::Option::Some(v);
48 self
49 }
50 pub fn set_vpc_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcConfig>>) -> Self {
52 self.vpc_configs = input;
53 self
54 }
55 pub fn get_vpc_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcConfig>> {
57 &self.vpc_configs
58 }
59 pub fn client_authentication(mut self, input: crate::types::ServerlessClientAuthentication) -> Self {
61 self.client_authentication = ::std::option::Option::Some(input);
62 self
63 }
64 pub fn set_client_authentication(mut self, input: ::std::option::Option<crate::types::ServerlessClientAuthentication>) -> Self {
66 self.client_authentication = input;
67 self
68 }
69 pub fn get_client_authentication(&self) -> &::std::option::Option<crate::types::ServerlessClientAuthentication> {
71 &self.client_authentication
72 }
73 pub fn build(self) -> crate::types::Serverless {
75 crate::types::Serverless {
76 vpc_configs: self.vpc_configs,
77 client_authentication: self.client_authentication,
78 }
79 }
80}