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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
// 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 UpdateExtensionInput {
    /// <p>The name, the ID, or the Amazon Resource Name (ARN) of the extension.</p>
    pub extension_identifier: ::std::option::Option<::std::string::String>,
    /// <p>Information about the extension.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The actions defined in the extension.</p>
    pub actions: ::std::option::Option<::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>>,
    /// <p>One or more parameters for the actions called by the extension.</p>
    pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Parameter>>,
    /// <p>The extension version number.</p>
    pub version_number: ::std::option::Option<i32>,
}
impl UpdateExtensionInput {
    /// <p>The name, the ID, or the Amazon Resource Name (ARN) of the extension.</p>
    pub fn extension_identifier(&self) -> ::std::option::Option<&str> {
        self.extension_identifier.as_deref()
    }
    /// <p>Information about the extension.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The actions defined in the extension.</p>
    pub fn actions(&self) -> ::std::option::Option<&::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>> {
        self.actions.as_ref()
    }
    /// <p>One or more parameters for the actions called by the extension.</p>
    pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::Parameter>> {
        self.parameters.as_ref()
    }
    /// <p>The extension version number.</p>
    pub fn version_number(&self) -> ::std::option::Option<i32> {
        self.version_number
    }
}
impl UpdateExtensionInput {
    /// Creates a new builder-style object to manufacture [`UpdateExtensionInput`](crate::operation::update_extension::UpdateExtensionInput).
    pub fn builder() -> crate::operation::update_extension::builders::UpdateExtensionInputBuilder {
        crate::operation::update_extension::builders::UpdateExtensionInputBuilder::default()
    }
}

/// A builder for [`UpdateExtensionInput`](crate::operation::update_extension::UpdateExtensionInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateExtensionInputBuilder {
    pub(crate) extension_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) actions: ::std::option::Option<::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>>,
    pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Parameter>>,
    pub(crate) version_number: ::std::option::Option<i32>,
}
impl UpdateExtensionInputBuilder {
    /// <p>The name, the ID, or the Amazon Resource Name (ARN) of the extension.</p>
    /// This field is required.
    pub fn extension_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.extension_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name, the ID, or the Amazon Resource Name (ARN) of the extension.</p>
    pub fn set_extension_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.extension_identifier = input;
        self
    }
    /// <p>The name, the ID, or the Amazon Resource Name (ARN) of the extension.</p>
    pub fn get_extension_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.extension_identifier
    }
    /// <p>Information about the extension.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Information about the extension.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>Information about the extension.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Adds a key-value pair to `actions`.
    ///
    /// To override the contents of this collection use [`set_actions`](Self::set_actions).
    ///
    /// <p>The actions defined in the extension.</p>
    pub fn actions(mut self, k: crate::types::ActionPoint, v: ::std::vec::Vec<crate::types::Action>) -> Self {
        let mut hash_map = self.actions.unwrap_or_default();
        hash_map.insert(k, v);
        self.actions = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The actions defined in the extension.</p>
    pub fn set_actions(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>>,
    ) -> Self {
        self.actions = input;
        self
    }
    /// <p>The actions defined in the extension.</p>
    pub fn get_actions(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>> {
        &self.actions
    }
    /// Adds a key-value pair to `parameters`.
    ///
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
    ///
    /// <p>One or more parameters for the actions called by the extension.</p>
    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Parameter) -> Self {
        let mut hash_map = self.parameters.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.parameters = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>One or more parameters for the actions called by the extension.</p>
    pub fn set_parameters(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Parameter>>,
    ) -> Self {
        self.parameters = input;
        self
    }
    /// <p>One or more parameters for the actions called by the extension.</p>
    pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Parameter>> {
        &self.parameters
    }
    /// <p>The extension version number.</p>
    pub fn version_number(mut self, input: i32) -> Self {
        self.version_number = ::std::option::Option::Some(input);
        self
    }
    /// <p>The extension version number.</p>
    pub fn set_version_number(mut self, input: ::std::option::Option<i32>) -> Self {
        self.version_number = input;
        self
    }
    /// <p>The extension version number.</p>
    pub fn get_version_number(&self) -> &::std::option::Option<i32> {
        &self.version_number
    }
    /// Consumes the builder and constructs a [`UpdateExtensionInput`](crate::operation::update_extension::UpdateExtensionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_extension::UpdateExtensionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_extension::UpdateExtensionInput {
            extension_identifier: self.extension_identifier,
            description: self.description,
            actions: self.actions,
            parameters: self.parameters,
            version_number: self.version_number,
        })
    }
}