Class: GetStream::Generated::Models::ModerationActionConfigResponse

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

Overview

Configuration for a moderation action

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

Initialize with attributes



32
33
34
35
36
37
38
39
40
# File 'lib/getstream_ruby/generated/models/moderation_action_config_response.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'] || nil
end

Instance Attribute Details

#actionString

Returns The action to take.

Returns:

  • (String)

    The action to take



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

def action
  @action
end

#customObject

Returns Custom data for the action.

Returns:

  • (Object)

    Custom data for the action



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

def custom
  @custom
end

#descriptionString

Returns Description of what this action does.

Returns:

  • (String)

    Description of what this action does



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

def description
  @description
end

#entity_typeString

Returns Type of entity this action applies to.

Returns:

  • (String)

    Type of entity this action applies to



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

def entity_type
  @entity_type
end

#iconString

Returns Icon for the dashboard.

Returns:

  • (String)

    Icon for the dashboard



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

def icon
  @icon
end

#orderInteger

Returns Display order (lower numbers shown first).

Returns:

  • (Integer)

    Display order (lower numbers shown first)



26
27
28
# File 'lib/getstream_ruby/generated/models/moderation_action_config_response.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_response.rb', line 43

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