Class: GetStream::Generated::Models::LabelsRequest
- Defined in:
- lib/getstream_ruby/generated/models/labels_request.rb
Instance Attribute Summary collapse
-
#category ⇒ String
Optional category for filtering (max 128 chars).
-
#content ⇒ String
Content to moderate.
-
#content_id ⇒ String
Customer-supplied identifier for the moderated content, for tracing.
-
#content_type ⇒ String
Type of content: ‘text’ (default), ‘message’, or ‘username’.
-
#policy ⇒ String
Optional moderation policy key (max 128 chars).
-
#user_id ⇒ String
Optional customer-supplied user identifier for the content author (max 256 chars).
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ LabelsRequest
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ LabelsRequest
Initialize with attributes
32 33 34 35 36 37 38 39 40 |
# File 'lib/getstream_ruby/generated/models/labels_request.rb', line 32 def initialize(attributes = {}) super(attributes) @content = attributes[:content] || attributes['content'] @category = attributes[:category] || attributes['category'] || nil @content_id = attributes[:content_id] || attributes['content_id'] || nil @content_type = attributes[:content_type] || attributes['content_type'] || nil @policy = attributes[:policy] || attributes['policy'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil end |
Instance Attribute Details
#category ⇒ String
Returns Optional category for filtering (max 128 chars).
17 18 19 |
# File 'lib/getstream_ruby/generated/models/labels_request.rb', line 17 def category @category end |
#content ⇒ String
Returns Content to moderate.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/labels_request.rb', line 14 def content @content end |
#content_id ⇒ String
Returns Customer-supplied identifier for the moderated content, for tracing.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/labels_request.rb', line 20 def content_id @content_id end |
#content_type ⇒ String
Returns Type of content: ‘text’ (default), ‘message’, or ‘username’. Stored as-sent; only ‘username’ routes to the username moderation API.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/labels_request.rb', line 23 def content_type @content_type end |
#policy ⇒ String
Returns Optional moderation policy key (max 128 chars).
26 27 28 |
# File 'lib/getstream_ruby/generated/models/labels_request.rb', line 26 def policy @policy end |
#user_id ⇒ String
Returns Optional customer-supplied user identifier for the content author (max 256 chars). Enables filtering stored results by user_id.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/labels_request.rb', line 29 def user_id @user_id 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/labels_request.rb', line 43 def self.json_field_mappings { content: 'content', category: 'category', content_id: 'content_id', content_type: 'content_type', policy: 'policy', user_id: 'user_id' } end |