aws_sdk_mq/operation/update_configuration/
_update_configuration_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Updates the specified configuration.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateConfigurationInput {
7    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
8    pub configuration_id: ::std::option::Option<::std::string::String>,
9    /// <p>Amazon MQ for Active MQ: The base64-encoded XML configuration. Amazon MQ for RabbitMQ: the base64-encoded Cuttlefish configuration.</p>
10    pub data: ::std::option::Option<::std::string::String>,
11    /// <p>The description of the configuration.</p>
12    pub description: ::std::option::Option<::std::string::String>,
13}
14impl UpdateConfigurationInput {
15    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
16    pub fn configuration_id(&self) -> ::std::option::Option<&str> {
17        self.configuration_id.as_deref()
18    }
19    /// <p>Amazon MQ for Active MQ: The base64-encoded XML configuration. Amazon MQ for RabbitMQ: the base64-encoded Cuttlefish configuration.</p>
20    pub fn data(&self) -> ::std::option::Option<&str> {
21        self.data.as_deref()
22    }
23    /// <p>The description of the configuration.</p>
24    pub fn description(&self) -> ::std::option::Option<&str> {
25        self.description.as_deref()
26    }
27}
28impl UpdateConfigurationInput {
29    /// Creates a new builder-style object to manufacture [`UpdateConfigurationInput`](crate::operation::update_configuration::UpdateConfigurationInput).
30    pub fn builder() -> crate::operation::update_configuration::builders::UpdateConfigurationInputBuilder {
31        crate::operation::update_configuration::builders::UpdateConfigurationInputBuilder::default()
32    }
33}
34
35/// A builder for [`UpdateConfigurationInput`](crate::operation::update_configuration::UpdateConfigurationInput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct UpdateConfigurationInputBuilder {
39    pub(crate) configuration_id: ::std::option::Option<::std::string::String>,
40    pub(crate) data: ::std::option::Option<::std::string::String>,
41    pub(crate) description: ::std::option::Option<::std::string::String>,
42}
43impl UpdateConfigurationInputBuilder {
44    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
45    /// This field is required.
46    pub fn configuration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.configuration_id = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
51    pub fn set_configuration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.configuration_id = input;
53        self
54    }
55    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
56    pub fn get_configuration_id(&self) -> &::std::option::Option<::std::string::String> {
57        &self.configuration_id
58    }
59    /// <p>Amazon MQ for Active MQ: The base64-encoded XML configuration. Amazon MQ for RabbitMQ: the base64-encoded Cuttlefish configuration.</p>
60    /// This field is required.
61    pub fn data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62        self.data = ::std::option::Option::Some(input.into());
63        self
64    }
65    /// <p>Amazon MQ for Active MQ: The base64-encoded XML configuration. Amazon MQ for RabbitMQ: the base64-encoded Cuttlefish configuration.</p>
66    pub fn set_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67        self.data = input;
68        self
69    }
70    /// <p>Amazon MQ for Active MQ: The base64-encoded XML configuration. Amazon MQ for RabbitMQ: the base64-encoded Cuttlefish configuration.</p>
71    pub fn get_data(&self) -> &::std::option::Option<::std::string::String> {
72        &self.data
73    }
74    /// <p>The description of the configuration.</p>
75    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.description = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>The description of the configuration.</p>
80    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.description = input;
82        self
83    }
84    /// <p>The description of the configuration.</p>
85    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
86        &self.description
87    }
88    /// Consumes the builder and constructs a [`UpdateConfigurationInput`](crate::operation::update_configuration::UpdateConfigurationInput).
89    pub fn build(
90        self,
91    ) -> ::std::result::Result<crate::operation::update_configuration::UpdateConfigurationInput, ::aws_smithy_types::error::operation::BuildError>
92    {
93        ::std::result::Result::Ok(crate::operation::update_configuration::UpdateConfigurationInput {
94            configuration_id: self.configuration_id,
95            data: self.data,
96            description: self.description,
97        })
98    }
99}