Class: GetStream::Generated::Models::UpsertModerationRuleRequest
- Inherits:
-
BaseModel
- Object
- BaseModel
- GetStream::Generated::Models::UpsertModerationRuleRequest
- Defined in:
- lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb
Instance Attribute Summary collapse
- #action ⇒ RuleBuilderAction
-
#action_sequences ⇒ Array<CallRuleActionSequence>
Escalation sequences for call rules.
-
#conditions ⇒ Array<RuleBuilderCondition>
Flat list of conditions (legacy).
-
#config_keys ⇒ Array<String>
List of config keys this rule applies to.
-
#cooldown_period ⇒ String
Duration before rule can trigger again (e.g. 24h, 7d).
-
#description ⇒ String
Optional description of the rule.
-
#enabled ⇒ Boolean
Whether the rule is active.
-
#groups ⇒ Array<RuleBuilderConditionGroup>
Nested condition groups.
-
#logic ⇒ String
Logical operator between conditions/groups: AND or OR.
-
#name ⇒ String
Unique rule name.
-
#rule_type ⇒ String
Type of rule: user, content, or call.
-
#team ⇒ String
Team scope for the rule.
- #user ⇒ UserRequest
-
#user_id ⇒ String
Optional user ID to associate with the audit log entry.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ UpsertModerationRuleRequest
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ UpsertModerationRuleRequest
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/upsert_moderation_rule_request.rb', line 56 def initialize(attributes = {}) super(attributes) @name = attributes[:name] || attributes['name'] @rule_type = attributes[:rule_type] || attributes['rule_type'] @cooldown_period = attributes[:cooldown_period] || attributes['cooldown_period'] || nil @description = attributes[:description] || attributes['description'] || nil @enabled = attributes[:enabled] || attributes['enabled'] || nil @logic = attributes[:logic] || attributes['logic'] || nil @team = attributes[:team] || attributes['team'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @action_sequences = attributes[:action_sequences] || attributes['action_sequences'] || nil @conditions = attributes[:conditions] || attributes['conditions'] || nil @config_keys = attributes[:config_keys] || attributes['config_keys'] || nil @groups = attributes[:groups] || attributes['groups'] || nil @action = attributes[:action] || attributes['action'] || nil @user = attributes[:user] || attributes['user'] || nil end |
Instance Attribute Details
#action ⇒ RuleBuilderAction
50 51 52 |
# File 'lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb', line 50 def action @action end |
#action_sequences ⇒ Array<CallRuleActionSequence>
Returns Escalation sequences for call rules.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb', line 38 def action_sequences @action_sequences end |
#conditions ⇒ Array<RuleBuilderCondition>
Returns Flat list of conditions (legacy).
41 42 43 |
# File 'lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb', line 41 def conditions @conditions end |
#config_keys ⇒ Array<String>
Returns List of config keys this rule applies to.
44 45 46 |
# File 'lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb', line 44 def config_keys @config_keys end |
#cooldown_period ⇒ String
Returns Duration before rule can trigger again (e.g. 24h, 7d).
20 21 22 |
# File 'lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb', line 20 def cooldown_period @cooldown_period end |
#description ⇒ String
Returns Optional description of the rule.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb', line 23 def description @description end |
#enabled ⇒ Boolean
Returns Whether the rule is active.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb', line 26 def enabled @enabled end |
#groups ⇒ Array<RuleBuilderConditionGroup>
Returns Nested condition groups.
47 48 49 |
# File 'lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb', line 47 def groups @groups end |
#logic ⇒ String
Returns Logical operator between conditions/groups: AND or OR.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb', line 29 def logic @logic end |
#name ⇒ String
Returns Unique rule name.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb', line 14 def name @name end |
#rule_type ⇒ String
Returns Type of rule: user, content, or call.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb', line 17 def rule_type @rule_type end |
#team ⇒ String
Returns Team scope for the rule.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb', line 32 def team @team end |
#user ⇒ UserRequest
53 54 55 |
# File 'lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb', line 53 def user @user end |
#user_id ⇒ String
Returns Optional user ID to associate with the audit log entry.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb', line 35 def user_id @user_id end |
Class Method Details
.json_field_mappings ⇒ Object
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/upsert_moderation_rule_request.rb', line 75 def self.json_field_mappings { name: 'name', rule_type: 'rule_type', cooldown_period: 'cooldown_period', description: 'description', enabled: 'enabled', logic: 'logic', team: 'team', user_id: 'user_id', action_sequences: 'action_sequences', conditions: 'conditions', config_keys: 'config_keys', groups: 'groups', action: 'action', user: 'user' } end |