Class: GetStream::Generated::Models::ThreadParticipant
- Defined in:
- lib/getstream_ruby/generated/models/thread_participant.rb
Overview
Represents a user that is participating in a thread.
Instance Attribute Summary collapse
- #app_pk ⇒ Integer
- #channel_cid ⇒ String
-
#created_at ⇒ DateTime
Date/time of creation.
- #custom ⇒ Object
- #last_read_at ⇒ DateTime
- #last_thread_message_at ⇒ DateTime
-
#left_thread_at ⇒ DateTime
Left Thread At is the time when the user left the thread.
-
#thread_id ⇒ String
Thead ID is unique string identifier of the thread.
- #user ⇒ UserResponse
-
#user_id ⇒ String
User ID is unique string identifier of the user.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ThreadParticipant
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ ThreadParticipant
Initialize with attributes
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/getstream_ruby/generated/models/thread_participant.rb', line 44 def initialize(attributes = {}) super(attributes) @app_pk = attributes[:app_pk] || attributes['app_pk'] @channel_cid = attributes[:channel_cid] || attributes['channel_cid'] @created_at = attributes[:created_at] || attributes['created_at'] @last_read_at = attributes[:last_read_at] || attributes['last_read_at'] @custom = attributes[:custom] || attributes['custom'] = attributes[:last_thread_message_at] || attributes['last_thread_message_at'] || nil @left_thread_at = attributes[:left_thread_at] || attributes['left_thread_at'] || nil @thread_id = attributes[:thread_id] || attributes['thread_id'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @user = attributes[:user] || attributes['user'] || nil end |
Instance Attribute Details
#app_pk ⇒ Integer
14 15 16 |
# File 'lib/getstream_ruby/generated/models/thread_participant.rb', line 14 def app_pk @app_pk end |
#channel_cid ⇒ String
17 18 19 |
# File 'lib/getstream_ruby/generated/models/thread_participant.rb', line 17 def channel_cid @channel_cid end |
#created_at ⇒ DateTime
Returns Date/time of creation.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/thread_participant.rb', line 20 def created_at @created_at end |
#custom ⇒ Object
26 27 28 |
# File 'lib/getstream_ruby/generated/models/thread_participant.rb', line 26 def custom @custom end |
#last_read_at ⇒ DateTime
23 24 25 |
# File 'lib/getstream_ruby/generated/models/thread_participant.rb', line 23 def last_read_at @last_read_at end |
#last_thread_message_at ⇒ DateTime
29 30 31 |
# File 'lib/getstream_ruby/generated/models/thread_participant.rb', line 29 def end |
#left_thread_at ⇒ DateTime
Returns Left Thread At is the time when the user left the thread.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/thread_participant.rb', line 32 def left_thread_at @left_thread_at end |
#thread_id ⇒ String
Returns Thead ID is unique string identifier of the thread.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/thread_participant.rb', line 35 def thread_id @thread_id end |
#user ⇒ UserResponse
41 42 43 |
# File 'lib/getstream_ruby/generated/models/thread_participant.rb', line 41 def user @user end |
#user_id ⇒ String
Returns User ID is unique string identifier of the user.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/thread_participant.rb', line 38 def user_id @user_id end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/getstream_ruby/generated/models/thread_participant.rb', line 59 def self.json_field_mappings { app_pk: 'app_pk', channel_cid: 'channel_cid', created_at: 'created_at', last_read_at: 'last_read_at', custom: 'custom', last_thread_message_at: 'last_thread_message_at', left_thread_at: 'left_thread_at', thread_id: 'thread_id', user_id: 'user_id', user: 'user' } end |