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    _request_id: Option<String>,
33}
34impl GetApplicationOutput {
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>A unique identifier for the Application.</p>
40    pub fn id(&self) -> ::std::option::Option<&str> {
41        self.id.as_deref()
42    }
43    /// <p>The name of the application.</p>
44    pub fn name(&self) -> ::std::option::Option<&str> {
45        self.name.as_deref()
46    }
47    /// <p>The namespace of the application.</p>
48    pub fn namespace(&self) -> ::std::option::Option<&str> {
49        self.namespace.as_deref()
50    }
51    /// <p>The description of the application.</p>
52    pub fn description(&self) -> ::std::option::Option<&str> {
53        self.description.as_deref()
54    }
55    /// <p>The configuration for where the application should be loaded from.</p>
56    pub fn application_source_config(&self) -> ::std::option::Option<&crate::types::ApplicationSourceConfig> {
57        self.application_source_config.as_ref()
58    }
59    /// <p>The events that the application subscribes.</p>
60    ///
61    /// 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()`.
62    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
63    pub fn subscriptions(&self) -> &[crate::types::Subscription] {
64        self.subscriptions.as_deref().unwrap_or_default()
65    }
66    /// <p>The events that the application publishes.</p>
67    ///
68    /// 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()`.
69    #[deprecated(note = "Publications has been replaced with Permissions")]
70    pub fn publications(&self) -> &[crate::types::Publication] {
71        self.publications.as_deref().unwrap_or_default()
72    }
73    /// <p>The created time of the Application.</p>
74    pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
75        self.created_time.as_ref()
76    }
77    /// <p>The last modified time of the Application.</p>
78    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
79        self.last_modified_time.as_ref()
80    }
81    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
82    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
83        self.tags.as_ref()
84    }
85    /// <p>The configuration of events or requests that the application has access to.</p>
86    ///
87    /// 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()`.
88    pub fn permissions(&self) -> &[::std::string::String] {
89        self.permissions.as_deref().unwrap_or_default()
90    }
91}
92impl ::aws_types::request_id::RequestId for GetApplicationOutput {
93    fn request_id(&self) -> Option<&str> {
94        self._request_id.as_deref()
95    }
96}
97impl GetApplicationOutput {
98    /// Creates a new builder-style object to manufacture [`GetApplicationOutput`](crate::operation::get_application::GetApplicationOutput).
99    pub fn builder() -> crate::operation::get_application::builders::GetApplicationOutputBuilder {
100        crate::operation::get_application::builders::GetApplicationOutputBuilder::default()
101    }
102}
103
104/// A builder for [`GetApplicationOutput`](crate::operation::get_application::GetApplicationOutput).
105#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
106#[non_exhaustive]
107pub struct GetApplicationOutputBuilder {
108    pub(crate) arn: ::std::option::Option<::std::string::String>,
109    pub(crate) id: ::std::option::Option<::std::string::String>,
110    pub(crate) name: ::std::option::Option<::std::string::String>,
111    pub(crate) namespace: ::std::option::Option<::std::string::String>,
112    pub(crate) description: ::std::option::Option<::std::string::String>,
113    pub(crate) application_source_config: ::std::option::Option<crate::types::ApplicationSourceConfig>,
114    pub(crate) subscriptions: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>,
115    pub(crate) publications: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>,
116    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
117    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
118    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
119    pub(crate) permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
120    _request_id: Option<String>,
121}
122impl GetApplicationOutputBuilder {
123    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
124    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.arn = ::std::option::Option::Some(input.into());
126        self
127    }
128    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
129    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.arn = input;
131        self
132    }
133    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
134    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
135        &self.arn
136    }
137    /// <p>A unique identifier for the Application.</p>
138    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
139        self.id = ::std::option::Option::Some(input.into());
140        self
141    }
142    /// <p>A unique identifier for the Application.</p>
143    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
144        self.id = input;
145        self
146    }
147    /// <p>A unique identifier for the Application.</p>
148    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
149        &self.id
150    }
151    /// <p>The name of the application.</p>
152    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153        self.name = ::std::option::Option::Some(input.into());
154        self
155    }
156    /// <p>The name of the application.</p>
157    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158        self.name = input;
159        self
160    }
161    /// <p>The name of the application.</p>
162    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
163        &self.name
164    }
165    /// <p>The namespace of the application.</p>
166    pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167        self.namespace = ::std::option::Option::Some(input.into());
168        self
169    }
170    /// <p>The namespace of the application.</p>
171    pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
172        self.namespace = input;
173        self
174    }
175    /// <p>The namespace of the application.</p>
176    pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
177        &self.namespace
178    }
179    /// <p>The description of the application.</p>
180    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181        self.description = ::std::option::Option::Some(input.into());
182        self
183    }
184    /// <p>The description of the application.</p>
185    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186        self.description = input;
187        self
188    }
189    /// <p>The description of the application.</p>
190    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
191        &self.description
192    }
193    /// <p>The configuration for where the application should be loaded from.</p>
194    pub fn application_source_config(mut self, input: crate::types::ApplicationSourceConfig) -> Self {
195        self.application_source_config = ::std::option::Option::Some(input);
196        self
197    }
198    /// <p>The configuration for where the application should be loaded from.</p>
199    pub fn set_application_source_config(mut self, input: ::std::option::Option<crate::types::ApplicationSourceConfig>) -> Self {
200        self.application_source_config = input;
201        self
202    }
203    /// <p>The configuration for where the application should be loaded from.</p>
204    pub fn get_application_source_config(&self) -> &::std::option::Option<crate::types::ApplicationSourceConfig> {
205        &self.application_source_config
206    }
207    /// Appends an item to `subscriptions`.
208    ///
209    /// To override the contents of this collection use [`set_subscriptions`](Self::set_subscriptions).
210    ///
211    /// <p>The events that the application subscribes.</p>
212    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
213    pub fn subscriptions(mut self, input: crate::types::Subscription) -> Self {
214        let mut v = self.subscriptions.unwrap_or_default();
215        v.push(input);
216        self.subscriptions = ::std::option::Option::Some(v);
217        self
218    }
219    /// <p>The events that the application subscribes.</p>
220    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
221    pub fn set_subscriptions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>) -> Self {
222        self.subscriptions = input;
223        self
224    }
225    /// <p>The events that the application subscribes.</p>
226    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
227    pub fn get_subscriptions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Subscription>> {
228        &self.subscriptions
229    }
230    /// Appends an item to `publications`.
231    ///
232    /// To override the contents of this collection use [`set_publications`](Self::set_publications).
233    ///
234    /// <p>The events that the application publishes.</p>
235    #[deprecated(note = "Publications has been replaced with Permissions")]
236    pub fn publications(mut self, input: crate::types::Publication) -> Self {
237        let mut v = self.publications.unwrap_or_default();
238        v.push(input);
239        self.publications = ::std::option::Option::Some(v);
240        self
241    }
242    /// <p>The events that the application publishes.</p>
243    #[deprecated(note = "Publications has been replaced with Permissions")]
244    pub fn set_publications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>) -> Self {
245        self.publications = input;
246        self
247    }
248    /// <p>The events that the application publishes.</p>
249    #[deprecated(note = "Publications has been replaced with Permissions")]
250    pub fn get_publications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Publication>> {
251        &self.publications
252    }
253    /// <p>The created time of the Application.</p>
254    pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
255        self.created_time = ::std::option::Option::Some(input);
256        self
257    }
258    /// <p>The created time of the Application.</p>
259    pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
260        self.created_time = input;
261        self
262    }
263    /// <p>The created time of the Application.</p>
264    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
265        &self.created_time
266    }
267    /// <p>The last modified time of the Application.</p>
268    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
269        self.last_modified_time = ::std::option::Option::Some(input);
270        self
271    }
272    /// <p>The last modified time of the Application.</p>
273    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
274        self.last_modified_time = input;
275        self
276    }
277    /// <p>The last modified time of the Application.</p>
278    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
279        &self.last_modified_time
280    }
281    /// Adds a key-value pair to `tags`.
282    ///
283    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
284    ///
285    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
286    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
287        let mut hash_map = self.tags.unwrap_or_default();
288        hash_map.insert(k.into(), v.into());
289        self.tags = ::std::option::Option::Some(hash_map);
290        self
291    }
292    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
293    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
294        self.tags = input;
295        self
296    }
297    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
298    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
299        &self.tags
300    }
301    /// Appends an item to `permissions`.
302    ///
303    /// To override the contents of this collection use [`set_permissions`](Self::set_permissions).
304    ///
305    /// <p>The configuration of events or requests that the application has access to.</p>
306    pub fn permissions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
307        let mut v = self.permissions.unwrap_or_default();
308        v.push(input.into());
309        self.permissions = ::std::option::Option::Some(v);
310        self
311    }
312    /// <p>The configuration of events or requests that the application has access to.</p>
313    pub fn set_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
314        self.permissions = input;
315        self
316    }
317    /// <p>The configuration of events or requests that the application has access to.</p>
318    pub fn get_permissions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
319        &self.permissions
320    }
321    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
322        self._request_id = Some(request_id.into());
323        self
324    }
325
326    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
327        self._request_id = request_id;
328        self
329    }
330    /// Consumes the builder and constructs a [`GetApplicationOutput`](crate::operation::get_application::GetApplicationOutput).
331    pub fn build(self) -> crate::operation::get_application::GetApplicationOutput {
332        crate::operation::get_application::GetApplicationOutput {
333            arn: self.arn,
334            id: self.id,
335            name: self.name,
336            namespace: self.namespace,
337            description: self.description,
338            application_source_config: self.application_source_config,
339            subscriptions: self.subscriptions,
340            publications: self.publications,
341            created_time: self.created_time,
342            last_modified_time: self.last_modified_time,
343            tags: self.tags,
344            permissions: self.permissions,
345            _request_id: self._request_id,
346        }
347    }
348}