Class: MicrosoftGraph::Models::OutlookItem

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

Direct Known Subclasses

Contact, Event, Message, Post

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 outlookItem and sets the default values.



56
57
58
# File 'lib/models/outlook_item.rb', line 56

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 outlook_item

Raises:

  • (StandardError)


79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/models/outlook_item.rb', line 79

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    mapping_value_node = parse_node.get_child_node("@odata.type")
    unless mapping_value_node.nil? then
        mapping_value = mapping_value_node.get_string_value
        case mapping_value
            when "#microsoft.graph.calendarSharingMessage"
                return CalendarSharingMessage.new
            when "#microsoft.graph.contact"
                return Contact.new
            when "#microsoft.graph.event"
                return Event.new
            when "#microsoft.graph.eventMessage"
                return EventMessage.new
            when "#microsoft.graph.eventMessageRequest"
                return EventMessageRequest.new
            when "#microsoft.graph.eventMessageResponse"
                return EventMessageResponse.new
            when "#microsoft.graph.message"
                return Message.new
            when "#microsoft.graph.post"
                return Post.new
        end
    end
    return OutlookItem.new
end

Instance Method Details

#categoriesObject

Gets the categories property value. The categories associated with the item

Returns:

  • a string



26
27
28
# File 'lib/models/outlook_item.rb', line 26

def categories
    return @categories
end

#categories=(value) ⇒ Object

Sets the categories property value. The categories associated with the item

Parameters:

  • value

    Value to set for the categories property.

Returns:

  • a void



34
35
36
# File 'lib/models/outlook_item.rb', line 34

def categories=(value)
    @categories = value
end

#change_keyObject

Gets the changeKey property value. Identifies the version of the item. Every time the item is changed, changeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only.

Returns:

  • a string



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

def change_key
    return @change_key
end

#change_key=(value) ⇒ Object

Sets the changeKey property value. Identifies the version of the item. Every time the item is changed, changeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only.

Parameters:

  • value

    Value to set for the change_key property.

Returns:

  • a void



49
50
51
# File 'lib/models/outlook_item.rb', line 49

def change_key=(value)
    @change_key = value
end

#created_date_timeObject

Gets the createdDateTime 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



63
64
65
# File 'lib/models/outlook_item.rb', line 63

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime 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 created_date_time property.

Returns:

  • a void



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

def created_date_time=(value)
    @created_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

def get_field_deserializers()
    return super.merge({
        "categories" => lambda {|n| @categories = n.get_collection_of_primitive_values(String) },
        "changeKey" => lambda {|n| @change_key = n.get_string_value() },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
    })
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime 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



121
122
123
# File 'lib/models/outlook_item.rb', line 121

def last_modified_date_time
    return @last_modified_date_time
end

#last_modified_date_time=(value) ⇒ Object

Sets the lastModifiedDateTime 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 last_modified_date_time property.

Returns:

  • a void



129
130
131
# File 'lib/models/outlook_item.rb', line 129

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


137
138
139
140
141
142
143
144
# File 'lib/models/outlook_item.rb', line 137

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_primitive_values("categories", @categories)
    writer.write_string_value("changeKey", @change_key)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
end