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}
23impl UpdateApplicationInput {
24    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
25    pub fn arn(&self) -> ::std::option::Option<&str> {
26        self.arn.as_deref()
27    }
28    /// <p>The name of the application.</p>
29    pub fn name(&self) -> ::std::option::Option<&str> {
30        self.name.as_deref()
31    }
32    /// <p>The description of the application.</p>
33    pub fn description(&self) -> ::std::option::Option<&str> {
34        self.description.as_deref()
35    }
36    /// <p>The configuration for where the application should be loaded from.</p>
37    pub fn application_source_config(&self) -> ::std::option::Option<&crate::types::ApplicationSourceConfig> {
38        self.application_source_config.as_ref()
39    }
40    /// <p>The events that the application subscribes.</p>
41    ///
42    /// 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()`.
43    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
44    pub fn subscriptions(&self) -> &[crate::types::Subscription] {
45        self.subscriptions.as_deref().unwrap_or_default()
46    }
47    /// <p>The events that the application publishes.</p>
48    ///
49    /// 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()`.
50    #[deprecated(note = "Publications has been replaced with Permissions")]
51    pub fn publications(&self) -> &[crate::types::Publication] {
52        self.publications.as_deref().unwrap_or_default()
53    }
54    /// <p>The configuration of events or requests that the application has access to.</p>
55    ///
56    /// 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()`.
57    pub fn permissions(&self) -> &[::std::string::String] {
58        self.permissions.as_deref().unwrap_or_default()
59    }
60}
61impl UpdateApplicationInput {
62    /// Creates a new builder-style object to manufacture [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
63    pub fn builder() -> crate::operation::update_application::builders::UpdateApplicationInputBuilder {
64        crate::operation::update_application::builders::UpdateApplicationInputBuilder::default()
65    }
66}
67
68/// A builder for [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
69#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
70#[non_exhaustive]
71pub struct UpdateApplicationInputBuilder {
72    pub(crate) arn: ::std::option::Option<::std::string::String>,
73    pub(crate) name: ::std::option::Option<::std::string::String>,
74    pub(crate) description: ::std::option::Option<::std::string::String>,
75    pub(crate) application_source_config: ::std::option::Option<crate::types::ApplicationSourceConfig>,
76    pub(crate) subscriptions: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>,
77    pub(crate) publications: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>,
78    pub(crate) permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
79}
80impl UpdateApplicationInputBuilder {
81    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
82    /// This field is required.
83    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84        self.arn = ::std::option::Option::Some(input.into());
85        self
86    }
87    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
88    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89        self.arn = input;
90        self
91    }
92    /// <p>The Amazon Resource Name (ARN) of the Application.</p>
93    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
94        &self.arn
95    }
96    /// <p>The name of the application.</p>
97    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98        self.name = ::std::option::Option::Some(input.into());
99        self
100    }
101    /// <p>The name of the application.</p>
102    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103        self.name = input;
104        self
105    }
106    /// <p>The name of the application.</p>
107    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
108        &self.name
109    }
110    /// <p>The description of the application.</p>
111    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
112        self.description = ::std::option::Option::Some(input.into());
113        self
114    }
115    /// <p>The description of the application.</p>
116    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117        self.description = input;
118        self
119    }
120    /// <p>The description of the application.</p>
121    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
122        &self.description
123    }
124    /// <p>The configuration for where the application should be loaded from.</p>
125    pub fn application_source_config(mut self, input: crate::types::ApplicationSourceConfig) -> Self {
126        self.application_source_config = ::std::option::Option::Some(input);
127        self
128    }
129    /// <p>The configuration for where the application should be loaded from.</p>
130    pub fn set_application_source_config(mut self, input: ::std::option::Option<crate::types::ApplicationSourceConfig>) -> Self {
131        self.application_source_config = input;
132        self
133    }
134    /// <p>The configuration for where the application should be loaded from.</p>
135    pub fn get_application_source_config(&self) -> &::std::option::Option<crate::types::ApplicationSourceConfig> {
136        &self.application_source_config
137    }
138    /// Appends an item to `subscriptions`.
139    ///
140    /// To override the contents of this collection use [`set_subscriptions`](Self::set_subscriptions).
141    ///
142    /// <p>The events that the application subscribes.</p>
143    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
144    pub fn subscriptions(mut self, input: crate::types::Subscription) -> Self {
145        let mut v = self.subscriptions.unwrap_or_default();
146        v.push(input);
147        self.subscriptions = ::std::option::Option::Some(v);
148        self
149    }
150    /// <p>The events that the application subscribes.</p>
151    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
152    pub fn set_subscriptions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>) -> Self {
153        self.subscriptions = input;
154        self
155    }
156    /// <p>The events that the application subscribes.</p>
157    #[deprecated(note = "Subscriptions has been replaced with Permissions")]
158    pub fn get_subscriptions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Subscription>> {
159        &self.subscriptions
160    }
161    /// Appends an item to `publications`.
162    ///
163    /// To override the contents of this collection use [`set_publications`](Self::set_publications).
164    ///
165    /// <p>The events that the application publishes.</p>
166    #[deprecated(note = "Publications has been replaced with Permissions")]
167    pub fn publications(mut self, input: crate::types::Publication) -> Self {
168        let mut v = self.publications.unwrap_or_default();
169        v.push(input);
170        self.publications = ::std::option::Option::Some(v);
171        self
172    }
173    /// <p>The events that the application publishes.</p>
174    #[deprecated(note = "Publications has been replaced with Permissions")]
175    pub fn set_publications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>) -> Self {
176        self.publications = input;
177        self
178    }
179    /// <p>The events that the application publishes.</p>
180    #[deprecated(note = "Publications has been replaced with Permissions")]
181    pub fn get_publications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Publication>> {
182        &self.publications
183    }
184    /// Appends an item to `permissions`.
185    ///
186    /// To override the contents of this collection use [`set_permissions`](Self::set_permissions).
187    ///
188    /// <p>The configuration of events or requests that the application has access to.</p>
189    pub fn permissions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
190        let mut v = self.permissions.unwrap_or_default();
191        v.push(input.into());
192        self.permissions = ::std::option::Option::Some(v);
193        self
194    }
195    /// <p>The configuration of events or requests that the application has access to.</p>
196    pub fn set_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
197        self.permissions = input;
198        self
199    }
200    /// <p>The configuration of events or requests that the application has access to.</p>
201    pub fn get_permissions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
202        &self.permissions
203    }
204    /// Consumes the builder and constructs a [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
205    pub fn build(
206        self,
207    ) -> ::std::result::Result<crate::operation::update_application::UpdateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
208        ::std::result::Result::Ok(crate::operation::update_application::UpdateApplicationInput {
209            arn: self.arn,
210            name: self.name,
211            description: self.description,
212            application_source_config: self.application_source_config,
213            subscriptions: self.subscriptions,
214            publications: self.publications,
215            permissions: self.permissions,
216        })
217    }
218}