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_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.
143 144 145 |
# File 'lib/models/chat_message.rb', line 143 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
166 167 168 169 |
# File 'lib/models/chat_message.rb', line 166 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.
83 84 85 |
# File 'lib/models/chat_message.rb', line 83 def return @attachments end |
#attachments=(value) ⇒ Object
Sets the attachments property value. References to attached objects like files, tabs, meetings etc.
91 92 93 |
# File 'lib/models/chat_message.rb', line 91 def (value) @attachments = value end |
#body ⇒ Object
Gets the body property value. The body property
98 99 100 |
# File 'lib/models/chat_message.rb', line 98 def body return @body end |
#body=(value) ⇒ Object
Sets the body property value. The body property
106 107 108 |
# File 'lib/models/chat_message.rb', line 106 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.
113 114 115 |
# File 'lib/models/chat_message.rb', line 113 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.
121 122 123 |
# File 'lib/models/chat_message.rb', line 121 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.
128 129 130 |
# File 'lib/models/chat_message.rb', line 128 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.
136 137 138 |
# File 'lib/models/chat_message.rb', line 136 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.
150 151 152 |
# File 'lib/models/chat_message.rb', line 150 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.
158 159 160 |
# File 'lib/models/chat_message.rb', line 158 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.
174 175 176 |
# File 'lib/models/chat_message.rb', line 174 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.
182 183 184 |
# File 'lib/models/chat_message.rb', line 182 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.
189 190 191 |
# File 'lib/models/chat_message.rb', line 189 def etag return @etag end |
#etag=(value) ⇒ Object
Sets the etag property value. Read-only. Version number of the chat message.
197 198 199 |
# File 'lib/models/chat_message.rb', line 197 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.
204 205 206 |
# File 'lib/models/chat_message.rb', line 204 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.
212 213 214 |
# File 'lib/models/chat_message.rb', line 212 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.
219 220 221 |
# File 'lib/models/chat_message.rb', line 219 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.
227 228 229 |
# File 'lib/models/chat_message.rb', line 227 def from=(value) @from = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/models/chat_message.rb', line 234 def get_field_deserializers() return super.merge({ "attachments" => lambda {|n| @attachments = 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) }) }, "messageType" => lambda {|n| @message_type = 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.
265 266 267 |
# File 'lib/models/chat_message.rb', line 265 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.
273 274 275 |
# File 'lib/models/chat_message.rb', line 273 def hosted_contents=(value) @hosted_contents = value end |
#importance ⇒ Object
Gets the importance property value. The importance property
280 281 282 |
# File 'lib/models/chat_message.rb', line 280 def importance return @importance end |
#importance=(value) ⇒ Object
Sets the importance property value. The importance property
288 289 290 |
# File 'lib/models/chat_message.rb', line 288 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.
295 296 297 |
# File 'lib/models/chat_message.rb', line 295 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.
303 304 305 |
# File 'lib/models/chat_message.rb', line 303 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.
310 311 312 |
# File 'lib/models/chat_message.rb', line 310 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.
318 319 320 |
# File 'lib/models/chat_message.rb', line 318 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.
325 326 327 |
# File 'lib/models/chat_message.rb', line 325 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.
333 334 335 |
# File 'lib/models/chat_message.rb', line 333 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.
340 341 342 |
# File 'lib/models/chat_message.rb', line 340 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.
348 349 350 |
# File 'lib/models/chat_message.rb', line 348 def mentions=(value) @mentions = value end |
#message_type ⇒ Object
Gets the messageType property value. The messageType property
355 356 357 |
# File 'lib/models/chat_message.rb', line 355 def return @message_type end |
#message_type=(value) ⇒ Object
Sets the messageType property value. The messageType property
363 364 365 |
# File 'lib/models/chat_message.rb', line 363 def (value) @message_type = 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.
370 371 372 |
# File 'lib/models/chat_message.rb', line 370 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.
378 379 380 |
# File 'lib/models/chat_message.rb', line 378 def policy_violation=(value) @policy_violation = value end |
#reactions ⇒ Object
Gets the reactions property value. Reactions for this chat message (for example, Like).
385 386 387 |
# File 'lib/models/chat_message.rb', line 385 def reactions return @reactions end |
#reactions=(value) ⇒ Object
Sets the reactions property value. Reactions for this chat message (for example, Like).
393 394 395 |
# File 'lib/models/chat_message.rb', line 393 def reactions=(value) @reactions = value end |
#replies ⇒ Object
Gets the replies property value. Replies for a specified message. Supports $expand for channel messages.
400 401 402 |
# File 'lib/models/chat_message.rb', line 400 def replies return @replies end |
#replies=(value) ⇒ Object
Sets the replies property value. Replies for a specified message. Supports $expand for channel messages.
408 409 410 |
# File 'lib/models/chat_message.rb', line 408 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.)
415 416 417 |
# File 'lib/models/chat_message.rb', line 415 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.)
423 424 425 |
# File 'lib/models/chat_message.rb', line 423 def reply_to_id=(value) @reply_to_id = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 |
# File 'lib/models/chat_message.rb', line 431 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_collection_of_object_values("attachments", @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_enum_value("messageType", @message_type) 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.
462 463 464 |
# File 'lib/models/chat_message.rb', line 462 def subject return @subject end |
#subject=(value) ⇒ Object
Sets the subject property value. The subject of the chat message, in plaintext.
470 471 472 |
# File 'lib/models/chat_message.rb', line 470 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.
477 478 479 |
# File 'lib/models/chat_message.rb', line 477 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.
485 486 487 |
# File 'lib/models/chat_message.rb', line 485 def summary=(value) @summary = value end |
#web_url ⇒ Object
Gets the webUrl property value. Read-only. Link to the message in Microsoft Teams.
492 493 494 |
# File 'lib/models/chat_message.rb', line 492 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.
500 501 502 |
# File 'lib/models/chat_message.rb', line 500 def web_url=(value) @web_url = value end |