Class: GetStream::Generated::Models::DraftResponse
- Defined in:
- lib/getstream_ruby/generated/models/draft_response.rb
Instance Attribute Summary collapse
-
#channel ⇒ ChannelResponse
Represents channel in chat.
- #channel_cid ⇒ String
- #created_at ⇒ DateTime
-
#message ⇒ DraftPayloadResponse
Contains the draft message content.
- #parent_id ⇒ String
-
#parent_message ⇒ MessageResponse
Represents any chat message.
-
#quoted_message ⇒ MessageResponse
Represents any chat message.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ DraftResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ DraftResponse
Initialize with attributes
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/getstream_ruby/generated/models/draft_response.rb', line 35 def initialize(attributes = {}) super(attributes) @channel_cid = attributes[:channel_cid] || attributes['channel_cid'] @created_at = attributes[:created_at] || attributes['created_at'] @message = attributes[:message] || attributes['message'] @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil @channel = attributes[:channel] || attributes['channel'] || nil @parent_message = attributes[:parent_message] || attributes['parent_message'] || nil @quoted_message = attributes[:quoted_message] || attributes['quoted_message'] || nil end |
Instance Attribute Details
#channel ⇒ ChannelResponse
Returns Represents channel in chat.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/draft_response.rb', line 26 def channel @channel end |
#channel_cid ⇒ String
14 15 16 |
# File 'lib/getstream_ruby/generated/models/draft_response.rb', line 14 def channel_cid @channel_cid end |
#created_at ⇒ DateTime
17 18 19 |
# File 'lib/getstream_ruby/generated/models/draft_response.rb', line 17 def created_at @created_at end |
#message ⇒ DraftPayloadResponse
Returns Contains the draft message content.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/draft_response.rb', line 20 def @message end |
#parent_id ⇒ String
23 24 25 |
# File 'lib/getstream_ruby/generated/models/draft_response.rb', line 23 def parent_id @parent_id end |
#parent_message ⇒ MessageResponse
Returns Represents any chat message.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/draft_response.rb', line 29 def @parent_message end |
#quoted_message ⇒ MessageResponse
Returns Represents any chat message.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/draft_response.rb', line 32 def @quoted_message end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/getstream_ruby/generated/models/draft_response.rb', line 47 def self.json_field_mappings { channel_cid: 'channel_cid', created_at: 'created_at', message: 'message', parent_id: 'parent_id', channel: 'channel', parent_message: 'parent_message', quoted_message: 'quoted_message' } end |