aws_sdk_kafka/operation/create_configuration/
_create_configuration_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateConfigurationOutput {
6    /// <p>The Amazon Resource Name (ARN) of the configuration.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>The time when the configuration was created.</p>
9    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
10    /// <p>Latest revision of the configuration.</p>
11    pub latest_revision: ::std::option::Option<crate::types::ConfigurationRevision>,
12    /// <p>The name of the configuration.</p>
13    pub name: ::std::option::Option<::std::string::String>,
14    /// <p>The state of the configuration. The possible states are ACTIVE, DELETING, and DELETE_FAILED.</p>
15    pub state: ::std::option::Option<crate::types::ConfigurationState>,
16    _request_id: Option<String>,
17}
18impl CreateConfigurationOutput {
19    /// <p>The Amazon Resource Name (ARN) of the configuration.</p>
20    pub fn arn(&self) -> ::std::option::Option<&str> {
21        self.arn.as_deref()
22    }
23    /// <p>The time when the configuration was created.</p>
24    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
25        self.creation_time.as_ref()
26    }
27    /// <p>Latest revision of the configuration.</p>
28    pub fn latest_revision(&self) -> ::std::option::Option<&crate::types::ConfigurationRevision> {
29        self.latest_revision.as_ref()
30    }
31    /// <p>The name of the configuration.</p>
32    pub fn name(&self) -> ::std::option::Option<&str> {
33        self.name.as_deref()
34    }
35    /// <p>The state of the configuration. The possible states are ACTIVE, DELETING, and DELETE_FAILED.</p>
36    pub fn state(&self) -> ::std::option::Option<&crate::types::ConfigurationState> {
37        self.state.as_ref()
38    }
39}
40impl ::aws_types::request_id::RequestId for CreateConfigurationOutput {
41    fn request_id(&self) -> Option<&str> {
42        self._request_id.as_deref()
43    }
44}
45impl CreateConfigurationOutput {
46    /// Creates a new builder-style object to manufacture [`CreateConfigurationOutput`](crate::operation::create_configuration::CreateConfigurationOutput).
47    pub fn builder() -> crate::operation::create_configuration::builders::CreateConfigurationOutputBuilder {
48        crate::operation::create_configuration::builders::CreateConfigurationOutputBuilder::default()
49    }
50}
51
52/// A builder for [`CreateConfigurationOutput`](crate::operation::create_configuration::CreateConfigurationOutput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct CreateConfigurationOutputBuilder {
56    pub(crate) arn: ::std::option::Option<::std::string::String>,
57    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
58    pub(crate) latest_revision: ::std::option::Option<crate::types::ConfigurationRevision>,
59    pub(crate) name: ::std::option::Option<::std::string::String>,
60    pub(crate) state: ::std::option::Option<crate::types::ConfigurationState>,
61    _request_id: Option<String>,
62}
63impl CreateConfigurationOutputBuilder {
64    /// <p>The Amazon Resource Name (ARN) of the configuration.</p>
65    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.arn = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The Amazon Resource Name (ARN) of the configuration.</p>
70    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.arn = input;
72        self
73    }
74    /// <p>The Amazon Resource Name (ARN) of the configuration.</p>
75    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
76        &self.arn
77    }
78    /// <p>The time when the configuration was created.</p>
79    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
80        self.creation_time = ::std::option::Option::Some(input);
81        self
82    }
83    /// <p>The time when the configuration was created.</p>
84    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
85        self.creation_time = input;
86        self
87    }
88    /// <p>The time when the configuration was created.</p>
89    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
90        &self.creation_time
91    }
92    /// <p>Latest revision of the configuration.</p>
93    pub fn latest_revision(mut self, input: crate::types::ConfigurationRevision) -> Self {
94        self.latest_revision = ::std::option::Option::Some(input);
95        self
96    }
97    /// <p>Latest revision of the configuration.</p>
98    pub fn set_latest_revision(mut self, input: ::std::option::Option<crate::types::ConfigurationRevision>) -> Self {
99        self.latest_revision = input;
100        self
101    }
102    /// <p>Latest revision of the configuration.</p>
103    pub fn get_latest_revision(&self) -> &::std::option::Option<crate::types::ConfigurationRevision> {
104        &self.latest_revision
105    }
106    /// <p>The name of the configuration.</p>
107    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.name = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The name of the configuration.</p>
112    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.name = input;
114        self
115    }
116    /// <p>The name of the configuration.</p>
117    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
118        &self.name
119    }
120    /// <p>The state of the configuration. The possible states are ACTIVE, DELETING, and DELETE_FAILED.</p>
121    pub fn state(mut self, input: crate::types::ConfigurationState) -> Self {
122        self.state = ::std::option::Option::Some(input);
123        self
124    }
125    /// <p>The state of the configuration. The possible states are ACTIVE, DELETING, and DELETE_FAILED.</p>
126    pub fn set_state(mut self, input: ::std::option::Option<crate::types::ConfigurationState>) -> Self {
127        self.state = input;
128        self
129    }
130    /// <p>The state of the configuration. The possible states are ACTIVE, DELETING, and DELETE_FAILED.</p>
131    pub fn get_state(&self) -> &::std::option::Option<crate::types::ConfigurationState> {
132        &self.state
133    }
134    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
135        self._request_id = Some(request_id.into());
136        self
137    }
138
139    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
140        self._request_id = request_id;
141        self
142    }
143    /// Consumes the builder and constructs a [`CreateConfigurationOutput`](crate::operation::create_configuration::CreateConfigurationOutput).
144    pub fn build(self) -> crate::operation::create_configuration::CreateConfigurationOutput {
145        crate::operation::create_configuration::CreateConfigurationOutput {
146            arn: self.arn,
147            creation_time: self.creation_time,
148            latest_revision: self.latest_revision,
149            name: self.name,
150            state: self.state,
151            _request_id: self._request_id,
152        }
153    }
154}