Class: GetStream::Generated::Models::ModerationActionConfig

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

Initialize with attributes



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

def initialize(attributes = {})
  super(attributes)
  @action = attributes[:action] || attributes['action']
  @description = attributes[:description] || attributes['description']
  @entity_type = attributes[:entity_type] || attributes['entity_type']
  @icon = attributes[:icon] || attributes['icon']
  @order = attributes[:order] || attributes['order']
  @custom = attributes[:custom] || attributes['custom']
end

Instance Attribute Details

#actionString

Returns:

  • (String)


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

def action
  @action
end

#customObject

Returns:

  • (Object)


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

def custom
  @custom
end

#descriptionString

Returns:

  • (String)


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

def description
  @description
end

#entity_typeString

Returns:

  • (String)


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

def entity_type
  @entity_type
end

#iconString

Returns:

  • (String)


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

def icon
  @icon
end

#orderInteger

Returns:

  • (Integer)


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

def order
  @order
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/moderation_action_config.rb', line 43

def self.json_field_mappings
  {
    action: 'action',
    description: 'description',
    entity_type: 'entity_type',
    icon: 'icon',
    order: 'order',
    custom: 'custom'
  }
end