aws_sdk_mq/operation/describe_configuration/
_describe_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 DescribeConfigurationOutput {
6    /// <p>Required. The ARN of the configuration.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>Optional. The authentication strategy associated with the configuration. The default is SIMPLE.</p>
9    pub authentication_strategy: ::std::option::Option<crate::types::AuthenticationStrategy>,
10    /// <p>Required. The date and time of the configuration revision.</p>
11    pub created: ::std::option::Option<::aws_smithy_types::DateTime>,
12    /// <p>Required. The description of the configuration.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.</p>
15    pub engine_type: ::std::option::Option<crate::types::EngineType>,
16    /// <p>The broker engine version. Defaults to the latest available version for the specified broker engine type. For a list of supported engine versions, see the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/activemq-version-management.html">ActiveMQ version management</a> and the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/rabbitmq-version-management.html">RabbitMQ version management</a> sections in the Amazon MQ Developer Guide.</p>
17    pub engine_version: ::std::option::Option<::std::string::String>,
18    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
19    pub id: ::std::option::Option<::std::string::String>,
20    /// <p>Required. The latest revision of the configuration.</p>
21    pub latest_revision: ::std::option::Option<crate::types::ConfigurationRevision>,
22    /// <p>Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.</p>
23    pub name: ::std::option::Option<::std::string::String>,
24    /// <p>The list of all tags associated with this configuration.</p>
25    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
26    _request_id: Option<String>,
27}
28impl DescribeConfigurationOutput {
29    /// <p>Required. The ARN of the configuration.</p>
30    pub fn arn(&self) -> ::std::option::Option<&str> {
31        self.arn.as_deref()
32    }
33    /// <p>Optional. The authentication strategy associated with the configuration. The default is SIMPLE.</p>
34    pub fn authentication_strategy(&self) -> ::std::option::Option<&crate::types::AuthenticationStrategy> {
35        self.authentication_strategy.as_ref()
36    }
37    /// <p>Required. The date and time of the configuration revision.</p>
38    pub fn created(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
39        self.created.as_ref()
40    }
41    /// <p>Required. The description of the configuration.</p>
42    pub fn description(&self) -> ::std::option::Option<&str> {
43        self.description.as_deref()
44    }
45    /// <p>Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.</p>
46    pub fn engine_type(&self) -> ::std::option::Option<&crate::types::EngineType> {
47        self.engine_type.as_ref()
48    }
49    /// <p>The broker engine version. Defaults to the latest available version for the specified broker engine type. For a list of supported engine versions, see the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/activemq-version-management.html">ActiveMQ version management</a> and the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/rabbitmq-version-management.html">RabbitMQ version management</a> sections in the Amazon MQ Developer Guide.</p>
50    pub fn engine_version(&self) -> ::std::option::Option<&str> {
51        self.engine_version.as_deref()
52    }
53    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
54    pub fn id(&self) -> ::std::option::Option<&str> {
55        self.id.as_deref()
56    }
57    /// <p>Required. The latest revision of the configuration.</p>
58    pub fn latest_revision(&self) -> ::std::option::Option<&crate::types::ConfigurationRevision> {
59        self.latest_revision.as_ref()
60    }
61    /// <p>Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.</p>
62    pub fn name(&self) -> ::std::option::Option<&str> {
63        self.name.as_deref()
64    }
65    /// <p>The list of all tags associated with this configuration.</p>
66    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
67        self.tags.as_ref()
68    }
69}
70impl ::aws_types::request_id::RequestId for DescribeConfigurationOutput {
71    fn request_id(&self) -> Option<&str> {
72        self._request_id.as_deref()
73    }
74}
75impl DescribeConfigurationOutput {
76    /// Creates a new builder-style object to manufacture [`DescribeConfigurationOutput`](crate::operation::describe_configuration::DescribeConfigurationOutput).
77    pub fn builder() -> crate::operation::describe_configuration::builders::DescribeConfigurationOutputBuilder {
78        crate::operation::describe_configuration::builders::DescribeConfigurationOutputBuilder::default()
79    }
80}
81
82/// A builder for [`DescribeConfigurationOutput`](crate::operation::describe_configuration::DescribeConfigurationOutput).
83#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
84#[non_exhaustive]
85pub struct DescribeConfigurationOutputBuilder {
86    pub(crate) arn: ::std::option::Option<::std::string::String>,
87    pub(crate) authentication_strategy: ::std::option::Option<crate::types::AuthenticationStrategy>,
88    pub(crate) created: ::std::option::Option<::aws_smithy_types::DateTime>,
89    pub(crate) description: ::std::option::Option<::std::string::String>,
90    pub(crate) engine_type: ::std::option::Option<crate::types::EngineType>,
91    pub(crate) engine_version: ::std::option::Option<::std::string::String>,
92    pub(crate) id: ::std::option::Option<::std::string::String>,
93    pub(crate) latest_revision: ::std::option::Option<crate::types::ConfigurationRevision>,
94    pub(crate) name: ::std::option::Option<::std::string::String>,
95    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
96    _request_id: Option<String>,
97}
98impl DescribeConfigurationOutputBuilder {
99    /// <p>Required. The ARN of the configuration.</p>
100    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.arn = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// <p>Required. The ARN of the configuration.</p>
105    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.arn = input;
107        self
108    }
109    /// <p>Required. The ARN of the configuration.</p>
110    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
111        &self.arn
112    }
113    /// <p>Optional. The authentication strategy associated with the configuration. The default is SIMPLE.</p>
114    pub fn authentication_strategy(mut self, input: crate::types::AuthenticationStrategy) -> Self {
115        self.authentication_strategy = ::std::option::Option::Some(input);
116        self
117    }
118    /// <p>Optional. The authentication strategy associated with the configuration. The default is SIMPLE.</p>
119    pub fn set_authentication_strategy(mut self, input: ::std::option::Option<crate::types::AuthenticationStrategy>) -> Self {
120        self.authentication_strategy = input;
121        self
122    }
123    /// <p>Optional. The authentication strategy associated with the configuration. The default is SIMPLE.</p>
124    pub fn get_authentication_strategy(&self) -> &::std::option::Option<crate::types::AuthenticationStrategy> {
125        &self.authentication_strategy
126    }
127    /// <p>Required. The date and time of the configuration revision.</p>
128    pub fn created(mut self, input: ::aws_smithy_types::DateTime) -> Self {
129        self.created = ::std::option::Option::Some(input);
130        self
131    }
132    /// <p>Required. The date and time of the configuration revision.</p>
133    pub fn set_created(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
134        self.created = input;
135        self
136    }
137    /// <p>Required. The date and time of the configuration revision.</p>
138    pub fn get_created(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
139        &self.created
140    }
141    /// <p>Required. The description of the configuration.</p>
142    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.description = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>Required. The description of the configuration.</p>
147    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.description = input;
149        self
150    }
151    /// <p>Required. The description of the configuration.</p>
152    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
153        &self.description
154    }
155    /// <p>Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.</p>
156    pub fn engine_type(mut self, input: crate::types::EngineType) -> Self {
157        self.engine_type = ::std::option::Option::Some(input);
158        self
159    }
160    /// <p>Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.</p>
161    pub fn set_engine_type(mut self, input: ::std::option::Option<crate::types::EngineType>) -> Self {
162        self.engine_type = input;
163        self
164    }
165    /// <p>Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.</p>
166    pub fn get_engine_type(&self) -> &::std::option::Option<crate::types::EngineType> {
167        &self.engine_type
168    }
169    /// <p>The broker engine version. Defaults to the latest available version for the specified broker engine type. For a list of supported engine versions, see the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/activemq-version-management.html">ActiveMQ version management</a> and the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/rabbitmq-version-management.html">RabbitMQ version management</a> sections in the Amazon MQ Developer Guide.</p>
170    pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171        self.engine_version = ::std::option::Option::Some(input.into());
172        self
173    }
174    /// <p>The broker engine version. Defaults to the latest available version for the specified broker engine type. For a list of supported engine versions, see the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/activemq-version-management.html">ActiveMQ version management</a> and the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/rabbitmq-version-management.html">RabbitMQ version management</a> sections in the Amazon MQ Developer Guide.</p>
175    pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176        self.engine_version = input;
177        self
178    }
179    /// <p>The broker engine version. Defaults to the latest available version for the specified broker engine type. For a list of supported engine versions, see the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/activemq-version-management.html">ActiveMQ version management</a> and the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/rabbitmq-version-management.html">RabbitMQ version management</a> sections in the Amazon MQ Developer Guide.</p>
180    pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
181        &self.engine_version
182    }
183    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
184    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.id = ::std::option::Option::Some(input.into());
186        self
187    }
188    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
189    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.id = input;
191        self
192    }
193    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
194    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
195        &self.id
196    }
197    /// <p>Required. The latest revision of the configuration.</p>
198    pub fn latest_revision(mut self, input: crate::types::ConfigurationRevision) -> Self {
199        self.latest_revision = ::std::option::Option::Some(input);
200        self
201    }
202    /// <p>Required. The latest revision of the configuration.</p>
203    pub fn set_latest_revision(mut self, input: ::std::option::Option<crate::types::ConfigurationRevision>) -> Self {
204        self.latest_revision = input;
205        self
206    }
207    /// <p>Required. The latest revision of the configuration.</p>
208    pub fn get_latest_revision(&self) -> &::std::option::Option<crate::types::ConfigurationRevision> {
209        &self.latest_revision
210    }
211    /// <p>Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.</p>
212    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213        self.name = ::std::option::Option::Some(input.into());
214        self
215    }
216    /// <p>Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.</p>
217    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
218        self.name = input;
219        self
220    }
221    /// <p>Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.</p>
222    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
223        &self.name
224    }
225    /// Adds a key-value pair to `tags`.
226    ///
227    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
228    ///
229    /// <p>The list of all tags associated with this configuration.</p>
230    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
231        let mut hash_map = self.tags.unwrap_or_default();
232        hash_map.insert(k.into(), v.into());
233        self.tags = ::std::option::Option::Some(hash_map);
234        self
235    }
236    /// <p>The list of all tags associated with this configuration.</p>
237    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
238        self.tags = input;
239        self
240    }
241    /// <p>The list of all tags associated with this configuration.</p>
242    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
243        &self.tags
244    }
245    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
246        self._request_id = Some(request_id.into());
247        self
248    }
249
250    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
251        self._request_id = request_id;
252        self
253    }
254    /// Consumes the builder and constructs a [`DescribeConfigurationOutput`](crate::operation::describe_configuration::DescribeConfigurationOutput).
255    pub fn build(self) -> crate::operation::describe_configuration::DescribeConfigurationOutput {
256        crate::operation::describe_configuration::DescribeConfigurationOutput {
257            arn: self.arn,
258            authentication_strategy: self.authentication_strategy,
259            created: self.created,
260            description: self.description,
261            engine_type: self.engine_type,
262            engine_version: self.engine_version,
263            id: self.id,
264            latest_revision: self.latest_revision,
265            name: self.name,
266            tags: self.tags,
267            _request_id: self._request_id,
268        }
269    }
270}