aws_sdk_ssmsap/operation/register_application/
_register_application_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct RegisterApplicationInput {
6 pub application_id: ::std::option::Option<::std::string::String>,
8 pub application_type: ::std::option::Option<crate::types::ApplicationType>,
10 pub instances: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12 pub sap_instance_number: ::std::option::Option<::std::string::String>,
14 pub sid: ::std::option::Option<::std::string::String>,
16 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18 pub credentials: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationCredential>>,
20 pub database_arn: ::std::option::Option<::std::string::String>,
22 pub components_info: ::std::option::Option<::std::vec::Vec<crate::types::ComponentInfo>>,
25}
26impl RegisterApplicationInput {
27 pub fn application_id(&self) -> ::std::option::Option<&str> {
29 self.application_id.as_deref()
30 }
31 pub fn application_type(&self) -> ::std::option::Option<&crate::types::ApplicationType> {
33 self.application_type.as_ref()
34 }
35 pub fn instances(&self) -> &[::std::string::String] {
39 self.instances.as_deref().unwrap_or_default()
40 }
41 pub fn sap_instance_number(&self) -> ::std::option::Option<&str> {
43 self.sap_instance_number.as_deref()
44 }
45 pub fn sid(&self) -> ::std::option::Option<&str> {
47 self.sid.as_deref()
48 }
49 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
51 self.tags.as_ref()
52 }
53 pub fn credentials(&self) -> &[crate::types::ApplicationCredential] {
57 self.credentials.as_deref().unwrap_or_default()
58 }
59 pub fn database_arn(&self) -> ::std::option::Option<&str> {
61 self.database_arn.as_deref()
62 }
63 pub fn components_info(&self) -> &[crate::types::ComponentInfo] {
68 self.components_info.as_deref().unwrap_or_default()
69 }
70}
71impl RegisterApplicationInput {
72 pub fn builder() -> crate::operation::register_application::builders::RegisterApplicationInputBuilder {
74 crate::operation::register_application::builders::RegisterApplicationInputBuilder::default()
75 }
76}
77
78#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
80#[non_exhaustive]
81pub struct RegisterApplicationInputBuilder {
82 pub(crate) application_id: ::std::option::Option<::std::string::String>,
83 pub(crate) application_type: ::std::option::Option<crate::types::ApplicationType>,
84 pub(crate) instances: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
85 pub(crate) sap_instance_number: ::std::option::Option<::std::string::String>,
86 pub(crate) sid: ::std::option::Option<::std::string::String>,
87 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
88 pub(crate) credentials: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationCredential>>,
89 pub(crate) database_arn: ::std::option::Option<::std::string::String>,
90 pub(crate) components_info: ::std::option::Option<::std::vec::Vec<crate::types::ComponentInfo>>,
91}
92impl RegisterApplicationInputBuilder {
93 pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.application_id = ::std::option::Option::Some(input.into());
97 self
98 }
99 pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101 self.application_id = input;
102 self
103 }
104 pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
106 &self.application_id
107 }
108 pub fn application_type(mut self, input: crate::types::ApplicationType) -> Self {
111 self.application_type = ::std::option::Option::Some(input);
112 self
113 }
114 pub fn set_application_type(mut self, input: ::std::option::Option<crate::types::ApplicationType>) -> Self {
116 self.application_type = input;
117 self
118 }
119 pub fn get_application_type(&self) -> &::std::option::Option<crate::types::ApplicationType> {
121 &self.application_type
122 }
123 pub fn instances(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 let mut v = self.instances.unwrap_or_default();
130 v.push(input.into());
131 self.instances = ::std::option::Option::Some(v);
132 self
133 }
134 pub fn set_instances(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
136 self.instances = input;
137 self
138 }
139 pub fn get_instances(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
141 &self.instances
142 }
143 pub fn sap_instance_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145 self.sap_instance_number = ::std::option::Option::Some(input.into());
146 self
147 }
148 pub fn set_sap_instance_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150 self.sap_instance_number = input;
151 self
152 }
153 pub fn get_sap_instance_number(&self) -> &::std::option::Option<::std::string::String> {
155 &self.sap_instance_number
156 }
157 pub fn sid(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159 self.sid = ::std::option::Option::Some(input.into());
160 self
161 }
162 pub fn set_sid(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164 self.sid = input;
165 self
166 }
167 pub fn get_sid(&self) -> &::std::option::Option<::std::string::String> {
169 &self.sid
170 }
171 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
177 let mut hash_map = self.tags.unwrap_or_default();
178 hash_map.insert(k.into(), v.into());
179 self.tags = ::std::option::Option::Some(hash_map);
180 self
181 }
182 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
184 self.tags = input;
185 self
186 }
187 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
189 &self.tags
190 }
191 pub fn credentials(mut self, input: crate::types::ApplicationCredential) -> Self {
197 let mut v = self.credentials.unwrap_or_default();
198 v.push(input);
199 self.credentials = ::std::option::Option::Some(v);
200 self
201 }
202 pub fn set_credentials(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationCredential>>) -> Self {
204 self.credentials = input;
205 self
206 }
207 pub fn get_credentials(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ApplicationCredential>> {
209 &self.credentials
210 }
211 pub fn database_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213 self.database_arn = ::std::option::Option::Some(input.into());
214 self
215 }
216 pub fn set_database_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
218 self.database_arn = input;
219 self
220 }
221 pub fn get_database_arn(&self) -> &::std::option::Option<::std::string::String> {
223 &self.database_arn
224 }
225 pub fn components_info(mut self, input: crate::types::ComponentInfo) -> Self {
232 let mut v = self.components_info.unwrap_or_default();
233 v.push(input);
234 self.components_info = ::std::option::Option::Some(v);
235 self
236 }
237 pub fn set_components_info(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ComponentInfo>>) -> Self {
240 self.components_info = input;
241 self
242 }
243 pub fn get_components_info(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ComponentInfo>> {
246 &self.components_info
247 }
248 pub fn build(
250 self,
251 ) -> ::std::result::Result<crate::operation::register_application::RegisterApplicationInput, ::aws_smithy_types::error::operation::BuildError>
252 {
253 ::std::result::Result::Ok(crate::operation::register_application::RegisterApplicationInput {
254 application_id: self.application_id,
255 application_type: self.application_type,
256 instances: self.instances,
257 sap_instance_number: self.sap_instance_number,
258 sid: self.sid,
259 tags: self.tags,
260 credentials: self.credentials,
261 database_arn: self.database_arn,
262 components_info: self.components_info,
263 })
264 }
265}