Class: GetStream::Generated::Models::ModerationTextAnalysisCompleteEvent
- Inherits:
-
BaseModel
- Object
- BaseModel
- GetStream::Generated::Models::ModerationTextAnalysisCompleteEvent
- Defined in:
- lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb
Overview
Per-text moderation verdict from /analyze. Fires on every /analyze call that included text inputs. Sibling of moderation.image_analysis.complete with the same audit / reconciliation purpose; for the /analyze origin this event replaces the legacy review_queue_item.* + moderation_check.completed events.
Instance Attribute Summary collapse
-
#config_key ⇒ String
The moderation policy key that was applied.
- #created_at ⇒ DateTime
-
#custom ⇒ Object
Echo of the ‘custom` metadata on the /analyze request.
-
#entity_creator_id ⇒ String
Echo of the ‘entity_creator_id` on the /analyze request.
-
#entity_id ⇒ String
Echo of the ‘entity_id` on the /analyze request.
-
#entity_type ⇒ String
Echo of the ‘entity_type` on the /analyze request.
- #received_at ⇒ DateTime
-
#review_queue_item_id ⇒ String
Review queue row ID for deep-linking into the dashboard.
-
#texts ⇒ Hash<String, AnalyzeTextField>
Per-text-field verdicts, same shape as the /analyze HTTP response.
- #type ⇒ String
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ModerationTextAnalysisCompleteEvent
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ ModerationTextAnalysisCompleteEvent
Initialize with attributes
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb', line 44 def initialize(attributes = {}) super(attributes) @created_at = attributes[:created_at] || attributes['created_at'] @type = attributes[:type] || attributes['type'] || "moderation.text_analysis.complete" @config_key = attributes[:config_key] || attributes['config_key'] || nil @entity_creator_id = attributes[:entity_creator_id] || attributes['entity_creator_id'] || nil @entity_id = attributes[:entity_id] || attributes['entity_id'] || nil @entity_type = attributes[:entity_type] || attributes['entity_type'] || nil @received_at = attributes[:received_at] || attributes['received_at'] || nil @review_queue_item_id = attributes[:review_queue_item_id] || attributes['review_queue_item_id'] || nil @custom = attributes[:custom] || attributes['custom'] || nil @texts = attributes[:texts] || attributes['texts'] || nil end |
Instance Attribute Details
#config_key ⇒ String
Returns The moderation policy key that was applied.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb', line 20 def config_key @config_key end |
#created_at ⇒ DateTime
14 15 16 |
# File 'lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb', line 14 def created_at @created_at end |
#custom ⇒ Object
Returns Echo of the ‘custom` metadata on the /analyze request.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb', line 38 def custom @custom end |
#entity_creator_id ⇒ String
Returns Echo of the ‘entity_creator_id` on the /analyze request.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb', line 23 def entity_creator_id @entity_creator_id end |
#entity_id ⇒ String
Returns Echo of the ‘entity_id` on the /analyze request.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb', line 26 def entity_id @entity_id end |
#entity_type ⇒ String
Returns Echo of the ‘entity_type` on the /analyze request.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb', line 29 def entity_type @entity_type end |
#received_at ⇒ DateTime
32 33 34 |
# File 'lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb', line 32 def received_at @received_at end |
#review_queue_item_id ⇒ String
Returns Review queue row ID for deep-linking into the dashboard.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb', line 35 def review_queue_item_id @review_queue_item_id end |
#texts ⇒ Hash<String, AnalyzeTextField>
Returns Per-text-field verdicts, same shape as the /analyze HTTP response. Each entry carries ‘id` when the request supplied `content_ids`.
41 42 43 |
# File 'lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb', line 41 def texts @texts end |
#type ⇒ String
17 18 19 |
# File 'lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb', line 17 def type @type end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb', line 59 def self.json_field_mappings { created_at: 'created_at', type: 'type', config_key: 'config_key', entity_creator_id: 'entity_creator_id', entity_id: 'entity_id', entity_type: 'entity_type', received_at: 'received_at', review_queue_item_id: 'review_queue_item_id', custom: 'custom', texts: 'texts' } end |