Class: GetStream::Generated::Models::ModerationAnalysisFailedEvent

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/moderation_analysis_failed_event.rb

Overview

An /analyze call was acknowledged but its moderation could not be completed, so no verdict exists for the content. The content was NOT screened — treat it as unverified rather than clean, and re-submit if a verdict is required.

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 = {}) ⇒ ModerationAnalysisFailedEvent

Initialize with attributes



41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/getstream_ruby/generated/models/moderation_analysis_failed_event.rb', line 41

def initialize(attributes = {})
  super(attributes)
  @created_at = attributes.fetch(:created_at) { attributes.fetch('created_at', nil) }
  @type = attributes.fetch(:type) { attributes.fetch('type', "moderation.analysis.failed") }
  @config_key = attributes.fetch(:config_key) { attributes.fetch('config_key', nil) }
  @entity_creator_id = attributes.fetch(:entity_creator_id) { attributes.fetch('entity_creator_id', nil) }
  @entity_id = attributes.fetch(:entity_id) { attributes.fetch('entity_id', nil) }
  @entity_type = attributes.fetch(:entity_type) { attributes.fetch('entity_type', nil) }
  @received_at = attributes.fetch(:received_at) { attributes.fetch('received_at', nil) }
  @content_ids = attributes.fetch(:content_ids) { attributes.fetch('content_ids', nil) }
  @custom = attributes.fetch(:custom) { attributes.fetch('custom', nil) }
end

Instance Attribute Details

#config_key ⇒ String

Returns The moderation policy key the request targeted.

Returns:

  • (String) —

    The moderation policy key the request targeted.



20
21
22
# File 'lib/getstream_ruby/generated/models/moderation_analysis_failed_event.rb', line 20

def config_key
  @config_key
end

#content_ids ⇒ Hash<String, String>

Returns Echo of the request's content_ids, keyed by text/image label. On keyframe and caption streams every request repeats the same entity_type/entity_id/entity_creator_id, so this is what identifies the specific submission that went unscreened.

Returns:

  • (Hash<String, String>) —

    Echo of the request's content_ids, keyed by text/image label. On keyframe and caption streams every request repeats the same entity_type/entity_id/entity_creator_id, so this is what identifies the specific submission that went unscreened.



35
36
37
# File 'lib/getstream_ruby/generated/models/moderation_analysis_failed_event.rb', line 35

def content_ids
  @content_ids
end

#created_at ⇒ DateTime

Returns:

  • (DateTime)


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

def created_at
  @created_at
end

#custom ⇒ Object

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_analysis_failed_event.rb', line 38

def custom
  @custom
end

#entity_creator_id ⇒ String

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_analysis_failed_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.

Returns:

  • (String) —

    Echo of the entity_id on the /analyze request.



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

def entity_id
  @entity_id
end

#entity_type ⇒ String

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_analysis_failed_event.rb', line 29

def entity_type
  @entity_type
end

#received_at ⇒ DateTime

Returns:

  • (DateTime)


32
33
34
# File 'lib/getstream_ruby/generated/models/moderation_analysis_failed_event.rb', line 32

def received_at
  @received_at
end

#type ⇒ String

Returns:

  • (String)


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

def type
  @type
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/getstream_ruby/generated/models/moderation_analysis_failed_event.rb', line 55

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',
    content_ids: 'content_ids',
    custom: 'custom'
  }
end