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