aws_sdk_appconfig/operation/update_extension/
_update_extension_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateExtensionOutput {
6    /// <p>The system-generated ID of the extension.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>The extension name.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The extension version number.</p>
11    pub version_number: i32,
12    /// <p>The system-generated Amazon Resource Name (ARN) for the extension.</p>
13    pub arn: ::std::option::Option<::std::string::String>,
14    /// <p>Information about the extension.</p>
15    pub description: ::std::option::Option<::std::string::String>,
16    /// <p>The actions defined in the extension.</p>
17    pub actions: ::std::option::Option<::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>>,
18    /// <p>The parameters accepted by the extension. You specify parameter values when you associate the extension to an AppConfig resource by using the <code>CreateExtensionAssociation</code> API action. For Lambda extension actions, these parameters are included in the Lambda request object.</p>
19    pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Parameter>>,
20    _request_id: Option<String>,
21}
22impl UpdateExtensionOutput {
23    /// <p>The system-generated ID of the extension.</p>
24    pub fn id(&self) -> ::std::option::Option<&str> {
25        self.id.as_deref()
26    }
27    /// <p>The extension name.</p>
28    pub fn name(&self) -> ::std::option::Option<&str> {
29        self.name.as_deref()
30    }
31    /// <p>The extension version number.</p>
32    pub fn version_number(&self) -> i32 {
33        self.version_number
34    }
35    /// <p>The system-generated Amazon Resource Name (ARN) for the extension.</p>
36    pub fn arn(&self) -> ::std::option::Option<&str> {
37        self.arn.as_deref()
38    }
39    /// <p>Information about the extension.</p>
40    pub fn description(&self) -> ::std::option::Option<&str> {
41        self.description.as_deref()
42    }
43    /// <p>The actions defined in the extension.</p>
44    pub fn actions(&self) -> ::std::option::Option<&::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>> {
45        self.actions.as_ref()
46    }
47    /// <p>The parameters accepted by the extension. You specify parameter values when you associate the extension to an AppConfig resource by using the <code>CreateExtensionAssociation</code> API action. For Lambda extension actions, these parameters are included in the Lambda request object.</p>
48    pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::Parameter>> {
49        self.parameters.as_ref()
50    }
51}
52impl ::aws_types::request_id::RequestId for UpdateExtensionOutput {
53    fn request_id(&self) -> Option<&str> {
54        self._request_id.as_deref()
55    }
56}
57impl UpdateExtensionOutput {
58    /// Creates a new builder-style object to manufacture [`UpdateExtensionOutput`](crate::operation::update_extension::UpdateExtensionOutput).
59    pub fn builder() -> crate::operation::update_extension::builders::UpdateExtensionOutputBuilder {
60        crate::operation::update_extension::builders::UpdateExtensionOutputBuilder::default()
61    }
62}
63
64/// A builder for [`UpdateExtensionOutput`](crate::operation::update_extension::UpdateExtensionOutput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
66#[non_exhaustive]
67pub struct UpdateExtensionOutputBuilder {
68    pub(crate) id: ::std::option::Option<::std::string::String>,
69    pub(crate) name: ::std::option::Option<::std::string::String>,
70    pub(crate) version_number: ::std::option::Option<i32>,
71    pub(crate) arn: ::std::option::Option<::std::string::String>,
72    pub(crate) description: ::std::option::Option<::std::string::String>,
73    pub(crate) actions: ::std::option::Option<::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>>,
74    pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Parameter>>,
75    _request_id: Option<String>,
76}
77impl UpdateExtensionOutputBuilder {
78    /// <p>The system-generated ID of the extension.</p>
79    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.id = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The system-generated ID of the extension.</p>
84    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.id = input;
86        self
87    }
88    /// <p>The system-generated ID of the extension.</p>
89    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
90        &self.id
91    }
92    /// <p>The extension name.</p>
93    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.name = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>The extension name.</p>
98    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.name = input;
100        self
101    }
102    /// <p>The extension name.</p>
103    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
104        &self.name
105    }
106    /// <p>The extension version number.</p>
107    pub fn version_number(mut self, input: i32) -> Self {
108        self.version_number = ::std::option::Option::Some(input);
109        self
110    }
111    /// <p>The extension version number.</p>
112    pub fn set_version_number(mut self, input: ::std::option::Option<i32>) -> Self {
113        self.version_number = input;
114        self
115    }
116    /// <p>The extension version number.</p>
117    pub fn get_version_number(&self) -> &::std::option::Option<i32> {
118        &self.version_number
119    }
120    /// <p>The system-generated Amazon Resource Name (ARN) for the extension.</p>
121    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122        self.arn = ::std::option::Option::Some(input.into());
123        self
124    }
125    /// <p>The system-generated Amazon Resource Name (ARN) for the extension.</p>
126    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.arn = input;
128        self
129    }
130    /// <p>The system-generated Amazon Resource Name (ARN) for the extension.</p>
131    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
132        &self.arn
133    }
134    /// <p>Information about the extension.</p>
135    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.description = ::std::option::Option::Some(input.into());
137        self
138    }
139    /// <p>Information about the extension.</p>
140    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.description = input;
142        self
143    }
144    /// <p>Information about the extension.</p>
145    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
146        &self.description
147    }
148    /// Adds a key-value pair to `actions`.
149    ///
150    /// To override the contents of this collection use [`set_actions`](Self::set_actions).
151    ///
152    /// <p>The actions defined in the extension.</p>
153    pub fn actions(mut self, k: crate::types::ActionPoint, v: ::std::vec::Vec<crate::types::Action>) -> Self {
154        let mut hash_map = self.actions.unwrap_or_default();
155        hash_map.insert(k, v);
156        self.actions = ::std::option::Option::Some(hash_map);
157        self
158    }
159    /// <p>The actions defined in the extension.</p>
160    pub fn set_actions(
161        mut self,
162        input: ::std::option::Option<::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>>,
163    ) -> Self {
164        self.actions = input;
165        self
166    }
167    /// <p>The actions defined in the extension.</p>
168    pub fn get_actions(
169        &self,
170    ) -> &::std::option::Option<::std::collections::HashMap<crate::types::ActionPoint, ::std::vec::Vec<crate::types::Action>>> {
171        &self.actions
172    }
173    /// Adds a key-value pair to `parameters`.
174    ///
175    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
176    ///
177    /// <p>The parameters accepted by the extension. You specify parameter values when you associate the extension to an AppConfig resource by using the <code>CreateExtensionAssociation</code> API action. For Lambda extension actions, these parameters are included in the Lambda request object.</p>
178    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Parameter) -> Self {
179        let mut hash_map = self.parameters.unwrap_or_default();
180        hash_map.insert(k.into(), v);
181        self.parameters = ::std::option::Option::Some(hash_map);
182        self
183    }
184    /// <p>The parameters accepted by the extension. You specify parameter values when you associate the extension to an AppConfig resource by using the <code>CreateExtensionAssociation</code> API action. For Lambda extension actions, these parameters are included in the Lambda request object.</p>
185    pub fn set_parameters(
186        mut self,
187        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Parameter>>,
188    ) -> Self {
189        self.parameters = input;
190        self
191    }
192    /// <p>The parameters accepted by the extension. You specify parameter values when you associate the extension to an AppConfig resource by using the <code>CreateExtensionAssociation</code> API action. For Lambda extension actions, these parameters are included in the Lambda request object.</p>
193    pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Parameter>> {
194        &self.parameters
195    }
196    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
197        self._request_id = Some(request_id.into());
198        self
199    }
200
201    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
202        self._request_id = request_id;
203        self
204    }
205    /// Consumes the builder and constructs a [`UpdateExtensionOutput`](crate::operation::update_extension::UpdateExtensionOutput).
206    pub fn build(self) -> crate::operation::update_extension::UpdateExtensionOutput {
207        crate::operation::update_extension::UpdateExtensionOutput {
208            id: self.id,
209            name: self.name,
210            version_number: self.version_number.unwrap_or_default(),
211            arn: self.arn,
212            description: self.description,
213            actions: self.actions,
214            parameters: self.parameters,
215            _request_id: self._request_id,
216        }
217    }
218}