Class: GetStream::Generated::Models::WSEvent
- Defined in:
- lib/getstream_ruby/generated/models/ws_event.rb
Overview
Represents an BaseEvent that happened in Stream Chat
Instance Attribute Summary collapse
- #automoderation ⇒ Boolean
- #automoderation_scores ⇒ ModerationResponse
- #channel ⇒ ChannelResponse
- #channel_id ⇒ String
- #channel_last_message_at ⇒ DateTime
- #channel_type ⇒ String
- #cid ⇒ String
- #connection_id ⇒ String
- #created_at ⇒ DateTime
- #created_by ⇒ UserResponse
- #custom ⇒ Object
- #me ⇒ OwnUserResponse
- #member ⇒ ChannelMemberResponse
- #message ⇒ MessageResponse
- #message_update ⇒ MessageUpdate
- #parent_id ⇒ String
- #poll ⇒ PollResponseData
- #poll_vote ⇒ PollVoteResponseData
- #reaction ⇒ ReactionResponse
- #reason ⇒ String
- #team ⇒ String
- #thread ⇒ ThreadResponse
- #thread_id ⇒ String
- #type ⇒ String
- #user ⇒ UserResponse
- #user_id ⇒ String
- #watcher_count ⇒ Integer
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ WSEvent
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ WSEvent
Initialize with attributes
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 95 def initialize(attributes = {}) super(attributes) @created_at = attributes[:created_at] || attributes['created_at'] @type = attributes[:type] || attributes['type'] @custom = attributes[:custom] || attributes['custom'] @automoderation = attributes[:automoderation] || attributes['automoderation'] || nil @channel_id = attributes[:channel_id] || attributes['channel_id'] || nil = attributes[:channel_last_message_at] || attributes['channel_last_message_at'] || nil @channel_type = attributes[:channel_type] || attributes['channel_type'] || nil @cid = attributes[:cid] || attributes['cid'] || nil @connection_id = attributes[:connection_id] || attributes['connection_id'] || nil @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil @reason = attributes[:reason] || attributes['reason'] || nil @team = attributes[:team] || attributes['team'] || nil @thread_id = attributes[:thread_id] || attributes['thread_id'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @watcher_count = attributes[:watcher_count] || attributes['watcher_count'] || nil @automoderation_scores = attributes[:automoderation_scores] || attributes['automoderation_scores'] || nil @channel = attributes[:channel] || attributes['channel'] || nil @created_by = attributes[:created_by] || attributes['created_by'] || nil @me = attributes[:me] || attributes['me'] || nil @member = attributes[:member] || attributes['member'] || nil = attributes[:message] || attributes['message'] || nil = attributes[:message_update] || attributes['message_update'] || nil @poll = attributes[:poll] || attributes['poll'] || nil @poll_vote = attributes[:poll_vote] || attributes['poll_vote'] || nil @reaction = attributes[:reaction] || attributes['reaction'] || nil @thread = attributes[:thread] || attributes['thread'] || nil @user = attributes[:user] || attributes['user'] || nil end |
Instance Attribute Details
#automoderation ⇒ Boolean
23 24 25 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 23 def automoderation @automoderation end |
#automoderation_scores ⇒ ModerationResponse
59 60 61 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 59 def automoderation_scores @automoderation_scores end |
#channel ⇒ ChannelResponse
62 63 64 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 62 def channel @channel end |
#channel_id ⇒ String
26 27 28 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 26 def channel_id @channel_id end |
#channel_last_message_at ⇒ DateTime
29 30 31 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 29 def end |
#channel_type ⇒ String
32 33 34 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 32 def channel_type @channel_type end |
#cid ⇒ String
35 36 37 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 35 def cid @cid end |
#connection_id ⇒ String
38 39 40 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 38 def connection_id @connection_id end |
#created_at ⇒ DateTime
14 15 16 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 14 def created_at @created_at end |
#created_by ⇒ UserResponse
65 66 67 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 65 def created_by @created_by end |
#custom ⇒ Object
20 21 22 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 20 def custom @custom end |
#me ⇒ OwnUserResponse
68 69 70 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 68 def me @me end |
#member ⇒ ChannelMemberResponse
71 72 73 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 71 def member @member end |
#message ⇒ MessageResponse
74 75 76 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 74 def end |
#message_update ⇒ MessageUpdate
77 78 79 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 77 def end |
#parent_id ⇒ String
41 42 43 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 41 def parent_id @parent_id end |
#poll ⇒ PollResponseData
80 81 82 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 80 def poll @poll end |
#poll_vote ⇒ PollVoteResponseData
83 84 85 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 83 def poll_vote @poll_vote end |
#reaction ⇒ ReactionResponse
86 87 88 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 86 def reaction @reaction end |
#reason ⇒ String
44 45 46 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 44 def reason @reason end |
#team ⇒ String
47 48 49 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 47 def team @team end |
#thread ⇒ ThreadResponse
89 90 91 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 89 def thread @thread end |
#thread_id ⇒ String
50 51 52 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 50 def thread_id @thread_id end |
#type ⇒ String
17 18 19 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 17 def type @type end |
#user ⇒ UserResponse
92 93 94 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 92 def user @user end |
#user_id ⇒ String
53 54 55 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 53 def user_id @user_id end |
#watcher_count ⇒ Integer
56 57 58 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 56 def watcher_count @watcher_count end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 127 def self.json_field_mappings { created_at: 'created_at', type: 'type', custom: 'custom', automoderation: 'automoderation', channel_id: 'channel_id', channel_last_message_at: 'channel_last_message_at', channel_type: 'channel_type', cid: 'cid', connection_id: 'connection_id', parent_id: 'parent_id', reason: 'reason', team: 'team', thread_id: 'thread_id', user_id: 'user_id', watcher_count: 'watcher_count', automoderation_scores: 'automoderation_scores', channel: 'channel', created_by: 'created_by', me: 'me', member: 'member', message: 'message', message_update: 'message_update', poll: 'poll', poll_vote: 'poll_vote', reaction: 'reaction', thread: 'thread', user: 'user' } end |