Class: MicrosoftGraph::Models::SharedInsight

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



31
32
33
# File 'lib/models/shared_insight.rb', line 31

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 shared_insight

Raises:

  • (StandardError)


39
40
41
42
# File 'lib/models/shared_insight.rb', line 39

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



47
48
49
50
51
52
53
54
55
56
# File 'lib/models/shared_insight.rb', line 47

def get_field_deserializers()
    return super.merge({
        "lastShared" => lambda {|n| @last_shared = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SharingDetail.create_from_discriminator_value(pn) }) },
        "lastSharedMethod" => lambda {|n| @last_shared_method = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Entity.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) }) },
        "sharingHistory" => lambda {|n| @sharing_history = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SharingDetail.create_from_discriminator_value(pn) }) },
    })
end

#last_sharedObject

Gets the lastShared property value. Details about the shared item. Read only.

Returns:

  • a sharing_detail



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

def last_shared
    return @last_shared
end

#last_shared=(value) ⇒ Object

Sets the lastShared property value. Details about the shared item. Read only.

Parameters:

  • value

    Value to set for the lastShared property.

Returns:

  • a void



69
70
71
# File 'lib/models/shared_insight.rb', line 69

def last_shared=(value)
    @last_shared = value
end

#last_shared_methodObject

Gets the lastSharedMethod property value. The lastSharedMethod property

Returns:

  • a entity



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

def last_shared_method
    return @last_shared_method
end

#last_shared_method=(value) ⇒ Object

Sets the lastSharedMethod property value. The lastSharedMethod property

Parameters:

  • value

    Value to set for the lastSharedMethod property.

Returns:

  • a void



84
85
86
# File 'lib/models/shared_insight.rb', line 84

def last_shared_method=(value)
    @last_shared_method = value
end

#resourceObject

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

Returns:

  • a entity



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

def resource
    return @resource
end

#resource=(value) ⇒ Object

Sets the resource property value. Used for navigating to the item that was shared. 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



99
100
101
# File 'lib/models/shared_insight.rb', line 99

def resource=(value)
    @resource = value
end

#resource_referenceObject

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

Returns:

  • a resource_reference



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

def resource_reference
    return @resource_reference
end

#resource_reference=(value) ⇒ Object

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

Parameters:

  • value

    Value to set for the resourceReference property.

Returns:

  • a void



114
115
116
# File 'lib/models/shared_insight.rb', line 114

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



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

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



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

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)


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

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("lastShared", @last_shared)
    writer.write_object_value("lastSharedMethod", @last_shared_method)
    writer.write_object_value("resource", @resource)
    writer.write_collection_of_object_values("sharingHistory", @sharing_history)
end

#sharing_historyObject

Gets the sharingHistory property value. The sharingHistory property

Returns:

  • a sharing_detail



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

def sharing_history
    return @sharing_history
end

#sharing_history=(value) ⇒ Object

Sets the sharingHistory property value. The sharingHistory property

Parameters:

  • value

    Value to set for the sharingHistory property.

Returns:

  • a void



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

def sharing_history=(value)
    @sharing_history = value
end