aws_sdk_repostspace/operation/update_space/
_update_space_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)]
5pub struct UpdateSpaceInput {
6    /// <p>The unique ID of this private re:Post.</p>
7    pub space_id: ::std::option::Option<::std::string::String>,
8    /// <p>A description for the private re:Post. This is used only to help you identify this private re:Post.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The pricing tier of this private re:Post.</p>
11    pub tier: ::std::option::Option<crate::types::TierLevel>,
12    /// <p>The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.</p>
13    pub role_arn: ::std::option::Option<::std::string::String>,
14    /// <p></p>
15    pub supported_email_domains: ::std::option::Option<crate::types::SupportedEmailDomainsParameters>,
16}
17impl UpdateSpaceInput {
18    /// <p>The unique ID of this private re:Post.</p>
19    pub fn space_id(&self) -> ::std::option::Option<&str> {
20        self.space_id.as_deref()
21    }
22    /// <p>A description for the private re:Post. This is used only to help you identify this private re:Post.</p>
23    pub fn description(&self) -> ::std::option::Option<&str> {
24        self.description.as_deref()
25    }
26    /// <p>The pricing tier of this private re:Post.</p>
27    pub fn tier(&self) -> ::std::option::Option<&crate::types::TierLevel> {
28        self.tier.as_ref()
29    }
30    /// <p>The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.</p>
31    pub fn role_arn(&self) -> ::std::option::Option<&str> {
32        self.role_arn.as_deref()
33    }
34    /// <p></p>
35    pub fn supported_email_domains(&self) -> ::std::option::Option<&crate::types::SupportedEmailDomainsParameters> {
36        self.supported_email_domains.as_ref()
37    }
38}
39impl ::std::fmt::Debug for UpdateSpaceInput {
40    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
41        let mut formatter = f.debug_struct("UpdateSpaceInput");
42        formatter.field("space_id", &self.space_id);
43        formatter.field("description", &"*** Sensitive Data Redacted ***");
44        formatter.field("tier", &self.tier);
45        formatter.field("role_arn", &self.role_arn);
46        formatter.field("supported_email_domains", &self.supported_email_domains);
47        formatter.finish()
48    }
49}
50impl UpdateSpaceInput {
51    /// Creates a new builder-style object to manufacture [`UpdateSpaceInput`](crate::operation::update_space::UpdateSpaceInput).
52    pub fn builder() -> crate::operation::update_space::builders::UpdateSpaceInputBuilder {
53        crate::operation::update_space::builders::UpdateSpaceInputBuilder::default()
54    }
55}
56
57/// A builder for [`UpdateSpaceInput`](crate::operation::update_space::UpdateSpaceInput).
58#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
59#[non_exhaustive]
60pub struct UpdateSpaceInputBuilder {
61    pub(crate) space_id: ::std::option::Option<::std::string::String>,
62    pub(crate) description: ::std::option::Option<::std::string::String>,
63    pub(crate) tier: ::std::option::Option<crate::types::TierLevel>,
64    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
65    pub(crate) supported_email_domains: ::std::option::Option<crate::types::SupportedEmailDomainsParameters>,
66}
67impl UpdateSpaceInputBuilder {
68    /// <p>The unique ID of this private re:Post.</p>
69    /// This field is required.
70    pub fn space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71        self.space_id = ::std::option::Option::Some(input.into());
72        self
73    }
74    /// <p>The unique ID of this private re:Post.</p>
75    pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76        self.space_id = input;
77        self
78    }
79    /// <p>The unique ID of this private re:Post.</p>
80    pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
81        &self.space_id
82    }
83    /// <p>A description for the private re:Post. This is used only to help you identify this private re:Post.</p>
84    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85        self.description = ::std::option::Option::Some(input.into());
86        self
87    }
88    /// <p>A description for the private re:Post. This is used only to help you identify this private re:Post.</p>
89    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90        self.description = input;
91        self
92    }
93    /// <p>A description for the private re:Post. This is used only to help you identify this private re:Post.</p>
94    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
95        &self.description
96    }
97    /// <p>The pricing tier of this private re:Post.</p>
98    pub fn tier(mut self, input: crate::types::TierLevel) -> Self {
99        self.tier = ::std::option::Option::Some(input);
100        self
101    }
102    /// <p>The pricing tier of this private re:Post.</p>
103    pub fn set_tier(mut self, input: ::std::option::Option<crate::types::TierLevel>) -> Self {
104        self.tier = input;
105        self
106    }
107    /// <p>The pricing tier of this private re:Post.</p>
108    pub fn get_tier(&self) -> &::std::option::Option<crate::types::TierLevel> {
109        &self.tier
110    }
111    /// <p>The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.</p>
112    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.role_arn = ::std::option::Option::Some(input.into());
114        self
115    }
116    /// <p>The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.</p>
117    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.role_arn = input;
119        self
120    }
121    /// <p>The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.</p>
122    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
123        &self.role_arn
124    }
125    /// <p></p>
126    pub fn supported_email_domains(mut self, input: crate::types::SupportedEmailDomainsParameters) -> Self {
127        self.supported_email_domains = ::std::option::Option::Some(input);
128        self
129    }
130    /// <p></p>
131    pub fn set_supported_email_domains(mut self, input: ::std::option::Option<crate::types::SupportedEmailDomainsParameters>) -> Self {
132        self.supported_email_domains = input;
133        self
134    }
135    /// <p></p>
136    pub fn get_supported_email_domains(&self) -> &::std::option::Option<crate::types::SupportedEmailDomainsParameters> {
137        &self.supported_email_domains
138    }
139    /// Consumes the builder and constructs a [`UpdateSpaceInput`](crate::operation::update_space::UpdateSpaceInput).
140    pub fn build(self) -> ::std::result::Result<crate::operation::update_space::UpdateSpaceInput, ::aws_smithy_types::error::operation::BuildError> {
141        ::std::result::Result::Ok(crate::operation::update_space::UpdateSpaceInput {
142            space_id: self.space_id,
143            description: self.description,
144            tier: self.tier,
145            role_arn: self.role_arn,
146            supported_email_domains: self.supported_email_domains,
147        })
148    }
149}
150impl ::std::fmt::Debug for UpdateSpaceInputBuilder {
151    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
152        let mut formatter = f.debug_struct("UpdateSpaceInputBuilder");
153        formatter.field("space_id", &self.space_id);
154        formatter.field("description", &"*** Sensitive Data Redacted ***");
155        formatter.field("tier", &self.tier);
156        formatter.field("role_arn", &self.role_arn);
157        formatter.field("supported_email_domains", &self.supported_email_domains);
158        formatter.finish()
159    }
160}