aws_sdk_finspace/operation/create_environment/_create_environment_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 CreateEnvironmentInput {
6 /// <p>The name of the FinSpace environment to be created.</p>
7 pub name: ::std::option::Option<::std::string::String>,
8 /// <p>The description of the FinSpace environment to be created.</p>
9 pub description: ::std::option::Option<::std::string::String>,
10 /// <p>The KMS key id to encrypt your data in the FinSpace environment.</p>
11 pub kms_key_id: ::std::option::Option<::std::string::String>,
12 /// <p>Add tags to your FinSpace environment.</p>
13 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
14 /// <p>Authentication mode for the environment.</p>
15 /// <ul>
16 /// <li>
17 /// <p><code>FEDERATED</code> - Users access FinSpace through Single Sign On (SSO) via your Identity provider.</p></li>
18 /// <li>
19 /// <p><code>LOCAL</code> - Users access FinSpace via email and password managed within the FinSpace environment.</p></li>
20 /// </ul>
21 pub federation_mode: ::std::option::Option<crate::types::FederationMode>,
22 /// <p>Configuration information when authentication mode is FEDERATED.</p>
23 pub federation_parameters: ::std::option::Option<crate::types::FederationParameters>,
24 /// <p>Configuration information for the superuser.</p>
25 pub superuser_parameters: ::std::option::Option<crate::types::SuperuserParameters>,
26 /// <p>The list of Amazon Resource Names (ARN) of the data bundles to install. Currently supported data bundle ARNs:</p>
27 /// <ul>
28 /// <li>
29 /// <p><code>arn:aws:finspace:${Region}::data-bundle/capital-markets-sample</code> - Contains sample Capital Markets datasets, categories and controlled vocabularies.</p></li>
30 /// <li>
31 /// <p><code>arn:aws:finspace:${Region}::data-bundle/taq</code> (default) - Contains trades and quotes data in addition to sample Capital Markets data.</p></li>
32 /// </ul>
33 pub data_bundles: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
34}
35impl CreateEnvironmentInput {
36 /// <p>The name of the FinSpace environment to be created.</p>
37 pub fn name(&self) -> ::std::option::Option<&str> {
38 self.name.as_deref()
39 }
40 /// <p>The description of the FinSpace environment to be created.</p>
41 pub fn description(&self) -> ::std::option::Option<&str> {
42 self.description.as_deref()
43 }
44 /// <p>The KMS key id to encrypt your data in the FinSpace environment.</p>
45 pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
46 self.kms_key_id.as_deref()
47 }
48 /// <p>Add tags to your FinSpace environment.</p>
49 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
50 self.tags.as_ref()
51 }
52 /// <p>Authentication mode for the environment.</p>
53 /// <ul>
54 /// <li>
55 /// <p><code>FEDERATED</code> - Users access FinSpace through Single Sign On (SSO) via your Identity provider.</p></li>
56 /// <li>
57 /// <p><code>LOCAL</code> - Users access FinSpace via email and password managed within the FinSpace environment.</p></li>
58 /// </ul>
59 pub fn federation_mode(&self) -> ::std::option::Option<&crate::types::FederationMode> {
60 self.federation_mode.as_ref()
61 }
62 /// <p>Configuration information when authentication mode is FEDERATED.</p>
63 pub fn federation_parameters(&self) -> ::std::option::Option<&crate::types::FederationParameters> {
64 self.federation_parameters.as_ref()
65 }
66 /// <p>Configuration information for the superuser.</p>
67 pub fn superuser_parameters(&self) -> ::std::option::Option<&crate::types::SuperuserParameters> {
68 self.superuser_parameters.as_ref()
69 }
70 /// <p>The list of Amazon Resource Names (ARN) of the data bundles to install. Currently supported data bundle ARNs:</p>
71 /// <ul>
72 /// <li>
73 /// <p><code>arn:aws:finspace:${Region}::data-bundle/capital-markets-sample</code> - Contains sample Capital Markets datasets, categories and controlled vocabularies.</p></li>
74 /// <li>
75 /// <p><code>arn:aws:finspace:${Region}::data-bundle/taq</code> (default) - Contains trades and quotes data in addition to sample Capital Markets data.</p></li>
76 /// </ul>
77 ///
78 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.data_bundles.is_none()`.
79 pub fn data_bundles(&self) -> &[::std::string::String] {
80 self.data_bundles.as_deref().unwrap_or_default()
81 }
82}
83impl CreateEnvironmentInput {
84 /// Creates a new builder-style object to manufacture [`CreateEnvironmentInput`](crate::operation::create_environment::CreateEnvironmentInput).
85 pub fn builder() -> crate::operation::create_environment::builders::CreateEnvironmentInputBuilder {
86 crate::operation::create_environment::builders::CreateEnvironmentInputBuilder::default()
87 }
88}
89
90/// A builder for [`CreateEnvironmentInput`](crate::operation::create_environment::CreateEnvironmentInput).
91#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
92#[non_exhaustive]
93pub struct CreateEnvironmentInputBuilder {
94 pub(crate) name: ::std::option::Option<::std::string::String>,
95 pub(crate) description: ::std::option::Option<::std::string::String>,
96 pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
97 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
98 pub(crate) federation_mode: ::std::option::Option<crate::types::FederationMode>,
99 pub(crate) federation_parameters: ::std::option::Option<crate::types::FederationParameters>,
100 pub(crate) superuser_parameters: ::std::option::Option<crate::types::SuperuserParameters>,
101 pub(crate) data_bundles: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
102}
103impl CreateEnvironmentInputBuilder {
104 /// <p>The name of the FinSpace environment to be created.</p>
105 /// This field is required.
106 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107 self.name = ::std::option::Option::Some(input.into());
108 self
109 }
110 /// <p>The name of the FinSpace environment to be created.</p>
111 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112 self.name = input;
113 self
114 }
115 /// <p>The name of the FinSpace environment to be created.</p>
116 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
117 &self.name
118 }
119 /// <p>The description of the FinSpace environment to be created.</p>
120 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121 self.description = ::std::option::Option::Some(input.into());
122 self
123 }
124 /// <p>The description of the FinSpace environment to be created.</p>
125 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126 self.description = input;
127 self
128 }
129 /// <p>The description of the FinSpace environment to be created.</p>
130 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
131 &self.description
132 }
133 /// <p>The KMS key id to encrypt your data in the FinSpace environment.</p>
134 pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135 self.kms_key_id = ::std::option::Option::Some(input.into());
136 self
137 }
138 /// <p>The KMS key id to encrypt your data in the FinSpace environment.</p>
139 pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140 self.kms_key_id = input;
141 self
142 }
143 /// <p>The KMS key id to encrypt your data in the FinSpace environment.</p>
144 pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
145 &self.kms_key_id
146 }
147 /// Adds a key-value pair to `tags`.
148 ///
149 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
150 ///
151 /// <p>Add tags to your FinSpace environment.</p>
152 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
153 let mut hash_map = self.tags.unwrap_or_default();
154 hash_map.insert(k.into(), v.into());
155 self.tags = ::std::option::Option::Some(hash_map);
156 self
157 }
158 /// <p>Add tags to your FinSpace environment.</p>
159 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
160 self.tags = input;
161 self
162 }
163 /// <p>Add tags to your FinSpace environment.</p>
164 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
165 &self.tags
166 }
167 /// <p>Authentication mode for the environment.</p>
168 /// <ul>
169 /// <li>
170 /// <p><code>FEDERATED</code> - Users access FinSpace through Single Sign On (SSO) via your Identity provider.</p></li>
171 /// <li>
172 /// <p><code>LOCAL</code> - Users access FinSpace via email and password managed within the FinSpace environment.</p></li>
173 /// </ul>
174 pub fn federation_mode(mut self, input: crate::types::FederationMode) -> Self {
175 self.federation_mode = ::std::option::Option::Some(input);
176 self
177 }
178 /// <p>Authentication mode for the environment.</p>
179 /// <ul>
180 /// <li>
181 /// <p><code>FEDERATED</code> - Users access FinSpace through Single Sign On (SSO) via your Identity provider.</p></li>
182 /// <li>
183 /// <p><code>LOCAL</code> - Users access FinSpace via email and password managed within the FinSpace environment.</p></li>
184 /// </ul>
185 pub fn set_federation_mode(mut self, input: ::std::option::Option<crate::types::FederationMode>) -> Self {
186 self.federation_mode = input;
187 self
188 }
189 /// <p>Authentication mode for the environment.</p>
190 /// <ul>
191 /// <li>
192 /// <p><code>FEDERATED</code> - Users access FinSpace through Single Sign On (SSO) via your Identity provider.</p></li>
193 /// <li>
194 /// <p><code>LOCAL</code> - Users access FinSpace via email and password managed within the FinSpace environment.</p></li>
195 /// </ul>
196 pub fn get_federation_mode(&self) -> &::std::option::Option<crate::types::FederationMode> {
197 &self.federation_mode
198 }
199 /// <p>Configuration information when authentication mode is FEDERATED.</p>
200 pub fn federation_parameters(mut self, input: crate::types::FederationParameters) -> Self {
201 self.federation_parameters = ::std::option::Option::Some(input);
202 self
203 }
204 /// <p>Configuration information when authentication mode is FEDERATED.</p>
205 pub fn set_federation_parameters(mut self, input: ::std::option::Option<crate::types::FederationParameters>) -> Self {
206 self.federation_parameters = input;
207 self
208 }
209 /// <p>Configuration information when authentication mode is FEDERATED.</p>
210 pub fn get_federation_parameters(&self) -> &::std::option::Option<crate::types::FederationParameters> {
211 &self.federation_parameters
212 }
213 /// <p>Configuration information for the superuser.</p>
214 pub fn superuser_parameters(mut self, input: crate::types::SuperuserParameters) -> Self {
215 self.superuser_parameters = ::std::option::Option::Some(input);
216 self
217 }
218 /// <p>Configuration information for the superuser.</p>
219 pub fn set_superuser_parameters(mut self, input: ::std::option::Option<crate::types::SuperuserParameters>) -> Self {
220 self.superuser_parameters = input;
221 self
222 }
223 /// <p>Configuration information for the superuser.</p>
224 pub fn get_superuser_parameters(&self) -> &::std::option::Option<crate::types::SuperuserParameters> {
225 &self.superuser_parameters
226 }
227 /// Appends an item to `data_bundles`.
228 ///
229 /// To override the contents of this collection use [`set_data_bundles`](Self::set_data_bundles).
230 ///
231 /// <p>The list of Amazon Resource Names (ARN) of the data bundles to install. Currently supported data bundle ARNs:</p>
232 /// <ul>
233 /// <li>
234 /// <p><code>arn:aws:finspace:${Region}::data-bundle/capital-markets-sample</code> - Contains sample Capital Markets datasets, categories and controlled vocabularies.</p></li>
235 /// <li>
236 /// <p><code>arn:aws:finspace:${Region}::data-bundle/taq</code> (default) - Contains trades and quotes data in addition to sample Capital Markets data.</p></li>
237 /// </ul>
238 pub fn data_bundles(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
239 let mut v = self.data_bundles.unwrap_or_default();
240 v.push(input.into());
241 self.data_bundles = ::std::option::Option::Some(v);
242 self
243 }
244 /// <p>The list of Amazon Resource Names (ARN) of the data bundles to install. Currently supported data bundle ARNs:</p>
245 /// <ul>
246 /// <li>
247 /// <p><code>arn:aws:finspace:${Region}::data-bundle/capital-markets-sample</code> - Contains sample Capital Markets datasets, categories and controlled vocabularies.</p></li>
248 /// <li>
249 /// <p><code>arn:aws:finspace:${Region}::data-bundle/taq</code> (default) - Contains trades and quotes data in addition to sample Capital Markets data.</p></li>
250 /// </ul>
251 pub fn set_data_bundles(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
252 self.data_bundles = input;
253 self
254 }
255 /// <p>The list of Amazon Resource Names (ARN) of the data bundles to install. Currently supported data bundle ARNs:</p>
256 /// <ul>
257 /// <li>
258 /// <p><code>arn:aws:finspace:${Region}::data-bundle/capital-markets-sample</code> - Contains sample Capital Markets datasets, categories and controlled vocabularies.</p></li>
259 /// <li>
260 /// <p><code>arn:aws:finspace:${Region}::data-bundle/taq</code> (default) - Contains trades and quotes data in addition to sample Capital Markets data.</p></li>
261 /// </ul>
262 pub fn get_data_bundles(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
263 &self.data_bundles
264 }
265 /// Consumes the builder and constructs a [`CreateEnvironmentInput`](crate::operation::create_environment::CreateEnvironmentInput).
266 pub fn build(
267 self,
268 ) -> ::std::result::Result<crate::operation::create_environment::CreateEnvironmentInput, ::aws_smithy_types::error::operation::BuildError> {
269 ::std::result::Result::Ok(crate::operation::create_environment::CreateEnvironmentInput {
270 name: self.name,
271 description: self.description,
272 kms_key_id: self.kms_key_id,
273 tags: self.tags,
274 federation_mode: self.federation_mode,
275 federation_parameters: self.federation_parameters,
276 superuser_parameters: self.superuser_parameters,
277 data_bundles: self.data_bundles,
278 })
279 }
280}