Class: MicrosoftGraph::Models::Chat

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/chat.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 chat and sets the default values.



74
75
76
# File 'lib/models/chat.rb', line 74

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)


97
98
99
100
# File 'lib/models/chat.rb', line 97

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

Instance Method Details

#chat_typeObject

Gets the chatType property value. The chatType property



59
60
61
# File 'lib/models/chat.rb', line 59

def chat_type
    return @chat_type
end

#chat_type=(value) ⇒ Object

Sets the chatType property value. The chatType property



67
68
69
# File 'lib/models/chat.rb', line 67

def chat_type=(value)
    @chat_type = value
end

#created_date_timeObject

Gets the createdDateTime property value. Date and time at which the chat was created. Read-only.



81
82
83
# File 'lib/models/chat.rb', line 81

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. Date and time at which the chat was created. Read-only.



89
90
91
# File 'lib/models/chat.rb', line 89

def created_date_time=(value)
    @created_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/models/chat.rb', line 105

def get_field_deserializers()
    return super.merge({
        "chatType" => lambda {|n| @chat_type = n.get_enum_value(MicrosoftGraph::Models::ChatType) },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "installedApps" => lambda {|n| @installed_apps = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::TeamsAppInstallation.create_from_discriminator_value(pn) }) },
        "lastMessagePreview" => lambda {|n| @last_message_preview = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ChatMessageInfo.create_from_discriminator_value(pn) }) },
        "lastUpdatedDateTime" => lambda {|n| @last_updated_date_time = n.get_date_time_value() },
        "members" => lambda {|n| @members = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ConversationMember.create_from_discriminator_value(pn) }) },
        "messages" => lambda {|n| @messages = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }) },
        "onlineMeetingInfo" => lambda {|n| @online_meeting_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TeamworkOnlineMeetingInfo.create_from_discriminator_value(pn) }) },
        "permissionGrants" => lambda {|n| @permission_grants = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ResourceSpecificPermissionGrant.create_from_discriminator_value(pn) }) },
        "pinnedMessages" => lambda {|n| @pinned_messages = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PinnedChatMessageInfo.create_from_discriminator_value(pn) }) },
        "tabs" => lambda {|n| @tabs = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::TeamsTab.create_from_discriminator_value(pn) }) },
        "tenantId" => lambda {|n| @tenant_id = n.get_string_value() },
        "topic" => lambda {|n| @topic = n.get_string_value() },
        "viewpoint" => lambda {|n| @viewpoint = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ChatViewpoint.create_from_discriminator_value(pn) }) },
        "webUrl" => lambda {|n| @web_url = n.get_string_value() },
    })
end

#installed_appsObject

Gets the installedApps property value. A collection of all the apps in the chat. Nullable.



128
129
130
# File 'lib/models/chat.rb', line 128

def installed_apps
    return @installed_apps
end

#installed_apps=(value) ⇒ Object

Sets the installedApps property value. A collection of all the apps in the chat. Nullable.



136
137
138
# File 'lib/models/chat.rb', line 136

def installed_apps=(value)
    @installed_apps = value
end

#last_message_previewObject

Gets the lastMessagePreview property value. Preview of the last message sent in the chat. Null if no messages have been sent in the chat. Currently, only the list chats operation supports this property.



143
144
145
# File 'lib/models/chat.rb', line 143

def last_message_preview
    return @last_message_preview
end

#last_message_preview=(value) ⇒ Object

Sets the lastMessagePreview property value. Preview of the last message sent in the chat. Null if no messages have been sent in the chat. Currently, only the list chats operation supports this property.



151
152
153
# File 'lib/models/chat.rb', line 151

def last_message_preview=(value)
    @last_message_preview = value
end

#last_updated_date_timeObject

Gets the lastUpdatedDateTime property value. Date and time at which the chat was renamed or list of members were last changed. Read-only.



158
159
160
# File 'lib/models/chat.rb', line 158

def last_updated_date_time
    return @last_updated_date_time
end

#last_updated_date_time=(value) ⇒ Object

Sets the lastUpdatedDateTime property value. Date and time at which the chat was renamed or list of members were last changed. Read-only.



166
167
168
# File 'lib/models/chat.rb', line 166

def last_updated_date_time=(value)
    @last_updated_date_time = value
end

#membersObject

Gets the members property value. A collection of all the members in the chat. Nullable.



173
174
175
# File 'lib/models/chat.rb', line 173

def members
    return @members
end

#members=(value) ⇒ Object

Sets the members property value. A collection of all the members in the chat. Nullable.



181
182
183
# File 'lib/models/chat.rb', line 181

def members=(value)
    @members = value
end

#messagesObject

Gets the messages property value. A collection of all the messages in the chat. Nullable.



188
189
190
# File 'lib/models/chat.rb', line 188

def messages
    return @messages
end

#messages=(value) ⇒ Object

Sets the messages property value. A collection of all the messages in the chat. Nullable.



196
197
198
# File 'lib/models/chat.rb', line 196

