Class: MicrosoftGraph::Models::UserActivity

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



116
117
118
# File 'lib/models/user_activity.rb', line 116

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 user_activity

Raises:

  • (StandardError)


169
170
171
172
# File 'lib/models/user_activity.rb', line 169

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

Instance Method Details

#activation_urlObject

Gets the activationUrl property value. Required. URL used to launch the activity in the best native experience represented by the appId. Might launch a web-based app if no native app exists.

Returns:

  • a string



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

def activation_url
    return @activation_url
end

#activation_url=(value) ⇒ Object

Sets the activationUrl property value. Required. URL used to launch the activity in the best native experience represented by the appId. Might launch a web-based app if no native app exists.

Parameters:

  • value

    Value to set for the activationUrl property.

Returns:

  • a void



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

def activation_url=(value)
    @activation_url = value
end

#activity_source_hostObject

Gets the activitySourceHost property value. Required. URL for the domain representing the cross-platform identity mapping for the app. Mapping is stored either as a JSON file hosted on the domain or configurable via Windows Dev Center. The JSON file is named cross-platform-app-identifiers and is hosted at root of your HTTPS domain, either at the top level domain or include a sub domain. For example: contoso.com or myapp.contoso.com but NOT myapp.contoso.com/somepath. You must have a unique file and domain (or sub domain) per cross-platform app identity. For example, a separate file and domain is needed for Word vs. PowerPoint.

Returns:

  • a string



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

def activity_source_host
    return @activity_source_host
end

#activity_source_host=(value) ⇒ Object

Sets the activitySourceHost property value. Required. URL for the domain representing the cross-platform identity mapping for the app. Mapping is stored either as a JSON file hosted on the domain or configurable via Windows Dev Center. The JSON file is named cross-platform-app-identifiers and is hosted at root of your HTTPS domain, either at the top level domain or include a sub domain. For example: contoso.com or myapp.contoso.com but NOT myapp.contoso.com/somepath. You must have a unique file and domain (or sub domain) per cross-platform app identity. For example, a separate file and domain is needed for Word vs. PowerPoint.

Parameters:

  • value

    Value to set for the activitySourceHost property.

Returns:

  • a void



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

def activity_source_host=(value)
    @activity_source_host = value
end

#app_activity_idObject

Gets the appActivityId property value. Required. The unique activity ID in the context of the app - supplied by caller and immutable thereafter.

Returns:

  • a string



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

def app_activity_id
    return @app_activity_id
end

#app_activity_id=(value) ⇒ Object

Sets the appActivityId property value. Required. The unique activity ID in the context of the app - supplied by caller and immutable thereafter.

Parameters:

  • value

    Value to set for the appActivityId property.

Returns:

  • a void



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

def app_activity_id=(value)
    @app_activity_id = value
end

#app_display_nameObject

Gets the appDisplayName property value. Optional. Short text description of the app used to generate the activity for use in cases when the app is not installed on the user’s local device.

Returns:

  • a string



101
102
103
# File 'lib/models/user_activity.rb', line 101

def app_display_name
    return @app_display_name
end

#app_display_name=(value) ⇒ Object

Sets the appDisplayName property value. Optional. Short text description of the app used to generate the activity for use in cases when the app is not installed on the user’s local device.

Parameters:

  • value

    Value to set for the appDisplayName property.

Returns:

  • a void



109
110
111
# File 'lib/models/user_activity.rb', line 109

def app_display_name=(value)
    @app_display_name = value
end

#content_infoObject

Gets the contentInfo property value. Optional. A custom piece of data - JSON-LD extensible description of content according to schema.org syntax.

Returns:

  • a json



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

def 
    return @content_info
end

#content_info=(value) ⇒ Object

Sets the contentInfo property value. Optional. A custom piece of data - JSON-LD extensible description of content according to schema.org syntax.

Parameters:

  • value

    Value to set for the contentInfo property.

Returns:

  • a void



131
132
133
# File 'lib/models/user_activity.rb', line 131

def (value)
    @content_info = value
end

#content_urlObject

Gets the contentUrl property value. Optional. Used in the event the content can be rendered outside of a native or web-based app experience (for example, a pointer to an item in an RSS feed).

Returns:

  • a string



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

def content_url
    return @content_url
end

#content_url=(value) ⇒ Object

Sets the contentUrl property value. Optional. Used in the event the content can be rendered outside of a native or web-based app experience (for example, a pointer to an item in an RSS feed).

Parameters:

  • value

    Value to set for the contentUrl property.

Returns:

  • a void



146
147
148
# File 'lib/models/user_activity.rb', line 146

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



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

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



161
162
163
# File 'lib/models/user_activity.rb', line 161

def created_date_time=(value)
    @created_date_time = value
