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}
15impl UpdateSpaceInput {
16    /// <p>The unique ID of this private re:Post.</p>
17    pub fn space_id(&self) -> ::std::option::Option<&str> {
18        self.space_id.as_deref()
19    }
20    /// <p>A description for the private re:Post. This is used only to help you identify this private re:Post.</p>
21    pub fn description(&self) -> ::std::option::Option<&str> {
22        self.description.as_deref()
23    }
24    /// <p>The pricing tier of this private re:Post.</p>
25    pub fn tier(&self) -> ::std::option::Option<&crate::types::TierLevel> {
26        self.tier.as_ref()
27    }
28    /// <p>The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.</p>
29    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    /// Creates a new builder-style object to manufacture [`UpdateSpaceInput`](crate::operation::update_space::UpdateSpaceInput).
45    pub fn builder() -> crate::operation::update_space::builders::UpdateSpaceInputBuilder {
46        crate::operation::update_space::builders::UpdateSpaceInputBuilder::default()
47    }
48}
49
50/// A builder for [`UpdateSpaceInput`](crate::operation::update_space::UpdateSpaceInput).
51#[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    /// <p>The unique ID of this private re:Post.</p>
61    /// This field is required.
62    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    /// <p>The unique ID of this private re:Post.</p>
67    pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68        self.space_id = input;
69        self
70    }
71    /// <p>The unique ID of this private re:Post.</p>
72    pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
73        &self.space_id
74    }
75    /// <p>A description for the private re:Post. This is used only to help you identify this private re:Post.</p>
76    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    /// <p>A description for the private re:Post. This is used only to help you identify this private re:Post.</p>
81    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82        self.description = input;
83        self
84    }
85    /// <p>A description for the private re:Post. This is used only to help you identify this private re:Post.</p>
86    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
87        &self.description
88    }
89    /// <p>The pricing tier of this private re:Post.</p>
90    pub fn tier(mut self, input: crate::types::TierLevel) -> Self {
91        self.tier = ::std::option::Option::Some(input);
92        self
93    }
94    /// <p>The pricing tier of this private re:Post.</p>
95    pub fn set_tier(mut self, input: ::std::option::Option<crate::types::TierLevel>) -> Self {
96        self.tier = input;
97        self
98    }
99    /// <p>The pricing tier of this private re:Post.</p>
100    pub fn get_tier(&self) -> &::std::option::Option<crate::types::TierLevel> {
101        &self.tier
102    }
103    /// <p>The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.</p>
104    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    /// <p>The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.</p>
109    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110        self.role_arn = input;
111        self
112    }
113    /// <p>The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets.</p>
114    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
115        &self.role_arn
116    }
117    /// Consumes the builder and constructs a [`UpdateSpaceInput`](crate::operation::update_space::UpdateSpaceInput).
118    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}