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