aws_sdk_repostspace/operation/create_space/
_create_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 CreateSpaceInput {
6    /// <p>The name for the private re:Post. This must be unique in your account.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The subdomain that you use to access your AWS re:Post Private private re:Post. All custom subdomains must be approved by AWS before use. In addition to your custom subdomain, all private re:Posts are issued an AWS generated subdomain for immediate use.</p>
9    pub subdomain: ::std::option::Option<::std::string::String>,
10    /// <p>The pricing tier for the private re:Post.</p>
11    pub tier: ::std::option::Option<crate::types::TierLevel>,
12    /// <p>A description for the private re:Post. This is used only to help you identify this private re:Post.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The AWS KMS key ARN that’s used for the AWS KMS encryption. If you don't provide a key, your data is encrypted by default with a key that AWS owns and manages for you.</p>
15    pub user_kms_key: ::std::option::Option<::std::string::String>,
16    /// <p>The list of tags associated with the private re:Post.</p>
17    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18    /// <p>The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.</p>
19    pub role_arn: ::std::option::Option<::std::string::String>,
20    /// <p></p>
21    pub supported_email_domains: ::std::option::Option<crate::types::SupportedEmailDomainsParameters>,
22}
23impl CreateSpaceInput {
24    /// <p>The name for the private re:Post. This must be unique in your account.</p>
25    pub fn name(&self) -> ::std::option::Option<&str> {
26        self.name.as_deref()
27    }
28    /// <p>The subdomain that you use to access your AWS re:Post Private private re:Post. All custom subdomains must be approved by AWS before use. In addition to your custom subdomain, all private re:Posts are issued an AWS generated subdomain for immediate use.</p>
29    pub fn subdomain(&self) -> ::std::option::Option<&str> {
30        self.subdomain.as_deref()
31    }
32    /// <p>The pricing tier for the private re:Post.</p>
33    pub fn tier(&self) -> ::std::option::Option<&crate::types::TierLevel> {
34        self.tier.as_ref()
35    }
36    /// <p>A description for the private re:Post. This is used only to help you identify this private re:Post.</p>
37    pub fn description(&self) -> ::std::option::Option<&str> {
38        self.description.as_deref()
39    }
40    /// <p>The AWS KMS key ARN that’s used for the AWS KMS encryption. If you don't provide a key, your data is encrypted by default with a key that AWS owns and manages for you.</p>
41    pub fn user_kms_key(&self) -> ::std::option::Option<&str> {
42        self.user_kms_key.as_deref()
43    }
44    /// <p>The list of tags associated with the private re:Post.</p>
45    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
46        self.tags.as_ref()
47    }
48    /// <p>The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.</p>
49    pub fn role_arn(&self) -> ::std::option::Option<&str> {
50        self.role_arn.as_deref()
51    }
52    /// <p></p>
53    pub fn supported_email_domains(&self) -> ::std::option::Option<&crate::types::SupportedEmailDomainsParameters> {
54        self.supported_email_domains.as_ref()
55    }
56}
57impl ::std::fmt::Debug for CreateSpaceInput {
58    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
59        let mut formatter = f.debug_struct("CreateSpaceInput");
60        formatter.field("name", &"*** Sensitive Data Redacted ***");
61        formatter.field("subdomain", &self.subdomain);
62        formatter.field("tier", &self.tier);
63        formatter.field("description", &"*** Sensitive Data Redacted ***");
64        formatter.field("user_kms_key", &self.user_kms_key);
65        formatter.field("tags", &"*** Sensitive Data Redacted ***");
66        formatter.field("role_arn", &self.role_arn);
67        formatter.field("supported_email_domains", &self.supported_email_domains);
68        formatter.finish()
69    }
70}
71impl CreateSpaceInput {
72    /// Creates a new builder-style object to manufacture [`CreateSpaceInput`](crate::operation::create_space::CreateSpaceInput).
73    pub fn builder() -> crate::operation::create_space::builders::CreateSpaceInputBuilder {
74        crate::operation::create_space::builders::CreateSpaceInputBuilder::default()
75    }
76}
77
78/// A builder for [`CreateSpaceInput`](crate::operation::create_space::CreateSpaceInput).
79#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
80#[non_exhaustive]
81pub struct CreateSpaceInputBuilder {
82    pub(crate) name: ::std::option::Option<::std::string::String>,
83    pub(crate) subdomain: ::std::option::Option<::std::string::String>,
84    pub(crate) tier: ::std::option::Option<crate::types::TierLevel>,
85    pub(crate) description: ::std::option::Option<::std::string::String>,
86    pub(crate) user_kms_key: ::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) role_arn: ::std::option::Option<::std::string::String>,
89    pub(crate) supported_email_domains: ::std::option::Option<crate::types::SupportedEmailDomainsParameters>,
90}
91impl CreateSpaceInputBuilder {
92    /// <p>The name for the private re:Post. This must be unique in your account.</p>
93    /// This field is required.
94    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.name = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <p>The name for the private re:Post. This must be unique in your account.</p>
99    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.name = input;
101        self
102    }
103    /// <p>The name for the private re:Post. This must be unique in your account.</p>
104    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
105        &self.name
106    }
107    /// <p>The subdomain that you use to access your AWS re:Post Private private re:Post. All custom subdomains must be approved by AWS before use. In addition to your custom subdomain, all private re:Posts are issued an AWS generated subdomain for immediate use.</p>
108    /// This field is required.
109    pub fn subdomain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110        self.subdomain = ::std::option::Option::Some(input.into());
111        self
112    }
113    /// <p>The subdomain that you use to access your AWS re:Post Private private re:Post. All custom subdomains must be approved by AWS before use. In addition to your custom subdomain, all private re:Posts are issued an AWS generated subdomain for immediate use.</p>
114    pub fn set_subdomain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115        self.subdomain = input;
116        self
117    }
118    /// <p>The subdomain that you use to access your AWS re:Post Private private re:Post. All custom subdomains must be approved by AWS before use. In addition to your custom subdomain, all private re:Posts are issued an AWS generated subdomain for immediate use.</p>
119    pub fn get_subdomain(&self) -> &::std::option::Option<::std::string::String> {
120        &self.subdomain
121    }
122    /// <p>The pricing tier for the private re:Post.</p>
123    /// This field is required.
124    pub fn tier(mut self, input: crate::types::TierLevel) -> Self {
125        self.tier = ::std::option::Option::Some(input);
126        self
127    }
128    /// <p>The pricing tier for the private re:Post.</p>
129    pub fn set_tier(mut self, input: ::std::option::Option<crate::types::TierLevel>) -> Self {
130        self.tier = input;
131        self
132    }
133    /// <p>The pricing tier for the private re:Post.</p>
134    pub fn get_tier(&self) -> &::std::option::Option<crate::types::TierLevel> {
135        &self.tier
136    }
137    /// <p>A description for the private re:Post. This is used only to help you identify this private re:Post.</p>
138    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
139        self.description = ::std::option::Option::Some(input.into());
140        self
141    }
142    /// <p>A description for the private re:Post. This is used only to help you identify this private re:Post.</p>
143    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
144        self.description = input;
145        self
146    }
147    /// <p>A description for the private re:Post. This is used only to help you identify this private re:Post.</p>
148    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
149        &self.description
150    }
151    /// <p>The AWS KMS key ARN that’s used for the AWS KMS encryption. If you don't provide a key, your data is encrypted by default with a key that AWS owns and manages for you.</p>
152    pub fn user_kms_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153        self.user_kms_key = ::std::option::Option::Some(input.into());
154        self
155    }
156    /// <p>The AWS KMS key ARN that’s used for the AWS KMS encryption. If you don't provide a key, your data is encrypted by default with a key that AWS owns and manages for you.</p>
157    pub fn set_user_kms_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158        self.user_kms_key = input;
159        self
160    }
161    /// <p>The AWS KMS key ARN that’s used for the AWS KMS encryption. If you don't provide a key, your data is encrypted by default with a key that AWS owns and manages for you.</p>
162    pub fn get_user_kms_key(&self) -> &::std::option::Option<::std::string::String> {
163        &self.user_kms_key
164    }
165    /// Adds a key-value pair to `tags`.
166    ///
167    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
168    ///
169    /// <p>The list of tags associated with the private re:Post.</p>
170    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
171        let mut hash_map = self.tags.unwrap_or_default();
172        hash_map.insert(k.into(), v.into());
173        self.tags = ::std::option::Option::Some(hash_map);
174        self
175    }
176    /// <p>The list of tags associated with the private re:Post.</p>
177    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
178        self.tags = input;
179        self
180    }
181    /// <p>The list of tags associated with the private re:Post.</p>
182    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
183        &self.tags
184    }
185    /// <p>The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.</p>
186    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187        self.role_arn = ::std::option::Option::Some(input.into());
188        self
189    }
190    /// <p>The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.</p>
191    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192        self.role_arn = input;
193        self
194    }
195    /// <p>The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.</p>
196    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
197        &self.role_arn
198    }
199    /// <p></p>
200    pub fn supported_email_domains(mut self, input: crate::types::SupportedEmailDomainsParameters) -> Self {
201        self.supported_email_domains = ::std::option::Option::Some(input);
202        self
203    }
204    /// <p></p>
205    pub fn set_supported_email_domains(mut self, input: ::std::option::Option<crate::types::SupportedEmailDomainsParameters>) -> Self {
206        self.supported_email_domains = input;
207        self
208    }
209    /// <p></p>
210    pub fn get_supported_email_domains(&self) -> &::std::option::Option<crate::types::SupportedEmailDomainsParameters> {
211        &self.supported_email_domains
212    }
213    /// Consumes the builder and constructs a [`CreateSpaceInput`](crate::operation::create_space::CreateSpaceInput).
214    pub fn build(self) -> ::std::result::Result<crate::operation::create_space::CreateSpaceInput, ::aws_smithy_types::error::operation::BuildError> {
215        ::std::result::Result::Ok(crate::operation::create_space::CreateSpaceInput {
216            name: self.name,
217            subdomain: self.subdomain,
218            tier: self.tier,
219            description: self.description,
220            user_kms_key: self.user_kms_key,
221            tags: self.tags,
222            role_arn: self.role_arn,
223            supported_email_domains: self.supported_email_domains,
224        })
225    }
226}
227impl ::std::fmt::Debug for CreateSpaceInputBuilder {
228    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
229        let mut formatter = f.debug_struct("CreateSpaceInputBuilder");
230        formatter.field("name", &"*** Sensitive Data Redacted ***");
231        formatter.field("subdomain", &self.subdomain);
232        formatter.field("tier", &self.tier);
233        formatter.field("description", &"*** Sensitive Data Redacted ***");
234        formatter.field("user_kms_key", &self.user_kms_key);
235        formatter.field("tags", &"*** Sensitive Data Redacted ***");
236        formatter.field("role_arn", &self.role_arn);
237        formatter.field("supported_email_domains", &self.supported_email_domains);
238        formatter.finish()
239    }
240}