Class: MicrosoftGraph::Models::ChatMessage
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/chat_message.rb
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#attachments ⇒ Object
Gets the attachments property value.
-
#attachments=(value) ⇒ Object
Sets the attachments property value.
-
#body ⇒ Object
Gets the body property value.
-
#body=(value) ⇒ Object
Sets the body property value.
-
#channel_identity ⇒ Object
Gets the channelIdentity property value.
-
#channel_identity=(value) ⇒ Object
Sets the channelIdentity property value.
-
#chat_id ⇒ Object
Gets the chatId property value.
-
#chat_id=(value) ⇒ Object
Sets the chatId property value.
-
#created_date_time ⇒ Object
Gets the createdDateTime property value.
-
#created_date_time=(value) ⇒ Object
Sets the createdDateTime property value.
-
#deleted_date_time ⇒ Object
Gets the deletedDateTime property value.
-
#deleted_date_time=(value) ⇒ Object
Sets the deletedDateTime property value.
-
#etag ⇒ Object
Gets the etag property value.
-
#etag=(value) ⇒ Object
Sets the etag property value.
-
#event_detail ⇒ Object
Gets the eventDetail property value.
-
#event_detail=(value) ⇒ Object
Sets the eventDetail property value.
-
#from ⇒ Object
Gets the from property value.
-
#from=(value) ⇒ Object
Sets the from property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#hosted_contents ⇒ Object
Gets the hostedContents property value.
-
#hosted_contents=(value) ⇒ Object
Sets the hostedContents property value.
-
#importance ⇒ Object
Gets the importance property value.
-
#importance=(value) ⇒ Object
Sets the importance property value.
-
#initialize ⇒ Object
constructor
Instantiates a new chatMessage and sets the default values.
-
#last_edited_date_time ⇒ Object
Gets the lastEditedDateTime property value.
-
#last_edited_date_time=(value) ⇒ Object
Sets the lastEditedDateTime property value.
-
#last_modified_date_time ⇒ Object
Gets the lastModifiedDateTime property value.
-
#last_modified_date_time=(value) ⇒ Object
Sets the lastModifiedDateTime property value.
-
#locale ⇒ Object
Gets the locale property value.
-
#locale=(value) ⇒ Object
Sets the locale property value.
-
#mentions ⇒ Object
Gets the mentions property value.
-
#mentions=(value) ⇒ Object
Sets the mentions property value.
-
#message_history ⇒ Object
Gets the messageHistory property value.
-
#message_history=(value) ⇒ Object
Sets the messageHistory property value.
-
#message_type ⇒ Object
Gets the messageType property value.
-
#message_type=(value) ⇒ Object
Sets the messageType property value.
-
#policy_violation ⇒ Object
Gets the policyViolation property value.
-
#policy_violation=(value) ⇒ Object
Sets the policyViolation property value.
-
#reactions ⇒ Object
Gets the reactions property value.
-
#reactions=(value) ⇒ Object
Sets the reactions property value.
-
#replies ⇒ Object
Gets the replies property value.
-
#replies=(value) ⇒ Object
Sets the replies property value.
-
#reply_to_id ⇒ Object
Gets the replyToId property value.
-
#reply_to_id=(value) ⇒ Object
Sets the replyToId property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#subject ⇒ Object
Gets the subject property value.
-
#subject=(value) ⇒ Object
Sets the subject property value.
-
#summary ⇒ Object
Gets the summary property value.
-
#summary=(value) ⇒ Object
Sets the summary property value.
-
#web_url ⇒ Object
Gets the webUrl property value.
-
#web_url=(value) ⇒ Object
Sets the webUrl property value.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new chatMessage and sets the default values.
146 147 148 |
# File 'lib/models/chat_message.rb', line 146 def initialize() super end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
169 170 171 172 |
# File 'lib/models/chat_message.rb', line 169 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return ChatMessage.new end |
Instance Method Details
#attachments ⇒ Object
Gets the attachments property value. References to attached objects like files, tabs, meetings etc.
86 87 88 |
# File 'lib/models/chat_message.rb', line 86 def return end |
#attachments=(value) ⇒ Object
Sets the attachments property value. References to attached objects like files, tabs, meetings etc.
94 95 96 |
# File 'lib/models/chat_message.rb', line 94 def (value) = value end |
#body ⇒ Object
Gets the body property value. The body property
101 102 103 |
# File 'lib/models/chat_message.rb', line 101 def body return @body end |
#body=(value) ⇒ Object
Sets the body property value. The body property
109 110 111 |
# File 'lib/models/chat_message.rb', line 109 def body=(value) @body = value end |
#channel_identity ⇒ Object
Gets the channelIdentity property value. If the message was sent in a channel, represents identity of the channel.
116 117 118 |
# File 'lib/models/chat_message.rb', line 116 def channel_identity return @channel_identity end |
#channel_identity=(value) ⇒ Object
Sets the channelIdentity property value. If the message was sent in a channel, represents identity of the channel.
124 125 126 |
# File 'lib/models/chat_message.rb', line 124 def channel_identity=(value) @channel_identity = value end |
#chat_id ⇒ Object
Gets the chatId property value. If the message was sent in a chat, represents the identity of the chat.
131 132 133 |
# File 'lib/models/chat_message.rb', line 131 def chat_id return @chat_id end |
#chat_id=(value) ⇒ Object
Sets the chatId property value. If the message was sent in a chat, represents the identity of the chat.
139 140 141 |
# File 'lib/models/chat_message.rb', line 139 def chat_id=(value) @chat_id = value end |
#created_date_time ⇒ Object
Gets the createdDateTime property value. Timestamp of when the chat message was created.
153 154 155 |
# File 'lib/models/chat_message.rb', line 153 def created_date_time return @created_date_time end |
#created_date_time=(value) ⇒ Object
Sets the createdDateTime property value. Timestamp of when the chat message was created.
161 162 163 |
# File 'lib/models/chat_message.rb', line 161 def created_date_time=(value) @created_date_time = value end |
#deleted_date_time ⇒ Object
Gets the deletedDateTime property value. Read only. Timestamp at which the chat message was deleted, or null if not deleted.
177 178 179 |
# File 'lib/models/chat_message.rb', line 177 def deleted_date_time return @deleted_date_time end |
#deleted_date_time=(value) ⇒ Object
Sets the deletedDateTime property value. Read only. Timestamp at which the chat message was deleted, or null if not deleted.
185 186 187 |
# File 'lib/models/chat_message.rb', line 185 def deleted_date_time=(value) @deleted_date_time = value end |
#etag ⇒ Object
Gets the etag property value. Read-only. Version number of the chat message.
192 193 194 |
# File 'lib/models/chat_message.rb', line 192 def etag return @etag end |
#etag=(value) ⇒ Object
Sets the etag property value. Read-only. Version number of the chat message.
200 201 202 |
# File 'lib/models/chat_message.rb', line 200 def etag=(value) @etag = value end |
#event_detail ⇒ Object
Gets the eventDetail property value. Read-only. If present, represents details of an event that happened in a chat, a channel, or a team, for example, adding new members. For event messages, the messageType property will be set to systemEventMessage.
207 208 209 |
# File 'lib/models/chat_message.rb', line 207 def event_detail return @event_detail end |
#event_detail=(value) ⇒ Object
Sets the eventDetail property value. Read-only. If present, represents details of an event that happened in a chat, a channel, or a team, for example, adding new members. For event messages, the messageType property will be set to systemEventMessage.
215 216 217 |
# File 'lib/models/chat_message.rb', line 215 def event_detail=(value) @event_detail = value end |
#from ⇒ Object
Gets the from property value. Details of the sender of the chat message. Can only be set during migration.
222 223 224 |
# File 'lib/models/chat_message.rb', line 222 def from return @from end |
#from=(value) ⇒ Object
Sets the from property value. Details of the sender of the chat message. Can only be set during migration.
230 231 232 |
# File 'lib/models/chat_message.rb', line 230 def from=(value) @from = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/models/chat_message.rb', line 237 def get_field_deserializers() return super.merge({ "attachments" => lambda {|n| = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessageAttachment.create_from_discriminator_value(pn) }) }, "body" => lambda {|n| @body = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemBody.create_from_discriminator_value(pn) }) }, "channelIdentity" => lambda {|n| @channel_identity = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ChannelIdentity.create_from_discriminator_value(pn) }) }, "chatId" => lambda {|n| @chat_id = n.get_string_value() }, "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() }, "deletedDateTime" => lambda {|n| @deleted_date_time = n.get_date_time_value() }, "etag" => lambda {|n| @etag = n.get_string_value() }, "eventDetail" => lambda {|n| @event_detail = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::EventMessageDetail.create_from_discriminator_value(pn) }) }, "from" => lambda {|n| @from = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ChatMessageFromIdentitySet.create_from_discriminator_value(pn) }) }, "hostedContents" => lambda {|n| @hosted_contents = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessageHostedContent.create_from_discriminator_value(pn) }) }, "importance" => lambda {|n| @importance = n.get_enum_value(MicrosoftGraph::Models::ChatMessageImportance) }, "lastEditedDateTime" => lambda {|n| @last_edited_date_time = n.get_date_time_value() }, "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() }, "locale" => lambda {|n| @locale = n.get_string_value() }, "mentions" => lambda {|n| @mentions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessageMention.create_from_discriminator_value(pn) }) }, "messageHistory" => lambda {|n| = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessageHistoryItem.create_from_discriminator_value(pn) }) }, "messageType" => lambda {|n| = n.get_enum_value(MicrosoftGraph::Models::ChatMessageType) }, "policyViolation" => lambda {|n| @policy_violation = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ChatMessagePolicyViolation.create_from_discriminator_value(pn) }) }, "reactions" => lambda {|n| @reactions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessageReaction.create_from_discriminator_value(pn) }) }, "replies" => lambda {|n| @replies = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }) }, "replyToId" => lambda {|n| @reply_to_id = n.get_string_value() }, "subject" => lambda {|n| @subject = n.get_string_value() }, "summary" => lambda {|n| @summary = n.get_string_value() }, "webUrl" => lambda {|n| @web_url = n.get_string_value() }, }) end |
#hosted_contents ⇒ Object
Gets the hostedContents property value. Content in a message hosted by Microsoft Teams - for example, images or code snippets.
269 270 271 |
# File 'lib/models/chat_message.rb', line 269 def hosted_contents return @hosted_contents end |
#hosted_contents=(value) ⇒ Object
Sets the hostedContents property value. Content in a message hosted by Microsoft Teams - for example, images or code snippets.
277 278 279 |
# File 'lib/models/chat_message.rb', line 277 def hosted_contents=(value) @hosted_contents = value end |
#importance ⇒ Object
Gets the importance property value. The importance property
284 285 286 |
# File 'lib/models/chat_message.rb', line 284 def importance return @importance end |
#importance=(value) ⇒ Object
Sets the importance property value. The importance property
292 293 294 |
# File 'lib/models/chat_message.rb', line 292 def importance=(value) @importance = value end |
#last_edited_date_time ⇒ Object
Gets the lastEditedDateTime property value. Read only. Timestamp when edits to the chat message were made. Triggers an ‘Edited’ flag in the Teams UI. If no edits are made the value is null.
299 300 301 |
# File 'lib/models/chat_message.rb', line 299 def last_edited_date_time return @last_edited_date_time end |
#last_edited_date_time=(value) ⇒ Object
Sets the lastEditedDateTime property value. Read only. Timestamp when edits to the chat message were made. Triggers an ‘Edited’ flag in the Teams UI. If no edits are made the value is null.
307 308 309 |
# File 'lib/models/chat_message.rb', line 307 def last_edited_date_time=(value) @last_edited_date_time = value end |
#last_modified_date_time ⇒ Object
Gets the lastModifiedDateTime property value. Read only. Timestamp when the chat message is created (initial setting) or modified, including when a reaction is added or removed.
314 315 316 |
# File 'lib/models/chat_message.rb', line 314 def last_modified_date_time return @last_modified_date_time end |
#last_modified_date_time=(value) ⇒ Object
Sets the lastModifiedDateTime property value. Read only. Timestamp when the chat message is created (initial setting) or modified, including when a reaction is added or removed.
322 323 324 |
# File 'lib/models/chat_message.rb', line 322 def last_modified_date_time=(value) @last_modified_date_time = value end |
#locale ⇒ Object
Gets the locale property value. Locale of the chat message set by the client. Always set to en-us.
329 330 331 |
# File 'lib/models/chat_message.rb', line 329 def locale return @locale end |
#locale=(value) ⇒ Object
Sets the locale property value. Locale of the chat message set by the client. Always set to en-us.
337 338 339 |
# File 'lib/models/chat_message.rb', line 337 def locale=(value) @locale = value end |
#mentions ⇒ Object
Gets the mentions property value. List of entities mentioned in the chat message. Supported entities are: user, bot, team, and channel.
344 345 346 |
# File 'lib/models/chat_message.rb', line 344 def mentions return @mentions end |
#mentions=(value) ⇒ Object
Sets the mentions property value. List of entities mentioned in the chat message. Supported entities are: user, bot, team, and channel.
352 353 354 |
# File 'lib/models/chat_message.rb', line 352 def mentions=(value) @mentions = value end |
#message_history ⇒ Object
Gets the messageHistory property value. List of activity history of a message item, including modification time and actions, such as reactionAdded, reactionRemoved, or reaction changes, on the message.
359 360 361 |
# File 'lib/models/chat_message.rb', line 359 def return end |
#message_history=(value) ⇒ Object
Sets the messageHistory property value. List of activity history of a message item, including modification time and actions, such as reactionAdded, reactionRemoved, or reaction changes, on the message.
367 368 369 |
# File 'lib/models/chat_message.rb', line 367 def (value) = value end |
#message_type ⇒ Object
Gets the messageType property value. The messageType property
374 375 376 |
# File 'lib/models/chat_message.rb', line 374 def return end |
#message_type=(value) ⇒ Object
Sets the messageType property value. The messageType property
382 383 384 |
# File 'lib/models/chat_message.rb', line 382 def (value) = value end |
#policy_violation ⇒ Object
Gets the policyViolation property value. Defines the properties of a policy violation set by a data loss prevention (DLP) application.
389 390 391 |
# File 'lib/models/chat_message.rb', line 389 def policy_violation return @policy_violation end |
#policy_violation=(value) ⇒ Object
Sets the policyViolation property value. Defines the properties of a policy violation set by a data loss prevention (DLP) application.
397 398 399 |
# File 'lib/models/chat_message.rb', line 397 def policy_violation=(value) @policy_violation = value end |
#reactions ⇒ Object
Gets the reactions property value. Reactions for this chat message (for example, Like).
404 405 406 |
# File 'lib/models/chat_message.rb', line 404 def reactions return @reactions end |
#reactions=(value) ⇒ Object
Sets the reactions property value. Reactions for this chat message (for example, Like).
412 413 414 |
# File 'lib/models/chat_message.rb', line 412 def reactions=(value) @reactions = value end |
#replies ⇒ Object
Gets the replies property value. Replies for a specified message. Supports $expand for channel messages.
419 420 421 |
# File 'lib/models/chat_message.rb', line 419 def replies return @replies end |
#replies=(value) ⇒ Object
Sets the replies property value. Replies for a specified message. Supports $expand for channel messages.
427 428 429 |
# File 'lib/models/chat_message.rb', line 427 def replies=(value) @replies = value end |
#reply_to_id ⇒ Object
Gets the replyToId property value. Read-only. ID of the parent chat message or root chat message of the thread. (Only applies to chat messages in channels, not chats.)
434 435 436 |
# File 'lib/models/chat_message.rb', line 434 def reply_to_id return @reply_to_id end |
#reply_to_id=(value) ⇒ Object
Sets the replyToId property value. Read-only. ID of the parent chat message or root chat message of the thread. (Only applies to chat messages in channels, not chats.)
442 443 444 |
# File 'lib/models/chat_message.rb', line 442 def reply_to_id=(value) @reply_to_id = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 |
# File 'lib/models/chat_message.rb', line 450 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_collection_of_object_values("attachments", ) writer.write_object_value("body", @body) writer.write_object_value("channelIdentity", @channel_identity) writer.write_string_value("chatId", @chat_id) writer.write_date_time_value("createdDateTime", @created_date_time) writer.write_date_time_value("deletedDateTime", @deleted_date_time) writer.write_string_value("etag", @etag) writer.write_object_value("eventDetail", @event_detail) writer.write_object_value("from", @from) writer.write_collection_of_object_values("hostedContents", @hosted_contents) writer.write_enum_value("importance", @importance) writer.write_date_time_value("lastEditedDateTime", @last_edited_date_time) writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time) writer.write_string_value("locale", @locale) writer.write_collection_of_object_values("mentions", @mentions) writer.write_collection_of_object_values("messageHistory", ) writer.write_enum_value("messageType", ) writer.write_object_value("policyViolation", @policy_violation) writer.write_collection_of_object_values("reactions", @reactions) writer.write_collection_of_object_values("replies", @replies) writer.write_string_value("replyToId", @reply_to_id) writer.write_string_value("subject", @subject) writer.write_string_value("summary", @summary) writer.write_string_value("webUrl", @web_url) end |
#subject ⇒ Object
Gets the subject property value. The subject of the chat message, in plaintext.
482 483 484 |
# File 'lib/models/chat_message.rb', line 482 def subject return @subject end |
#subject=(value) ⇒ Object
Sets the subject property value. The subject of the chat message, in plaintext.
490 491 492 |
# File 'lib/models/chat_message.rb', line 490 def subject=(value) @subject = value end |
#summary ⇒ Object
Gets the summary property value. Summary text of the chat message that could be used for push notifications and summary views or fall back views. Only applies to channel chat messages, not chat messages in a chat.
497 498 499 |
# File 'lib/models/chat_message.rb', line 497 def summary return @summary end |
#summary=(value) ⇒ Object
Sets the summary property value. Summary text of the chat message that could be used for push notifications and summary views or fall back views. Only applies to channel chat messages, not chat messages in a chat.
505 506 507 |
# File 'lib/models/chat_message.rb', line 505 def summary=(value) @summary = value end |
#web_url ⇒ Object
Gets the webUrl property value. Read-only. Link to the message in Microsoft Teams.
512 513 514 |
# File 'lib/models/chat_message.rb', line 512 def web_url return @web_url end |
#web_url=(value) ⇒ Object
Sets the webUrl property value. Read-only. Link to the message in Microsoft Teams.
520 521 522 |
# File 'lib/models/chat_message.rb', line 520 def web_url=(value) @web_url = value end |