Class: GetStream::Generated::Models::MessageUnblockedEvent

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

Overview

Emitted when a message is unblocked.

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 = {}) ⇒ MessageUnblockedEvent

Initialize with attributes



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

def initialize(attributes = {})
  super(attributes)
  @created_at = attributes[:created_at] || attributes['created_at']
  @message_id = attributes[:message_id] || attributes['message_id']
  @custom = attributes[:custom] || attributes['custom']
  @message = attributes[:message] || attributes['message']
  @type = attributes[:type] || attributes['type'] || "message.unblocked"
  @cid = attributes[:cid] || attributes['cid'] || nil
  @received_at = attributes[:received_at] || attributes['received_at'] || nil
  @user = attributes[:user] || attributes['user'] || nil
end

Instance Attribute Details

#cidString

Returns The CID of the channel where the message was unblocked.

Returns:

  • (String)

    The CID of the channel where the message was unblocked



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

def cid
  @cid
end

#created_atDateTime

Returns Date/time of creation.

Returns:

  • (DateTime)

    Date/time of creation



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

def created_at
  @created_at
end

#customObject

Returns:

  • (Object)


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

def custom
  @custom
end

#messageMessageResponse

Returns:



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

def message
  @message
end

#message_idString

Returns:

  • (String)


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

def message_id
  @message_id
end

#received_atDateTime

Returns:

  • (DateTime)


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

def received_at
  @received_at
end

#typeString

Returns The type of event: “message.unblocked” in this case.

Returns:

  • (String)

    The type of event: “message.unblocked” in this case



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

def type
  @type
end

#userUserResponseCommonFields



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

def user
  @user
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/getstream_ruby/generated/models/message_unblocked_event.rb', line 51

def self.json_field_mappings
  {
    created_at: 'created_at',
    message_id: 'message_id',
    custom: 'custom',
    message: 'message',
    type: 'type',
    cid: 'cid',
    received_at: 'received_at',
    user: 'user'
  }
end