Class: GetStream::Generated::Models::ModerationRuleV2Response

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

Initialize with attributes



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/getstream_ruby/generated/models/moderation_rule_v2_response.rb', line 56

def initialize(attributes = {})
  super(attributes)
  @created_at = attributes[:created_at] || attributes['created_at']
  @description = attributes[:description] || attributes['description']
  @enabled = attributes[:enabled] || attributes['enabled']
  @id = attributes[:id] || attributes['id']
  @name = attributes[:name] || attributes['name']
  @rule_type = attributes[:rule_type] || attributes['rule_type']
  @team = attributes[:team] || attributes['team']
  @updated_at = attributes[:updated_at] || attributes['updated_at']
  @config_keys = attributes[:config_keys] || attributes['config_keys']
  @action = attributes[:action] || attributes['action']
  @cooldown_period = attributes[:cooldown_period] || attributes['cooldown_period'] || nil
  @logic = attributes[:logic] || attributes['logic'] || nil
  @conditions = attributes[:conditions] || attributes['conditions'] || nil
  @groups = attributes[:groups] || attributes['groups'] || nil
end

Instance Attribute Details

#actionRuleBuilderAction

Returns:



41
42
43
# File 'lib/getstream_ruby/generated/models/moderation_rule_v2_response.rb', line 41

def action
  @action
end

#conditionsArray<RuleBuilderCondition>

Returns:



50
51
52
# File 'lib/getstream_ruby/generated/models/moderation_rule_v2_response.rb', line 50

def conditions
  @conditions
end

#config_keysArray<String>

Returns:

  • (Array<String>)


38
39
40
# File 'lib/getstream_ruby/generated/models/moderation_rule_v2_response.rb', line 38

def config_keys
  @config_keys
end

#cooldown_periodString

Returns:

  • (String)


44
45
46
# File 'lib/getstream_ruby/generated/models/moderation_rule_v2_response.rb', line 44

def cooldown_period
  @cooldown_period
end

#created_atDateTime

Returns:

  • (DateTime)


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

def created_at
  @created_at
end

#descriptionString

Returns:

  • (String)


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

def description
  @description
end

#enabledBoolean

Returns:

  • (Boolean)


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

def enabled
  @enabled
end

#groupsArray<RuleBuilderConditionGroup>

Returns:



53
54
55
# File 'lib/getstream_ruby/generated/models/moderation_rule_v2_response.rb', line 53

def groups
  @groups
end

#idString

Returns:

  • (String)


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

def id
  @id
end

#logicString

Returns:

  • (String)


47
48
49
# File 'lib/getstream_ruby/generated/models/moderation_rule_v2_response.rb', line 47

def logic
  @logic
end

#nameString

Returns:

  • (String)


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

def name
  @name
end

#rule_typeString

Returns:

  • (String)


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

def rule_type
  @rule_type
end

#teamString

Returns:

  • (String)


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

def team
  @team
end

#updated_atDateTime

Returns:

  • (DateTime)


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

def updated_at
  @updated_at
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/getstream_ruby/generated/models/moderation_rule_v2_response.rb', line 75

def self.json_field_mappings
  {
    created_at: 'created_at',
    description: 'description',
    enabled: 'enabled',
    id: 'id',
    name: 'name',
    rule_type: 'rule_type',
    team: 'team',
    updated_at: 'updated_at',
    config_keys: 'config_keys',
    action: 'action',
    cooldown_period: 'cooldown_period',
    logic: 'logic',
    conditions: 'conditions',
    groups: 'groups'
  }
end