Class: MicrosoftGraph::Models::UsedInsight

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



25
26
27
# File 'lib/models/used_insight.rb', line 25

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 used_insight

Raises:

  • (StandardError)


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

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



41
42
43
44
45
46
47
48
# File 'lib/models/used_insight.rb', line 41

def get_field_deserializers()
    return super.merge({
        "lastUsed" => lambda {|n| @last_used = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::UsageDetails.create_from_discriminator_value(pn) }) },
        "resource" => lambda {|n| @resource = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Entity.create_from_discriminator_value(pn) }) },
        "resourceReference" => lambda {|n| @resource_reference = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ResourceReference.create_from_discriminator_value(pn) }) },
        "resourceVisualization" => lambda {|n| @resource_visualization = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ResourceVisualization.create_from_discriminator_value(pn) }) },
    })
end

#last_usedObject

Gets the lastUsed property value. Information about when the item was last viewed or modified by the user. Read only.

Returns:

  • a usage_details



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

def last_used
    return @last_used
end

#last_used=(value) ⇒ Object

Sets the lastUsed property value. Information about when the item was last viewed or modified by the user. Read only.

Parameters:

  • value

    Value to set for the lastUsed property.

Returns:

  • a void



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

def last_used=(value)
    @last_used = value
end

#resourceObject

Gets the resource property value. Used for navigating to the item that was used. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem.

Returns:

  • a entity



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

def resource
    return @resource
end

#resource=(value) ⇒ Object

Sets the resource property value. Used for navigating to the item that was used. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem.

Parameters:

  • value

    Value to set for the resource property.

Returns:

  • a void



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

def resource=(value)
    @resource = value
end

#resource_referenceObject

Gets the resourceReference property value. Reference properties of the used document, such as the url and type of the document. Read-only

Returns:

  • a resource_reference



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

def resource_reference
    return @resource_reference
end

#resource_reference=(value) ⇒ Object

Sets the resourceReference property value. Reference properties of the used document, such as the url and type of the document. Read-only

Parameters:

  • value

    Value to set for the resourceReference property.

Returns:

  • a void



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

def resource_reference=(value)
    @resource_reference = value
end

#resource_visualizationObject

Gets the resourceVisualization property value. Properties that you can use to visualize the document in your experience. Read-only

Returns:

  • a resource_visualization



98
99
100
# File 'lib/models/used_insight.rb', line 98

def resource_visualization
    return @resource_visualization
end

#resource_visualization=(value) ⇒ Object

Sets the resourceVisualization property value. Properties that you can use to visualize the document in your experience. Read-only

Parameters:

  • value

    Value to set for the resourceVisualization property.

Returns:

  • a void



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

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


114
115
116
117
118
119
# File 'lib/models/used_insight.rb', line 114

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("lastUsed", @last_used)
    writer.write_object_value("resource", @resource)
end