aws_sdk_appintegrations/operation/update_application/
_update_application_input.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 UpdateApplicationInput {
6    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the application.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the application.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The configuration for where the application should be loaded from.</p>
13    pub application_source_config: ::std::option::Option<crate::types::ApplicationSourceConfig>,
14    /// <p>The events that the application subscribes.</p>
15    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
16    pub subscriptions: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>,
17    /// <p>The events that the application publishes.</p>
18    #[deprecated(note = "Publications has been replaced with Permissions")]
19    pub publications: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>,
20    /// <p>The configuration of events or requests that the application has access to.</p>
21    pub permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
22    /// <p>Indicates whether the application is a service.</p>
23    #[deprecated(note = "IsService has been deprecated in favor of ApplicationType", since = "2025-12-01")]
24    pub is_service: ::std::option::Option<bool>,
25    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
26    pub initialization_timeout: ::std::option::Option<i32>,
27    /// <p>The configuration settings for the application.</p>
28    pub application_config: ::std::option::Option<crate::types::ApplicationConfig>,
29    /// <p>The iframe configuration for the application.</p>
30    pub iframe_config: ::std::option::Option<crate::types::IframeConfig>,
31    /// <p>The type of application.</p>
32    pub application_type: ::std::option::Option<crate::types::ApplicationType>,
33}
34impl UpdateApplicationInput {
35    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
36    pub fn arn(&self) -> ::std::option::Option<&str> {
37        self.arn.as_deref()
38    }
39    /// <p>The name of the application.</p>
40    pub fn name(&self) -> ::std::option::Option<&str> {
41        self.name.as_deref()
42    }
43    /// <p>The description of the application.</p>
44    pub fn description(&self) -> ::std::option::Option<&str> {
45        self.description.as_deref()
46    }
47    /// <p>The configuration for where the application should be loaded from.</p>
48    pub fn application_source_config(&self) -> ::std::option::Option<&crate::types::ApplicationSourceConfig> {
49        self.application_source_config.as_ref()
50    }
51    /// <p>The events that the application subscribes.</p>
52    ///
53    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subscriptions.is_none()`.
54    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
55    pub fn subscriptions(&self) -> &[crate::types::Subscription] {
56        self.subscriptions.as_deref().unwrap_or_default()
57    }
58    /// <p>The events that the application publishes.</p>
59    ///
60    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.publications.is_none()`.
61    #[deprecated(note = "Publications has been replaced with Permissions")]
62    pub fn publications(&self) -> &[crate::types::Publication] {
63        self.publications.as_deref().unwrap_or_default()
64    }
65    /// <p>The configuration of events or requests that the application has access to.</p>
66    ///
67    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.permissions.is_none()`.
68    pub fn permissions(&self) -> &[::std::string::String] {
69        self.permissions.as_deref().unwrap_or_default()
70    }
71    /// <p>Indicates whether the application is a service.</p>
72    #[deprecated(note = "IsService has been deprecated in favor of ApplicationType", since = "2025-12-01")]
73    pub fn is_service(&self) -> ::std::option::Option<bool> {
74        self.is_service
75    }
76    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
77    pub fn initialization_timeout(&self) -> ::std::option::Option<i32> {
78        self.initialization_timeout
79    }
80    /// <p>The configuration settings for the application.</p>
81    pub fn application_config(&self) -> ::std::option::Option<&crate::types::ApplicationConfig> {
82        self.application_config.as_ref()
83    }
84    /// <p>The iframe configuration for the application.</p>
85    pub fn iframe_config(&self) -> ::std::option::Option<&crate::types::IframeConfig> {
86        self.iframe_config.as_ref()
87    }
88    /// <p>The type of application.</p>
89    pub fn application_type(&self) -> ::std::option::Option<&crate::types::ApplicationType> {
90        self.application_type.as_ref()
91    }
92}
93impl UpdateApplicationInput {
94    /// Creates a new builder-style object to manufacture [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
95    pub fn builder() -> crate::operation::update_application::builders::UpdateApplicationInputBuilder {
96        crate::operation::update_application::builders::UpdateApplicationInputBuilder::default()
97    }
98}
99
100/// A builder for [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
101#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
102#[non_exhaustive]
103pub struct UpdateApplicationInputBuilder {
104    pub(crate) arn: ::std::option::Option<::std::string::String>,
105    pub(crate) name: ::std::option::Option<::std::string::String>,
106    pub(crate) description: ::std::option::Option<::std::string::String>,
107    pub(crate) application_source_config: ::std::option::Option<crate::types::ApplicationSourceConfig>,
108    pub(crate) subscriptions: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>,
109    pub(crate) publications: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>,
110    pub(crate) permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
111    pub(crate) is_service: ::std::option::Option<bool>,
112    pub(crate) initialization_timeout: ::std::option::Option<i32>,
113    pub(crate) application_config: ::std::option::Option<crate::types::ApplicationConfig>,
114    pub(crate) iframe_config: ::std::option::Option<crate::types::IframeConfig>,
115    pub(crate) application_type: ::std::option::Option<crate::types::ApplicationType>,
116}
117impl UpdateApplicationInputBuilder {
118    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
119    /// This field is required.
120    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.arn = ::std::option::Option::Some(input.into());
122        self
123    }
124    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
125    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126        self.arn = input;
127        self
128    }
129    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
130    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
131        &self.arn
132    }
133    /// <p>The name of the application.</p>
134    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135        self.name = ::std::option::Option::Some(input.into());
136        self
137    }
138    /// <p>The name of the application.</p>
139    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.name = input;
141        self
142    }
143    /// <p>The name of the application.</p>
144    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
145        &self.name
146    }
147    /// <p>The description of the application.</p>
148    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
149        self.description = ::std::option::Option::Some(input.into());
150        self
151    }
152    /// <p>The description of the application.</p>
153    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
154        self.description = input;
155        self
156    }
157    /// <p>The description of the application.</p>
158    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
159        &self.description
160    }
161    /// <p>The configuration for where the application should be loaded from.</p>
162    pub fn application_source_config(mut self, input: crate::types::ApplicationSourceConfig) -> Self {
163        self.application_source_config = ::std::option::Option::Some(input);
164        self
165    }
166    /// <p>The configuration for where the application should be loaded from.</p>
167    pub fn set_application_source_config(mut self, input: ::std::option::Option<crate::types::ApplicationSourceConfig>) -> Self {
168        self.application_source_config = input;
169        self
170    }
171    /// <p>The configuration for where the application should be loaded from.</p>
172    pub fn get_application_source_config(&self) -> &::std::option::Option<crate::types::ApplicationSourceConfig> {
173        &self.application_source_config
174    }
175    /// Appends an item to `subscriptions`.
176    ///
177    /// To override the contents of this collection use [`set_subscriptions`](Self::set_subscriptions).
178    ///
179    /// <p>The events that the application subscribes.</p>
180    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
181    pub fn subscriptions(mut self, input: crate::types::Subscription) -> Self {
182        let mut v = self.subscriptions.unwrap_or_default();
183        v.push(input);
184        self.subscriptions = ::std::option::Option::Some(v);
185        self
186    }
187    /// <p>The events that the application subscribes.</p>
188    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
189    pub fn set_subscriptions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>) -> Self {
190        self.subscriptions = input;
191        self
192    }
193    /// <p>The events that the application subscribes.</p>
194    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
195    pub fn get_subscriptions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Subscription>> {
196        &self.subscriptions
197    }
198    /// Appends an item to `publications`.
199    ///
200    /// To override the contents of this collection use [`set_publications`](Self::set_publications).
201    ///
202    /// <p>The events that the application publishes.</p>
203    #[deprecated(note = "Publications has been replaced with Permissions")]
204    pub fn publications(mut self, input: crate::types::Publication) -> Self {
205        let mut v = self.publications.unwrap_or_default();
206        v.push(input);
207        self.publications = ::std::option::Option::Some(v);
208        self
209    }
210    /// <p>The events that the application publishes.</p>
211    #[deprecated(note = "Publications has been replaced with Permissions")]
212    pub fn set_publications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>) -> Self {
213        self.publications = input;
214        self
215    }
216    /// <p>The events that the application publishes.</p>
217    #[deprecated(note = "Publications has been replaced with Permissions")]
218    pub fn get_publications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Publication>> {
219        &self.publications
220    }
221    /// Appends an item to `permissions`.
222    ///
223    /// To override the contents of this collection use [`set_permissions`](Self::set_permissions).
224    ///
225    /// <p>The configuration of events or requests that the application has access to.</p>
226    pub fn permissions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
227        let mut v = self.permissions.unwrap_or_default();
228        v.push(input.into());
229        self.permissions = ::std::option::Option::Some(v);
230        self
231    }
232    /// <p>The configuration of events or requests that the application has access to.</p>
233    pub fn set_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
234        self.permissions = input;
235        self
236    }
237    /// <p>The configuration of events or requests that the application has access to.</p>
238    pub fn get_permissions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
239        &self.permissions
240    }
241    /// <p>Indicates whether the application is a service.</p>
242    #[deprecated(note = "IsService has been deprecated in favor of ApplicationType", since = "2025-12-01")]
243    pub fn is_service(mut self, input: bool) -> Self {
244        self.is_service = ::std::option::Option::Some(input);
245        self
246    }
247    /// <p>Indicates whether the application is a service.</p>
248    #[deprecated(note = "IsService has been deprecated in favor of ApplicationType", since = "2025-12-01")]
249    pub fn set_is_service(mut self, input: ::std::option::Option<bool>) -> Self {
250        self.is_service = input;
251        self
252    }
253    /// <p>Indicates whether the application is a service.</p>
254    #[deprecated(note = "IsService has been deprecated in favor of ApplicationType", since = "2025-12-01")]
255    pub fn get_is_service(&self) -> &::std::option::Option<bool> {
256        &self.is_service
257    }
258    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
259    pub fn initialization_timeout(mut self, input: i32) -> Self {
260        self.initialization_timeout = ::std::option::Option::Some(input);
261        self
262    }
263    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
264    pub fn set_initialization_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
265        self.initialization_timeout = input;
266        self
267    }
268    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
269    pub fn get_initialization_timeout(&self) -> &::std::option::Option<i32> {
270        &self.initialization_timeout
271    }
272    /// <p>The configuration settings for the application.</p>
273    pub fn application_config(mut self, input: crate::types::ApplicationConfig) -> Self {
274        self.application_config = ::std::option::Option::Some(input);
275        self
276    }
277    /// <p>The configuration settings for the application.</p>
278    pub fn set_application_config(mut self, input: ::std::option::Option<crate::types::ApplicationConfig>) -> Self {
279        self.application_config = input;
280        self
281    }
282    /// <p>The configuration settings for the application.</p>
283    pub fn get_application_config(&self) -> &::std::option::Option<crate::types::ApplicationConfig> {
284        &self.application_config
285    }
286    /// <p>The iframe configuration for the application.</p>
287    pub fn iframe_config(mut self, input: crate::types::IframeConfig) -> Self {
288        self.iframe_config = ::std::option::Option::Some(input);
289        self
290    }
291    /// <p>The iframe configuration for the application.</p>
292    pub fn set_iframe_config(mut self, input: ::std::option::Option<crate::types::IframeConfig>) -> Self {
293        self.iframe_config = input;
294        self
295    }
296    /// <p>The iframe configuration for the application.</p>
297    pub fn get_iframe_config(&self) -> &::std::option::Option<crate::types::IframeConfig> {
298        &self.iframe_config
299    }
300    /// <p>The type of application.</p>
301    pub fn application_type(mut self, input: crate::types::ApplicationType) -> Self {
302        self.application_type = ::std::option::Option::Some(input);
303        self
304    }
305    /// <p>The type of application.</p>
306    pub fn set_application_type(mut self, input: ::std::option::Option<crate::types::ApplicationType>) -> Self {
307        self.application_type = input;
308        self
309    }
310    /// <p>The type of application.</p>
311    pub fn get_application_type(&self) -> &::std::option::Option<crate::types::ApplicationType> {
312        &self.application_type
313    }
314    /// Consumes the builder and constructs a [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
315    pub fn build(
316        self,
317    ) -> ::std::result::Result<crate::operation::update_application::UpdateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
318        ::std::result::Result::Ok(crate::operation::update_application::UpdateApplicationInput {
319            arn: self.arn,
320            name: self.name,
321            description: self.description,
322            application_source_config: self.application_source_config,
323            subscriptions: self.subscriptions,
324            publications: self.publications,
325            permissions: self.permissions,
326            is_service: self.is_service,
327            initialization_timeout: self.initialization_timeout,
328            application_config: self.application_config,
329            iframe_config: self.iframe_config,
330            application_type: self.application_type,
331        })
332    }
333}