aws_sdk_appintegrations/operation/create_application/
_create_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 CreateApplicationInput {
6    /// <p>The name of the application.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The namespace of the application.</p>
9    pub namespace: ::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>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
21    pub client_token: ::std::option::Option<::std::string::String>,
22    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
23    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
24    /// <p>The configuration of events or requests that the application has access to.</p>
25    pub permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
26    /// <p>Indicates whether the application is a service.</p>
27    #[deprecated(note = "IsService has been deprecated in favor of ApplicationType", since = "2025-12-01")]
28    pub is_service: ::std::option::Option<bool>,
29    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
30    pub initialization_timeout: ::std::option::Option<i32>,
31    /// <p>The configuration settings for the application.</p>
32    pub application_config: ::std::option::Option<crate::types::ApplicationConfig>,
33    /// <p>The iframe configuration for the application.</p>
34    pub iframe_config: ::std::option::Option<crate::types::IframeConfig>,
35    /// <p>The type of application.</p>
36    pub application_type: ::std::option::Option<crate::types::ApplicationType>,
37}
38impl CreateApplicationInput {
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 namespace of the application.</p>
44    pub fn namespace(&self) -> ::std::option::Option<&str> {
45        self.namespace.as_deref()
46    }
47    /// <p>The description of the application.</p>
48    pub fn description(&self) -> ::std::option::Option<&str> {
49        self.description.as_deref()
50    }
51    /// <p>The configuration for where the application should be loaded from.</p>
52    pub fn application_source_config(&self) -> ::std::option::Option<&crate::types::ApplicationSourceConfig> {
53        self.application_source_config.as_ref()
54    }
55    /// <p>The events that the application subscribes.</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 `.subscriptions.is_none()`.
58    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
59    pub fn subscriptions(&self) -> &[crate::types::Subscription] {
60        self.subscriptions.as_deref().unwrap_or_default()
61    }
62    /// <p>The events that the application publishes.</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 `.publications.is_none()`.
65    #[deprecated(note = "Publications has been replaced with Permissions")]
66    pub fn publications(&self) -> &[crate::types::Publication] {
67        self.publications.as_deref().unwrap_or_default()
68    }
69    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
70    pub fn client_token(&self) -> ::std::option::Option<&str> {
71        self.client_token.as_deref()
72    }
73    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
74    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
75        self.tags.as_ref()
76    }
77    /// <p>The configuration of events or requests that the application has access to.</p>
78    ///
79    /// 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()`.
80    pub fn permissions(&self) -> &[::std::string::String] {
81        self.permissions.as_deref().unwrap_or_default()
82    }
83    /// <p>Indicates whether the application is a service.</p>
84    #[deprecated(note = "IsService has been deprecated in favor of ApplicationType", since = "2025-12-01")]
85    pub fn is_service(&self) -> ::std::option::Option<bool> {
86        self.is_service
87    }
88    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
89    pub fn initialization_timeout(&self) -> ::std::option::Option<i32> {
90        self.initialization_timeout
91    }
92    /// <p>The configuration settings for the application.</p>
93    pub fn application_config(&self) -> ::std::option::Option<&crate::types::ApplicationConfig> {
94        self.application_config.as_ref()
95    }
96    /// <p>The iframe configuration for the application.</p>
97    pub fn iframe_config(&self) -> ::std::option::Option<&crate::types::IframeConfig> {
98        self.iframe_config.as_ref()
99    }
100    /// <p>The type of application.</p>
101    pub fn application_type(&self) -> ::std::option::Option<&crate::types::ApplicationType> {
102        self.application_type.as_ref()
103    }
104}
105impl CreateApplicationInput {
106    /// Creates a new builder-style object to manufacture [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
107    pub fn builder() -> crate::operation::create_application::builders::CreateApplicationInputBuilder {
108        crate::operation::create_application::builders::CreateApplicationInputBuilder::default()
109    }
110}
111
112/// A builder for [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
113#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
114#[non_exhaustive]
115pub struct CreateApplicationInputBuilder {
116    pub(crate) name: ::std::option::Option<::std::string::String>,
117    pub(crate) namespace: ::std::option::Option<::std::string::String>,
118    pub(crate) description: ::std::option::Option<::std::string::String>,
119    pub(crate) application_source_config: ::std::option::Option<crate::types::ApplicationSourceConfig>,
120    pub(crate) subscriptions: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>,
121    pub(crate) publications: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>,
122    pub(crate) client_token: ::std::option::Option<::std::string::String>,
123    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
124    pub(crate) permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
125    pub(crate) is_service: ::std::option::Option<bool>,
126    pub(crate) initialization_timeout: ::std::option::Option<i32>,
127    pub(crate) application_config: ::std::option::Option<crate::types::ApplicationConfig>,
128    pub(crate) iframe_config: ::std::option::Option<crate::types::IframeConfig>,
129    pub(crate) application_type: ::std::option::Option<crate::types::ApplicationType>,
130}
131impl CreateApplicationInputBuilder {
132    /// <p>The name of the application.</p>
133    /// This field is required.
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 namespace of the application.</p>
148    /// This field is required.
149    pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.namespace = ::std::option::Option::Some(input.into());
151        self
152    }
153    /// <p>The namespace of the application.</p>
154    pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.namespace = input;
156        self
157    }
158    /// <p>The namespace of the application.</p>
159    pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
160        &self.namespace
161    }
162    /// <p>The description of the application.</p>
163    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164        self.description = ::std::option::Option::Some(input.into());
165        self
166    }
167    /// <p>The description of the application.</p>
168    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169        self.description = input;
170        self
171    }
172    /// <p>The description of the application.</p>
173    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
174        &self.description
175    }
176    /// <p>The configuration for where the application should be loaded from.</p>
177    /// This field is required.
178    pub fn application_source_config(mut self, input: crate::types::ApplicationSourceConfig) -> Self {
179        self.application_source_config = ::std::option::Option::Some(input);
180        self
181    }
182    /// <p>The configuration for where the application should be loaded from.</p>
183    pub fn set_application_source_config(mut self, input: ::std::option::Option<crate::types::ApplicationSourceConfig>) -> Self {
184        self.application_source_config = input;
185        self
186    }
187    /// <p>The configuration for where the application should be loaded from.</p>
188    pub fn get_application_source_config(&self) -> &::std::option::Option<crate::types::ApplicationSourceConfig> {
189        &self.application_source_config
190    }
191    /// Appends an item to `subscriptions`.
192    ///
193    /// To override the contents of this collection use [`set_subscriptions`](Self::set_subscriptions).
194    ///
195    /// <p>The events that the application subscribes.</p>
196    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
197    pub fn subscriptions(mut self, input: crate::types::Subscription) -> Self {
198        let mut v = self.subscriptions.unwrap_or_default();
199        v.push(input);
200        self.subscriptions = ::std::option::Option::Some(v);
201        self
202    }
203    /// <p>The events that the application subscribes.</p>
204    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
205    pub fn set_subscriptions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>) -> Self {
206        self.subscriptions = input;
207        self
208    }
209    /// <p>The events that the application subscribes.</p>
210    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
211    pub fn get_subscriptions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Subscription>> {
212        &self.subscriptions
213    }
214    /// Appends an item to `publications`.
215    ///
216    /// To override the contents of this collection use [`set_publications`](Self::set_publications).
217    ///
218    /// <p>The events that the application publishes.</p>
219    #[deprecated(note = "Publications has been replaced with Permissions")]
220    pub fn publications(mut self, input: crate::types::Publication) -> Self {
221        let mut v = self.publications.unwrap_or_default();
222        v.push(input);
223        self.publications = ::std::option::Option::Some(v);
224        self
225    }
226    /// <p>The events that the application publishes.</p>
227    #[deprecated(note = "Publications has been replaced with Permissions")]
228    pub fn set_publications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>) -> Self {
229        self.publications = input;
230        self
231    }
232    /// <p>The events that the application publishes.</p>
233    #[deprecated(note = "Publications has been replaced with Permissions")]
234    pub fn get_publications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Publication>> {
235        &self.publications
236    }
237    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
238    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
239        self.client_token = ::std::option::Option::Some(input.into());
240        self
241    }
242    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
243    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244        self.client_token = input;
245        self
246    }
247    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
248    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
249        &self.client_token
250    }
251    /// Adds a key-value pair to `tags`.
252    ///
253    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
254    ///
255    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
256    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
257        let mut hash_map = self.tags.unwrap_or_default();
258        hash_map.insert(k.into(), v.into());
259        self.tags = ::std::option::Option::Some(hash_map);
260        self
261    }
262    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
263    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
264        self.tags = input;
265        self
266    }
267    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
268    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
269        &self.tags
270    }
271    /// Appends an item to `permissions`.
272    ///
273    /// To override the contents of this collection use [`set_permissions`](Self::set_permissions).
274    ///
275    /// <p>The configuration of events or requests that the application has access to.</p>
276    pub fn permissions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
277        let mut v = self.permissions.unwrap_or_default();
278        v.push(input.into());
279        self.permissions = ::std::option::Option::Some(v);
280        self
281    }
282    /// <p>The configuration of events or requests that the application has access to.</p>
283    pub fn set_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
284        self.permissions = input;
285        self
286    }
287    /// <p>The configuration of events or requests that the application has access to.</p>
288    pub fn get_permissions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
289        &self.permissions
290    }
291    /// <p>Indicates whether the application is a service.</p>
292    #[deprecated(note = "IsService has been deprecated in favor of ApplicationType", since = "2025-12-01")]
293    pub fn is_service(mut self, input: bool) -> Self {
294        self.is_service = ::std::option::Option::Some(input);
295        self
296    }
297    /// <p>Indicates whether the application is a service.</p>
298    #[deprecated(note = "IsService has been deprecated in favor of ApplicationType", since = "2025-12-01")]
299    pub fn set_is_service(mut self, input: ::std::option::Option<bool>) -> Self {
300        self.is_service = input;
301        self
302    }
303    /// <p>Indicates whether the application is a service.</p>
304    #[deprecated(note = "IsService has been deprecated in favor of ApplicationType", since = "2025-12-01")]
305    pub fn get_is_service(&self) -> &::std::option::Option<bool> {
306        &self.is_service
307    }
308    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
309    pub fn initialization_timeout(mut self, input: i32) -> Self {
310        self.initialization_timeout = ::std::option::Option::Some(input);
311        self
312    }
313    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
314    pub fn set_initialization_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
315        self.initialization_timeout = input;
316        self
317    }
318    /// <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
319    pub fn get_initialization_timeout(&self) -> &::std::option::Option<i32> {
320        &self.initialization_timeout
321    }
322    /// <p>The configuration settings for the application.</p>
323    pub fn application_config(mut self, input: crate::types::ApplicationConfig) -> Self {
324        self.application_config = ::std::option::Option::Some(input);
325        self
326    }
327    /// <p>The configuration settings for the application.</p>
328    pub fn set_application_config(mut self, input: ::std::option::Option<crate::types::ApplicationConfig>) -> Self {
329        self.application_config = input;
330        self
331    }
332    /// <p>The configuration settings for the application.</p>
333    pub fn get_application_config(&self) -> &::std::option::Option<crate::types::ApplicationConfig> {
334        &self.application_config
335    }
336    /// <p>The iframe configuration for the application.</p>
337    pub fn iframe_config(mut self, input: crate::types::IframeConfig) -> Self {
338        self.iframe_config = ::std::option::Option::Some(input);
339        self
340    }
341    /// <p>The iframe configuration for the application.</p>
342    pub fn set_iframe_config(mut self, input: ::std::option::Option<crate::types::IframeConfig>) -> Self {
343        self.iframe_config = input;
344        self
345    }
346    /// <p>The iframe configuration for the application.</p>
347    pub fn get_iframe_config(&self) -> &::std::option::Option<crate::types::IframeConfig> {
348        &self.iframe_config
349    }
350    /// <p>The type of application.</p>
351    pub fn application_type(mut self, input: crate::types::ApplicationType) -> Self {
352        self.application_type = ::std::option::Option::Some(input);
353        self
354    }
355    /// <p>The type of application.</p>
356    pub fn set_application_type(mut self, input: ::std::option::Option<crate::types::ApplicationType>) -> Self {
357        self.application_type = input;
358        self
359    }
360    /// <p>The type of application.</p>
361    pub fn get_application_type(&self) -> &::std::option::Option<crate::types::ApplicationType> {
362        &self.application_type
363    }
364    /// Consumes the builder and constructs a [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
365    pub fn build(
366        self,
367    ) -> ::std::result::Result<crate::operation::create_application::CreateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
368        ::std::result::Result::Ok(crate::operation::create_application::CreateApplicationInput {
369            name: self.name,
370            namespace: self.namespace,
371            description: self.description,
372            application_source_config: self.application_source_config,
373            subscriptions: self.subscriptions,
374            publications: self.publications,
375            client_token: self.client_token,
376            tags: self.tags,
377            permissions: self.permissions,
378            is_service: self.is_service,
379            initialization_timeout: self.initialization_timeout,
380            application_config: self.application_config,
381            iframe_config: self.iframe_config,
382            application_type: self.application_type,
383        })
384    }
385}