aws_sdk_repostspace/operation/update_channel/
_update_channel_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateChannelInput {
6 pub space_id: ::std::option::Option<::std::string::String>,
8 pub channel_id: ::std::option::Option<::std::string::String>,
10 pub channel_name: ::std::option::Option<::std::string::String>,
12 pub channel_description: ::std::option::Option<::std::string::String>,
14}
15impl UpdateChannelInput {
16 pub fn space_id(&self) -> ::std::option::Option<&str> {
18 self.space_id.as_deref()
19 }
20 pub fn channel_id(&self) -> ::std::option::Option<&str> {
22 self.channel_id.as_deref()
23 }
24 pub fn channel_name(&self) -> ::std::option::Option<&str> {
26 self.channel_name.as_deref()
27 }
28 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 pub fn builder() -> crate::operation::update_channel::builders::UpdateChannelInputBuilder {
46 crate::operation::update_channel::builders::UpdateChannelInputBuilder::default()
47 }
48}
49
50#[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 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 pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68 self.space_id = input;
69 self
70 }
71 pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
73 &self.space_id
74 }
75 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 pub fn set_channel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83 self.channel_id = input;
84 self
85 }
86 pub fn get_channel_id(&self) -> &::std::option::Option<::std::string::String> {
88 &self.channel_id
89 }
90 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 pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98 self.channel_name = input;
99 self
100 }
101 pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
103 &self.channel_name
104 }
105 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 pub fn set_channel_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112 self.channel_description = input;
113 self
114 }
115 pub fn get_channel_description(&self) -> &::std::option::Option<::std::string::String> {
117 &self.channel_description
118 }
119 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}