Class: MicrosoftGraph::Models::SearchHit
- Inherits:
-
Object
- Object
- MicrosoftGraph::Models::SearchHit
- Includes:
- MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/search_hit.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
-
#additional_data ⇒ Object
Gets the additionalData property value.
-
#additional_data=(value) ⇒ Object
Sets the additionalData property value.
-
#content_source ⇒ Object
Gets the contentSource property value.
-
#content_source=(value) ⇒ Object
Sets the contentSource property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#hit_id ⇒ Object
Gets the hitId property value.
-
#hit_id=(value) ⇒ Object
Sets the hitId property value.
-
#initialize ⇒ Object
constructor
Instantiates a new searchHit and sets the default values.
-
#is_collapsed ⇒ Object
Gets the isCollapsed property value.
-
#is_collapsed=(value) ⇒ Object
Sets the isCollapsed property value.
-
#odata_type ⇒ Object
Gets the @odata.type property value.
-
#odata_type=(value) ⇒ Object
Sets the @odata.type property value.
-
#rank ⇒ Object
Gets the rank property value.
-
#rank=(value) ⇒ Object
Sets the rank property value.
-
#resource ⇒ Object
Gets the resource property value.
-
#resource=(value) ⇒ Object
Sets the resource property value.
-
#result_template_id ⇒ Object
Gets the resultTemplateId property value.
-
#result_template_id=(value) ⇒ Object
Sets the resultTemplateId property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#summary ⇒ Object
Gets the summary property value.
-
#summary=(value) ⇒ Object
Sets the summary property value.
Constructor Details
#initialize ⇒ Object
Instantiates a new searchHit and sets the default values.
55 56 57 |
# File 'lib/models/search_hit.rb', line 55 def initialize() @additional_data = Hash.new end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
78 79 80 81 |
# File 'lib/models/search_hit.rb', line 78 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return SearchHit.new end |
Instance Method Details
#additional_data ⇒ Object
Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
40 41 42 |
# File 'lib/models/search_hit.rb', line 40 def additional_data return @additional_data end |
#additional_data=(value) ⇒ Object
Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
48 49 50 |
# File 'lib/models/search_hit.rb', line 48 def additional_data=(value) @additional_data = value end |
#content_source ⇒ Object
Gets the contentSource property value. The name of the content source that the externalItem is part of.
62 63 64 |
# File 'lib/models/search_hit.rb', line 62 def content_source return @content_source end |
#content_source=(value) ⇒ Object
Sets the contentSource property value. The name of the content source that the externalItem is part of.
70 71 72 |
# File 'lib/models/search_hit.rb', line 70 def content_source=(value) @content_source = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/models/search_hit.rb', line 86 def get_field_deserializers() return { "contentSource" => lambda {|n| @content_source = n.get_string_value() }, "hitId" => lambda {|n| @hit_id = n.get_string_value() }, "isCollapsed" => lambda {|n| @is_collapsed = n.get_boolean_value() }, "@odata.type" => lambda {|n| @odata_type = n.get_string_value() }, "rank" => lambda {|n| @rank = n.get_number_value() }, "resource" => lambda {|n| @resource = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Entity.create_from_discriminator_value(pn) }) }, "resultTemplateId" => lambda {|n| @result_template_id = n.get_string_value() }, "summary" => lambda {|n| @summary = n.get_string_value() }, } end |
#hit_id ⇒ Object
Gets the hitId property value. The internal identifier for the item. The format of the identifier varies based on the entity type. For details, see hitId format.
102 103 104 |
# File 'lib/models/search_hit.rb', line 102 def hit_id return @hit_id end |
#hit_id=(value) ⇒ Object
Sets the hitId property value. The internal identifier for the item. The format of the identifier varies based on the entity type. For details, see hitId format.
110 111 112 |
# File 'lib/models/search_hit.rb', line 110 def hit_id=(value) @hit_id = value end |
#is_collapsed ⇒ Object
Gets the isCollapsed property value. Indicates whether the current result is collapsed when the collapseProperties property in the searchRequest is used.
117 118 119 |
# File 'lib/models/search_hit.rb', line 117 def is_collapsed return @is_collapsed end |
#is_collapsed=(value) ⇒ Object
Sets the isCollapsed property value. Indicates whether the current result is collapsed when the collapseProperties property in the searchRequest is used.
125 126 127 |
# File 'lib/models/search_hit.rb', line 125 def is_collapsed=(value) @is_collapsed = value end |
#odata_type ⇒ Object
Gets the @odata.type property value. The OdataType property
132 133 134 |
# File 'lib/models/search_hit.rb', line 132 def odata_type return @odata_type end |
#odata_type=(value) ⇒ Object
Sets the @odata.type property value. The OdataType property
140 141 142 |
# File 'lib/models/search_hit.rb', line 140 def odata_type=(value) @odata_type = value end |
#rank ⇒ Object
Gets the rank property value. The rank or the order of the result.
147 148 149 |
# File 'lib/models/search_hit.rb', line 147 def rank return @rank end |
#rank=(value) ⇒ Object
Sets the rank property value. The rank or the order of the result.
155 156 157 |
# File 'lib/models/search_hit.rb', line 155 def rank=(value) @rank = value end |
#resource ⇒ Object
Gets the resource property value. The resource property
162 163 164 |
# File 'lib/models/search_hit.rb', line 162 def resource return @resource end |
#resource=(value) ⇒ Object
Sets the resource property value. The resource property
170 171 172 |
# File 'lib/models/search_hit.rb', line 170 def resource=(value) @resource = value end |
#result_template_id ⇒ Object
Gets the resultTemplateId property value. ID of the result template used to render the search result. This ID must map to a display layout in the resultTemplates dictionary that is also included in the searchResponse.
177 178 179 |
# File 'lib/models/search_hit.rb', line 177 def result_template_id return @result_template_id end |
#result_template_id=(value) ⇒ Object
Sets the resultTemplateId property value. ID of the result template used to render the search result. This ID must map to a display layout in the resultTemplates dictionary that is also included in the searchResponse.
185 186 187 |
# File 'lib/models/search_hit.rb', line 185 def result_template_id=(value) @result_template_id = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/models/search_hit.rb', line 193 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_string_value("contentSource", @content_source) writer.write_string_value("hitId", @hit_id) writer.write_boolean_value("isCollapsed", @is_collapsed) writer.write_string_value("@odata.type", @odata_type) writer.write_number_value("rank", @rank) writer.write_object_value("resource", @resource) writer.write_string_value("resultTemplateId", @result_template_id) writer.write_string_value("summary", @summary) writer.write_additional_data(@additional_data) end |
#summary ⇒ Object
Gets the summary property value. A summary of the result, if a summary is available.
209 210 211 |
# File 'lib/models/search_hit.rb', line 209 def summary return @summary end |
#summary=(value) ⇒ Object
Sets the summary property value. A summary of the result, if a summary is available.
217 218 219 |
# File 'lib/models/search_hit.rb', line 217 def summary=(value) @summary = value end |