aws_sdk_repostspace/operation/update_channel/
_update_channel_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 UpdateChannelInput {
6    /// <p>The unique ID of the private re:Post.</p>
7    pub space_id: ::std::option::Option<::std::string::String>,
8    /// <p>The unique ID of the private re:Post channel.</p>
9    pub channel_id: ::std::option::Option<::std::string::String>,
10    /// <p>The name for the channel. This must be unique per private re:Post.</p>
11    pub channel_name: ::std::option::Option<::std::string::String>,
12    /// <p>A description for the channel. This is used only to help you identify this channel.</p>
13    pub channel_description: ::std::option::Option<::std::string::String>,
14}
15impl UpdateChannelInput {
16    /// <p>The unique ID of the private re:Post.</p>
17    pub fn space_id(&self) -> ::std::option::Option<&str> {
18        self.space_id.as_deref()
19    }
20    /// <p>The unique ID of the private re:Post channel.</p>
21    pub fn channel_id(&self) -> ::std::option::Option<&str> {
22        self.channel_id.as_deref()
23    }
24    /// <p>The name for the channel. This must be unique per private re:Post.</p>
25    pub fn channel_name(&self) -> ::std::option::Option<&str> {
26        self.channel_name.as_deref()
27    }
28    /// <p>A description for the channel. This is used only to help you identify this channel.</p>
29    pub fn channel_description(&self) -> ::std::option::Option<&str> {
30        self.channel_description.as_deref()
31    }
32}
33impl ::std::fmt::Debug for UpdateChannelInput {
34    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35        let mut formatter = f.debug_struct("UpdateChannelInput");
36        formatter.field("space_id", &self.space_id);
37        formatter.field("channel_id", &self.channel_id);
38        formatter.field("channel_name", &"*** Sensitive Data Redacted ***");
39        formatter.field("channel_description", &"*** Sensitive Data Redacted ***");
40        formatter.finish()
41    }
42}
43impl UpdateChannelInput {
44    /// Creates a new builder-style object to manufacture [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
45    pub fn builder() -> crate::operation::update_channel::builders::UpdateChannelInputBuilder {
46        crate::operation::update_channel::builders::UpdateChannelInputBuilder::default()
47    }
48}
49
50/// A builder for [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
52#[non_exhaustive]
53pub struct UpdateChannelInputBuilder {
54    pub(crate) space_id: ::std::option::Option<::std::string::String>,
55    pub(crate) channel_id: ::std::option::Option<::std::string::String>,
56    pub(crate) channel_name: ::std::option::Option<::std::string::String>,
57    pub(crate) channel_description: ::std::option::Option<::std::string::String>,
58}
59impl UpdateChannelInputBuilder {
60    /// <p>The unique ID of the 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 the 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 the private re:Post.</p>
72    pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
73        &self.space_id
74    }
75    /// <p>The unique ID of the private re:Post channel.</p>
76    /// This field is required.
77    pub fn channel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78        self.channel_id = ::std::option::Option::Some(input.into());
79        self
80    }
81    /// <p>The unique ID of the private re:Post channel.</p>
82    pub fn set_channel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83        self.channel_id = input;
84        self
85    }
86    /// <p>The unique ID of the private re:Post channel.</p>
87    pub fn get_channel_id(&self) -> &::std::option::Option<::std::string::String> {
88        &self.channel_id
89    }
90    /// <p>The name for the channel. This must be unique per private re:Post.</p>
91    /// This field is required.
92    pub fn channel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93        self.channel_name = ::std::option::Option::Some(input.into());
94        self
95    }
96    /// <p>The name for the channel. This must be unique per private re:Post.</p>
97    pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98        self.channel_name = input;
99        self
100    }
101    /// <p>The name for the channel. This must be unique per private re:Post.</p>
102    pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
103        &self.channel_name
104    }
105    /// <p>A description for the channel. This is used only to help you identify this channel.</p>
106    pub fn channel_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107        self.channel_description = ::std::option::Option::Some(input.into());
108        self
109    }
110    /// <p>A description for the channel. This is used only to help you identify this channel.</p>
111    pub fn set_channel_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112        self.channel_description = input;
113        self
114    }
115    /// <p>A description for the channel. This is used only to help you identify this channel.</p>
116    pub fn get_channel_description(&self) -> &::std::option::Option<::std::string::String> {
117        &self.channel_description
118    }
119    /// Consumes the builder and constructs a [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
120    pub fn build(
121        self,
122    ) -> ::std::result::Result<crate::operation::update_channel::UpdateChannelInput, ::aws_smithy_types::error::operation::BuildError> {
123        ::std::result::Result::Ok(crate::operation::update_channel::UpdateChannelInput {
124            space_id: self.space_id,
125            channel_id: self.channel_id,
126            channel_name: self.channel_name,
127            channel_description: self.channel_description,
128        })
129    }
130}
131impl ::std::fmt::Debug for UpdateChannelInputBuilder {
132    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
133        let mut formatter = f.debug_struct("UpdateChannelInputBuilder");
134        formatter.field("space_id", &self.space_id);
135        formatter.field("channel_id", &self.channel_id);
136        formatter.field("channel_name", &"*** Sensitive Data Redacted ***");
137        formatter.field("channel_description", &"*** Sensitive Data Redacted ***");
138        formatter.finish()
139    }
140}