end

#expiration_date_timeObject

Gets the expirationDateTime property value. Set by the server. DateTime in UTC when the object expired on the server.

Returns:

  • a date_time



177
178
179
# File 'lib/models/user_activity.rb', line 177

def expiration_date_time
    return @expiration_date_time
end

#expiration_date_time=(value) ⇒ Object

Sets the expirationDateTime property value. Set by the server. DateTime in UTC when the object expired on the server.

Parameters:

  • value

    Value to set for the expirationDateTime property.

Returns:

  • a void



185
186
187
# File 'lib/models/user_activity.rb', line 185

def expiration_date_time=(value)
    @expiration_date_time = value
end

#fallback_urlObject

Gets the fallbackUrl property value. Optional. URL used to launch the activity in a web-based app, if available.

Returns:

  • a string



192
193
194
# File 'lib/models/user_activity.rb', line 192

def fallback_url
    return @fallback_url
end

#fallback_url=(value) ⇒ Object

Sets the fallbackUrl property value. Optional. URL used to launch the activity in a web-based app, if available.

Parameters:

  • value

    Value to set for the fallbackUrl property.

Returns:

  • a void



200
201
202
# File 'lib/models/user_activity.rb', line 200

def fallback_url=(value)
    @fallback_url = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/models/user_activity.rb', line 207

def get_field_deserializers()
    return super.merge({
        "activationUrl" => lambda {|n| @activation_url = n.get_string_value() },
        "activitySourceHost" => lambda {|n| @activity_source_host = n.get_string_value() },
        "appActivityId" => lambda {|n| @app_activity_id = n.get_string_value() },
        "appDisplayName" => lambda {|n| @app_display_name = n.get_string_value() },
        "contentInfo" => lambda {|n| @content_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },
        "contentUrl" => lambda {|n| @content_url = n.get_string_value() },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "expirationDateTime" => lambda {|n| @expiration_date_time = n.get_date_time_value() },
        "fallbackUrl" => lambda {|n| @fallback_url = n.get_string_value() },
        "historyItems" => lambda {|n| @history_items = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ActivityHistoryItem.create_from_discriminator_value(pn) }) },
        "lastModifiedDateTime" => lambda {|n| @last_modified_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() },
        "visualElements" => lambda {|n| @visual_elements = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::VisualInfo.create_from_discriminator_value(pn) }) },
    })
end

#history_itemsObject

Gets the historyItems property value. Optional. NavigationProperty/Containment; navigation property to the activity’s historyItems.

Returns:

  • a activity_history_item



229
230
231
# File 'lib/models/user_activity.rb', line 229

def history_items
    return @history_items
end

#history_items=(value) ⇒ Object

Sets the historyItems property value. Optional. NavigationProperty/Containment; navigation property to the activity’s historyItems.

Parameters:

  • value

    Value to set for the historyItems property.

Returns:

  • a void



237
238
239
# File 'lib/models/user_activity.rb', line 237

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



244
245
246
# File 'lib/models/user_activity.rb', line 244

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



252
253
254
# File 'lib/models/user_activity.rb', line 252

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)


260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# File 'lib/models/user_activity.rb', line 260

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("activationUrl", @activation_url)
    writer.write_string_value("activitySourceHost", @activity_source_host)
    writer.write_string_value("appActivityId", @app_activity_id)
    writer.write_string_value("appDisplayName", @app_display_name)
    writer.write_object_value("contentInfo", @content_info)
    writer.write_string_value("contentUrl", @content_url)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_date_time_value("expirationDateTime", @expiration_date_time)
    writer.write_string_value("fallbackUrl", @fallback_url)
    writer.write_collection_of_object_values("historyItems", @history_items)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
    writer.write_enum_value("status", @status)
    writer.write_string_value("userTimezone", @user_timezone)
    writer.write_object_value("visualElements", @visual_elements)
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



282
283
284
# File 'lib/models/user_activity.rb', line 282

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



290
291
292
# File 'lib/models/user_activity.rb', line 290

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



297
298
299
# File 'lib/models/user_activity.rb', line 297

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



305
306
307
# File 'lib/models/user_activity.rb', line 305

def user_timezone=(value)
    @user_timezone = value
end

#visual_elementsObject

Gets the visualElements property value. The visualElements property

Returns:

  • a visual_info



312
313
314
# File 'lib/models/user_activity.rb', line 312

def visual_elements
    return @visual_elements
end

#visual_elements=(value) ⇒ Object

Sets the visualElements property value. The visualElements property

Parameters:

  • value

    Value to set for the visualElements property.

Returns:

  • a void



320
321
322
# File 'lib/models/user_activity.rb', line 320

def visual_elements=(value)
    @visual_elements = value
end