aws_sdk_kafka/operation/create_cluster/
_create_cluster_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateClusterOutput {
6 pub cluster_arn: ::std::option::Option<::std::string::String>,
8 pub cluster_name: ::std::option::Option<::std::string::String>,
10 pub state: ::std::option::Option<crate::types::ClusterState>,
12 _request_id: Option<String>,
13}
14impl CreateClusterOutput {
15 pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
17 self.cluster_arn.as_deref()
18 }
19 pub fn cluster_name(&self) -> ::std::option::Option<&str> {
21 self.cluster_name.as_deref()
22 }
23 pub fn state(&self) -> ::std::option::Option<&crate::types::ClusterState> {
25 self.state.as_ref()
26 }
27}
28impl ::aws_types::request_id::RequestId for CreateClusterOutput {
29 fn request_id(&self) -> Option<&str> {
30 self._request_id.as_deref()
31 }
32}
33impl CreateClusterOutput {
34 pub fn builder() -> crate::operation::create_cluster::builders::CreateClusterOutputBuilder {
36 crate::operation::create_cluster::builders::CreateClusterOutputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct CreateClusterOutputBuilder {
44 pub(crate) cluster_arn: ::std::option::Option<::std::string::String>,
45 pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
46 pub(crate) state: ::std::option::Option<crate::types::ClusterState>,
47 _request_id: Option<String>,
48}
49impl CreateClusterOutputBuilder {
50 pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52 self.cluster_arn = ::std::option::Option::Some(input.into());
53 self
54 }
55 pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57 self.cluster_arn = input;
58 self
59 }
60 pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
62 &self.cluster_arn
63 }
64 pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66 self.cluster_name = ::std::option::Option::Some(input.into());
67 self
68 }
69 pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71 self.cluster_name = input;
72 self
73 }
74 pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
76 &self.cluster_name
77 }
78 pub fn state(mut self, input: crate::types::ClusterState) -> Self {
80 self.state = ::std::option::Option::Some(input);
81 self
82 }
83 pub fn set_state(mut self, input: ::std::option::Option<crate::types::ClusterState>) -> Self {
85 self.state = input;
86 self
87 }
88 pub fn get_state(&self) -> &::std::option::Option<crate::types::ClusterState> {
90 &self.state
91 }
92 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
93 self._request_id = Some(request_id.into());
94 self
95 }
96
97 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
98 self._request_id = request_id;
99 self
100 }
101 pub fn build(self) -> crate::operation::create_cluster::CreateClusterOutput {
103 crate::operation::create_cluster::CreateClusterOutput {
104 cluster_arn: self.cluster_arn,
105 cluster_name: self.cluster_name,
106 state: self.state,
107 _request_id: self._request_id,
108 }
109 }
110}