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

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a chat

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

Returns:

  • a chat_type



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

Parameters:

  • value

    Value to set for the chatType property.

Returns:

  • a void



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.

Returns:

  • a date_time



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.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



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

Returns:

  • a i_dictionary



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.

Returns:

  • a teams_app_installation



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.

Parameters:

  • value

    Value to set for the installedApps property.

Returns:

  • a void



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.

Returns:

  • a chat_message_info



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.

Parameters:

  • value

    Value to set for the lastMessagePreview property.

Returns:

  • a void



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.

Returns:

  • a date_time



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.

Parameters:

  • value

    Value to set for the lastUpdatedDateTime property.

Returns:

  • a void



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.

Returns:

  • a conversation_member



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.

Parameters:

  • value

    Value to set for the members property.

Returns:

  • a void



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.

Returns:

  • a chat_message



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.

Parameters:

  • value

    Value to set for the messages property.

Returns:

  • a void



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.

Returns:

  • a teamwork_online_meeting_info



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.

Parameters:

  • value

    Value to set for the onlineMeetingInfo property.

Returns:

  • a void



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

Returns:

  • a resource_specific_permission_grant



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

Parameters:

  • value

    Value to set for the permissionGrants property.

Returns:

  • a void



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.

Returns:

  • a pinned_chat_message_info



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.

Parameters:

  • value

    Value to set for the pinnedMessages property.

Returns:

  • a void



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

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

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.

Returns:

  • a teams_tab



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.

Parameters:

  • value

    Value to set for the tabs property.

Returns:

  • a void



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.

Returns:

  • a string



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.

Parameters:

  • value

    Value to set for the tenantId property.

Returns:

  • a void



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.

Returns:

  • a string



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.

Parameters:

  • value

    Value to set for the topic property.

Returns:

  • a void



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.

Returns:

  • a chat_viewpoint



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.

Parameters:

  • value

    Value to set for the viewpoint property.

Returns:

  • a void



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.

Returns:

  • a string



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.

Parameters:

  • value

    Value to set for the webUrl property.

Returns:

  • a void



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

def web_url=(value)
    @web_url = value
end