def messages=(value)
    @messages = value
end

#online_meeting_infoObject

Gets the onlineMeetingInfo property value. Represents details about an online meeting. If the chat isn’t associated with an online meeting, the property is empty. Read-only.



203
204
205
# File 'lib/models/chat.rb', line 203

def online_meeting_info
    return @online_meeting_info
end

#online_meeting_info=(value) ⇒ Object

Sets the onlineMeetingInfo property value. Represents details about an online meeting. If the chat isn’t associated with an online meeting, the property is empty. Read-only.



211
212
213
# File 'lib/models/chat.rb', line 211

def online_meeting_info=(value)
    @online_meeting_info = value
end

#permission_grantsObject

Gets the permissionGrants property value. The permissionGrants property



218
219
220
# File 'lib/models/chat.rb', line 218

def permission_grants
    return @permission_grants
end

#permission_grants=(value) ⇒ Object

Sets the permissionGrants property value. The permissionGrants property



226
227
228
# File 'lib/models/chat.rb', line 226

def permission_grants=(value)
    @permission_grants = value
end

#pinned_messagesObject

Gets the pinnedMessages property value. A collection of all the pinned messages in the chat. Nullable.



233
234
235
# File 'lib/models/chat.rb', line 233

def pinned_messages
    return @pinned_messages
end

#pinned_messages=(value) ⇒ Object

Sets the pinnedMessages property value. A collection of all the pinned messages in the chat. Nullable.



241
242
243
# File 'lib/models/chat.rb', line 241

def pinned_messages=(value)
    @pinned_messages = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Raises:

  • (StandardError)


249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/models/chat.rb', line 249

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_enum_value("chatType", @chat_type)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_collection_of_object_values("installedApps", @installed_apps)
    writer.write_object_value("lastMessagePreview", @last_message_preview)
    writer.write_date_time_value("lastUpdatedDateTime", @last_updated_date_time)
    writer.write_collection_of_object_values("members", @members)
    writer.write_collection_of_object_values("messages", @messages)
    writer.write_object_value("onlineMeetingInfo", @online_meeting_info)
    writer.write_collection_of_object_values("permissionGrants", @permission_grants)
    writer.write_collection_of_object_values("pinnedMessages", @pinned_messages)
    writer.write_collection_of_object_values("tabs", @tabs)
    writer.write_string_value("tenantId", @tenant_id)
    writer.write_string_value("topic", @topic)
    writer.write_object_value("viewpoint", @viewpoint)
    writer.write_string_value("webUrl", @web_url)
end

#tabsObject

Gets the tabs property value. A collection of all the tabs in the chat. Nullable.



272
273
274
# File 'lib/models/chat.rb', line 272

def tabs
    return @tabs
end

#tabs=(value) ⇒ Object

Sets the tabs property value. A collection of all the tabs in the chat. Nullable.



280
281
282
# File 'lib/models/chat.rb', line 280

def tabs=(value)
    @tabs = value
end

#tenant_idObject

Gets the tenantId property value. The identifier of the tenant in which the chat was created. Read-only.



287
288
289
# File 'lib/models/chat.rb', line 287

def tenant_id
    return @tenant_id
end

#tenant_id=(value) ⇒ Object

Sets the tenantId property value. The identifier of the tenant in which the chat was created. Read-only.



295
296
297
# File 'lib/models/chat.rb', line 295

def tenant_id=(value)
    @tenant_id = value
end

#topicObject

Gets the topic property value. (Optional) Subject or topic for the chat. Only available for group chats.



302
303
304
# File 'lib/models/chat.rb', line 302

def topic
    return @topic
end

#topic=(value) ⇒ Object

Sets the topic property value. (Optional) Subject or topic for the chat. Only available for group chats.



310
311
312
# File 'lib/models/chat.rb', line 310

def topic=(value)
    @topic = value
end

#viewpointObject

Gets the viewpoint property value. Represents caller-specific information about the chat, such as last message read date and time. This property is populated only when the request is made in a delegated context.



317
318
319
# File 'lib/models/chat.rb', line 317

def viewpoint
    return @viewpoint
end

#viewpoint=(value) ⇒ Object

Sets the viewpoint property value. Represents caller-specific information about the chat, such as last message read date and time. This property is populated only when the request is made in a delegated context.



325
326
327
# File 'lib/models/chat.rb', line 325

def viewpoint=(value)
    @viewpoint = value
end

#web_urlObject

Gets the webUrl property value. The URL for the chat in Microsoft Teams. The URL should be treated as an opaque blob, and not parsed. Read-only.



332
333
334
# File 'lib/models/chat.rb', line 332

def web_url
    return @web_url
end

#web_url=(value) ⇒ Object

Sets the webUrl property value. The URL for the chat in Microsoft Teams. The URL should be treated as an opaque blob, and not parsed. Read-only.



340
341
342
# File 'lib/models/chat.rb', line 340

def web_url=(value)
    @web_url = value
end