Class: GetStream::Generated::Models::ModerationTextAnalysisCompleteEvent

Inherits:
BaseModel
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

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_keyString

Returns The moderation policy key that was applied.

Returns:

  • (String)

    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_atDateTime

Returns:

  • (DateTime)


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

def created_at
  @created_at
end

#customObject

Returns Echo of the ‘custom` metadata on the /analyze request.

Returns:

  • (Object)

    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_idString

Returns Echo of the ‘entity_creator_id` on the /analyze request.

Returns:

  • (String)

    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_idString

Returns Echo of the ‘entity_id` on the /analyze request.

Returns:

  • (String)

    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_typeString

Returns Echo of the ‘entity_type` on the /analyze request.

Returns:

  • (String)

    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_atDateTime

Returns:

  • (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_idString

Returns Review queue row ID for deep-linking into the dashboard.

Returns:

  • (String)

    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

#textsHash<String, AnalyzeTextField>

Returns Per-text-field verdicts, same shape as the /analyze HTTP response. Each entry carries ‘id` when the request supplied `content_ids`.

Returns:

  • (Hash<String, AnalyzeTextField>)

    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

#typeString

Returns:

  • (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_mappingsObject

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