Class: GetStream::Generated::Models::LabelsResponse
- Defined in:
- lib/getstream_ruby/generated/models/labels_response.rb
Instance Attribute Summary collapse
-
#content_id ⇒ String
Customer-supplied identifier for the moderated content, for tracing.
-
#directed_at ⇒ String
Who the content is directed at (USER, GROUP, EVERYONE, NONE, etc.), when the provider exposes it.
- #duration ⇒ String
-
#harm_type ⇒ String
High-level harm category.
-
#labels ⇒ Array<String>
Moderation labels detected.
-
#language ⇒ String
Detected language.
-
#masked_content ⇒ String
Content with blocklisted tokens masked or substituted.
-
#recommended_action ⇒ String
Provider recommended action.
-
#severity ⇒ String
Severity level.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ LabelsResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ LabelsResponse
Initialize with attributes
41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/getstream_ruby/generated/models/labels_response.rb', line 41 def initialize(attributes = {}) super(attributes) @duration = attributes[:duration] || attributes['duration'] @recommended_action = attributes[:recommended_action] || attributes['recommended_action'] @content_id = attributes[:content_id] || attributes['content_id'] || nil @directed_at = attributes[:directed_at] || attributes['directed_at'] || nil @harm_type = attributes[:harm_type] || attributes['harm_type'] || nil @language = attributes[:language] || attributes['language'] || nil @masked_content = attributes[:masked_content] || attributes['masked_content'] || nil @severity = attributes[:severity] || attributes['severity'] || nil @labels = attributes[:labels] || attributes['labels'] || nil end |
Instance Attribute Details
#content_id ⇒ String
Returns Customer-supplied identifier for the moderated content, for tracing.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/labels_response.rb', line 20 def content_id @content_id end |
#directed_at ⇒ String
Returns Who the content is directed at (USER, GROUP, EVERYONE, NONE, etc.), when the provider exposes it.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/labels_response.rb', line 23 def directed_at @directed_at end |
#duration ⇒ String
14 15 16 |
# File 'lib/getstream_ruby/generated/models/labels_response.rb', line 14 def duration @duration end |
#harm_type ⇒ String
Returns High-level harm category.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/labels_response.rb', line 26 def harm_type @harm_type end |
#labels ⇒ Array<String>
Returns Moderation labels detected.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/labels_response.rb', line 38 def labels @labels end |
#language ⇒ String
Returns Detected language.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/labels_response.rb', line 29 def language @language end |
#masked_content ⇒ String
Returns Content with blocklisted tokens masked or substituted. Present only when a blocklist rewrote the original content.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/labels_response.rb', line 32 def masked_content @masked_content end |
#recommended_action ⇒ String
Returns Provider recommended action.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/labels_response.rb', line 17 def recommended_action @recommended_action end |
#severity ⇒ String
Returns Severity level.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/labels_response.rb', line 35 def severity @severity 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/labels_response.rb', line 55 def self.json_field_mappings { duration: 'duration', recommended_action: 'recommended_action', content_id: 'content_id', directed_at: 'directed_at', harm_type: 'harm_type', language: 'language', masked_content: 'masked_content', severity: 'severity', labels: 'labels' } end |