Class: GetStream::Generated::Models::DraftPayloadResponse
- Defined in:
- lib/getstream_ruby/generated/models/draft_payload_response.rb
Overview
Contains the draft message content
Instance Attribute Summary collapse
-
#attachments ⇒ Array<Attachment>
Array of message attachments.
- #custom ⇒ Object
-
#html ⇒ String
Contains HTML markup of the message.
-
#id ⇒ String
Message ID is unique string identifier of the message.
-
#mentioned_users ⇒ Array<UserResponse>
List of mentioned users.
-
#mml ⇒ String
MML content of the message.
-
#parent_id ⇒ String
ID of parent message (thread).
-
#poll_id ⇒ String
Identifier of the poll to include in the message.
- #quoted_message_id ⇒ String
-
#show_in_channel ⇒ Boolean
Whether thread reply should be shown in the channel as well.
-
#silent ⇒ Boolean
Whether message is silent or not.
-
#text ⇒ String
Text of the message.
-
#type ⇒ String
Contains type of the message.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ DraftPayloadResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ DraftPayloadResponse
Initialize with attributes
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 53 def initialize(attributes = {}) super(attributes) @id = attributes[:id] || attributes['id'] @text = attributes[:text] || attributes['text'] @custom = attributes[:custom] || attributes['custom'] @html = attributes[:html] || attributes['html'] || nil @mml = attributes[:mml] || attributes['mml'] || nil @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil @poll_id = attributes[:poll_id] || attributes['poll_id'] || nil @quoted_message_id = attributes[:quoted_message_id] || attributes['quoted_message_id'] || nil @show_in_channel = attributes[:show_in_channel] || attributes['show_in_channel'] || nil @silent = attributes[:silent] || attributes['silent'] || nil @type = attributes[:type] || attributes['type'] || nil @attachments = attributes[:attachments] || attributes['attachments'] || nil @mentioned_users = attributes[:mentioned_users] || attributes['mentioned_users'] || nil end |
Instance Attribute Details
#attachments ⇒ Array<Attachment>
Returns Array of message attachments.
47 48 49 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 47 def @attachments end |
#custom ⇒ Object
20 21 22 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 20 def custom @custom end |
#html ⇒ String
Returns Contains HTML markup of the message.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 23 def html @html end |
#id ⇒ String
Returns Message ID is unique string identifier of the message.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 14 def id @id end |
#mentioned_users ⇒ Array<UserResponse>
Returns List of mentioned users.
50 51 52 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 50 def mentioned_users @mentioned_users end |
#mml ⇒ String
Returns MML content of the message.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 26 def mml @mml end |
#parent_id ⇒ String
Returns ID of parent message (thread).
29 30 31 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 29 def parent_id @parent_id end |
#poll_id ⇒ String
Returns Identifier of the poll to include in the message.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 32 def poll_id @poll_id end |
#quoted_message_id ⇒ String
35 36 37 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 35 def @quoted_message_id end |
#show_in_channel ⇒ Boolean
Returns Whether thread reply should be shown in the channel as well.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 38 def show_in_channel @show_in_channel end |
#silent ⇒ Boolean
Returns Whether message is silent or not.
41 42 43 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 41 def silent @silent end |
#text ⇒ String
Returns Text of the message.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 17 def text @text end |
#type ⇒ String
Returns Contains type of the message. One of: regular, system.
44 45 46 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 44 def type @type end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/getstream_ruby/generated/models/draft_payload_response.rb', line 71 def self.json_field_mappings { id: 'id', text: 'text', custom: 'custom', html: 'html', mml: 'mml', parent_id: 'parent_id', poll_id: 'poll_id', quoted_message_id: 'quoted_message_id', show_in_channel: 'show_in_channel', silent: 'silent', type: 'type', attachments: 'attachments', mentioned_users: 'mentioned_users' } end |