Class: MicrosoftGraph::Models::ChatMessageInfo

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/chat_message_info.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new chatMessageInfo and sets the default values.



47
48
49
# File 'lib/models/chat_message_info.rb', line 47

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

Raises:

  • (StandardError)


70
71
72
73
# File 'lib/models/chat_message_info.rb', line 70

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return ChatMessageInfo.new
end

Instance Method Details

#bodyObject

Gets the body property value. Body of the chatMessage. This will still contain markers for @mentions and attachments even though the object does not return @mentions and attachments.



32
33
34
# File 'lib/models/chat_message_info.rb', line 32

def body
    return @body
end

#body=(value) ⇒ Object

Sets the body property value. Body of the chatMessage. This will still contain markers for @mentions and attachments even though the object does not return @mentions and attachments.



40
41
42
# File 'lib/models/chat_message_info.rb', line 40

def body=(value)
    @body = value
end

#created_date_timeObject

Gets the createdDateTime property value. Date time object representing the time at which message was created.



54
55
56
# File 'lib/models/chat_message_info.rb', line 54

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. Date time object representing the time at which message was created.



62
63
64
# File 'lib/models/chat_message_info.rb', line 62

def created_date_time=(value)
    @created_date_time = value
end

#event_detailObject

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, members were added, and so on. For event messages, the messageType property will be set to systemEventMessage.



78
79
80
# File 'lib/models/chat_message_info.rb', line 78

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, members were added, and so on. For event messages, the messageType property will be set to systemEventMessage.



86
87
88
# File 'lib/models/chat_message_info.rb', line 86

def event_detail=(value)
    @event_detail = value
end

#fromObject

Gets the from property value. Information about the sender of the message.



93
94
95
# File 'lib/models/chat_message_info.rb', line 93

def from
    return @from
end

#from=(value) ⇒ Object

Sets the from property value. Information about the sender of the message.



101
102
103
# File 'lib/models/chat_message_info.rb', line 101

def from=(value)
    @from = value
end

#get_field_deserializersObject

The deserialization information for the current model



108
109
110
111
112
113
114
115
116
117
# File 'lib/models/chat_message_info.rb', line 108

def get_field_deserializers()
    return super.merge({
        "body" => lambda {|n| @body = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemBody.create_from_discriminator_value(pn) }) },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_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) }) },
        "isDeleted" => lambda {|n| @is_deleted = n.get_boolean_value() },
        "messageType" => lambda {|n| @message_type = n.get_enum_value(MicrosoftGraph::Models::ChatMessageType) },
    })
end

#is_deletedObject

Gets the isDeleted property value. If set to true, the original message has been deleted.



122
123
124
# File 'lib/models/chat_message_info.rb', line 122

def is_deleted
    return @is_deleted
end

#is_deleted=(value) ⇒ Object

Sets the isDeleted property value. If set to true, the original message has been deleted.



130
131
132
# File 'lib/models/chat_message_info.rb', line 130

def is_deleted=(value)
    @is_deleted = value
end

#message_typeObject

Gets the messageType property value. The messageType property



137
138
139
# File 'lib/models/chat_message_info.rb', line 137

def message_type
    return @message_type
end

#message_type=(value) ⇒ Object

Sets the messageType property value. The messageType property



145
146
147
# File 'lib/models/chat_message_info.rb', line 145

def message_type=(value)
    @message_type = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Raises:

  • (StandardError)


153
154
155
156
157
158
159
160
161
162
# File 'lib/models/chat_message_info.rb', line 153

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("body", @body)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_object_value("eventDetail", @event_detail)
    writer.write_object_value("from", @from)
    writer.write_boolean_value("isDeleted", @is_deleted)
    writer.write_enum_value("messageType", @message_type)
end