aws_sdk_mq/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>Required. The Amazon Resource Name (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.</p>
11    pub created: ::std::option::Option<::aws_smithy_types::DateTime>,
12    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
13    pub id: ::std::option::Option<::std::string::String>,
14    /// <p>The latest revision of the configuration.</p>
15    pub latest_revision: ::std::option::Option<crate::types::ConfigurationRevision>,
16    /// <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>
17    pub name: ::std::option::Option<::std::string::String>,
18    _request_id: Option<String>,
19}
20impl CreateConfigurationOutput {
21    /// <p>Required. The Amazon Resource Name (ARN) of the configuration.</p>
22    pub fn arn(&self) -> ::std::option::Option<&str> {
23        self.arn.as_deref()
24    }
25    /// <p>Optional. The authentication strategy associated with the configuration. The default is SIMPLE.</p>
26    pub fn authentication_strategy(&self) -> ::std::option::Option<&crate::types::AuthenticationStrategy> {
27        self.authentication_strategy.as_ref()
28    }
29    /// <p>Required. The date and time of the configuration.</p>
30    pub fn created(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
31        self.created.as_ref()
32    }
33    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
34    pub fn id(&self) -> ::std::option::Option<&str> {
35        self.id.as_deref()
36    }
37    /// <p>The latest revision of the configuration.</p>
38    pub fn latest_revision(&self) -> ::std::option::Option<&crate::types::ConfigurationRevision> {
39        self.latest_revision.as_ref()
40    }
41    /// <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>
42    pub fn name(&self) -> ::std::option::Option<&str> {
43        self.name.as_deref()
44    }
45}
46impl ::aws_types::request_id::RequestId for CreateConfigurationOutput {
47    fn request_id(&self) -> Option<&str> {
48        self._request_id.as_deref()
49    }
50}
51impl CreateConfigurationOutput {
52    /// Creates a new builder-style object to manufacture [`CreateConfigurationOutput`](crate::operation::create_configuration::CreateConfigurationOutput).
53    pub fn builder() -> crate::operation::create_configuration::builders::CreateConfigurationOutputBuilder {
54        crate::operation::create_configuration::builders::CreateConfigurationOutputBuilder::default()
55    }
56}
57
58/// A builder for [`CreateConfigurationOutput`](crate::operation::create_configuration::CreateConfigurationOutput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct CreateConfigurationOutputBuilder {
62    pub(crate) arn: ::std::option::Option<::std::string::String>,
63    pub(crate) authentication_strategy: ::std::option::Option<crate::types::AuthenticationStrategy>,
64    pub(crate) created: ::std::option::Option<::aws_smithy_types::DateTime>,
65    pub(crate) id: ::std::option::Option<::std::string::String>,
66    pub(crate) latest_revision: ::std::option::Option<crate::types::ConfigurationRevision>,
67    pub(crate) name: ::std::option::Option<::std::string::String>,
68    _request_id: Option<String>,
69}
70impl CreateConfigurationOutputBuilder {
71    /// <p>Required. The Amazon Resource Name (ARN) of the configuration.</p>
72    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.arn = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>Required. The Amazon Resource Name (ARN) of the configuration.</p>
77    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.arn = input;
79        self
80    }
81    /// <p>Required. The Amazon Resource Name (ARN) of the configuration.</p>
82    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
83        &self.arn
84    }
85    /// <p>Optional. The authentication strategy associated with the configuration. The default is SIMPLE.</p>
86    pub fn authentication_strategy(mut self, input: crate::types::AuthenticationStrategy) -> Self {
87        self.authentication_strategy = ::std::option::Option::Some(input);
88        self
89    }
90    /// <p>Optional. The authentication strategy associated with the configuration. The default is SIMPLE.</p>
91    pub fn set_authentication_strategy(mut self, input: ::std::option::Option<crate::types::AuthenticationStrategy>) -> Self {
92        self.authentication_strategy = input;
93        self
94    }
95    /// <p>Optional. The authentication strategy associated with the configuration. The default is SIMPLE.</p>
96    pub fn get_authentication_strategy(&self) -> &::std::option::Option<crate::types::AuthenticationStrategy> {
97        &self.authentication_strategy
98    }
99    /// <p>Required. The date and time of the configuration.</p>
100    pub fn created(mut self, input: ::aws_smithy_types::DateTime) -> Self {
101        self.created = ::std::option::Option::Some(input);
102        self
103    }
104    /// <p>Required. The date and time of the configuration.</p>
105    pub fn set_created(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
106        self.created = input;
107        self
108    }
109    /// <p>Required. The date and time of the configuration.</p>
110    pub fn get_created(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
111        &self.created
112    }
113    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
114    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.id = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
119    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.id = input;
121        self
122    }
123    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
124    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
125        &self.id
126    }
127    /// <p>The latest revision of the configuration.</p>
128    pub fn latest_revision(mut self, input: crate::types::ConfigurationRevision) -> Self {
129        self.latest_revision = ::std::option::Option::Some(input);
130        self
131    }
132    /// <p>The latest revision of the configuration.</p>
133    pub fn set_latest_revision(mut self, input: ::std::option::Option<crate::types::ConfigurationRevision>) -> Self {
134        self.latest_revision = input;
135        self
136    }
137    /// <p>The latest revision of the configuration.</p>
138    pub fn get_latest_revision(&self) -> &::std::option::Option<crate::types::ConfigurationRevision> {
139        &self.latest_revision
140    }
141    /// <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>
142    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.name = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <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>
147    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.name = input;
149        self
150    }
151    /// <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>
152    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
153        &self.name
154    }
155    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
156        self._request_id = Some(request_id.into());
157        self
158    }
159
160    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
161        self._request_id = request_id;
162        self
163    }
164    /// Consumes the builder and constructs a [`CreateConfigurationOutput`](crate::operation::create_configuration::CreateConfigurationOutput).
165    pub fn build(self) -> crate::operation::create_configuration::CreateConfigurationOutput {
166        crate::operation::create_configuration::CreateConfigurationOutput {
167            arn: self.arn,
168            authentication_strategy: self.authentication_strategy,
169            created: self.created,
170            id: self.id,
171            latest_revision: self.latest_revision,
172            name: self.name,
173            _request_id: self._request_id,
174        }
175    }
176}