Class: GetStream::Generated::Models::MessageModerationResult
- Defined in:
- lib/getstream_ruby/generated/models/message_moderation_result.rb
Overview
Result of the message moderation
Instance Attribute Summary collapse
-
#action ⇒ String
Action taken by automod.
- #ai_moderation_response ⇒ ModerationResponse
-
#blocked_word ⇒ String
Word that was blocked.
-
#blocklist_name ⇒ String
Name of the blocklist.
-
#created_at ⇒ DateTime
Date/time of creation.
-
#message_id ⇒ String
ID of the message.
-
#moderated_by ⇒ String
User who moderated the message.
- #moderation_thresholds ⇒ Thresholds
-
#updated_at ⇒ DateTime
Date/time of the last update.
-
#user_bad_karma ⇒ Boolean
Whether user has bad karma.
-
#user_karma ⇒ Float
Karma of the user.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ MessageModerationResult
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ MessageModerationResult
Initialize with attributes
47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/getstream_ruby/generated/models/message_moderation_result.rb', line 47 def initialize(attributes = {}) super(attributes) @action = attributes[:action] || attributes['action'] @created_at = attributes[:created_at] || attributes['created_at'] = attributes[:message_id] || attributes['message_id'] @updated_at = attributes[:updated_at] || attributes['updated_at'] @user_bad_karma = attributes[:user_bad_karma] || attributes['user_bad_karma'] @user_karma = attributes[:user_karma] || attributes['user_karma'] @blocked_word = attributes[:blocked_word] || attributes['blocked_word'] || nil @blocklist_name = attributes[:blocklist_name] || attributes['blocklist_name'] || nil @moderated_by = attributes[:moderated_by] || attributes['moderated_by'] || nil @ai_moderation_response = attributes[:ai_moderation_response] || attributes['ai_moderation_response'] || nil @moderation_thresholds = attributes[:moderation_thresholds] || attributes['moderation_thresholds'] || nil end |
Instance Attribute Details
#action ⇒ String
Returns Action taken by automod.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/message_moderation_result.rb', line 14 def action @action end |
#ai_moderation_response ⇒ ModerationResponse
41 42 43 |
# File 'lib/getstream_ruby/generated/models/message_moderation_result.rb', line 41 def ai_moderation_response @ai_moderation_response end |
#blocked_word ⇒ String
Returns Word that was blocked.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/message_moderation_result.rb', line 32 def blocked_word @blocked_word end |
#blocklist_name ⇒ String
Returns Name of the blocklist.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/message_moderation_result.rb', line 35 def blocklist_name @blocklist_name end |
#created_at ⇒ DateTime
Returns Date/time of creation.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/message_moderation_result.rb', line 17 def created_at @created_at end |
#message_id ⇒ String
Returns ID of the message.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/message_moderation_result.rb', line 20 def end |
#moderated_by ⇒ String
Returns User who moderated the message.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/message_moderation_result.rb', line 38 def moderated_by @moderated_by end |
#moderation_thresholds ⇒ Thresholds
44 45 46 |
# File 'lib/getstream_ruby/generated/models/message_moderation_result.rb', line 44 def moderation_thresholds @moderation_thresholds end |
#updated_at ⇒ DateTime
Returns Date/time of the last update.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/message_moderation_result.rb', line 23 def updated_at @updated_at end |
#user_bad_karma ⇒ Boolean
Returns Whether user has bad karma.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/message_moderation_result.rb', line 26 def user_bad_karma @user_bad_karma end |
#user_karma ⇒ Float
Returns Karma of the user.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/message_moderation_result.rb', line 29 def user_karma @user_karma end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/getstream_ruby/generated/models/message_moderation_result.rb', line 63 def self.json_field_mappings { action: 'action', created_at: 'created_at', message_id: 'message_id', updated_at: 'updated_at', user_bad_karma: 'user_bad_karma', user_karma: 'user_karma', blocked_word: 'blocked_word', blocklist_name: 'blocklist_name', moderated_by: 'moderated_by', ai_moderation_response: 'ai_moderation_response', moderation_thresholds: 'moderation_thresholds' } end |