Class: GetStream::Generated::Models::AnalyzeTextField
- Defined in:
- lib/getstream_ruby/generated/models/analyze_text_field.rb
Instance Attribute Summary collapse
-
#action ⇒ String
Per-field action: keep | flag | remove.
-
#classifications ⇒ Array<Classification>
Flat list of detected Bodyguard text labels (e.g. INSULT, VULGARITY).
-
#error ⇒ String
Set when moderation couldn’t be determined for this field — action is absent.
-
#id ⇒ String
Echo of ‘content_ids` when supplied on the request; omitted otherwise.
-
#language ⇒ String
Detected language code.
-
#severity ⇒ String
Aggregate severity across the field: LOW | MEDIUM | HIGH | CRITICAL.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ AnalyzeTextField
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ AnalyzeTextField
Initialize with attributes
32 33 34 35 36 37 38 39 40 |
# File 'lib/getstream_ruby/generated/models/analyze_text_field.rb', line 32 def initialize(attributes = {}) super(attributes) @action = attributes[:action] || attributes['action'] || nil @error = attributes[:error] || attributes['error'] || nil @id = attributes[:id] || attributes['id'] || nil @language = attributes[:language] || attributes['language'] || nil @severity = attributes[:severity] || attributes['severity'] || nil @classifications = attributes[:classifications] || attributes['classifications'] || nil end |
Instance Attribute Details
#action ⇒ String
Returns Per-field action: keep | flag | remove.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/analyze_text_field.rb', line 14 def action @action end |
#classifications ⇒ Array<Classification>
Returns Flat list of detected Bodyguard text labels (e.g. INSULT, VULGARITY). Each entry carries ‘name` and `severity`.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/analyze_text_field.rb', line 29 def classifications @classifications end |
#error ⇒ String
Returns Set when moderation couldn’t be determined for this field — action is absent.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/analyze_text_field.rb', line 17 def error @error end |
#id ⇒ String
Returns Echo of ‘content_ids` when supplied on the request; omitted otherwise.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/analyze_text_field.rb', line 20 def id @id end |
#language ⇒ String
Returns Detected language code.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/analyze_text_field.rb', line 23 def language @language end |
#severity ⇒ String
Returns Aggregate severity across the field: LOW | MEDIUM | HIGH | CRITICAL.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/analyze_text_field.rb', line 26 def severity @severity end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/getstream_ruby/generated/models/analyze_text_field.rb', line 43 def self.json_field_mappings { action: 'action', error: 'error', id: 'id', language: 'language', severity: 'severity', classifications: 'classifications' } end |