1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The details of a channel ban.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ChannelBan {
    /// <p>The member being banned from the channel.</p>
    pub member: ::std::option::Option<crate::types::Identity>,
    /// <p>The ARN of the channel from which a member is being banned.</p>
    pub channel_arn: ::std::option::Option<::std::string::String>,
    /// <p>The time at which the ban was created.</p>
    pub created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The <code>AppInstanceUser</code> who created the ban.</p>
    pub created_by: ::std::option::Option<crate::types::Identity>,
}
impl ChannelBan {
    /// <p>The member being banned from the channel.</p>
    pub fn member(&self) -> ::std::option::Option<&crate::types::Identity> {
        self.member.as_ref()
    }
    /// <p>The ARN of the channel from which a member is being banned.</p>
    pub fn channel_arn(&self) -> ::std::option::Option<&str> {
        self.channel_arn.as_deref()
    }
    /// <p>The time at which the ban was created.</p>
    pub fn created_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_timestamp.as_ref()
    }
    /// <p>The <code>AppInstanceUser</code> who created the ban.</p>
    pub fn created_by(&self) -> ::std::option::Option<&crate::types::Identity> {
        self.created_by.as_ref()
    }
}
impl ChannelBan {
    /// Creates a new builder-style object to manufacture [`ChannelBan`](crate::types::ChannelBan).
    pub fn builder() -> crate::types::builders::ChannelBanBuilder {
        crate::types::builders::ChannelBanBuilder::default()
    }
}

/// A builder for [`ChannelBan`](crate::types::ChannelBan).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ChannelBanBuilder {
    pub(crate) member: ::std::option::Option<crate::types::Identity>,
    pub(crate) channel_arn: ::std::option::Option<::std::string::String>,
    pub(crate) created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) created_by: ::std::option::Option<crate::types::Identity>,
}
impl ChannelBanBuilder {
    /// <p>The member being banned from the channel.</p>
    pub fn member(mut self, input: crate::types::Identity) -> Self {
        self.member = ::std::option::Option::Some(input);
        self
    }
    /// <p>The member being banned from the channel.</p>
    pub fn set_member(mut self, input: ::std::option::Option<crate::types::Identity>) -> Self {
        self.member = input;
        self
    }
    /// <p>The member being banned from the channel.</p>
    pub fn get_member(&self) -> &::std::option::Option<crate::types::Identity> {
        &self.member
    }
    /// <p>The ARN of the channel from which a member is being banned.</p>
    pub fn channel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.channel_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the channel from which a member is being banned.</p>
    pub fn set_channel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.channel_arn = input;
        self
    }
    /// <p>The ARN of the channel from which a member is being banned.</p>
    pub fn get_channel_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.channel_arn
    }
    /// <p>The time at which the ban was created.</p>
    pub fn created_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the ban was created.</p>
    pub fn set_created_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_timestamp = input;
        self
    }
    /// <p>The time at which the ban was created.</p>
    pub fn get_created_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_timestamp
    }
    /// <p>The <code>AppInstanceUser</code> who created the ban.</p>
    pub fn created_by(mut self, input: crate::types::Identity) -> Self {
        self.created_by = ::std::option::Option::Some(input);
        self
    }
    /// <p>The <code>AppInstanceUser</code> who created the ban.</p>
    pub fn set_created_by(mut self, input: ::std::option::Option<crate::types::Identity>) -> Self {
        self.created_by = input;
        self
    }
    /// <p>The <code>AppInstanceUser</code> who created the ban.</p>
    pub fn get_created_by(&self) -> &::std::option::Option<crate::types::Identity> {
        &self.created_by
    }
    /// Consumes the builder and constructs a [`ChannelBan`](crate::types::ChannelBan).
    pub fn build(self) -> crate::types::ChannelBan {
        crate::types::ChannelBan {
            member: self.member,
            channel_arn: self.channel_arn,
            created_timestamp: self.created_timestamp,
            created_by: self.created_by,
        }
    }
}