aws_sdk_repostspace/operation/update_space/
_update_space_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateSpaceInput {
6 pub space_id: ::std::option::Option<::std::string::String>,
8 pub description: ::std::option::Option<::std::string::String>,
10 pub tier: ::std::option::Option<crate::types::TierLevel>,
12 pub role_arn: ::std::option::Option<::std::string::String>,
14}
15impl UpdateSpaceInput {
16 pub fn space_id(&self) -> ::std::option::Option<&str> {
18 self.space_id.as_deref()
19 }
20 pub fn description(&self) -> ::std::option::Option<&str> {
22 self.description.as_deref()
23 }
24 pub fn tier(&self) -> ::std::option::Option<&crate::types::TierLevel> {
26 self.tier.as_ref()
27 }
28 pub fn role_arn(&self) -> ::std::option::Option<&str> {
30 self.role_arn.as_deref()
31 }
32}
33impl ::std::fmt::Debug for UpdateSpaceInput {
34 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35 let mut formatter = f.debug_struct("UpdateSpaceInput");
36 formatter.field("space_id", &self.space_id);
37 formatter.field("description", &"*** Sensitive Data Redacted ***");
38 formatter.field("tier", &self.tier);
39 formatter.field("role_arn", &self.role_arn);
40 formatter.finish()
41 }
42}
43impl UpdateSpaceInput {
44 pub fn builder() -> crate::operation::update_space::builders::UpdateSpaceInputBuilder {
46 crate::operation::update_space::builders::UpdateSpaceInputBuilder::default()
47 }
48}
49
50#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
52#[non_exhaustive]
53pub struct UpdateSpaceInputBuilder {
54 pub(crate) space_id: ::std::option::Option<::std::string::String>,
55 pub(crate) description: ::std::option::Option<::std::string::String>,
56 pub(crate) tier: ::std::option::Option<crate::types::TierLevel>,
57 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
58}
59impl UpdateSpaceInputBuilder {
60 pub fn space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63 self.space_id = ::std::option::Option::Some(input.into());
64 self
65 }
66 pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68 self.space_id = input;
69 self
70 }
71 pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
73 &self.space_id
74 }
75 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77 self.description = ::std::option::Option::Some(input.into());
78 self
79 }
80 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82 self.description = input;
83 self
84 }
85 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
87 &self.description
88 }
89 pub fn tier(mut self, input: crate::types::TierLevel) -> Self {
91 self.tier = ::std::option::Option::Some(input);
92 self
93 }
94 pub fn set_tier(mut self, input: ::std::option::Option<crate::types::TierLevel>) -> Self {
96 self.tier = input;
97 self
98 }
99 pub fn get_tier(&self) -> &::std::option::Option<crate::types::TierLevel> {
101 &self.tier
102 }
103 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 self.role_arn = ::std::option::Option::Some(input.into());
106 self
107 }
108 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110 self.role_arn = input;
111 self
112 }
113 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
115 &self.role_arn
116 }
117 pub fn build(self) -> ::std::result::Result<crate::operation::update_space::UpdateSpaceInput, ::aws_smithy_types::error::operation::BuildError> {
119 ::std::result::Result::Ok(crate::operation::update_space::UpdateSpaceInput {
120 space_id: self.space_id,
121 description: self.description,
122 tier: self.tier,
123 role_arn: self.role_arn,
124 })
125 }
126}
127impl ::std::fmt::Debug for UpdateSpaceInputBuilder {
128 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
129 let mut formatter = f.debug_struct("UpdateSpaceInputBuilder");
130 formatter.field("space_id", &self.space_id);
131 formatter.field("description", &"*** Sensitive Data Redacted ***");
132 formatter.field("tier", &self.tier);
133 formatter.field("role_arn", &self.role_arn);
134 formatter.finish()
135 }
136}