Class: GetStream::Generated::Models::ThreadParticipant

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

Overview

Represents a user that is participating in a thread.

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 = {}) ⇒ 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']
  @last_thread_message_at = 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_pkInteger

Returns:

  • (Integer)


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

def app_pk
  @app_pk
end

#channel_cidString

Returns:

  • (String)


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

def channel_cid
  @channel_cid
end

#created_atDateTime

Returns Date/time of creation.

Returns:

  • (DateTime)

    Date/time of creation



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

def created_at
  @created_at
end

#customObject

Returns:

  • (Object)


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

def custom
  @custom
end

#last_read_atDateTime

Returns:

  • (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_atDateTime

Returns:

  • (DateTime)


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

def last_thread_message_at
  @last_thread_message_at
end

#left_thread_atDateTime

Returns Left Thread At is the time when the user left the thread.

Returns:

  • (DateTime)

    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_idString

Returns Thead ID is unique string identifier of the thread.

Returns:

  • (String)

    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

#userUserResponse

Returns:



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

def user
  @user
end

#user_idString

Returns User ID is unique string identifier of the user.

Returns:

  • (String)

    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_mappingsObject

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