aws_sdk_appintegrations/operation/get_application/
_get_application_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 GetApplicationOutput {
6    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>A unique identifier for the Application.</p>
9    pub id: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the application.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>The namespace of the application.</p>
13    pub namespace: ::std::option::Option<::std::string::String>,
14    /// <p>The description of the application.</p>
15    pub description: ::std::option::Option<::std::string::String>,
16    /// <p>The configuration for where the application should be loaded from.</p>
17    pub application_source_config: ::std::option::Option<crate::types::ApplicationSourceConfig>,
18    /// <p>The events that the application subscribes.</p>
19    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
20    pub subscriptions: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>,
21    /// <p>The events that the application publishes.</p>
22    #[deprecated(note = "Publications has been replaced with Permissions")]
23    pub publications: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>,
24    /// <p>The created time of the Application.</p>
25    pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
26    /// <p>The last modified time of the Application.</p>
27    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
28    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
29    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
30    /// <p>The configuration of events or requests that the application has access to.</p>
31    pub permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
32    /// <p>Indicates whether the application is a service.</p>
33    pub is_service: bool,
34    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
35    pub initialization_timeout: ::std::option::Option<i32>,
36    /// <p>The configuration settings for the application.</p>
37    pub application_config: ::std::option::Option<crate::types::ApplicationConfig>,
38    /// <p>The iframe configuration for the application.</p>
39    pub iframe_config: ::std::option::Option<crate::types::IframeConfig>,
40    _request_id: Option<String>,
41}
42impl GetApplicationOutput {
43    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
44    pub fn arn(&self) -> ::std::option::Option<&str> {
45        self.arn.as_deref()
46    }
47    /// <p>A unique identifier for the Application.</p>
48    pub fn id(&self) -> ::std::option::Option<&str> {
49        self.id.as_deref()
50    }
51    /// <p>The name of the application.</p>
52    pub fn name(&self) -> ::std::option::Option<&str> {
53        self.name.as_deref()
54    }
55    /// <p>The namespace of the application.</p>
56    pub fn namespace(&self) -> ::std::option::Option<&str> {
57        self.namespace.as_deref()
58    }
59    /// <p>The description of the application.</p>
60    pub fn description(&self) -> ::std::option::Option<&str> {
61        self.description.as_deref()
62    }
63    /// <p>The configuration for where the application should be loaded from.</p>
64    pub fn application_source_config(&self) -> ::std::option::Option<&crate::types::ApplicationSourceConfig> {
65        self.application_source_config.as_ref()
66    }
67    /// <p>The events that the application subscribes.</p>
68    ///
69    /// 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()`.
70    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
71    pub fn subscriptions(&self) -> &[crate::types::Subscription] {
72        self.subscriptions.as_deref().unwrap_or_default()
73    }
74    /// <p>The events that the application publishes.</p>
75    ///
76    /// 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()`.
77    #[deprecated(note = "Publications has been replaced with Permissions")]
78    pub fn publications(&self) -> &[crate::types::Publication] {
79        self.publications.as_deref().unwrap_or_default()
80    }
81    /// <p>The created time of the Application.</p>
82    pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
83        self.created_time.as_ref()
84    }
85    /// <p>The last modified time of the Application.</p>
86    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
87        self.last_modified_time.as_ref()
88    }
89    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
90    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
91        self.tags.as_ref()
92    }
93    /// <p>The configuration of events or requests that the application has access to.</p>
94    ///
95    /// 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()`.
96    pub fn permissions(&self) -> &[::std::string::String] {
97        self.permissions.as_deref().unwrap_or_default()
98    }
99    /// <p>Indicates whether the application is a service.</p>
100    pub fn is_service(&self) -> bool {
101        self.is_service
102    }
103    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
104    pub fn initialization_timeout(&self) -> ::std::option::Option<i32> {
105        self.initialization_timeout
106    }
107    /// <p>The configuration settings for the application.</p>
108    pub fn application_config(&self) -> ::std::option::Option<&crate::types::ApplicationConfig> {
109        self.application_config.as_ref()
110    }
111    /// <p>The iframe configuration for the application.</p>
112    pub fn iframe_config(&self) -> ::std::option::Option<&crate::types::IframeConfig> {
113        self.iframe_config.as_ref()
114    }
115}
116impl ::aws_types::request_id::RequestId for GetApplicationOutput {
117    fn request_id(&self) -> Option<&str> {
118        self._request_id.as_deref()
119    }
120}
121impl GetApplicationOutput {
122    /// Creates a new builder-style object to manufacture [`GetApplicationOutput`](crate::operation::get_application::GetApplicationOutput).
123    pub fn builder() -> crate::operation::get_application::builders::GetApplicationOutputBuilder {
124        crate::operation::get_application::builders::GetApplicationOutputBuilder::default()
125    }
126}
127
128/// A builder for [`GetApplicationOutput`](crate::operation::get_application::GetApplicationOutput).
129#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
130#[non_exhaustive]
131pub struct GetApplicationOutputBuilder {
132    pub(crate) arn: ::std::option::Option<::std::string::String>,
133    pub(crate) id: ::std::option::Option<::std::string::String>,
134    pub(crate) name: ::std::option::Option<::std::string::String>,
135    pub(crate) namespace: ::std::option::Option<::std::string::String>,
136    pub(crate) description: ::std::option::Option<::std::string::String>,
137    pub(crate) application_source_config: ::std::option::Option<crate::types::ApplicationSourceConfig>,
138    pub(crate) subscriptions: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>,
139    pub(crate) publications: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>,
140    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
141    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
142    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
143    pub(crate) permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
144    pub(crate) is_service: ::std::option::Option<bool>,
145    pub(crate) initialization_timeout: ::std::option::Option<i32>,
146    pub(crate) application_config: ::std::option::Option<crate::types::ApplicationConfig>,
147    pub(crate) iframe_config: ::std::option::Option<crate::types::IframeConfig>,
148    _request_id: Option<String>,
149}
150impl GetApplicationOutputBuilder {
151    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
152    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153        self.arn = ::std::option::Option::Some(input.into());
154        self
155    }
156    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
157    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158        self.arn = input;
159        self
160    }
161    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
162    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
163        &self.arn
164    }
165    /// <p>A unique identifier for the Application.</p>
166    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167        self.id = ::std::option::Option::Some(input.into());
168        self
169    }
170    /// <p>A unique identifier for the Application.</p>
171    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
172        self.id = input;
173        self
174    }
175    /// <p>A unique identifier for the Application.</p>
176    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
177        &self.id
178    }
179    /// <p>The name of the application.</p>
180    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181        self.name = ::std::option::Option::Some(input.into());
182        self
183    }
184    /// <p>The name of the application.</p>
185    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186        self.name = input;
187        self
188    }
189    /// <p>The name of the application.</p>
190    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
191        &self.name
192    }
193    /// <p>The namespace of the application.</p>
194    pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        self.namespace = ::std::option::Option::Some(input.into());
196        self
197    }
198    /// <p>The namespace of the application.</p>
199    pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
200        self.namespace = input;
201        self
202    }
203    /// <p>The namespace of the application.</p>
204    pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
205        &self.namespace
206    }
207    /// <p>The description of the application.</p>
208    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
209        self.description = ::std::option::Option::Some(input.into());
210        self
211    }
212    /// <p>The description of the application.</p>
213    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
214        self.description = input;
215        self
216    }
217    /// <p>The description of the application.</p>
218    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
219        &self.description
220    }
221    /// <p>The configuration for where the application should be loaded from.</p>
222    pub fn application_source_config(mut self, input: crate::types::ApplicationSourceConfig) -> Self {
223        self.application_source_config = ::std::option::Option::Some(input);
224        self
225    }
226    /// <p>The configuration for where the application should be loaded from.</p>
227    pub fn set_application_source_config(mut self, input: ::std::option::Option<crate::types::ApplicationSourceConfig>) -> Self {
228        self.application_source_config = input;
229        self
230    }
231    /// <p>The configuration for where the application should be loaded from.</p>
232    pub fn get_application_source_config(&self) -> &::std::option::Option<crate::types::ApplicationSourceConfig> {
233        &self.application_source_config
234    }
235    /// Appends an item to `subscriptions`.
236    ///
237    /// To override the contents of this collection use [`set_subscriptions`](Self::set_subscriptions).
238    ///
239    /// <p>The events that the application subscribes.</p>
240    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
241    pub fn subscriptions(mut self, input: crate::types::Subscription) -> Self {
242        let mut v = self.subscriptions.unwrap_or_default();
243        v.push(input);
244        self.subscriptions = ::std::option::Option::Some(v);
245        self
246    }
247    /// <p>The events that the application subscribes.</p>
248    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
249    pub fn set_subscriptions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>) -> Self {
250        self.subscriptions = input;
251        self
252    }
253    /// <p>The events that the application subscribes.</p>
254    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
255    pub fn get_subscriptions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Subscription>> {
256        &self.subscriptions
257    }
258    /// Appends an item to `publications`.
259    ///
260    /// To override the contents of this collection use [`set_publications`](Self::set_publications).
261    ///
262    /// <p>The events that the application publishes.</p>
263    #[deprecated(note = "Publications has been replaced with Permissions")]
264    pub fn publications(mut self, input: crate::types::Publication) -> Self {
265        let mut v = self.publications.unwrap_or_default();
266        v.push(input);
267        self.publications = ::std::option::Option::Some(v);
268        self
269    }
270    /// <p>The events that the application publishes.</p>
271    #[deprecated(note = "Publications has been replaced with Permissions")]
272    pub fn set_publications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>) -> Self {
273        self.publications = input;
274        self
275    }
276    /// <p>The events that the application publishes.</p>
277    #[deprecated(note = "Publications has been replaced with Permissions")]
278    pub fn get_publications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Publication>> {
279        &self.publications
280    }
281    /// <p>The created time of the Application.</p>
282    pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
283        self.created_time = ::std::option::Option::Some(input);
284        self
285    }
286    /// <p>The created time of the Application.</p>
287    pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
288        self.created_time = input;
289        self
290    }
291    /// <p>The created time of the Application.</p>
292    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
293        &self.created_time
294    }
295    /// <p>The last modified time of the Application.</p>
296    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
297        self.last_modified_time = ::std::option::Option::Some(input);
298        self
299    }
300    /// <p>The last modified time of the Application.</p>
301    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
302        self.last_modified_time = input;
303        self
304    }
305    /// <p>The last modified time of the Application.</p>
306    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
307        &self.last_modified_time
308    }
309    /// Adds a key-value pair to `tags`.
310    ///
311    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
312    ///
313    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
314    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
315        let mut hash_map = self.tags.unwrap_or_default();
316        hash_map.insert(k.into(), v.into());
317        self.tags = ::std::option::Option::Some(hash_map);
318        self
319    }
320    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
321    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
322        self.tags = input;
323        self
324    }
325    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
326    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
327        &self.tags
328    }
329    /// Appends an item to `permissions`.
330    ///
331    /// To override the contents of this collection use [`set_permissions`](Self::set_permissions).
332    ///
333    /// <p>The configuration of events or requests that the application has access to.</p>
334    pub fn permissions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
335        let mut v = self.permissions.unwrap_or_default();
336        v.push(input.into());
337        self.permissions = ::std::option::Option::Some(v);
338        self
339    }
340    /// <p>The configuration of events or requests that the application has access to.</p>
341    pub fn set_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
342        self.permissions = input;
343        self
344    }
345    /// <p>The configuration of events or requests that the application has access to.</p>
346    pub fn get_permissions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
347        &self.permissions
348    }
349    /// <p>Indicates whether the application is a service.</p>
350    pub fn is_service(mut self, input: bool) -> Self {
351        self.is_service = ::std::option::Option::Some(input);
352        self
353    }
354    /// <p>Indicates whether the application is a service.</p>
355    pub fn set_is_service(mut self, input: ::std::option::Option<bool>) -> Self {
356        self.is_service = input;
357        self
358    }
359    /// <p>Indicates whether the application is a service.</p>
360    pub fn get_is_service(&self) -> &::std::option::Option<bool> {
361        &self.is_service
362    }
363    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
364    pub fn initialization_timeout(mut self, input: i32) -> Self {
365        self.initialization_timeout = ::std::option::Option::Some(input);
366        self
367    }
368    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
369    pub fn set_initialization_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
370        self.initialization_timeout = input;
371        self
372    }
373    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
374    pub fn get_initialization_timeout(&self) -> &::std::option::Option<i32> {
375        &self.initialization_timeout
376    }
377    /// <p>The configuration settings for the application.</p>
378    pub fn application_config(mut self, input: crate::types::ApplicationConfig) -> Self {
379        self.application_config = ::std::option::Option::Some(input);
380        self
381    }
382    /// <p>The configuration settings for the application.</p>
383    pub fn set_application_config(mut self, input: ::std::option::Option<crate::types::ApplicationConfig>) -> Self {
384        self.application_config = input;
385        self
386    }
387    /// <p>The configuration settings for the application.</p>
388    pub fn get_application_config(&self) -> &::std::option::Option<crate::types::ApplicationConfig> {
389        &self.application_config
390    }
391    /// <p>The iframe configuration for the application.</p>
392    pub fn iframe_config(mut self, input: crate::types::IframeConfig) -> Self {
393        self.iframe_config = ::std::option::Option::Some(input);
394        self
395    }
396    /// <p>The iframe configuration for the application.</p>
397    pub fn set_iframe_config(mut self, input: ::std::option::Option<crate::types::IframeConfig>) -> Self {
398        self.iframe_config = input;
399        self
400    }
401    /// <p>The iframe configuration for the application.</p>
402    pub fn get_iframe_config(&self) -> &::std::option::Option<crate::types::IframeConfig> {
403        &self.iframe_config
404    }
405    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
406        self._request_id = Some(request_id.into());
407        self
408    }
409
410    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
411        self._request_id = request_id;
412        self
413    }
414    /// Consumes the builder and constructs a [`GetApplicationOutput`](crate::operation::get_application::GetApplicationOutput).
415    pub fn build(self) -> crate::operation::get_application::GetApplicationOutput {
416        crate::operation::get_application::GetApplicationOutput {
417            arn: self.arn,
418            id: self.id,
419            name: self.name,
420            namespace: self.namespace,
421            description: self.description,
422            application_source_config: self.application_source_config,
423            subscriptions: self.subscriptions,
424            publications: self.publications,
425            created_time: self.created_time,
426            last_modified_time: self.last_modified_time,
427            tags: self.tags,
428            permissions: self.permissions,
429            is_service: self.is_service.unwrap_or_default(),
430            initialization_timeout: self.initialization_timeout,
431            application_config: self.application_config,
432            iframe_config: self.iframe_config,
433            _request_id: self._request_id,
434        }
435    }
436}