Class: MicrosoftGraph::Models::Trending
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/trending.rb
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new trending and sets the default values.
-
#last_modified_date_time ⇒ Object
Gets the lastModifiedDateTime property value.
-
#last_modified_date_time=(value) ⇒ Object
Sets the lastModifiedDateTime property value.
-
#resource ⇒ Object
Gets the resource property value.
-
#resource=(value) ⇒ Object
Sets the resource property value.
-
#resource_reference ⇒ Object
Gets the resourceReference property value.
-
#resource_reference=(value) ⇒ Object
Sets the resourceReference property value.
-
#resource_visualization ⇒ Object
Gets the resourceVisualization property value.
-
#resource_visualization=(value) ⇒ Object
Sets the resourceVisualization property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#weight ⇒ Object
Gets the weight property value.
-
#weight=(value) ⇒ Object
Sets the weight property value.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
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
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_deserializers ⇒ Object
The deserialization information for the current model
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_time ⇒ Object
Gets the lastModifiedDateTime property value. The lastModifiedDateTime property
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
66 67 68 |
# File 'lib/models/trending.rb', line 66 def last_modified_date_time=(value) @last_modified_date_time = value end |
#resource ⇒ Object
Gets the resource property value. Used for navigating to the trending document.
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.
81 82 83 |
# File 'lib/models/trending.rb', line 81 def resource=(value) @resource = value end |
#resource_reference ⇒ Object
Gets the resourceReference property value. Reference properties of the trending document, such as the url and type of the document.
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.
96 97 98 |
# File 'lib/models/trending.rb', line 96 def resource_reference=(value) @resource_reference = value end |
#resource_visualization ⇒ Object
Gets the resourceVisualization property value. Properties that you can use to visualize the document in your experience.
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.
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
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 |
#weight ⇒ Object
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.
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.
138 139 140 |
# File 'lib/models/trending.rb', line 138 def weight=(value) @weight = value end |