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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A list of parameters for a control. A control can have zero, one, or more than one parameter. An example of a control with two parameters is: "backup plan frequency is at least <code>daily</code> and the retention period is at least <code>1 year</code>". The first parameter is <code>daily</code>. The second parameter is <code>1 year</code>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ControlInputParameter {
    /// <p>The name of a parameter, for example, <code>BackupPlanFrequency</code>.</p>
    #[doc(hidden)]
    pub parameter_name: std::option::Option<std::string::String>,
    /// <p>The value of parameter, for example, <code>hourly</code>.</p>
    #[doc(hidden)]
    pub parameter_value: std::option::Option<std::string::String>,
}
impl ControlInputParameter {
    /// <p>The name of a parameter, for example, <code>BackupPlanFrequency</code>.</p>
    pub fn parameter_name(&self) -> std::option::Option<&str> {
        self.parameter_name.as_deref()
    }
    /// <p>The value of parameter, for example, <code>hourly</code>.</p>
    pub fn parameter_value(&self) -> std::option::Option<&str> {
        self.parameter_value.as_deref()
    }
}
impl ControlInputParameter {
    /// Creates a new builder-style object to manufacture [`ControlInputParameter`](crate::types::ControlInputParameter).
    pub fn builder() -> crate::types::builders::ControlInputParameterBuilder {
        crate::types::builders::ControlInputParameterBuilder::default()
    }
}

/// A builder for [`ControlInputParameter`](crate::types::ControlInputParameter).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ControlInputParameterBuilder {
    pub(crate) parameter_name: std::option::Option<std::string::String>,
    pub(crate) parameter_value: std::option::Option<std::string::String>,
}
impl ControlInputParameterBuilder {
    /// <p>The name of a parameter, for example, <code>BackupPlanFrequency</code>.</p>
    pub fn parameter_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.parameter_name = Some(input.into());
        self
    }
    /// <p>The name of a parameter, for example, <code>BackupPlanFrequency</code>.</p>
    pub fn set_parameter_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.parameter_name = input;
        self
    }
    /// <p>The value of parameter, for example, <code>hourly</code>.</p>
    pub fn parameter_value(mut self, input: impl Into<std::string::String>) -> Self {
        self.parameter_value = Some(input.into());
        self
    }
    /// <p>The value of parameter, for example, <code>hourly</code>.</p>
    pub fn set_parameter_value(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.parameter_value = input;
        self
    }
    /// Consumes the builder and constructs a [`ControlInputParameter`](crate::types::ControlInputParameter).
    pub fn build(self) -> crate::types::ControlInputParameter {
        crate::types::ControlInputParameter {
            parameter_name: self.parameter_name,
            parameter_value: self.parameter_value,
        }
    }
}