Class: GetStream::Generated::Models::AnalyzeImageField
- Defined in:
- lib/getstream_ruby/generated/models/analyze_image_field.rb
Instance Attribute Summary collapse
-
#action ⇒ String
Per-image action: keep | flag | remove.
-
#classifications ⇒ Array<Classification>
Hierarchical list of L1 (parent) classifications.
-
#confidence ⇒ Float
Highest confidence (0–1) across detected classifications + sub-classifications.
-
#error ⇒ String
Set when moderation couldn’t be determined for this image — action is absent.
-
#id ⇒ String
Echo of ‘content_ids` when supplied on the request; omitted otherwise.
-
#ocr_classifications ⇒ Array<Classification>
Flat list of Bodyguard OCR text-moderation labels on the image’s extracted text (e.g. VULGARITY, PII).
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ AnalyzeImageField
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ AnalyzeImageField
Initialize with attributes
32 33 34 35 36 37 38 39 40 |
# File 'lib/getstream_ruby/generated/models/analyze_image_field.rb', line 32 def initialize(attributes = {}) super(attributes) @action = attributes[:action] || attributes['action'] || nil @confidence = attributes[:confidence] || attributes['confidence'] || nil @error = attributes[:error] || attributes['error'] || nil @id = attributes[:id] || attributes['id'] || nil @classifications = attributes[:classifications] || attributes['classifications'] || nil @ocr_classifications = attributes[:ocr_classifications] || attributes['ocr_classifications'] || nil end |
Instance Attribute Details
#action ⇒ String
Returns Per-image action: keep | flag | remove.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/analyze_image_field.rb', line 14 def action @action end |
#classifications ⇒ Array<Classification>
Returns Hierarchical list of L1 (parent) classifications. Each entry: ‘name`, `confidence` (0–1), and nested `subclassifications` (L2 leaves with their own confidence). Resolved against the app’s effective taxonomy (custom taxonomy when configured, otherwise the standard Bodyguard catalogue).
26 27 28 |
# File 'lib/getstream_ruby/generated/models/analyze_image_field.rb', line 26 def classifications @classifications end |
#confidence ⇒ Float
Returns Highest confidence (0–1) across detected classifications + sub-classifications. Convenience aggregate over the nested values in ‘classifications`.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/analyze_image_field.rb', line 17 def confidence @confidence end |
#error ⇒ String
Returns Set when moderation couldn’t be determined for this image — action is absent.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/analyze_image_field.rb', line 20 def error @error end |
#id ⇒ String
Returns Echo of ‘content_ids` when supplied on the request; omitted otherwise.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/analyze_image_field.rb', line 23 def id @id end |
#ocr_classifications ⇒ Array<Classification>
Returns Flat list of Bodyguard OCR text-moderation labels on the image’s extracted text (e.g. VULGARITY, PII). Each entry: ‘name` + `severity`. Populated when BG’s OCR pipeline returned non-empty results for this image.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/analyze_image_field.rb', line 29 def ocr_classifications @ocr_classifications 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_image_field.rb', line 43 def self.json_field_mappings { action: 'action', confidence: 'confidence', error: 'error', id: 'id', classifications: 'classifications', ocr_classifications: 'ocr_classifications' } end |