Class: GetStream::Generated::Models::LabelResultResponse
- Defined in:
- lib/getstream_ruby/generated/models/label_result_response.rb
Instance Attribute Summary collapse
-
#category ⇒ String
Category.
-
#content ⇒ String
The moderated content.
-
#content_id ⇒ String
Customer-supplied identifier for the moderated content.
- #content_type ⇒ String
-
#created_at ⇒ DateTime
Timestamp.
-
#directed_at ⇒ String
Who the content is directed at (USER, GROUP, EVERYONE, NONE, etc.).
-
#harm_type ⇒ String
High-level harm category.
-
#id ⇒ String
Unique identifier.
-
#labels ⇒ Array<String>
Moderation labels.
-
#language ⇒ String
Detected language.
-
#masked_content ⇒ String
Content with blocklisted tokens masked (when a blocklist rule with action=mask rewrote the original).
- #policy ⇒ String
-
#recommended_action ⇒ String
Provider recommended action.
-
#severity ⇒ String
Severity level.
-
#user_id ⇒ String
Customer-supplied user identifier for the content author.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ LabelResultResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ LabelResultResponse
Initialize with attributes
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 59 def initialize(attributes = {}) super(attributes) @category = attributes[:category] || attributes['category'] @content = attributes[:content] || attributes['content'] @content_type = attributes[:content_type] || attributes['content_type'] @created_at = attributes[:created_at] || attributes['created_at'] @harm_type = attributes[:harm_type] || attributes['harm_type'] @id = attributes[:id] || attributes['id'] @language = attributes[:language] || attributes['language'] @recommended_action = attributes[:recommended_action] || attributes['recommended_action'] @severity = attributes[:severity] || attributes['severity'] @labels = attributes[:labels] || attributes['labels'] @content_id = attributes[:content_id] || attributes['content_id'] || nil @directed_at = attributes[:directed_at] || attributes['directed_at'] || nil @masked_content = attributes[:masked_content] || attributes['masked_content'] || nil @policy = attributes[:policy] || attributes['policy'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil end |
Instance Attribute Details
#category ⇒ String
Returns Category.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 14 def category @category end |
#content ⇒ String
Returns The moderated content.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 17 def content @content end |
#content_id ⇒ String
Returns Customer-supplied identifier for the moderated content.
44 45 46 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 44 def content_id @content_id end |
#content_type ⇒ String
20 21 22 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 20 def content_type @content_type end |
#created_at ⇒ DateTime
Returns Timestamp.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 23 def created_at @created_at end |
#directed_at ⇒ String
Returns Who the content is directed at (USER, GROUP, EVERYONE, NONE, etc.).
47 48 49 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 47 def directed_at @directed_at end |
#harm_type ⇒ String
Returns High-level harm category.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 26 def harm_type @harm_type end |
#id ⇒ String
Returns Unique identifier.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 29 def id @id end |
#labels ⇒ Array<String>
Returns Moderation labels.
41 42 43 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 41 def labels @labels end |
#language ⇒ String
Returns Detected language.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 32 def language @language end |
#masked_content ⇒ String
Returns Content with blocklisted tokens masked (when a blocklist rule with action=mask rewrote the original).
50 51 52 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 50 def masked_content @masked_content end |
#policy ⇒ String
53 54 55 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 53 def policy @policy end |
#recommended_action ⇒ String
Returns Provider recommended action.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 35 def recommended_action @recommended_action end |
#severity ⇒ String
Returns Severity level.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 38 def severity @severity end |
#user_id ⇒ String
Returns Customer-supplied user identifier for the content author.
56 57 58 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 56 def user_id @user_id end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 79 def self.json_field_mappings { category: 'category', content: 'content', content_type: 'content_type', created_at: 'created_at', harm_type: 'harm_type', id: 'id', language: 'language', recommended_action: 'recommended_action', severity: 'severity', labels: 'labels', content_id: 'content_id', directed_at: 'directed_at', masked_content: 'masked_content', policy: 'policy', user_id: 'user_id' } end |