Class: MicrosoftGraph::Models::Post

Inherits:
OutlookItem show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/post.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from OutlookItem

#categories, #categories=, #change_key, #change_key=, #created_date_time, #created_date_time=, #last_modified_date_time, #last_modified_date_time=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new post and sets the default values.



83
84
85
86
# File 'lib/models/post.rb', line 83

def initialize()
    super
    @odata_type = "#microsoft.graph.post"
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 post

Raises:

  • (StandardError)


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

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

Instance Method Details

#attachmentsObject

Gets the attachments property value. Read-only. Nullable. Supports $expand.

Returns:

  • a attachment



53
54
55
# File 'lib/models/post.rb', line 53

def attachments
    return @attachments
end

#attachments=(value) ⇒ Object

Sets the attachments property value. Read-only. Nullable. Supports $expand.

Parameters:

  • value

    Value to set for the attachments property.

Returns:

  • a void



61
62
63
# File 'lib/models/post.rb', line 61

def attachments=(value)
    @attachments = value
end

#bodyObject

Gets the body property value. The contents of the post. This is a default property. This property can be null.

Returns:

  • a item_body



68
69
70
# File 'lib/models/post.rb', line 68

def body
    return @body
end

#body=(value) ⇒ Object

Sets the body property value. The contents of the post. This is a default property. This property can be null.

Parameters:

  • value

    Value to set for the body property.

Returns:

  • a void



76
77
78
# File 'lib/models/post.rb', line 76

def body=(value)
    @body = value
end

#conversation_idObject

Gets the conversationId property value. Unique ID of the conversation. Read-only.

Returns:

  • a string



91
92
93
# File 'lib/models/post.rb', line 91

def conversation_id
    return @conversation_id
end

#conversation_id=(value) ⇒ Object

Sets the conversationId property value. Unique ID of the conversation. Read-only.

Parameters:

  • value

    Value to set for the conversationId property.

Returns:

  • a void



99
100
101
# File 'lib/models/post.rb', line 99

def conversation_id=(value)
    @conversation_id = value
end

#conversation_thread_idObject

Gets the conversationThreadId property value. Unique ID of the conversation thread. Read-only.

Returns:

  • a string



106
107
108
# File 'lib/models/post.rb', line 106

def conversation_thread_id
    return @conversation_thread_id
end

#conversation_thread_id=(value) ⇒ Object

Sets the conversationThreadId property value. Unique ID of the conversation thread. Read-only.

Parameters:

  • value

    Value to set for the conversationThreadId property.

Returns:

  • a void



114
115
116
# File 'lib/models/post.rb', line 114

def conversation_thread_id=(value)
    @conversation_thread_id = value
end

#extensionsObject

Gets the extensions property value. The collection of open extensions defined for the post. Read-only. Nullable. Supports $expand.

Returns:

  • a extension



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

def extensions
    return @extensions
end

#extensions=(value) ⇒ Object

Sets the extensions property value. The collection of open extensions defined for the post. Read-only. Nullable. Supports $expand.

Parameters:

  • value

    Value to set for the extensions property.

Returns:

  • a void



138
139
140
# File 'lib/models/post.rb', line 138

def extensions=(value)
    @extensions = value
end

#fromObject

Gets the from property value. The from property

Returns:

  • a recipient



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

def from
    return @from
end

#from=(value) ⇒ Object

Sets the from property value. The from property

Parameters:

  • value

    Value to set for the from property.

Returns:

  • a void



153
154
155
# File 'lib/models/post.rb', line 153

def from=(value)
    @from = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/models/post.rb', line 160

def get_field_deserializers()
    return super.merge({
        "attachments" => lambda {|n| @attachments = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Attachment.create_from_discriminator_value(pn) }) },
        "body" => lambda {|n| @body = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemBody.create_from_discriminator_value(pn) }) },
        "conversationId" => lambda {|n| @conversation_id = n.get_string_value() },
        "conversationThreadId" => lambda {|n| @conversation_thread_id = n.get_string_value() },
        "extensions" => lambda {|n| @extensions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Extension.create_from_discriminator_value(pn) }) },
        "from" => lambda {|n| @from = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Recipient.create_from_discriminator_value(pn) }) },
        "hasAttachments" => lambda {|n| @has_attachments = n.get_boolean_value() },
        "inReplyTo" => lambda {|n| @in_reply_to = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Post.create_from_discriminator_value(pn) }) },
        "multiValueExtendedProperties" => lambda {|n| @multi_value_extended_properties = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::MultiValueLegacyExtendedProperty.create_from_discriminator_value(pn) }) },
        "newParticipants" => lambda {|n| @new_participants = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Recipient.create_from_discriminator_value(pn) }) },
        "receivedDateTime" => lambda {|n| @received_date_time = n.get_date_time_value() },
        "sender" => lambda {|n| @sender = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Recipient.create_from_discriminator_value(pn) }) },
        "singleValueExtendedProperties" => lambda {|n| @single_value_extended_properties = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SingleValueLegacyExtendedProperty.create_from_discriminator_value(pn) }) },
    })
