Class: GetStream::Generated::Models::ChannelMemberResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/channel_member_response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#==, #inspect, omit_empty_fields, #to_h, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ ChannelMemberResponse

Initialize with attributes



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
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 80

def initialize(attributes = {})
  super(attributes)
  @banned = attributes.fetch(:banned) { attributes.fetch('banned', nil) }
  @channel_role = attributes.fetch(:channel_role) { attributes.fetch('channel_role', nil) }
  @created_at = attributes.fetch(:created_at) { attributes.fetch('created_at', nil) }
  @notifications_muted = attributes.fetch(:notifications_muted) { attributes.fetch('notifications_muted', nil) }
  @shadow_banned = attributes.fetch(:shadow_banned) { attributes.fetch('shadow_banned', nil) }
  @updated_at = attributes.fetch(:updated_at) { attributes.fetch('updated_at', nil) }
  @user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) }
  @custom = attributes.fetch(:custom) { attributes.fetch('custom', nil) }
  @archived_at = attributes.fetch(:archived_at) { attributes.fetch('archived_at', nil) }
  @ban_expires = attributes.fetch(:ban_expires) { attributes.fetch('ban_expires', nil) }
  @ban_from_future_channels = attributes.fetch(:ban_from_future_channels) { attributes.fetch('ban_from_future_channels', nil) }
  @deleted_at = attributes.fetch(:deleted_at) { attributes.fetch('deleted_at', nil) }
  @future_channel_ban_expires = attributes.fetch(:future_channel_ban_expires) { attributes.fetch('future_channel_ban_expires', nil) }
  @invite_accepted_at = attributes.fetch(:invite_accepted_at) { attributes.fetch('invite_accepted_at', nil) }
  @invite_rejected_at = attributes.fetch(:invite_rejected_at) { attributes.fetch('invite_rejected_at', nil) }
  @invited = attributes.fetch(:invited) { attributes.fetch('invited', nil) }
  @is_moderator = attributes.fetch(:is_moderator) { attributes.fetch('is_moderator', nil) }
  @pinned_at = attributes.fetch(:pinned_at) { attributes.fetch('pinned_at', nil) }
  @role = attributes.fetch(:role) { attributes.fetch('role', nil) }
  @status = attributes.fetch(:status) { attributes.fetch('status', nil) }
  @deleted_messages = attributes.fetch(:deleted_messages) { attributes.fetch('deleted_messages', nil) }
  @user = attributes.fetch(:user) { attributes.fetch('user', nil) }
end

Instance Attribute Details

#archived_at ⇒ DateTime

Returns:

  • (DateTime)


38
39
40
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 38

def archived_at
  @archived_at
end

#ban_expires ⇒ DateTime

Returns Expiration date of the ban.

Returns:

  • (DateTime) —

    Expiration date of the ban



41
42
43
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 41

def ban_expires
  @ban_expires
end

#ban_from_future_channels ⇒ Boolean

Returns Whether the member's ban also applies to channels the channel's creator will create in the future (an active future channel ban by the creator targets this member).

Returns:

  • (Boolean) —

    Whether the member's ban also applies to channels the channel's creator will create in the future (an active future channel ban by the creator targets this member)



44
45
46
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 44

def ban_from_future_channels
  @ban_from_future_channels
end

#banned ⇒ Boolean

Returns Whether member is banned this channel or not.

Returns:

  • (Boolean) —

    Whether member is banned this channel or not



14
15
16
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 14

def banned
  @banned
end

#channel_role ⇒ String

Returns Role of the member in the channel.

Returns:

  • (String) —

    Role of the member in the channel



17
18
19
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 17

def channel_role
  @channel_role
end

#created_at ⇒ DateTime

Returns Date/time of creation.

Returns:

  • (DateTime) —

    Date/time of creation



20
21
22
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 20

def created_at
  @created_at
end

#custom ⇒ Object

Returns:

  • (Object)


35
36
37
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 35

def custom
  @custom
end

#deleted_at ⇒ DateTime

Returns:

  • (DateTime)


47
48
49
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 47

def deleted_at
  @deleted_at
end

#deleted_messages ⇒ Array<String>

Returns:

  • (Array<String>)


74
75
76
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 74

def deleted_messages
  @deleted_messages
end

#future_channel_ban_expires ⇒ DateTime

Returns Expiration date of the future channel ban; absent when the future channel ban is permanent.

Returns:

  • (DateTime) —

    Expiration date of the future channel ban; absent when the future channel ban is permanent



50
51
52
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 50

def future_channel_ban_expires
  @future_channel_ban_expires
end

#invite_accepted_at ⇒ DateTime

Returns Date when invite was accepted.

Returns:

  • (DateTime) —

    Date when invite was accepted



53
54
55
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 53

def invite_accepted_at
  @invite_accepted_at
end

#invite_rejected_at ⇒ DateTime

Returns Date when invite was rejected.

Returns:

  • (DateTime) —

    Date when invite was rejected



56
57
58
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 56

def invite_rejected_at
  @invite_rejected_at
end

#invited ⇒ Boolean

Returns Whether member was invited or not.

Returns:

  • (Boolean) —

    Whether member was invited or not



59
60
61
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 59

def invited
  @invited
end

#is_moderator ⇒ Boolean

Returns Whether member is channel moderator or not.

Returns:

  • (Boolean) —

    Whether member is channel moderator or not



62
63
64
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 62

def is_moderator
  @is_moderator
end

#notifications_muted ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 23

def notifications_muted
  @notifications_muted
end

#pinned_at ⇒ DateTime

Returns:

  • (DateTime)


65
66
67
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 65

def pinned_at
  @pinned_at
end

#role ⇒ String

Returns Permission level of the member in the channel (DEPRECATED: use channel_role instead). One of: member, moderator, admin, owner.

Returns:

  • (String) —

    Permission level of the member in the channel (DEPRECATED: use channel_role instead). One of: member, moderator, admin, owner



68
69
70
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 68

def role
  @role
end

#shadow_banned ⇒ Boolean

Returns Whether member is shadow banned in this channel or not.

Returns:

  • (Boolean) —

    Whether member is shadow banned in this channel or not



26
27
28
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 26

def shadow_banned
  @shadow_banned
end

#status ⇒ String

Returns:

  • (String)


71
72
73
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 71

def status
  @status
end

#updated_at ⇒ DateTime

Returns Date/time of the last update.

Returns:

  • (DateTime) —

    Date/time of the last update



29
30
31
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 29

def updated_at
  @updated_at
end

#user ⇒ UserResponse

Returns User response object.

Returns:



77
78
79
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 77

def user
  @user
end

#user_id ⇒ String

Returns:

  • (String)


32
33
34
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 32

def user_id
  @user_id
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/getstream_ruby/generated/models/channel_member_response.rb', line 107

def self.json_field_mappings
  {
    banned: 'banned',
    channel_role: 'channel_role',
    created_at: 'created_at',
    notifications_muted: 'notifications_muted',
    shadow_banned: 'shadow_banned',
    updated_at: 'updated_at',
    user_id: 'user_id',
    custom: 'custom',
    archived_at: 'archived_at',
    ban_expires: 'ban_expires',
    ban_from_future_channels: 'ban_from_future_channels',
    deleted_at: 'deleted_at',
    future_channel_ban_expires: 'future_channel_ban_expires',
    invite_accepted_at: 'invite_accepted_at',
    invite_rejected_at: 'invite_rejected_at',
    invited: 'invited',
    is_moderator: 'is_moderator',
    pinned_at: 'pinned_at',
    role: 'role',
    status: 'status',
    deleted_messages: 'deleted_messages',
    user: 'user'
  }
end