aws_sdk_mq/operation/update_configuration/
_update_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 UpdateConfigurationOutput {
6    /// <p>The Amazon Resource Name (ARN) of the configuration.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>Required. The date and time of the configuration.</p>
9    pub created: ::std::option::Option<::aws_smithy_types::DateTime>,
10    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
11    pub id: ::std::option::Option<::std::string::String>,
12    /// <p>The latest revision of the configuration.</p>
13    pub latest_revision: ::std::option::Option<crate::types::ConfigurationRevision>,
14    /// <p>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>
15    pub name: ::std::option::Option<::std::string::String>,
16    /// <p>The list of the first 20 warnings about the configuration elements or attributes that were sanitized.</p>
17    pub warnings: ::std::option::Option<::std::vec::Vec<crate::types::SanitizationWarning>>,
18    _request_id: Option<String>,
19}
20impl UpdateConfigurationOutput {
21    /// <p>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>Required. The date and time of the configuration.</p>
26    pub fn created(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
27        self.created.as_ref()
28    }
29    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
30    pub fn id(&self) -> ::std::option::Option<&str> {
31        self.id.as_deref()
32    }
33    /// <p>The latest revision of the configuration.</p>
34    pub fn latest_revision(&self) -> ::std::option::Option<&crate::types::ConfigurationRevision> {
35        self.latest_revision.as_ref()
36    }
37    /// <p>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>
38    pub fn name(&self) -> ::std::option::Option<&str> {
39        self.name.as_deref()
40    }
41    /// <p>The list of the first 20 warnings about the configuration elements or attributes that were sanitized.</p>
42    ///
43    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.warnings.is_none()`.
44    pub fn warnings(&self) -> &[crate::types::SanitizationWarning] {
45        self.warnings.as_deref().unwrap_or_default()
46    }
47}
48impl ::aws_types::request_id::RequestId for UpdateConfigurationOutput {
49    fn request_id(&self) -> Option<&str> {
50        self._request_id.as_deref()
51    }
52}
53impl UpdateConfigurationOutput {
54    /// Creates a new builder-style object to manufacture [`UpdateConfigurationOutput`](crate::operation::update_configuration::UpdateConfigurationOutput).
55    pub fn builder() -> crate::operation::update_configuration::builders::UpdateConfigurationOutputBuilder {
56        crate::operation::update_configuration::builders::UpdateConfigurationOutputBuilder::default()
57    }
58}
59
60/// A builder for [`UpdateConfigurationOutput`](crate::operation::update_configuration::UpdateConfigurationOutput).
61#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
62#[non_exhaustive]
63pub struct UpdateConfigurationOutputBuilder {
64    pub(crate) arn: ::std::option::Option<::std::string::String>,
65    pub(crate) created: ::std::option::Option<::aws_smithy_types::DateTime>,
66    pub(crate) id: ::std::option::Option<::std::string::String>,
67    pub(crate) latest_revision: ::std::option::Option<crate::types::ConfigurationRevision>,
68    pub(crate) name: ::std::option::Option<::std::string::String>,
69    pub(crate) warnings: ::std::option::Option<::std::vec::Vec<crate::types::SanitizationWarning>>,
70    _request_id: Option<String>,
71}
72impl UpdateConfigurationOutputBuilder {
73    /// <p>The Amazon Resource Name (ARN) of the configuration.</p>
74    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.arn = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The Amazon Resource Name (ARN) of the configuration.</p>
79    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.arn = input;
81        self
82    }
83    /// <p>The Amazon Resource Name (ARN) of the configuration.</p>
84    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
85        &self.arn
86    }
87    /// <p>Required. The date and time of the configuration.</p>
88    pub fn created(mut self, input: ::aws_smithy_types::DateTime) -> Self {
89        self.created = ::std::option::Option::Some(input);
90        self
91    }
92    /// <p>Required. The date and time of the configuration.</p>
93    pub fn set_created(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
94        self.created = input;
95        self
96    }
97    /// <p>Required. The date and time of the configuration.</p>
98    pub fn get_created(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
99        &self.created
100    }
101    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
102    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.id = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
107    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.id = input;
109        self
110    }
111    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
112    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
113        &self.id
114    }
115    /// <p>The latest revision of the configuration.</p>
116    pub fn latest_revision(mut self, input: crate::types::ConfigurationRevision) -> Self {
117        self.latest_revision = ::std::option::Option::Some(input);
118        self
119    }
120    /// <p>The latest revision of the configuration.</p>
121    pub fn set_latest_revision(mut self, input: ::std::option::Option<crate::types::ConfigurationRevision>) -> Self {
122        self.latest_revision = input;
123        self
124    }
125    /// <p>The latest revision of the configuration.</p>
126    pub fn get_latest_revision(&self) -> &::std::option::Option<crate::types::ConfigurationRevision> {
127        &self.latest_revision
128    }
129    /// <p>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>
130    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.name = ::std::option::Option::Some(input.into());
132        self
133    }
134    /// <p>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>
135    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.name = input;
137        self
138    }
139    /// <p>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>
140    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
141        &self.name
142    }
143    /// Appends an item to `warnings`.
144    ///
145    /// To override the contents of this collection use [`set_warnings`](Self::set_warnings).
146    ///
147    /// <p>The list of the first 20 warnings about the configuration elements or attributes that were sanitized.</p>
148    pub fn warnings(mut self, input: crate::types::SanitizationWarning) -> Self {
149        let mut v = self.warnings.unwrap_or_default();
150        v.push(input);
151        self.warnings = ::std::option::Option::Some(v);
152        self
153    }
154    /// <p>The list of the first 20 warnings about the configuration elements or attributes that were sanitized.</p>
155    pub fn set_warnings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SanitizationWarning>>) -> Self {
156        self.warnings = input;
157        self
158    }
159    /// <p>The list of the first 20 warnings about the configuration elements or attributes that were sanitized.</p>
160    pub fn get_warnings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SanitizationWarning>> {
161        &self.warnings
162    }
163    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
164        self._request_id = Some(request_id.into());
165        self
166    }
167
168    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
169        self._request_id = request_id;
170        self
171    }
172    /// Consumes the builder and constructs a [`UpdateConfigurationOutput`](crate::operation::update_configuration::UpdateConfigurationOutput).
173    pub fn build(self) -> crate::operation::update_configuration::UpdateConfigurationOutput {
174        crate::operation::update_configuration::UpdateConfigurationOutput {
175            arn: self.arn,
176            created: self.created,
177            id: self.id,
178            latest_revision: self.latest_revision,
179            name: self.name,
180            warnings: self.warnings,
181            _request_id: self._request_id,
182        }
183    }
184}