aws_sdk_mq/operation/update_broker/
_update_broker_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 UpdateBrokerOutput {
6    /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
7    pub authentication_strategy: ::std::option::Option<crate::types::AuthenticationStrategy>,
8    /// <p>Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot.</p>
9    pub auto_minor_version_upgrade: ::std::option::Option<bool>,
10    /// <p>Required. The unique ID that Amazon MQ generates for the broker.</p>
11    pub broker_id: ::std::option::Option<::std::string::String>,
12    /// <p>The ID of the updated configuration.</p>
13    pub configuration: ::std::option::Option<crate::types::ConfigurationId>,
14    /// <p>The broker engine version to upgrade to. For more information, 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>
15    pub engine_version: ::std::option::Option<::std::string::String>,
16    /// <p>The broker's host instance type to upgrade to. For a list of supported instance types, see <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/broker.html#broker-instance-types">Broker instance types</a>.</p>
17    pub host_instance_type: ::std::option::Option<::std::string::String>,
18    /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
19    pub ldap_server_metadata: ::std::option::Option<crate::types::LdapServerMetadataOutput>,
20    /// <p>The list of information about logs to be enabled for the specified broker.</p>
21    pub logs: ::std::option::Option<crate::types::Logs>,
22    /// <p>The parameters that determine the WeeklyStartTime.</p>
23    pub maintenance_window_start_time: ::std::option::Option<crate::types::WeeklyStartTime>,
24    /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
25    pub security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
26    /// <p>The replication details of the data replication-enabled broker. Only returned if dataReplicationMode is set to CRDR.</p>
27    pub data_replication_metadata: ::std::option::Option<crate::types::DataReplicationMetadataOutput>,
28    /// <p>Describes whether this broker is a part of a data replication pair.</p>
29    pub data_replication_mode: ::std::option::Option<crate::types::DataReplicationMode>,
30    /// <p>The pending replication details of the data replication-enabled broker. Only returned if pendingDataReplicationMode is set to CRDR.</p>
31    pub pending_data_replication_metadata: ::std::option::Option<crate::types::DataReplicationMetadataOutput>,
32    /// <p>Describes whether this broker will be a part of a data replication pair after reboot.</p>
33    pub pending_data_replication_mode: ::std::option::Option<crate::types::DataReplicationMode>,
34    _request_id: Option<String>,
35}
36impl UpdateBrokerOutput {
37    /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
38    pub fn authentication_strategy(&self) -> ::std::option::Option<&crate::types::AuthenticationStrategy> {
39        self.authentication_strategy.as_ref()
40    }
41    /// <p>Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot.</p>
42    pub fn auto_minor_version_upgrade(&self) -> ::std::option::Option<bool> {
43        self.auto_minor_version_upgrade
44    }
45    /// <p>Required. The unique ID that Amazon MQ generates for the broker.</p>
46    pub fn broker_id(&self) -> ::std::option::Option<&str> {
47        self.broker_id.as_deref()
48    }
49    /// <p>The ID of the updated configuration.</p>
50    pub fn configuration(&self) -> ::std::option::Option<&crate::types::ConfigurationId> {
51        self.configuration.as_ref()
52    }
53    /// <p>The broker engine version to upgrade to. For more information, 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>
54    pub fn engine_version(&self) -> ::std::option::Option<&str> {
55        self.engine_version.as_deref()
56    }
57    /// <p>The broker's host instance type to upgrade to. For a list of supported instance types, see <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/broker.html#broker-instance-types">Broker instance types</a>.</p>
58    pub fn host_instance_type(&self) -> ::std::option::Option<&str> {
59        self.host_instance_type.as_deref()
60    }
61    /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
62    pub fn ldap_server_metadata(&self) -> ::std::option::Option<&crate::types::LdapServerMetadataOutput> {
63        self.ldap_server_metadata.as_ref()
64    }
65    /// <p>The list of information about logs to be enabled for the specified broker.</p>
66    pub fn logs(&self) -> ::std::option::Option<&crate::types::Logs> {
67        self.logs.as_ref()
68    }
69    /// <p>The parameters that determine the WeeklyStartTime.</p>
70    pub fn maintenance_window_start_time(&self) -> ::std::option::Option<&crate::types::WeeklyStartTime> {
71        self.maintenance_window_start_time.as_ref()
72    }
73    /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
74    ///
75    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.security_groups.is_none()`.
76    pub fn security_groups(&self) -> &[::std::string::String] {
77        self.security_groups.as_deref().unwrap_or_default()
78    }
79    /// <p>The replication details of the data replication-enabled broker. Only returned if dataReplicationMode is set to CRDR.</p>
80    pub fn data_replication_metadata(&self) -> ::std::option::Option<&crate::types::DataReplicationMetadataOutput> {
81        self.data_replication_metadata.as_ref()
82    }
83    /// <p>Describes whether this broker is a part of a data replication pair.</p>
84    pub fn data_replication_mode(&self) -> ::std::option::Option<&crate::types::DataReplicationMode> {
85        self.data_replication_mode.as_ref()
86    }
87    /// <p>The pending replication details of the data replication-enabled broker. Only returned if pendingDataReplicationMode is set to CRDR.</p>
88    pub fn pending_data_replication_metadata(&self) -> ::std::option::Option<&crate::types::DataReplicationMetadataOutput> {
89        self.pending_data_replication_metadata.as_ref()
90    }
91    /// <p>Describes whether this broker will be a part of a data replication pair after reboot.</p>
92    pub fn pending_data_replication_mode(&self) -> ::std::option::Option<&crate::types::DataReplicationMode> {
93        self.pending_data_replication_mode.as_ref()
94    }
95}
96impl ::aws_types::request_id::RequestId for UpdateBrokerOutput {
97    fn request_id(&self) -> Option<&str> {
98        self._request_id.as_deref()
99    }
100}
101impl UpdateBrokerOutput {
102    /// Creates a new builder-style object to manufacture [`UpdateBrokerOutput`](crate::operation::update_broker::UpdateBrokerOutput).
103    pub fn builder() -> crate::operation::update_broker::builders::UpdateBrokerOutputBuilder {
104        crate::operation::update_broker::builders::UpdateBrokerOutputBuilder::default()
105    }
106}
107
108/// A builder for [`UpdateBrokerOutput`](crate::operation::update_broker::UpdateBrokerOutput).
109#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
110#[non_exhaustive]
111pub struct UpdateBrokerOutputBuilder {
112    pub(crate) authentication_strategy: ::std::option::Option<crate::types::AuthenticationStrategy>,
113    pub(crate) auto_minor_version_upgrade: ::std::option::Option<bool>,
114    pub(crate) broker_id: ::std::option::Option<::std::string::String>,
115    pub(crate) configuration: ::std::option::Option<crate::types::ConfigurationId>,
116    pub(crate) engine_version: ::std::option::Option<::std::string::String>,
117    pub(crate) host_instance_type: ::std::option::Option<::std::string::String>,
118    pub(crate) ldap_server_metadata: ::std::option::Option<crate::types::LdapServerMetadataOutput>,
119    pub(crate) logs: ::std::option::Option<crate::types::Logs>,
120    pub(crate) maintenance_window_start_time: ::std::option::Option<crate::types::WeeklyStartTime>,
121    pub(crate) security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
122    pub(crate) data_replication_metadata: ::std::option::Option<crate::types::DataReplicationMetadataOutput>,
123    pub(crate) data_replication_mode: ::std::option::Option<crate::types::DataReplicationMode>,
124    pub(crate) pending_data_replication_metadata: ::std::option::Option<crate::types::DataReplicationMetadataOutput>,
125    pub(crate) pending_data_replication_mode: ::std::option::Option<crate::types::DataReplicationMode>,
126    _request_id: Option<String>,
127}
128impl UpdateBrokerOutputBuilder {
129    /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
130    pub fn authentication_strategy(mut self, input: crate::types::AuthenticationStrategy) -> Self {
131        self.authentication_strategy = ::std::option::Option::Some(input);
132        self
133    }
134    /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
135    pub fn set_authentication_strategy(mut self, input: ::std::option::Option<crate::types::AuthenticationStrategy>) -> Self {
136        self.authentication_strategy = input;
137        self
138    }
139    /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
140    pub fn get_authentication_strategy(&self) -> &::std::option::Option<crate::types::AuthenticationStrategy> {
141        &self.authentication_strategy
142    }
143    /// <p>Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot.</p>
144    pub fn auto_minor_version_upgrade(mut self, input: bool) -> Self {
145        self.auto_minor_version_upgrade = ::std::option::Option::Some(input);
146        self
147    }
148    /// <p>Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot.</p>
149    pub fn set_auto_minor_version_upgrade(mut self, input: ::std::option::Option<bool>) -> Self {
150        self.auto_minor_version_upgrade = input;
151        self
152    }
153    /// <p>Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot.</p>
154    pub fn get_auto_minor_version_upgrade(&self) -> &::std::option::Option<bool> {
155        &self.auto_minor_version_upgrade
156    }
157    /// <p>Required. The unique ID that Amazon MQ generates for the broker.</p>
158    pub fn broker_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159        self.broker_id = ::std::option::Option::Some(input.into());
160        self
161    }
162    /// <p>Required. The unique ID that Amazon MQ generates for the broker.</p>
163    pub fn set_broker_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.broker_id = input;
165        self
166    }
167    /// <p>Required. The unique ID that Amazon MQ generates for the broker.</p>
168    pub fn get_broker_id(&self) -> &::std::option::Option<::std::string::String> {
169        &self.broker_id
170    }
171    /// <p>The ID of the updated configuration.</p>
172    pub fn configuration(mut self, input: crate::types::ConfigurationId) -> Self {
173        self.configuration = ::std::option::Option::Some(input);
174        self
175    }
176    /// <p>The ID of the updated configuration.</p>
177    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::ConfigurationId>) -> Self {
178        self.configuration = input;
179        self
180    }
181    /// <p>The ID of the updated configuration.</p>
182    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::ConfigurationId> {
183        &self.configuration
184    }
185    /// <p>The broker engine version to upgrade to. For more information, 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>
186    pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187        self.engine_version = ::std::option::Option::Some(input.into());
188        self
189    }
190    /// <p>The broker engine version to upgrade to. For more information, 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>
191    pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192        self.engine_version = input;
193        self
194    }
195    /// <p>The broker engine version to upgrade to. For more information, 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>
196    pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
197        &self.engine_version
198    }
199    /// <p>The broker's host instance type to upgrade to. For a list of supported instance types, see <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/broker.html#broker-instance-types">Broker instance types</a>.</p>
200    pub fn host_instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
201        self.host_instance_type = ::std::option::Option::Some(input.into());
202        self
203    }
204    /// <p>The broker's host instance type to upgrade to. For a list of supported instance types, see <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/broker.html#broker-instance-types">Broker instance types</a>.</p>
205    pub fn set_host_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
206        self.host_instance_type = input;
207        self
208    }
209    /// <p>The broker's host instance type to upgrade to. For a list of supported instance types, see <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/broker.html#broker-instance-types">Broker instance types</a>.</p>
210    pub fn get_host_instance_type(&self) -> &::std::option::Option<::std::string::String> {
211        &self.host_instance_type
212    }
213    /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
214    pub fn ldap_server_metadata(mut self, input: crate::types::LdapServerMetadataOutput) -> Self {
215        self.ldap_server_metadata = ::std::option::Option::Some(input);
216        self
217    }
218    /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
219    pub fn set_ldap_server_metadata(mut self, input: ::std::option::Option<crate::types::LdapServerMetadataOutput>) -> Self {
220        self.ldap_server_metadata = input;
221        self
222    }
223    /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
224    pub fn get_ldap_server_metadata(&self) -> &::std::option::Option<crate::types::LdapServerMetadataOutput> {
225        &self.ldap_server_metadata
226    }
227    /// <p>The list of information about logs to be enabled for the specified broker.</p>
228    pub fn logs(mut self, input: crate::types::Logs) -> Self {
229        self.logs = ::std::option::Option::Some(input);
230        self
231    }
232    /// <p>The list of information about logs to be enabled for the specified broker.</p>
233    pub fn set_logs(mut self, input: ::std::option::Option<crate::types::Logs>) -> Self {
234        self.logs = input;
235        self
236    }
237    /// <p>The list of information about logs to be enabled for the specified broker.</p>
238    pub fn get_logs(&self) -> &::std::option::Option<crate::types::Logs> {
239        &self.logs
240    }
241    /// <p>The parameters that determine the WeeklyStartTime.</p>
242    pub fn maintenance_window_start_time(mut self, input: crate::types::WeeklyStartTime) -> Self {
243        self.maintenance_window_start_time = ::std::option::Option::Some(input);
244        self
245    }
246    /// <p>The parameters that determine the WeeklyStartTime.</p>
247    pub fn set_maintenance_window_start_time(mut self, input: ::std::option::Option<crate::types::WeeklyStartTime>) -> Self {
248        self.maintenance_window_start_time = input;
249        self
250    }
251    /// <p>The parameters that determine the WeeklyStartTime.</p>
252    pub fn get_maintenance_window_start_time(&self) -> &::std::option::Option<crate::types::WeeklyStartTime> {
253        &self.maintenance_window_start_time
254    }
255    /// Appends an item to `security_groups`.
256    ///
257    /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
258    ///
259    /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
260    pub fn security_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
261        let mut v = self.security_groups.unwrap_or_default();
262        v.push(input.into());
263        self.security_groups = ::std::option::Option::Some(v);
264        self
265    }
266    /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
267    pub fn set_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
268        self.security_groups = input;
269        self
270    }
271    /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
272    pub fn get_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
273        &self.security_groups
274    }
275    /// <p>The replication details of the data replication-enabled broker. Only returned if dataReplicationMode is set to CRDR.</p>
276    pub fn data_replication_metadata(mut self, input: crate::types::DataReplicationMetadataOutput) -> Self {
277        self.data_replication_metadata = ::std::option::Option::Some(input);
278        self
279    }
280    /// <p>The replication details of the data replication-enabled broker. Only returned if dataReplicationMode is set to CRDR.</p>
281    pub fn set_data_replication_metadata(mut self, input: ::std::option::Option<crate::types::DataReplicationMetadataOutput>) -> Self {
282        self.data_replication_metadata = input;
283        self
284    }
285    /// <p>The replication details of the data replication-enabled broker. Only returned if dataReplicationMode is set to CRDR.</p>
286    pub fn get_data_replication_metadata(&self) -> &::std::option::Option<crate::types::DataReplicationMetadataOutput> {
287        &self.data_replication_metadata
288    }
289    /// <p>Describes whether this broker is a part of a data replication pair.</p>
290    pub fn data_replication_mode(mut self, input: crate::types::DataReplicationMode) -> Self {
291        self.data_replication_mode = ::std::option::Option::Some(input);
292        self
293    }
294    /// <p>Describes whether this broker is a part of a data replication pair.</p>
295    pub fn set_data_replication_mode(mut self, input: ::std::option::Option<crate::types::DataReplicationMode>) -> Self {
296        self.data_replication_mode = input;
297        self
298    }
299    /// <p>Describes whether this broker is a part of a data replication pair.</p>
300    pub fn get_data_replication_mode(&self) -> &::std::option::Option<crate::types::DataReplicationMode> {
301        &self.data_replication_mode
302    }
303    /// <p>The pending replication details of the data replication-enabled broker. Only returned if pendingDataReplicationMode is set to CRDR.</p>
304    pub fn pending_data_replication_metadata(mut self, input: crate::types::DataReplicationMetadataOutput) -> Self {
305        self.pending_data_replication_metadata = ::std::option::Option::Some(input);
306        self
307    }
308    /// <p>The pending replication details of the data replication-enabled broker. Only returned if pendingDataReplicationMode is set to CRDR.</p>
309    pub fn set_pending_data_replication_metadata(mut self, input: ::std::option::Option<crate::types::DataReplicationMetadataOutput>) -> Self {
310        self.pending_data_replication_metadata = input;
311        self
312    }
313    /// <p>The pending replication details of the data replication-enabled broker. Only returned if pendingDataReplicationMode is set to CRDR.</p>
314    pub fn get_pending_data_replication_metadata(&self) -> &::std::option::Option<crate::types::DataReplicationMetadataOutput> {
315        &self.pending_data_replication_metadata
316    }
317    /// <p>Describes whether this broker will be a part of a data replication pair after reboot.</p>
318    pub fn pending_data_replication_mode(mut self, input: crate::types::DataReplicationMode) -> Self {
319        self.pending_data_replication_mode = ::std::option::Option::Some(input);
320        self
321    }
322    /// <p>Describes whether this broker will be a part of a data replication pair after reboot.</p>
323    pub fn set_pending_data_replication_mode(mut self, input: ::std::option::Option<crate::types::DataReplicationMode>) -> Self {
324        self.pending_data_replication_mode = input;
325        self
326    }
327    /// <p>Describes whether this broker will be a part of a data replication pair after reboot.</p>
328    pub fn get_pending_data_replication_mode(&self) -> &::std::option::Option<crate::types::DataReplicationMode> {
329        &self.pending_data_replication_mode
330    }
331    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
332        self._request_id = Some(request_id.into());
333        self
334    }
335
336    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
337        self._request_id = request_id;
338        self
339    }
340    /// Consumes the builder and constructs a [`UpdateBrokerOutput`](crate::operation::update_broker::UpdateBrokerOutput).
341    pub fn build(self) -> crate::operation::update_broker::UpdateBrokerOutput {
342        crate::operation::update_broker::UpdateBrokerOutput {
343            authentication_strategy: self.authentication_strategy,
344            auto_minor_version_upgrade: self.auto_minor_version_upgrade,
345            broker_id: self.broker_id,
346            configuration: self.configuration,
347            engine_version: self.engine_version,
348            host_instance_type: self.host_instance_type,
349            ldap_server_metadata: self.ldap_server_metadata,
350            logs: self.logs,
351            maintenance_window_start_time: self.maintenance_window_start_time,
352            security_groups: self.security_groups,
353            data_replication_metadata: self.data_replication_metadata,
354            data_replication_mode: self.data_replication_mode,
355            pending_data_replication_metadata: self.pending_data_replication_metadata,
356            pending_data_replication_mode: self.pending_data_replication_mode,
357            _request_id: self._request_id,
358        }
359    }
360}