Class: GetStream::Generated::Models::MarkUnreadRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/mark_unread_request.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 = {}) ⇒ MarkUnreadRequest

Initialize with attributes



29
30
31
32
33
34
35
36
# File 'lib/getstream_ruby/generated/models/mark_unread_request.rb', line 29

def initialize(attributes = {})
  super(attributes)
  @message_id = attributes.fetch(:message_id) { attributes.fetch('message_id', nil) }
  @message_timestamp = attributes.fetch(:message_timestamp) { attributes.fetch('message_timestamp', nil) }
  @thread_id = attributes.fetch(:thread_id) { attributes.fetch('thread_id', nil) }
  @user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) }
  @user = attributes.fetch(:user) { attributes.fetch('user', nil) }
end

Instance Attribute Details

#message_id ⇒ String

Returns ID of the message from where the channel is marked unread. Omit message_id, message_timestamp and thread_id to mark the whole channel soft unread: a dot without a counter.

Returns:

  • (String) —

    ID of the message from where the channel is marked unread. Omit message_id, message_timestamp and thread_id to mark the whole channel soft unread: a dot without a counter



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

def message_id
  @message_id
end

#message_timestamp ⇒ DateTime

Returns Timestamp of the message from where the channel is marked unread. Omit message_id, message_timestamp and thread_id to mark the whole channel soft unread.

Returns:

  • (DateTime) —

    Timestamp of the message from where the channel is marked unread. Omit message_id, message_timestamp and thread_id to mark the whole channel soft unread



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

def message_timestamp
  @message_timestamp
end

#thread_id ⇒ String

Returns Mark a thread unread. Specify at most one of thread_id, message_timestamp, or message_id; omit all three to mark the channel soft unread.

Returns:

  • (String) —

    Mark a thread unread. Specify at most one of thread_id, message_timestamp, or message_id; omit all three to mark the channel soft unread



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

def thread_id
  @thread_id
end

#user ⇒ UserRequest

Returns User request object.

Returns:



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

def user
  @user
end

#user_id ⇒ String

Returns:

  • (String)


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

def user_id
  @user_id
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



39
40
41
42
43
44
45
46
47
# File 'lib/getstream_ruby/generated/models/mark_unread_request.rb', line 39

def self.json_field_mappings
  {
    message_id: 'message_id',
    message_timestamp: 'message_timestamp',
    thread_id: 'thread_id',
    user_id: 'user_id',
    user: 'user'
  }
end