Class: MicrosoftGraph::Models::Conversation

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



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

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 conversation

Raises:

  • (StandardError)


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

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



48
49
50
51
52
53
54
55
56
57
# File 'lib/models/conversation.rb', line 48

def get_field_deserializers()
    return super.merge({
        "hasAttachments" => lambda {|n| @has_attachments = n.get_boolean_value() },
        "lastDeliveredDateTime" => lambda {|n| @last_delivered_date_time = n.get_date_time_value() },
        "preview" => lambda {|n| @preview = n.get_string_value() },
        "threads" => lambda {|n| @threads = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ConversationThread.create_from_discriminator_value(pn) }) },
        "topic" => lambda {|n| @topic = n.get_string_value() },
        "uniqueSenders" => lambda {|n| @unique_senders = n.get_collection_of_primitive_values(String) },
    })
end

#has_attachmentsObject

Gets the hasAttachments property value. Indicates whether any of the posts within this Conversation has at least one attachment. Supports $filter (eq, ne) and $search.

Returns:

  • a boolean



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

def has_attachments
    return @has_attachments
end

#has_attachments=(value) ⇒ Object

Sets the hasAttachments property value. Indicates whether any of the posts within this Conversation has at least one attachment. Supports $filter (eq, ne) and $search.

Parameters:

  • value

    Value to set for the hasAttachments property.

Returns:

  • a void



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

def has_attachments=(value)
    @has_attachments = value
end

#last_delivered_date_timeObject

Gets the lastDeliveredDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z

Returns:

  • a date_time



77
78
79
# File 'lib/models/conversation.rb', line 77

def last_delivered_date_time
    return @last_delivered_date_time
end

#last_delivered_date_time=(value) ⇒ Object

Sets the lastDeliveredDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z

Parameters:

  • value

    Value to set for the lastDeliveredDateTime property.

Returns:

  • a void



85
86
87
# File 'lib/models/conversation.rb', line 85

def last_delivered_date_time=(value)
    @last_delivered_date_time = value
end

#previewObject

Gets the preview property value. A short summary from the body of the latest post in this conversation. Supports $filter (eq, ne, le, ge).

Returns:

  • a string



92
93
94
# File 'lib/models/conversation.rb', line 92

def preview
    return @preview
end

#preview=(value) ⇒ Object

Sets the preview property value. A short summary from the body of the latest post in this conversation. Supports $filter (eq, ne, le, ge).

Parameters:

  • value

    Value to set for the preview property.

Returns:

  • a void



100
101
102
# File 'lib/models/conversation.rb', line 100

def preview=(value)
    @preview = 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)


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

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_boolean_value("hasAttachments", @has_attachments)
    writer.write_date_time_value("lastDeliveredDateTime", @last_delivered_date_time)
    writer.write_string_value("preview", @preview)
    writer.write_collection_of_object_values("threads", @threads)
    writer.write_string_value("topic", @topic)
    writer.write_collection_of_primitive_values("uniqueSenders", @unique_senders)
end

#threadsObject

Gets the threads property value. A collection of all the conversation threads in the conversation. A navigation property. Read-only. Nullable.

Returns:

  • a conversation_thread



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

def threads
    return @threads
end

#threads=(value) ⇒ Object

Sets the threads property value. A collection of all the conversation threads in the conversation. A navigation property. Read-only. Nullable.

Parameters:

  • value

    Value to set for the threads property.

Returns:

  • a void



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

def threads=(value)
    @threads = value
end

#topicObject

Gets the topic property value. The topic of the conversation. This property can be set when the conversation is created, but it cannot be updated.

Returns:

  • a string



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

def topic
    return @topic
end

#topic=(value) ⇒ Object

Sets the topic property value. The topic of the conversation. This property can be set when the conversation is created, but it cannot be updated.

Parameters:

  • value

    Value to set for the topic property.

Returns:

  • a void



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

def topic=(value)
    @topic = value
end

#unique_sendersObject

Gets the uniqueSenders property value. All the users that sent a message to this Conversation.

Returns:

  • a string



152
153
154
# File 'lib/models/conversation.rb', line 152

def unique_senders
    return @unique_senders
end

#unique_senders=(value) ⇒ Object

Sets the uniqueSenders property value. All the users that sent a message to this Conversation.

Parameters:

  • value

    Value to set for the uniqueSenders property.

Returns:

  • a void



160
161
162
# File 'lib/models/conversation.rb', line 160

def unique_senders=(value)
    @unique_senders = value
end