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