Class: MicrosoftGraph::Models::ItemActivity

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



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

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 item_activity

Raises:

  • (StandardError)


79
80
81
82
# File 'lib/models/item_activity.rb', line 79

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

Instance Method Details

#accessObject

Gets the access property value. An item was accessed.

Returns:

  • a access_action



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

def access
    return @access
end

#access=(value) ⇒ Object

Sets the access property value. An item was accessed.

Parameters:

  • value

    Value to set for the access property.

Returns:

  • a void



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

def access=(value)
    @access = value
end

#activity_date_timeObject

Gets the activityDateTime property value. Details about when the activity took place. Read-only.

Returns:

  • a date_time



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

def activity_date_time
    return @activity_date_time
end

#activity_date_time=(value) ⇒ Object

Sets the activityDateTime property value. Details about when the activity took place. Read-only.

Parameters:

  • value

    Value to set for the activityDateTime property.

Returns:

  • a void



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

def activity_date_time=(value)
    @activity_date_time = value
end

#actorObject

Gets the actor property value. Identity of who performed the action. Read-only.

Returns:

  • a identity_set



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

def actor
    return @actor
end

#actor=(value) ⇒ Object

Sets the actor property value. Identity of who performed the action. Read-only.

Parameters:

  • value

    Value to set for the actor property.

Returns:

  • a void



64
65
66
# File 'lib/models/item_activity.rb', line 64

def actor=(value)
    @actor = value
end

#drive_itemObject

Gets the driveItem property value. Exposes the driveItem that was the target of this activity.

Returns:

  • a drive_item



87
88
89
# File 'lib/models/item_activity.rb', line 87

def drive_item
    return @drive_item
end

#drive_item=(value) ⇒ Object

Sets the driveItem property value. Exposes the driveItem that was the target of this activity.

Parameters:

  • value

    Value to set for the driveItem property.

Returns:

  • a void



95
96
97
# File 'lib/models/item_activity.rb', line 95

def drive_item=(value)
    @drive_item = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



102
103
104
105
106
107
108
109
# File 'lib/models/item_activity.rb', line 102

def get_field_deserializers()
    return super.merge({
        "access" => lambda {|n| @access = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessAction.create_from_discriminator_value(pn) }) },
        "activityDateTime" => lambda {|n| @activity_date_time = n.get_date_time_value() },
        "actor" => lambda {|n| @actor = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::IdentitySet.create_from_discriminator_value(pn) }) },
        "driveItem" => lambda {|n| @drive_item = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) },
    })
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


115
116
117
118
119
120
121
122
# File 'lib/models/item_activity.rb', line 115

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("access", @access)
    writer.write_date_time_value("activityDateTime", @activity_date_time)
    writer.write_object_value("actor", @actor)
    writer.write_object_value("driveItem", @drive_item)
end