end

#has_attachmentsObject

Gets the hasAttachments property value. Indicates whether the post has at least one attachment. This is a default property.

Returns:

  • a boolean



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

def has_attachments
    return @has_attachments
end

#has_attachments=(value) ⇒ Object

Sets the hasAttachments property value. Indicates whether the post has at least one attachment. This is a default property.

Parameters:

  • value

    Value to set for the hasAttachments property.

Returns:

  • a void



189
190
191
# File 'lib/models/post.rb', line 189

def has_attachments=(value)
    @has_attachments = value
end

#in_reply_toObject

Gets the inReplyTo property value. Read-only. Supports $expand.

Returns:

  • a post



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

def in_reply_to
    return @in_reply_to
end

#in_reply_to=(value) ⇒ Object

Sets the inReplyTo property value. Read-only. Supports $expand.

Parameters:

  • value

    Value to set for the inReplyTo property.

Returns:

  • a void



204
205
206
# File 'lib/models/post.rb', line 204

def in_reply_to=(value)
    @in_reply_to = value
end

#multi_value_extended_propertiesObject

Gets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the post. Read-only. Nullable.

Returns:

  • a multi_value_legacy_extended_property



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

def multi_value_extended_properties
    return @multi_value_extended_properties
end

#multi_value_extended_properties=(value) ⇒ Object

Sets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the post. Read-only. Nullable.

Parameters:

  • value

    Value to set for the multiValueExtendedProperties property.

Returns:

  • a void



219
220
221
# File 'lib/models/post.rb', line 219

def multi_value_extended_properties=(value)
    @multi_value_extended_properties = value
end

#new_participantsObject

Gets the newParticipants property value. Conversation participants that were added to the thread as part of this post.

Returns:

  • a recipient



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

def new_participants
    return @new_participants
end

#new_participants=(value) ⇒ Object

Sets the newParticipants property value. Conversation participants that were added to the thread as part of this post.

Parameters:

  • value

    Value to set for the newParticipants property.

Returns:

  • a void



234
235
236
# File 'lib/models/post.rb', line 234

def new_participants=(value)
    @new_participants = value
end

#received_date_timeObject

Gets the receivedDateTime property value. Specifies when the post was received. The DateTimeOffset 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



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

def received_date_time
    return @received_date_time
end

#received_date_time=(value) ⇒ Object

Sets the receivedDateTime property value. Specifies when the post was received. The DateTimeOffset 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 receivedDateTime property.

Returns:

  • a void



249
250
251
# File 'lib/models/post.rb', line 249

def received_date_time=(value)
    @received_date_time = value
end

#senderObject

Gets the sender property value. Contains the address of the sender. The value of Sender is assumed to be the address of the authenticated user in the case when Sender is not specified. This is a default property.

Returns:

  • a recipient



256
257
258
# File 'lib/models/post.rb', line 256

def sender
    return @sender
end

#sender=(value) ⇒ Object

Sets the sender property value. Contains the address of the sender. The value of Sender is assumed to be the address of the authenticated user in the case when Sender is not specified. This is a default property.

Parameters:

  • value

    Value to set for the sender property.

Returns:

  • a void



264
265
266
# File 'lib/models/post.rb', line 264

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


272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# File 'lib/models/post.rb', line 272

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_string_value("conversationId", @conversation_id)
    writer.write_string_value("conversationThreadId", @conversation_thread_id)
    writer.write_collection_of_object_values("extensions", @extensions)
    writer.write_object_value("from", @from)
    writer.write_boolean_value("hasAttachments", @has_attachments)
    writer.write_object_value("inReplyTo", @in_reply_to)
    writer.write_collection_of_object_values("multiValueExtendedProperties", @multi_value_extended_properties)
    writer.write_collection_of_object_values("newParticipants", @new_participants)
    writer.write_date_time_value("receivedDateTime", @received_date_time)
    writer.write_object_value("sender", @sender)
    writer.write_collection_of_object_values("singleValueExtendedProperties", @single_value_extended_properties)
end

#single_value_extended_propertiesObject

Gets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the post. Read-only. Nullable.

Returns:

  • a single_value_legacy_extended_property



293
294
295
# File 'lib/models/post.rb', line 293

def single_value_extended_properties
    return @single_value_extended_properties
end

#single_value_extended_properties=(value) ⇒ Object

Sets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the post. Read-only. Nullable.

Parameters:

  • value

    Value to set for the singleValueExtendedProperties property.

Returns:

  • a void



301
302
303
# File 'lib/models/post.rb', line 301

def single_value_extended_properties=(value)
    @single_value_extended_properties = value
end