Class: GetStream::Generated::Models::CallModerationWarningEvent

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

Overview

This event is sent when a moderation warning is issued to a user

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

Initialize with attributes



32
33
34
35
36
37
38
39
40
# File 'lib/getstream_ruby/generated/models/call_moderation_warning_event.rb', line 32

def initialize(attributes = {})
  super(attributes)
  @call_cid = attributes[:call_cid] || attributes['call_cid']
  @created_at = attributes[:created_at] || attributes['created_at']
  @message = attributes[:message] || attributes['message']
  @user_id = attributes[:user_id] || attributes['user_id']
  @custom = attributes[:custom] || attributes['custom']
  @type = attributes[:type] || attributes['type'] || "call.moderation_warning"
end

Instance Attribute Details

#call_cidString

Returns:

  • (String)


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

def call_cid
  @call_cid
end

#created_atDateTime

Returns:

  • (DateTime)


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

def created_at
  @created_at
end

#customObject

Returns Custom data associated with the moderation action.

Returns:

  • (Object)

    Custom data associated with the moderation action



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

def custom
  @custom
end

#messageString

Returns The warning message.

Returns:

  • (String)

    The warning message



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

def message
  @message
end

#typeString

Returns The type of event: “call.moderation_warning” in this case.

Returns:

  • (String)

    The type of event: “call.moderation_warning” in this case



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

def type
  @type
end

#user_idString

Returns The user ID who is receiving the warning.

Returns:

  • (String)

    The user ID who is receiving the warning



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

def user_id
  @user_id
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



43
44
45
46
47
48
49
50
51
52
# File 'lib/getstream_ruby/generated/models/call_moderation_warning_event.rb', line 43

def self.json_field_mappings
  {
    call_cid: 'call_cid',
    created_at: 'created_at',
    message: 'message',
    user_id: 'user_id',
    custom: 'custom',
    type: 'type'
  }
end