1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateParameterGroupInput {
    /// <p>The name of the parameter group to update.</p>
    pub parameter_group_name: ::std::option::Option<::std::string::String>,
    /// <p>An array of parameter names and values for the parameter update. You must supply at least one parameter name and value; subsequent arguments are optional. A maximum of 20 parameters may be updated per request.</p>
    pub parameter_name_values: ::std::option::Option<::std::vec::Vec<crate::types::ParameterNameValue>>,
}
impl UpdateParameterGroupInput {
    /// <p>The name of the parameter group to update.</p>
    pub fn parameter_group_name(&self) -> ::std::option::Option<&str> {
        self.parameter_group_name.as_deref()
    }
    /// <p>An array of parameter names and values for the parameter update. You must supply at least one parameter name and value; subsequent arguments are optional. A maximum of 20 parameters may be updated per request.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.parameter_name_values.is_none()`.
    pub fn parameter_name_values(&self) -> &[crate::types::ParameterNameValue] {
        self.parameter_name_values.as_deref().unwrap_or_default()
    }
}
impl UpdateParameterGroupInput {
    /// Creates a new builder-style object to manufacture [`UpdateParameterGroupInput`](crate::operation::update_parameter_group::UpdateParameterGroupInput).
    pub fn builder() -> crate::operation::update_parameter_group::builders::UpdateParameterGroupInputBuilder {
        crate::operation::update_parameter_group::builders::UpdateParameterGroupInputBuilder::default()
    }
}

/// A builder for [`UpdateParameterGroupInput`](crate::operation::update_parameter_group::UpdateParameterGroupInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateParameterGroupInputBuilder {
    pub(crate) parameter_group_name: ::std::option::Option<::std::string::String>,
    pub(crate) parameter_name_values: ::std::option::Option<::std::vec::Vec<crate::types::ParameterNameValue>>,
}
impl UpdateParameterGroupInputBuilder {
    /// <p>The name of the parameter group to update.</p>
    /// This field is required.
    pub fn parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.parameter_group_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the parameter group to update.</p>
    pub fn set_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.parameter_group_name = input;
        self
    }
    /// <p>The name of the parameter group to update.</p>
    pub fn get_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.parameter_group_name
    }
    /// Appends an item to `parameter_name_values`.
    ///
    /// To override the contents of this collection use [`set_parameter_name_values`](Self::set_parameter_name_values).
    ///
    /// <p>An array of parameter names and values for the parameter update. You must supply at least one parameter name and value; subsequent arguments are optional. A maximum of 20 parameters may be updated per request.</p>
    pub fn parameter_name_values(mut self, input: crate::types::ParameterNameValue) -> Self {
        let mut v = self.parameter_name_values.unwrap_or_default();
        v.push(input);
        self.parameter_name_values = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of parameter names and values for the parameter update. You must supply at least one parameter name and value; subsequent arguments are optional. A maximum of 20 parameters may be updated per request.</p>
    pub fn set_parameter_name_values(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterNameValue>>) -> Self {
        self.parameter_name_values = input;
        self
    }
    /// <p>An array of parameter names and values for the parameter update. You must supply at least one parameter name and value; subsequent arguments are optional. A maximum of 20 parameters may be updated per request.</p>
    pub fn get_parameter_name_values(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterNameValue>> {
        &self.parameter_name_values
    }
    /// Consumes the builder and constructs a [`UpdateParameterGroupInput`](crate::operation::update_parameter_group::UpdateParameterGroupInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_parameter_group::UpdateParameterGroupInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_parameter_group::UpdateParameterGroupInput {
            parameter_group_name: self.parameter_group_name,
            parameter_name_values: self.parameter_name_values,
        })
    }
}