Class: GetStream::Generated::Models::TriggeredRuleResponse

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

Initialize with attributes



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

def initialize(attributes = {})
  super(attributes)
  @rule_id = attributes.fetch(:rule_id) { attributes.fetch('rule_id', nil) }
  @actions = attributes.fetch(:actions) { attributes.fetch('actions', nil) }
  @rule_name = attributes.fetch(:rule_name) { attributes.fetch('rule_name', nil) }
  @type = attributes.fetch(:type) { attributes.fetch('type', nil) }
  @violation_number = attributes.fetch(:violation_number) { attributes.fetch('violation_number', nil) }
  @call_options = attributes.fetch(:call_options) { attributes.fetch('call_options', nil) }
end

Instance Attribute Details

#actions ⇒ Array<String>

Returns Action types resolved from the rule's action sequence.

Returns:

  • (Array<String>) —

    Action types resolved from the rule's action sequence



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

def actions
  @actions
end

#call_options ⇒ CallActionOptions

Returns:



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

def call_options
  @call_options
end

#rule_id ⇒ String

Returns ID of the moderation rule that triggered.

Returns:

  • (String) —

    ID of the moderation rule that triggered



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

def rule_id
  @rule_id
end

#rule_name ⇒ String

Returns Name of the moderation rule that triggered.

Returns:

  • (String) —

    Name of the moderation rule that triggered



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

def rule_name
  @rule_name
end

#type ⇒ String

Returns Type of the moderation rule that triggered (content, user, or call).

Returns:

  • (String) —

    Type of the moderation rule that triggered (content, user, or call)



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

def type
  @type
end

#violation_number ⇒ Integer

Returns Violation count for action sequence rules (1-based).

Returns:

  • (Integer) —

    Violation count for action sequence rules (1-based)



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

def violation_number
  @violation_number
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



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

def self.json_field_mappings
  {
    rule_id: 'rule_id',
    actions: 'actions',
    rule_name: 'rule_name',
    type: 'type',
    violation_number: 'violation_number',
    call_options: 'call_options'
  }
end