aws_sdk_elasticbeanstalk/operation/update_configuration_template/
_update_configuration_template_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The result message containing the options for the specified solution stack.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateConfigurationTemplateInput {
7    /// <p>The name of the application associated with the configuration template to update.</p>
8    /// <p>If no application is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
9    pub application_name: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the configuration template to update.</p>
11    /// <p>If no configuration template is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
12    pub template_name: ::std::option::Option<::std::string::String>,
13    /// <p>A new description for the configuration.</p>
14    pub description: ::std::option::Option<::std::string::String>,
15    /// <p>A list of configuration option settings to update with the new specified option value.</p>
16    pub option_settings: ::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>>,
17    /// <p>A list of configuration options to remove from the configuration set.</p>
18    /// <p>Constraint: You can remove only <code>UserDefined</code> configuration options.</p>
19    pub options_to_remove: ::std::option::Option<::std::vec::Vec<crate::types::OptionSpecification>>,
20}
21impl UpdateConfigurationTemplateInput {
22    /// <p>The name of the application associated with the configuration template to update.</p>
23    /// <p>If no application is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
24    pub fn application_name(&self) -> ::std::option::Option<&str> {
25        self.application_name.as_deref()
26    }
27    /// <p>The name of the configuration template to update.</p>
28    /// <p>If no configuration template is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
29    pub fn template_name(&self) -> ::std::option::Option<&str> {
30        self.template_name.as_deref()
31    }
32    /// <p>A new description for the configuration.</p>
33    pub fn description(&self) -> ::std::option::Option<&str> {
34        self.description.as_deref()
35    }
36    /// <p>A list of configuration option settings to update with the new specified option value.</p>
37    ///
38    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.option_settings.is_none()`.
39    pub fn option_settings(&self) -> &[crate::types::ConfigurationOptionSetting] {
40        self.option_settings.as_deref().unwrap_or_default()
41    }
42    /// <p>A list of configuration options to remove from the configuration set.</p>
43    /// <p>Constraint: You can remove only <code>UserDefined</code> configuration options.</p>
44    ///
45    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.options_to_remove.is_none()`.
46    pub fn options_to_remove(&self) -> &[crate::types::OptionSpecification] {
47        self.options_to_remove.as_deref().unwrap_or_default()
48    }
49}
50impl UpdateConfigurationTemplateInput {
51    /// Creates a new builder-style object to manufacture [`UpdateConfigurationTemplateInput`](crate::operation::update_configuration_template::UpdateConfigurationTemplateInput).
52    pub fn builder() -> crate::operation::update_configuration_template::builders::UpdateConfigurationTemplateInputBuilder {
53        crate::operation::update_configuration_template::builders::UpdateConfigurationTemplateInputBuilder::default()
54    }
55}
56
57/// A builder for [`UpdateConfigurationTemplateInput`](crate::operation::update_configuration_template::UpdateConfigurationTemplateInput).
58#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
59#[non_exhaustive]
60pub struct UpdateConfigurationTemplateInputBuilder {
61    pub(crate) application_name: ::std::option::Option<::std::string::String>,
62    pub(crate) template_name: ::std::option::Option<::std::string::String>,
63    pub(crate) description: ::std::option::Option<::std::string::String>,
64    pub(crate) option_settings: ::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>>,
65    pub(crate) options_to_remove: ::std::option::Option<::std::vec::Vec<crate::types::OptionSpecification>>,
66}
67impl UpdateConfigurationTemplateInputBuilder {
68    /// <p>The name of the application associated with the configuration template to update.</p>
69    /// <p>If no application is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
70    /// This field is required.
71    pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
72        self.application_name = ::std::option::Option::Some(input.into());
73        self
74    }
75    /// <p>The name of the application associated with the configuration template to update.</p>
76    /// <p>If no application is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
77    pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.application_name = input;
79        self
80    }
81    /// <p>The name of the application associated with the configuration template to update.</p>
82    /// <p>If no application is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
83    pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
84        &self.application_name
85    }
86    /// <p>The name of the configuration template to update.</p>
87    /// <p>If no configuration template is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
88    /// This field is required.
89    pub fn template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.template_name = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>The name of the configuration template to update.</p>
94    /// <p>If no configuration template is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
95    pub fn set_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96        self.template_name = input;
97        self
98    }
99    /// <p>The name of the configuration template to update.</p>
100    /// <p>If no configuration template is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
101    pub fn get_template_name(&self) -> &::std::option::Option<::std::string::String> {
102        &self.template_name
103    }
104    /// <p>A new description for the configuration.</p>
105    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106        self.description = ::std::option::Option::Some(input.into());
107        self
108    }
109    /// <p>A new description for the configuration.</p>
110    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111        self.description = input;
112        self
113    }
114    /// <p>A new description for the configuration.</p>
115    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
116        &self.description
117    }
118    /// Appends an item to `option_settings`.
119    ///
120    /// To override the contents of this collection use [`set_option_settings`](Self::set_option_settings).
121    ///
122    /// <p>A list of configuration option settings to update with the new specified option value.</p>
123    pub fn option_settings(mut self, input: crate::types::ConfigurationOptionSetting) -> Self {
124        let mut v = self.option_settings.unwrap_or_default();
125        v.push(input);
126        self.option_settings = ::std::option::Option::Some(v);
127        self
128    }
129    /// <p>A list of configuration option settings to update with the new specified option value.</p>
130    pub fn set_option_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>>) -> Self {
131        self.option_settings = input;
132        self
133    }
134    /// <p>A list of configuration option settings to update with the new specified option value.</p>
135    pub fn get_option_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>> {
136        &self.option_settings
137    }
138    /// Appends an item to `options_to_remove`.
139    ///
140    /// To override the contents of this collection use [`set_options_to_remove`](Self::set_options_to_remove).
141    ///
142    /// <p>A list of configuration options to remove from the configuration set.</p>
143    /// <p>Constraint: You can remove only <code>UserDefined</code> configuration options.</p>
144    pub fn options_to_remove(mut self, input: crate::types::OptionSpecification) -> Self {
145        let mut v = self.options_to_remove.unwrap_or_default();
146        v.push(input);
147        self.options_to_remove = ::std::option::Option::Some(v);
148        self
149    }
150    /// <p>A list of configuration options to remove from the configuration set.</p>
151    /// <p>Constraint: You can remove only <code>UserDefined</code> configuration options.</p>
152    pub fn set_options_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OptionSpecification>>) -> Self {
153        self.options_to_remove = input;
154        self
155    }
156    /// <p>A list of configuration options to remove from the configuration set.</p>
157    /// <p>Constraint: You can remove only <code>UserDefined</code> configuration options.</p>
158    pub fn get_options_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OptionSpecification>> {
159        &self.options_to_remove
160    }
161    /// Consumes the builder and constructs a [`UpdateConfigurationTemplateInput`](crate::operation::update_configuration_template::UpdateConfigurationTemplateInput).
162    pub fn build(
163        self,
164    ) -> ::std::result::Result<
165        crate::operation::update_configuration_template::UpdateConfigurationTemplateInput,
166        ::aws_smithy_types::error::operation::BuildError,
167    > {
168        ::std::result::Result::Ok(crate::operation::update_configuration_template::UpdateConfigurationTemplateInput {
169            application_name: self.application_name,
170            template_name: self.template_name,
171            description: self.description,
172            option_settings: self.option_settings,
173            options_to_remove: self.options_to_remove,
174        })
175    }
176}