aws_sdk_appintegrations/operation/create_application/
_create_application_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateApplicationInput {
6 pub name: ::std::option::Option<::std::string::String>,
8 pub namespace: ::std::option::Option<::std::string::String>,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub application_source_config: ::std::option::Option<crate::types::ApplicationSourceConfig>,
14 #[deprecated(note = "Subscriptions has been replaced with Permissions")]
16 pub subscriptions: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>,
17 #[deprecated(note = "Publications has been replaced with Permissions")]
19 pub publications: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>,
20 pub client_token: ::std::option::Option<::std::string::String>,
22 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
24 pub permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
26}
27impl CreateApplicationInput {
28 pub fn name(&self) -> ::std::option::Option<&str> {
30 self.name.as_deref()
31 }
32 pub fn namespace(&self) -> ::std::option::Option<&str> {
34 self.namespace.as_deref()
35 }
36 pub fn description(&self) -> ::std::option::Option<&str> {
38 self.description.as_deref()
39 }
40 pub fn application_source_config(&self) -> ::std::option::Option<&crate::types::ApplicationSourceConfig> {
42 self.application_source_config.as_ref()
43 }
44 #[deprecated(note = "Subscriptions has been replaced with Permissions")]
48 pub fn subscriptions(&self) -> &[crate::types::Subscription] {
49 self.subscriptions.as_deref().unwrap_or_default()
50 }
51 #[deprecated(note = "Publications has been replaced with Permissions")]
55 pub fn publications(&self) -> &[crate::types::Publication] {
56 self.publications.as_deref().unwrap_or_default()
57 }
58 pub fn client_token(&self) -> ::std::option::Option<&str> {
60 self.client_token.as_deref()
61 }
62 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
64 self.tags.as_ref()
65 }
66 pub fn permissions(&self) -> &[::std::string::String] {
70 self.permissions.as_deref().unwrap_or_default()
71 }
72}
73impl CreateApplicationInput {
74 pub fn builder() -> crate::operation::create_application::builders::CreateApplicationInputBuilder {
76 crate::operation::create_application::builders::CreateApplicationInputBuilder::default()
77 }
78}
79
80#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
82#[non_exhaustive]
83pub struct CreateApplicationInputBuilder {
84 pub(crate) name: ::std::option::Option<::std::string::String>,
85 pub(crate) namespace: ::std::option::Option<::std::string::String>,
86 pub(crate) description: ::std::option::Option<::std::string::String>,
87 pub(crate) application_source_config: ::std::option::Option<crate::types::ApplicationSourceConfig>,
88 pub(crate) subscriptions: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>,
89 pub(crate) publications: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>,
90 pub(crate) client_token: ::std::option::Option<::std::string::String>,
91 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
92 pub(crate) permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
93}
94impl CreateApplicationInputBuilder {
95 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103 self.name = input;
104 self
105 }
106 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
108 &self.name
109 }
110 pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.namespace = ::std::option::Option::Some(input.into());
114 self
115 }
116 pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.namespace = input;
119 self
120 }
121 pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
123 &self.namespace
124 }
125 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127 self.description = ::std::option::Option::Some(input.into());
128 self
129 }
130 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.description = input;
133 self
134 }
135 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
137 &self.description
138 }
139 pub fn application_source_config(mut self, input: crate::types::ApplicationSourceConfig) -> Self {
142 self.application_source_config = ::std::option::Option::Some(input);
143 self
144 }
145 pub fn set_application_source_config(mut self, input: ::std::option::Option<crate::types::ApplicationSourceConfig>) -> Self {
147 self.application_source_config = input;
148 self
149 }
150 pub fn get_application_source_config(&self) -> &::std::option::Option<crate::types::ApplicationSourceConfig> {
152 &self.application_source_config
153 }
154 #[deprecated(note = "Subscriptions has been replaced with Permissions")]
160 pub fn subscriptions(mut self, input: crate::types::Subscription) -> Self {
161 let mut v = self.subscriptions.unwrap_or_default();
162 v.push(input);
163 self.subscriptions = ::std::option::Option::Some(v);
164 self
165 }
166 #[deprecated(note = "Subscriptions has been replaced with Permissions")]
168 pub fn set_subscriptions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Subscription>>) -> Self {
169 self.subscriptions = input;
170 self
171 }
172 #[deprecated(note = "Subscriptions has been replaced with Permissions")]
174 pub fn get_subscriptions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Subscription>> {
175 &self.subscriptions
176 }
177 #[deprecated(note = "Publications has been replaced with Permissions")]
183 pub fn publications(mut self, input: crate::types::Publication) -> Self {
184 let mut v = self.publications.unwrap_or_default();
185 v.push(input);
186 self.publications = ::std::option::Option::Some(v);
187 self
188 }
189 #[deprecated(note = "Publications has been replaced with Permissions")]
191 pub fn set_publications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Publication>>) -> Self {
192 self.publications = input;
193 self
194 }
195 #[deprecated(note = "Publications has been replaced with Permissions")]
197 pub fn get_publications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Publication>> {
198 &self.publications
199 }
200 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202 self.client_token = ::std::option::Option::Some(input.into());
203 self
204 }
205 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207 self.client_token = input;
208 self
209 }
210 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
212 &self.client_token
213 }
214 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
220 let mut hash_map = self.tags.unwrap_or_default();
221 hash_map.insert(k.into(), v.into());
222 self.tags = ::std::option::Option::Some(hash_map);
223 self
224 }
225 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
227 self.tags = input;
228 self
229 }
230 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
232 &self.tags
233 }
234 pub fn permissions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
240 let mut v = self.permissions.unwrap_or_default();
241 v.push(input.into());
242 self.permissions = ::std::option::Option::Some(v);
243 self
244 }
245 pub fn set_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
247 self.permissions = input;
248 self
249 }
250 pub fn get_permissions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
252 &self.permissions
253 }
254 pub fn build(
256 self,
257 ) -> ::std::result::Result<crate::operation::create_application::CreateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
258 ::std::result::Result::Ok(crate::operation::create_application::CreateApplicationInput {
259 name: self.name,
260 namespace: self.namespace,
261 description: self.description,
262 application_source_config: self.application_source_config,
263 subscriptions: self.subscriptions,
264 publications: self.publications,
265 client_token: self.client_token,
266 tags: self.tags,
267 permissions: self.permissions,
268 })
269 }
270}