Class: GetStream::Generated::Models::WSEvent

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

Overview

Represents an BaseEvent that happened in Stream Chat

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 = {}) ⇒ 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
  @channel_last_message_at = 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
  @message = attributes[:message] || attributes['message'] || nil
  @message_update = 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

#automoderationBoolean



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

def automoderation
  @automoderation
end

#automoderation_scoresModerationResponse



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

def automoderation_scores
  @automoderation_scores
end

#channelChannelResponse



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

def channel
  @channel
end

#channel_idString



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

def channel_id
  @channel_id
end

#channel_last_message_atDateTime



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

def channel_last_message_at
  @channel_last_message_at
end

#channel_typeString



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

def channel_type
  @channel_type
end

#cidString



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

def cid
  @cid
end

#connection_idString



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

def connection_id
  @connection_id
end

#created_atDateTime



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

def created_at
  @created_at
end

#created_byUserResponse



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

def created_by
  @created_by
end

#customObject



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

def custom
  @custom
end

#meOwnUserResponse



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

def me
  @me
end

#memberChannelMemberResponse



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

def member
  @member
end

#messageMessageResponse



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

def message
  @message
end

#message_updateMessageUpdate



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

def message_update
  @message_update
end

#parent_idString



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

def parent_id
  @parent_id
end

#pollPollResponseData



80
81
82
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 80

def poll
  @poll
end

#poll_votePollVoteResponseData



83
84
85
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 83

def poll_vote
  @poll_vote
end

#reactionReactionResponse



86
87
88
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 86

def reaction
  @reaction
end

#reasonString



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

def reason
  @reason
end

#teamString



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

def team
  @team
end

#threadThreadResponse



89
90
91
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 89

def thread
  @thread
end

#thread_idString



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

def thread_id
  @thread_id
end

#typeString



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

def type
  @type
end

#userUserResponse



92
93
94
# File 'lib/getstream_ruby/generated/models/ws_event.rb', line 92

def user
  @user
end

#user_idString



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

def user_id
  @user_id
end

#watcher_countInteger



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_mappingsObject

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