1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetSpaceOutput {
6 pub space_id: ::std::string::String,
8 pub arn: ::std::string::String,
10 pub name: ::std::string::String,
12 pub status: ::std::string::String,
14 pub configuration_status: crate::types::ConfigurationStatus,
16 pub client_id: ::std::string::String,
18 pub description: ::std::option::Option<::std::string::String>,
20 pub vanity_domain_status: crate::types::VanityDomainStatus,
22 pub vanity_domain: ::std::string::String,
24 pub random_domain: ::std::string::String,
26 pub customer_role_arn: ::std::option::Option<::std::string::String>,
28 pub create_date_time: ::aws_smithy_types::DateTime,
30 pub delete_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
32 pub tier: crate::types::TierLevel,
34 pub storage_limit: i64,
36 #[deprecated(note = "This property has been depracted and will be replaced by the roles property.")]
38 pub user_admins: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
39 #[deprecated(note = "This property has been depracted and will be replaced by the roles property.")]
41 pub group_admins: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
42 pub roles: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::Role>>>,
44 pub user_kms_key: ::std::option::Option<::std::string::String>,
46 pub user_count: ::std::option::Option<i32>,
48 pub content_size: ::std::option::Option<i64>,
50 _request_id: Option<String>,
51}
52impl GetSpaceOutput {
53 pub fn space_id(&self) -> &str {
55 use std::ops::Deref;
56 self.space_id.deref()
57 }
58 pub fn arn(&self) -> &str {
60 use std::ops::Deref;
61 self.arn.deref()
62 }
63 pub fn name(&self) -> &str {
65 use std::ops::Deref;
66 self.name.deref()
67 }
68 pub fn status(&self) -> &str {
70 use std::ops::Deref;
71 self.status.deref()
72 }
73 pub fn configuration_status(&self) -> &crate::types::ConfigurationStatus {
75 &self.configuration_status
76 }
77 pub fn client_id(&self) -> &str {
79 use std::ops::Deref;
80 self.client_id.deref()
81 }
82 pub fn description(&self) -> ::std::option::Option<&str> {
84 self.description.as_deref()
85 }
86 pub fn vanity_domain_status(&self) -> &crate::types::VanityDomainStatus {
88 &self.vanity_domain_status
89 }
90 pub fn vanity_domain(&self) -> &str {
92 use std::ops::Deref;
93 self.vanity_domain.deref()
94 }
95 pub fn random_domain(&self) -> &str {
97 use std::ops::Deref;
98 self.random_domain.deref()
99 }
100 pub fn customer_role_arn(&self) -> ::std::option::Option<&str> {
102 self.customer_role_arn.as_deref()
103 }
104 pub fn create_date_time(&self) -> &::aws_smithy_types::DateTime {
106 &self.create_date_time
107 }
108 pub fn delete_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
110 self.delete_date_time.as_ref()
111 }
112 pub fn tier(&self) -> &crate::types::TierLevel {
114 &self.tier
115 }
116 pub fn storage_limit(&self) -> i64 {
118 self.storage_limit
119 }
120 #[deprecated(note = "This property has been depracted and will be replaced by the roles property.")]
124 pub fn user_admins(&self) -> &[::std::string::String] {
125 self.user_admins.as_deref().unwrap_or_default()
126 }
127 #[deprecated(note = "This property has been depracted and will be replaced by the roles property.")]
131 pub fn group_admins(&self) -> &[::std::string::String] {
132 self.group_admins.as_deref().unwrap_or_default()
133 }
134 pub fn roles(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::Role>>> {
136 self.roles.as_ref()
137 }
138 pub fn user_kms_key(&self) -> ::std::option::Option<&str> {
140 self.user_kms_key.as_deref()
141 }
142 pub fn user_count(&self) -> ::std::option::Option<i32> {
144 self.user_count
145 }
146 pub fn content_size(&self) -> ::std::option::Option<i64> {
148 self.content_size
149 }
150}
151impl ::std::fmt::Debug for GetSpaceOutput {
152 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
153 let mut formatter = f.debug_struct("GetSpaceOutput");
154 formatter.field("space_id", &self.space_id);
155 formatter.field("arn", &self.arn);
156 formatter.field("name", &"*** Sensitive Data Redacted ***");
157 formatter.field("status", &self.status);
158 formatter.field("configuration_status", &self.configuration_status);
159 formatter.field("client_id", &self.client_id);
160 formatter.field("description", &"*** Sensitive Data Redacted ***");
161 formatter.field("vanity_domain_status", &self.vanity_domain_status);
162 formatter.field("vanity_domain", &self.vanity_domain);
163 formatter.field("random_domain", &self.random_domain);
164 formatter.field("customer_role_arn", &self.customer_role_arn);
165 formatter.field("create_date_time", &self.create_date_time);
166 formatter.field("delete_date_time", &self.delete_date_time);
167 formatter.field("tier", &self.tier);
168 formatter.field("storage_limit", &self.storage_limit);
169 formatter.field("user_admins", &self.user_admins);
170 formatter.field("group_admins", &self.group_admins);
171 formatter.field("roles", &self.roles);
172 formatter.field("user_kms_key", &self.user_kms_key);
173 formatter.field("user_count", &self.user_count);
174 formatter.field("content_size", &self.content_size);
175 formatter.field("_request_id", &self._request_id);
176 formatter.finish()
177 }
178}
179impl ::aws_types::request_id::RequestId for GetSpaceOutput {
180 fn request_id(&self) -> Option<&str> {
181 self._request_id.as_deref()
182 }
183}
184impl GetSpaceOutput {
185 pub fn builder() -> crate::operation::get_space::builders::GetSpaceOutputBuilder {
187 crate::operation::get_space::builders::GetSpaceOutputBuilder::default()
188 }
189}
190
191#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
193#[non_exhaustive]
194pub struct GetSpaceOutputBuilder {
195 pub(crate) space_id: ::std::option::Option<::std::string::String>,
196 pub(crate) arn: ::std::option::Option<::std::string::String>,
197 pub(crate) name: ::std::option::Option<::std::string::String>,
198 pub(crate) status: ::std::option::Option<::std::string::String>,
199 pub(crate) configuration_status: ::std::option::Option<crate::types::ConfigurationStatus>,
200 pub(crate) client_id: ::std::option::Option<::std::string::String>,
201 pub(crate) description: ::std::option::Option<::std::string::String>,
202 pub(crate) vanity_domain_status: ::std::option::Option<crate::types::VanityDomainStatus>,
203 pub(crate) vanity_domain: ::std::option::Option<::std::string::String>,
204 pub(crate) random_domain: ::std::option::Option<::std::string::String>,
205 pub(crate) customer_role_arn: ::std::option::Option<::std::string::String>,
206 pub(crate) create_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
207 pub(crate) delete_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
208 pub(crate) tier: ::std::option::Option<crate::types::TierLevel>,
209 pub(crate) storage_limit: ::std::option::Option<i64>,
210 pub(crate) user_admins: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
211 pub(crate) group_admins: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
212 pub(crate) roles: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::Role>>>,
213 pub(crate) user_kms_key: ::std::option::Option<::std::string::String>,
214 pub(crate) user_count: ::std::option::Option<i32>,
215 pub(crate) content_size: ::std::option::Option<i64>,
216 _request_id: Option<String>,
217}
218impl GetSpaceOutputBuilder {
219 pub fn space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222 self.space_id = ::std::option::Option::Some(input.into());
223 self
224 }
225 pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
227 self.space_id = input;
228 self
229 }
230 pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
232 &self.space_id
233 }
234 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
237 self.arn = ::std::option::Option::Some(input.into());
238 self
239 }
240 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
242 self.arn = input;
243 self
244 }
245 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
247 &self.arn
248 }
249 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
252 self.name = ::std::option::Option::Some(input.into());
253 self
254 }
255 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
257 self.name = input;
258 self
259 }
260 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
262 &self.name
263 }
264 pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
267 self.status = ::std::option::Option::Some(input.into());
268 self
269 }
270 pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
272 self.status = input;
273 self
274 }
275 pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
277 &self.status
278 }
279 pub fn configuration_status(mut self, input: crate::types::ConfigurationStatus) -> Self {
282 self.configuration_status = ::std::option::Option::Some(input);
283 self
284 }
285 pub fn set_configuration_status(mut self, input: ::std::option::Option<crate::types::ConfigurationStatus>) -> Self {
287 self.configuration_status = input;
288 self
289 }
290 pub fn get_configuration_status(&self) -> &::std::option::Option<crate::types::ConfigurationStatus> {
292 &self.configuration_status
293 }
294 pub fn client_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
297 self.client_id = ::std::option::Option::Some(input.into());
298 self
299 }
300 pub fn set_client_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
302 self.client_id = input;
303 self
304 }
305 pub fn get_client_id(&self) -> &::std::option::Option<::std::string::String> {
307 &self.client_id
308 }
309 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
311 self.description = ::std::option::Option::Some(input.into());
312 self
313 }
314 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
316 self.description = input;
317 self
318 }
319 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
321 &self.description
322 }
323 pub fn vanity_domain_status(mut self, input: crate::types::VanityDomainStatus) -> Self {
326 self.vanity_domain_status = ::std::option::Option::Some(input);
327 self
328 }
329 pub fn set_vanity_domain_status(mut self, input: ::std::option::Option<crate::types::VanityDomainStatus>) -> Self {
331 self.vanity_domain_status = input;
332 self
333 }
334 pub fn get_vanity_domain_status(&self) -> &::std::option::Option<crate::types::VanityDomainStatus> {
336 &self.vanity_domain_status
337 }
338 pub fn vanity_domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
341 self.vanity_domain = ::std::option::Option::Some(input.into());
342 self
343 }
344 pub fn set_vanity_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
346 self.vanity_domain = input;
347 self
348 }
349 pub fn get_vanity_domain(&self) -> &::std::option::Option<::std::string::String> {
351 &self.vanity_domain
352 }
353 pub fn random_domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
356 self.random_domain = ::std::option::Option::Some(input.into());
357 self
358 }
359 pub fn set_random_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
361 self.random_domain = input;
362 self
363 }
364 pub fn get_random_domain(&self) -> &::std::option::Option<::std::string::String> {
366 &self.random_domain
367 }
368 pub fn customer_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
370 self.customer_role_arn = ::std::option::Option::Some(input.into());
371 self
372 }
373 pub fn set_customer_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
375 self.customer_role_arn = input;
376 self
377 }
378 pub fn get_customer_role_arn(&self) -> &::std::option::Option<::std::string::String> {
380 &self.customer_role_arn
381 }
382 pub fn create_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
385 self.create_date_time = ::std::option::Option::Some(input);
386 self
387 }
388 pub fn set_create_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
390 self.create_date_time = input;
391 self
392 }
393 pub fn get_create_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
395 &self.create_date_time
396 }
397 pub fn delete_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
399 self.delete_date_time = ::std::option::Option::Some(input);
400 self
401 }
402 pub fn set_delete_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
404 self.delete_date_time = input;
405 self
406 }
407 pub fn get_delete_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
409 &self.delete_date_time
410 }
411 pub fn tier(mut self, input: crate::types::TierLevel) -> Self {
414 self.tier = ::std::option::Option::Some(input);
415 self
416 }
417 pub fn set_tier(mut self, input: ::std::option::Option<crate::types::TierLevel>) -> Self {
419 self.tier = input;
420 self
421 }
422 pub fn get_tier(&self) -> &::std::option::Option<crate::types::TierLevel> {
424 &self.tier
425 }
426 pub fn storage_limit(mut self, input: i64) -> Self {
429 self.storage_limit = ::std::option::Option::Some(input);
430 self
431 }
432 pub fn set_storage_limit(mut self, input: ::std::option::Option<i64>) -> Self {
434 self.storage_limit = input;
435 self
436 }
437 pub fn get_storage_limit(&self) -> &::std::option::Option<i64> {
439 &self.storage_limit
440 }
441 #[deprecated(note = "This property has been depracted and will be replaced by the roles property.")]
447 pub fn user_admins(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
448 let mut v = self.user_admins.unwrap_or_default();
449 v.push(input.into());
450 self.user_admins = ::std::option::Option::Some(v);
451 self
452 }
453 #[deprecated(note = "This property has been depracted and will be replaced by the roles property.")]
455 pub fn set_user_admins(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
456 self.user_admins = input;
457 self
458 }
459 #[deprecated(note = "This property has been depracted and will be replaced by the roles property.")]
461 pub fn get_user_admins(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
462 &self.user_admins
463 }
464 #[deprecated(note = "This property has been depracted and will be replaced by the roles property.")]
470 pub fn group_admins(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
471 let mut v = self.group_admins.unwrap_or_default();
472 v.push(input.into());
473 self.group_admins = ::std::option::Option::Some(v);
474 self
475 }
476 #[deprecated(note = "This property has been depracted and will be replaced by the roles property.")]
478 pub fn set_group_admins(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
479 self.group_admins = input;
480 self
481 }
482 #[deprecated(note = "This property has been depracted and will be replaced by the roles property.")]
484 pub fn get_group_admins(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
485 &self.group_admins
486 }
487 pub fn roles(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<crate::types::Role>) -> Self {
493 let mut hash_map = self.roles.unwrap_or_default();
494 hash_map.insert(k.into(), v);
495 self.roles = ::std::option::Option::Some(hash_map);
496 self
497 }
498 pub fn set_roles(
500 mut self,
501 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::Role>>>,
502 ) -> Self {
503 self.roles = input;
504 self
505 }
506 pub fn get_roles(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::Role>>> {
508 &self.roles
509 }
510 pub fn user_kms_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
512 self.user_kms_key = ::std::option::Option::Some(input.into());
513 self
514 }
515 pub fn set_user_kms_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
517 self.user_kms_key = input;
518 self
519 }
520 pub fn get_user_kms_key(&self) -> &::std::option::Option<::std::string::String> {
522 &self.user_kms_key
523 }
524 pub fn user_count(mut self, input: i32) -> Self {
526 self.user_count = ::std::option::Option::Some(input);
527 self
528 }
529 pub fn set_user_count(mut self, input: ::std::option::Option<i32>) -> Self {
531 self.user_count = input;
532 self
533 }
534 pub fn get_user_count(&self) -> &::std::option::Option<i32> {
536 &self.user_count
537 }
538 pub fn content_size(mut self, input: i64) -> Self {
540 self.content_size = ::std::option::Option::Some(input);
541 self
542 }
543 pub fn set_content_size(mut self, input: ::std::option::Option<i64>) -> Self {
545 self.content_size = input;
546 self
547 }
548 pub fn get_content_size(&self) -> &::std::option::Option<i64> {
550 &self.content_size
551 }
552 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
553 self._request_id = Some(request_id.into());
554 self
555 }
556
557 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
558 self._request_id = request_id;
559 self
560 }
561 pub fn build(self) -> ::std::result::Result<crate::operation::get_space::GetSpaceOutput, ::aws_smithy_types::error::operation::BuildError> {
576 ::std::result::Result::Ok(crate::operation::get_space::GetSpaceOutput {
577 space_id: self.space_id.ok_or_else(|| {
578 ::aws_smithy_types::error::operation::BuildError::missing_field(
579 "space_id",
580 "space_id was not specified but it is required when building GetSpaceOutput",
581 )
582 })?,
583 arn: self.arn.ok_or_else(|| {
584 ::aws_smithy_types::error::operation::BuildError::missing_field(
585 "arn",
586 "arn was not specified but it is required when building GetSpaceOutput",
587 )
588 })?,
589 name: self.name.ok_or_else(|| {
590 ::aws_smithy_types::error::operation::BuildError::missing_field(
591 "name",
592 "name was not specified but it is required when building GetSpaceOutput",
593 )
594 })?,
595 status: self.status.ok_or_else(|| {
596 ::aws_smithy_types::error::operation::BuildError::missing_field(
597 "status",
598 "status was not specified but it is required when building GetSpaceOutput",
599 )
600 })?,
601 configuration_status: self.configuration_status.ok_or_else(|| {
602 ::aws_smithy_types::error::operation::BuildError::missing_field(
603 "configuration_status",
604 "configuration_status was not specified but it is required when building GetSpaceOutput",
605 )
606 })?,
607 client_id: self.client_id.ok_or_else(|| {
608 ::aws_smithy_types::error::operation::BuildError::missing_field(
609 "client_id",
610 "client_id was not specified but it is required when building GetSpaceOutput",
611 )
612 })?,
613 description: self.description,
614 vanity_domain_status: self.vanity_domain_status.ok_or_else(|| {
615 ::aws_smithy_types::error::operation::BuildError::missing_field(
616 "vanity_domain_status",
617 "vanity_domain_status was not specified but it is required when building GetSpaceOutput",
618 )
619 })?,
620 vanity_domain: self.vanity_domain.ok_or_else(|| {
621 ::aws_smithy_types::error::operation::BuildError::missing_field(
622 "vanity_domain",
623 "vanity_domain was not specified but it is required when building GetSpaceOutput",
624 )
625 })?,
626 random_domain: self.random_domain.ok_or_else(|| {
627 ::aws_smithy_types::error::operation::BuildError::missing_field(
628 "random_domain",
629 "random_domain was not specified but it is required when building GetSpaceOutput",
630 )
631 })?,
632 customer_role_arn: self.customer_role_arn,
633 create_date_time: self.create_date_time.ok_or_else(|| {
634 ::aws_smithy_types::error::operation::BuildError::missing_field(
635 "create_date_time",
636 "create_date_time was not specified but it is required when building GetSpaceOutput",
637 )
638 })?,
639 delete_date_time: self.delete_date_time,
640 tier: self.tier.ok_or_else(|| {
641 ::aws_smithy_types::error::operation::BuildError::missing_field(
642 "tier",
643 "tier was not specified but it is required when building GetSpaceOutput",
644 )
645 })?,
646 storage_limit: self.storage_limit.ok_or_else(|| {
647 ::aws_smithy_types::error::operation::BuildError::missing_field(
648 "storage_limit",
649 "storage_limit was not specified but it is required when building GetSpaceOutput",
650 )
651 })?,
652 user_admins: self.user_admins,
653 group_admins: self.group_admins,
654 roles: self.roles,
655 user_kms_key: self.user_kms_key,
656 user_count: self.user_count,
657 content_size: self.content_size,
658 _request_id: self._request_id,
659 })
660 }
661}
662impl ::std::fmt::Debug for GetSpaceOutputBuilder {
663 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
664 let mut formatter = f.debug_struct("GetSpaceOutputBuilder");
665 formatter.field("space_id", &self.space_id);
666 formatter.field("arn", &self.arn);
667 formatter.field("name", &"*** Sensitive Data Redacted ***");
668 formatter.field("status", &self.status);
669 formatter.field("configuration_status", &self.configuration_status);
670 formatter.field("client_id", &self.client_id);
671 formatter.field("description", &"*** Sensitive Data Redacted ***");
672 formatter.field("vanity_domain_status", &self.vanity_domain_status);
673 formatter.field("vanity_domain", &self.vanity_domain);
674 formatter.field("random_domain", &self.random_domain);
675 formatter.field("customer_role_arn", &self.customer_role_arn);
676 formatter.field("create_date_time", &self.create_date_time);
677 formatter.field("delete_date_time", &self.delete_date_time);
678 formatter.field("tier", &self.tier);
679 formatter.field("storage_limit", &self.storage_limit);
680 formatter.field("user_admins", &self.user_admins);
681 formatter.field("group_admins", &self.group_admins);
682 formatter.field("roles", &self.roles);
683 formatter.field("user_kms_key", &self.user_kms_key);
684 formatter.field("user_count", &self.user_count);
685 formatter.field("content_size", &self.content_size);
686 formatter.field("_request_id", &self._request_id);
687 formatter.finish()
688 }
689}