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



29
30
31
32
33
34
35
36
# File 'lib/getstream_ruby/generated/models/triggered_rule_response.rb', line 29

def initialize(attributes = {})
  super(attributes)
  @rule_id = attributes[:rule_id] || attributes['rule_id']
  @actions = attributes[:actions] || attributes['actions']
  @rule_name = attributes[:rule_name] || attributes['rule_name'] || nil
  @violation_number = attributes[:violation_number] || attributes['violation_number'] || nil
  @call_options = attributes[:call_options] || attributes['call_options'] || nil
end

Instance Attribute Details

#actionsArray<String>

Returns Array of action types resolved from the rule’s action sequence (e.g. mute_video, kick_user, end_call, warning, blur).

Returns:

  • (Array<String>)

    Array of action types resolved from the rule’s action sequence (e.g. mute_video, kick_user, end_call, warning, blur)



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

def actions
  @actions
end

#call_optionsCallActionOptions

Returns:



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

def call_options
  @call_options
end

#rule_idString

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_nameString

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

#violation_numberInteger

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

Returns:

  • (Integer)

    The violation count for action sequence rules (1-based)



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

def violation_number
  @violation_number
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



39
40
41
42
43
44
45
46
47
# File 'lib/getstream_ruby/generated/models/triggered_rule_response.rb', line 39

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