Class: GetStream::Generated::Models::MessageRequest
- Defined in:
- lib/getstream_ruby/generated/models/message_request.rb
Overview
Message data for creating or updating a message
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_channel ⇒ Boolean
- #mentioned_here ⇒ Boolean
- #mentioned_roles ⇒ Array<String>
-
#mentioned_users ⇒ Array<String>
Array of user IDs to mention.
-
#mml ⇒ String
Should be empty if
textis provided. -
#parent_id ⇒ String
ID of parent message (thread).
-
#pin_expires ⇒ DateTime
Date when pinned message expires.
-
#pinned ⇒ Boolean
Whether message is pinned or not.
-
#pinned_at ⇒ DateTime
Date when message got pinned.
-
#poll_id ⇒ String
Identifier of the poll to include in the message.
- #quoted_message_id ⇒ String
-
#restricted_visibility ⇒ Array<String>
A list of user ids that have restricted visibility to the message.
- #shared_location ⇒ SharedLocation
-
#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.
- #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 = {}) ⇒ MessageRequest
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ MessageRequest
Initialize with attributes
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 83 def initialize(attributes = {}) super(attributes) @html = attributes[:html] || attributes['html'] || nil @id = attributes[:id] || attributes['id'] || nil @mentioned_channel = attributes[:mentioned_channel] || attributes['mentioned_channel'] || nil @mentioned_here = attributes[:mentioned_here] || attributes['mentioned_here'] || nil @mml = attributes[:mml] || attributes['mml'] || nil @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil @pin_expires = attributes[:pin_expires] || attributes['pin_expires'] || nil @pinned = attributes[:pinned] || attributes['pinned'] || nil @pinned_at = attributes[:pinned_at] || attributes['pinned_at'] || 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 @text = attributes[:text] || attributes['text'] || nil @type = attributes[:type] || attributes['type'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @attachments = attributes[:attachments] || attributes['attachments'] || nil @mentioned_roles = attributes[:mentioned_roles] || attributes['mentioned_roles'] || nil @mentioned_users = attributes[:mentioned_users] || attributes['mentioned_users'] || nil @restricted_visibility = attributes[:restricted_visibility] || attributes['restricted_visibility'] || nil @custom = attributes[:custom] || attributes['custom'] || nil @shared_location = attributes[:shared_location] || attributes['shared_location'] || nil @user = attributes[:user] || attributes['user'] || nil end |
Instance Attribute Details
#attachments ⇒ Array<Attachment>
Returns Array of message attachments.
62 63 64 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 62 def @attachments end |
#custom ⇒ Object
74 75 76 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 74 def custom @custom end |
#html ⇒ String
Returns Contains HTML markup of the message. Can only be set when using server-side API.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 14 def html @html end |
#id ⇒ String
Returns Message ID is unique string identifier of the message.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 17 def id @id end |
#mentioned_channel ⇒ Boolean
20 21 22 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 20 def mentioned_channel @mentioned_channel end |
#mentioned_here ⇒ Boolean
23 24 25 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 23 def mentioned_here @mentioned_here end |
#mentioned_roles ⇒ Array<String>
65 66 67 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 65 def mentioned_roles @mentioned_roles end |
#mentioned_users ⇒ Array<String>
Returns Array of user IDs to mention.
68 69 70 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 68 def mentioned_users @mentioned_users end |
#mml ⇒ String
Returns Should be empty if text is provided. Can only be set when using server-side API.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/message_request.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/message_request.rb', line 29 def parent_id @parent_id end |
#pin_expires ⇒ DateTime
Returns Date when pinned message expires.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 32 def pin_expires @pin_expires end |
#pinned ⇒ Boolean
Returns Whether message is pinned or not.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 35 def pinned @pinned end |
#pinned_at ⇒ DateTime
Returns Date when message got pinned.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 38 def pinned_at @pinned_at end |
#poll_id ⇒ String
Returns Identifier of the poll to include in the message.
41 42 43 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 41 def poll_id @poll_id end |
#quoted_message_id ⇒ String
44 45 46 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 44 def @quoted_message_id end |
#restricted_visibility ⇒ Array<String>
Returns A list of user ids that have restricted visibility to the message.
71 72 73 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 71 def restricted_visibility @restricted_visibility end |
#shared_location ⇒ SharedLocation
77 78 79 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 77 def shared_location @shared_location end |
#show_in_channel ⇒ Boolean
Returns Whether thread reply should be shown in the channel as well.
47 48 49 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 47 def show_in_channel @show_in_channel end |
#silent ⇒ Boolean
Returns Whether message is silent or not.
50 51 52 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 50 def silent @silent end |
#text ⇒ String
Returns Text of the message. Should be empty if mml is provided.
53 54 55 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 53 def text @text end |
#type ⇒ String
Returns Contains type of the message. One of: regular, system.
56 57 58 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 56 def type @type end |
#user ⇒ UserRequest
80 81 82 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 80 def user @user end |
#user_id ⇒ String
59 60 61 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 59 def user_id @user_id end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/getstream_ruby/generated/models/message_request.rb', line 111 def self.json_field_mappings { html: 'html', id: 'id', mentioned_channel: 'mentioned_channel', mentioned_here: 'mentioned_here', mml: 'mml', parent_id: 'parent_id', pin_expires: 'pin_expires', pinned: 'pinned', pinned_at: 'pinned_at', poll_id: 'poll_id', quoted_message_id: 'quoted_message_id', show_in_channel: 'show_in_channel', silent: 'silent', text: 'text', type: 'type', user_id: 'user_id', attachments: 'attachments', mentioned_roles: 'mentioned_roles', mentioned_users: 'mentioned_users', restricted_visibility: 'restricted_visibility', custom: 'custom', shared_location: 'shared_location', user: 'user' } end |