Class: GetStream::Generated::Models::FlagRequest
- Defined in:
- lib/getstream_ruby/generated/models/flag_request.rb
Instance Attribute Summary collapse
-
#custom ⇒ Object
Additional metadata about the flag.
-
#entity_creator_id ⇒ String
ID of the user who created the flagged entity.
-
#entity_id ⇒ String
Unique identifier of the entity being flagged.
-
#entity_type ⇒ String
Type of entity being flagged (e.g., message, user).
- #moderation_payload ⇒ ModerationPayload
-
#reason ⇒ String
Optional explanation for why the content is being flagged.
- #user ⇒ UserRequest
- #user_id ⇒ String
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ FlagRequest
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ FlagRequest
Initialize with attributes
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/getstream_ruby/generated/models/flag_request.rb', line 38 def initialize(attributes = {}) super(attributes) @entity_id = attributes[:entity_id] || attributes['entity_id'] @entity_type = attributes[:entity_type] || attributes['entity_type'] @entity_creator_id = attributes[:entity_creator_id] || attributes['entity_creator_id'] || nil @reason = attributes[:reason] || attributes['reason'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @custom = attributes[:custom] || attributes['custom'] || nil @moderation_payload = attributes[:moderation_payload] || attributes['moderation_payload'] || nil @user = attributes[:user] || attributes['user'] || nil end |
Instance Attribute Details
#custom ⇒ Object
Returns Additional metadata about the flag.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/flag_request.rb', line 29 def custom @custom end |
#entity_creator_id ⇒ String
Returns ID of the user who created the flagged entity.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/flag_request.rb', line 20 def entity_creator_id @entity_creator_id end |
#entity_id ⇒ String
Returns Unique identifier of the entity being flagged.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/flag_request.rb', line 14 def entity_id @entity_id end |
#entity_type ⇒ String
Returns Type of entity being flagged (e.g., message, user).
17 18 19 |
# File 'lib/getstream_ruby/generated/models/flag_request.rb', line 17 def entity_type @entity_type end |
#moderation_payload ⇒ ModerationPayload
32 33 34 |
# File 'lib/getstream_ruby/generated/models/flag_request.rb', line 32 def moderation_payload @moderation_payload end |
#reason ⇒ String
Returns Optional explanation for why the content is being flagged.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/flag_request.rb', line 23 def reason @reason end |
#user ⇒ UserRequest
35 36 37 |
# File 'lib/getstream_ruby/generated/models/flag_request.rb', line 35 def user @user end |
#user_id ⇒ String
26 27 28 |
# File 'lib/getstream_ruby/generated/models/flag_request.rb', line 26 def user_id @user_id end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/getstream_ruby/generated/models/flag_request.rb', line 51 def self.json_field_mappings { entity_id: 'entity_id', entity_type: 'entity_type', entity_creator_id: 'entity_creator_id', reason: 'reason', user_id: 'user_id', custom: 'custom', moderation_payload: 'moderation_payload', user: 'user' } end |