Class: MicrosoftGraph::Models::Trending

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



29
30
31
# File 'lib/models/trending.rb', line 29

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 trending

Raises:

  • (StandardError)


37
38
39
40
# File 'lib/models/trending.rb', line 37

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



45
46
47
48
49
50
51
52
53
# File 'lib/models/trending.rb', line 45

def get_field_deserializers()
    return super.merge({
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
        "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) }) },
        "weight" => lambda {|n| @weight = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
    })
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime property value. The lastModifiedDateTime property

Returns:

  • a date_time



58
59
60
# File 'lib/models/trending.rb', line 58

def last_modified_date_time
    return @last_modified_date_time
end

#last_modified_date_time=(value) ⇒ Object

Sets the lastModifiedDateTime property value. The lastModifiedDateTime property

Parameters:

  • value

    Value to set for the lastModifiedDateTime property.

Returns:

  • a void



66
67
68
# File 'lib/models/trending.rb', line 66

def last_modified_date_time=(value)
    @last_modified_date_time = value
end

#resourceObject

Gets the resource property value. Used for navigating to the trending document.

Returns:

  • a entity



73
74
75
# File 'lib/models/trending.rb', line 73

def resource
    return @resource
end

#resource=(value) ⇒ Object

Sets the resource property value. Used for navigating to the trending document.

Parameters:

  • value

    Value to set for the resource property.

Returns:

  • a void



81
82
83
# File 'lib/models/trending.rb', line 81

def resource=(value)
    @resource = value
end

#resource_referenceObject

Gets the resourceReference property value. Reference properties of the trending document, such as the url and type of the document.

Returns:

  • a resource_reference



88
89
90
# File 'lib/models/trending.rb', line 88

def resource_reference
    return @resource_reference
end

#resource_reference=(value) ⇒ Object

Sets the resourceReference property value. Reference properties of the trending document, such as the url and type of the document.

Parameters:

  • value

    Value to set for the resourceReference property.

Returns:

  • a void



96
97
98
# File 'lib/models/trending.rb', line 96

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.

Returns:

  • a resource_visualization



103
104
105
# File 'lib/models/trending.rb', line 103

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.

Parameters:

  • value

    Value to set for the resourceVisualization property.

Returns:

  • a void



111
112
113
# File 'lib/models/trending.rb', line 111

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)


119
120
121
122
123
124
125
# File 'lib/models/trending.rb', line 119

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
    writer.write_object_value("resource", @resource)
    writer.write_object_value("weight", @weight)
end

#weightObject

Gets the weight property value. Value indicating how much the document is currently trending. The larger the number, the more the document is currently trending around the user (the more relevant it is). Returned documents are sorted by this value.

Returns:

  • a double



130
131
132
# File 'lib/models/trending.rb', line 130

def weight
    return @weight
end

#weight=(value) ⇒ Object

Sets the weight property value. Value indicating how much the document is currently trending. The larger the number, the more the document is currently trending around the user (the more relevant it is). Returned documents are sorted by this value.

Parameters:

  • value

    Value to set for the weight property.

Returns:

  • a void



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

def weight=(value)
    @weight = value
end