Class: MicrosoftGraph::Models::ActivityHistoryItem

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



71
72
73
# File 'lib/models/activity_history_item.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 activity_history_item

Raises:

  • (StandardError)


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

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

Instance Method Details

#active_duration_secondsObject

Gets the activeDurationSeconds property value. Optional. The duration of active user engagement. if not supplied, this is calculated from the startedDateTime and lastActiveDateTime.

Returns:

  • a integer



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

def active_duration_seconds
    return @active_duration_seconds
end

#active_duration_seconds=(value) ⇒ Object

Sets the activeDurationSeconds property value. Optional. The duration of active user engagement. if not supplied, this is calculated from the startedDateTime and lastActiveDateTime.

Parameters:

  • value

    Value to set for the activeDurationSeconds property.

Returns:

  • a void



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

def active_duration_seconds=(value)
    @active_duration_seconds = value
end

#activityObject

Gets the activity property value. The activity property

Returns:

  • a user_activity



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

def activity
    return @activity
end

#activity=(value) ⇒ Object

Sets the activity property value. The activity property

Parameters:

  • value

    Value to set for the activity property.

Returns:

  • a void



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

def activity=(value)
    @activity = value
end

#created_date_timeObject

Gets the createdDateTime property value. Set by the server. DateTime in UTC when the object was created on the server.

Returns:

  • a date_time



78
79
80
# File 'lib/models/activity_history_item.rb', line 78

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. Set by the server. DateTime in UTC when the object was created on the server.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



86
87
88
# File 'lib/models/activity_history_item.rb', line 86

def created_date_time=(value)
    @created_date_time = value
end

#expiration_date_timeObject

Gets the expirationDateTime property value. Optional. UTC DateTime when the historyItem will undergo hard-delete. Can be set by the client.

Returns:

  • a date_time



102
103
104
# File 'lib/models/activity_history_item.rb', line 102

def expiration_date_time
    return @expiration_date_time
end

#expiration_date_time=(value) ⇒ Object

Sets the expirationDateTime property value. Optional. UTC DateTime when the historyItem will undergo hard-delete. Can be set by the client.

Parameters:

  • value

    Value to set for the expirationDateTime property.

Returns:

  • a void



110
111
112
# File 'lib/models/activity_history_item.rb', line 110

def expiration_date_time=(value)
    @expiration_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/models/activity_history_item.rb', line 117

def get_field_deserializers()
    return super.merge({
        "activeDurationSeconds" => lambda {|n| @active_duration_seconds = n.get_number_value() },
        "activity" => lambda {|n| @activity = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::UserActivity.create_from_discriminator_value(pn) }) },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "expirationDateTime" => lambda {|n| @expiration_date_time = n.get_date_time_value() },
        "lastActiveDateTime" => lambda {|n| @last_active_date_time = n.get_date_time_value() },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
        "startedDateTime" => lambda {|n| @started_date_time = n.get_date_time_value() },
        "status" => lambda {|n| @status = n.get_enum_value(MicrosoftGraph::Models::Status) },
        "userTimezone" => lambda {|n| @user_timezone = n.get_string_value() },
    })
end

#last_active_date_timeObject

Gets the lastActiveDateTime property value. Optional. UTC DateTime when the historyItem (activity session) was last understood as active or finished - if null, historyItem status should be Ongoing.

Returns:

  • a date_time



134
135
136
# File 'lib/models/activity_history_item.rb', line 134

def last_active_date_time
    return @last_active_date_time
end

#last_active_date_time=(value) ⇒ Object

Sets the lastActiveDateTime property value. Optional. UTC DateTime when the historyItem (activity session) was last understood as active or finished - if null, historyItem status should be Ongoing.

Parameters:

  • value

    Value to set for the lastActiveDateTime property.

Returns:

  • a void



142
143
144
# File 'lib/models/activity_history_item.rb', line 142

def last_active_date_time=(value)
    @last_active_date_time = value
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime property value. Set by the server. DateTime in UTC when the object was modified on the server.

Returns:

  • a date_time



149
150
151
# File 'lib/models/activity_history_item.rb', line 149

def last_modified_date_time
    return @last_modified_date_time
end

#last_modified_date_time=(value) ⇒ Object

Sets the lastModifiedDateTime property value. Set by the server. DateTime in UTC when the object was modified on the server.

Parameters:

  • value

    Value to set for the lastModifiedDateTime property.

Returns:

  • a void



157
158
159
# File 'lib/models/activity_history_item.rb', line 157

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)


165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/models/activity_history_item.rb', line 165

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_number_value("activeDurationSeconds", @active_duration_seconds)
    writer.write_object_value("activity", @activity)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_date_time_value("expirationDateTime", @expiration_date_time)
    writer.write_date_time_value("lastActiveDateTime", @last_active_date_time)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
    writer.write_date_time_value("startedDateTime", @started_date_time)
    writer.write_enum_value("status", @status)
    writer.write_string_value("userTimezone", @user_timezone)
end

#started_date_timeObject

Gets the startedDateTime property value. Required. UTC DateTime when the historyItem (activity session) was started. Required for timeline history.

Returns:

  • a date_time



182
183
184
# File 'lib/models/activity_history_item.rb', line 182

def started_date_time
    return @started_date_time
end

#started_date_time=(value) ⇒ Object

Sets the startedDateTime property value. Required. UTC DateTime when the historyItem (activity session) was started. Required for timeline history.

Parameters:

  • value

    Value to set for the startedDateTime property.

Returns:

  • a void



190
191
192
# File 'lib/models/activity_history_item.rb', line 190

def started_date_time=(value)
    @started_date_time = value
end

#statusObject

Gets the status property value. Set by the server. A status code used to identify valid objects. Values: active, updated, deleted, ignored.

Returns:

  • a status



197
198
199
# File 'lib/models/activity_history_item.rb', line 197

def status
    return @status
end

#status=(value) ⇒ Object

Sets the status property value. Set by the server. A status code used to identify valid objects. Values: active, updated, deleted, ignored.

Parameters:

  • value

    Value to set for the status property.

Returns:

  • a void



205
206
207
# File 'lib/models/activity_history_item.rb', line 205

def status=(value)
    @status = value
end

#user_timezoneObject

Gets the userTimezone property value. Optional. The timezone in which the user’s device used to generate the activity was located at activity creation time. Values supplied as Olson IDs in order to support cross-platform representation.

Returns:

  • a string



212
213
214
# File 'lib/models/activity_history_item.rb', line 212

def user_timezone
    return @user_timezone
end

#user_timezone=(value) ⇒ Object

Sets the userTimezone property value. Optional. The timezone in which the user’s device used to generate the activity was located at activity creation time. Values supplied as Olson IDs in order to support cross-platform representation.

Parameters:

  • value

    Value to set for the userTimezone property.

Returns:

  • a void



220
221
222
# File 'lib/models/activity_history_item.rb', line 220

def user_timezone=(value)
    @user_timezone = value
end