Class: Algolia::Composition::Params
- Inherits:
-
Object
- Object
- Algolia::Composition::Params
- Defined in:
- lib/algolia/models/composition/params.rb
Instance Attribute Summary collapse
-
#analytics ⇒ Object
Whether this search will be included in Analytics.
-
#analytics_tags ⇒ Object
Tags to apply to the query for [segmenting analytics data](www.algolia.com/doc/guides/search-analytics/guides/segments).
-
#around_lat_lng ⇒ Object
Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude.
-
#around_lat_lng_via_ip ⇒ Object
Whether to obtain the coordinates from the request’s IP address.
-
#around_precision ⇒ Object
Returns the value of attribute around_precision.
-
#around_radius ⇒ Object
Returns the value of attribute around_radius.
-
#click_analytics ⇒ Object
Whether to include a ‘queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](www.algolia.com/doc/guides/sending-events/getting-started).
-
#enable_ab_test ⇒ Object
Whether to enable index level A/B testing for this run request.
-
#enable_personalization ⇒ Object
Whether to enable Personalization.
-
#enable_re_ranking ⇒ Object
Whether this search will use [Dynamic Re-Ranking](www.algolia.com/doc/guides/algolia-ai/re-ranking) This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
-
#enable_rules ⇒ Object
Whether to enable composition rules.
-
#facet_filters ⇒ Object
Returns the value of attribute facet_filters.
-
#facets ⇒ Object
Facets for which to retrieve facet values that match the search criteria and the number of matching facet values To retrieve all facets, use the wildcard character ‘*`.
-
#filters ⇒ Object
Filter expression to only include items that match the filter criteria in the response.
-
#get_ranking_info ⇒ Object
Whether the run response should include detailed ranking information.
-
#hits_per_page ⇒ Object
Number of hits per page.
-
#injected_items ⇒ Object
A list of extenrally injected objectID groups into from an external source.
-
#inside_bounding_box ⇒ Object
Returns the value of attribute inside_bounding_box.
-
#inside_polygon ⇒ Object
Coordinates of a polygon in which to search.
-
#minimum_around_radius ⇒ Object
Minimum radius (in meters) for a search around a location when ‘aroundRadius` isn’t set.
-
#natural_languages ⇒ Object
ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches) - Sets ‘removeStopWords` and `ignorePlurals` to the list of provided languages.
-
#numeric_filters ⇒ Object
Returns the value of attribute numeric_filters.
-
#optional_filters ⇒ Object
Returns the value of attribute optional_filters.
-
#page ⇒ Object
Page of search results to retrieve.
-
#query ⇒ Object
Search query.
-
#query_languages ⇒ Object
Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the ‘removeStopWords` and `ignorePlurals` settings.
-
#relevancy_strictness ⇒ Object
Relevancy threshold below which less relevant results aren’t included in the results You can only set ‘relevancyStrictness` on [virtual replica indices](www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas).
-
#rule_contexts ⇒ Object
Assigns a rule context to the run query [Rule contexts](www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
-
#user_token ⇒ Object
Unique pseudonymous or anonymous user identifier.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.types_mapping ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Params
constructor
Initializes the object.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
- #to_json(*_args) ⇒ Object
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ Params
Initializes the object
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/algolia/models/composition/params.rb', line 173 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::Params` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, "`#{k}` is not a valid attribute in `Algolia::Params`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end h[k.to_sym] = v } if attributes.key?(:analytics) self.analytics = attributes[:analytics] end if attributes.key?(:analytics_tags) if (value = attributes[:analytics_tags]).is_a?(Array) self. = value end end if attributes.key?(:around_lat_lng) self.around_lat_lng = attributes[:around_lat_lng] end if attributes.key?(:around_lat_lng_via_ip) self.around_lat_lng_via_ip = attributes[:around_lat_lng_via_ip] end if attributes.key?(:around_radius) self.around_radius = attributes[:around_radius] end if attributes.key?(:around_precision) self.around_precision = attributes[:around_precision] end if attributes.key?(:click_analytics) self.click_analytics = attributes[:click_analytics] end if attributes.key?(:enable_ab_test) self.enable_ab_test = attributes[:enable_ab_test] end if attributes.key?(:enable_personalization) self.enable_personalization = attributes[:enable_personalization] end if attributes.key?(:enable_re_ranking) self.enable_re_ranking = attributes[:enable_re_ranking] end if attributes.key?(:enable_rules) self.enable_rules = attributes[:enable_rules] end if attributes.key?(:facet_filters) self.facet_filters = attributes[:facet_filters] end if attributes.key?(:facets) if (value = attributes[:facets]).is_a?(Array) self.facets = value end end if attributes.key?(:filters) self.filters = attributes[:filters] end if attributes.key?(:get_ranking_info) self.get_ranking_info = attributes[:get_ranking_info] end if attributes.key?(:hits_per_page) self.hits_per_page = attributes[:hits_per_page] end if attributes.key?(:injected_items) if (value = attributes[:injected_items]).is_a?(Hash) self.injected_items = value end end if attributes.key?(:inside_bounding_box) self.inside_bounding_box = attributes[:inside_bounding_box] end if attributes.key?(:inside_polygon) if (value = attributes[:inside_polygon]).is_a?(Array) self.inside_polygon = value end end if attributes.key?(:minimum_around_radius) self.minimum_around_radius = attributes[:minimum_around_radius] end if attributes.key?(:natural_languages) if (value = attributes[:natural_languages]).is_a?(Array) self.natural_languages = value end end if attributes.key?(:numeric_filters) self.numeric_filters = attributes[:numeric_filters] end if attributes.key?(:optional_filters) self.optional_filters = attributes[:optional_filters] end if attributes.key?(:page) self.page = attributes[:page] end if attributes.key?(:query) self.query = attributes[:query] end if attributes.key?(:relevancy_strictness) self.relevancy_strictness = attributes[:relevancy_strictness] end if attributes.key?(:query_languages) if (value = attributes[:query_languages]).is_a?(Array) self.query_languages = value end end if attributes.key?(:rule_contexts) if (value = attributes[:rule_contexts]).is_a?(Array) self.rule_contexts = value end end if attributes.key?(:user_token) self.user_token = attributes[:user_token] end end |
Instance Attribute Details
#analytics ⇒ Object
Whether this search will be included in Analytics.
12 13 14 |
# File 'lib/algolia/models/composition/params.rb', line 12 def analytics @analytics end |
#analytics_tags ⇒ Object
Tags to apply to the query for [segmenting analytics data](www.algolia.com/doc/guides/search-analytics/guides/segments).
15 16 17 |
# File 'lib/algolia/models/composition/params.rb', line 15 def end |
#around_lat_lng ⇒ Object
Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a circle around this central location are included in the results. The radius of the circle is determined by the ‘aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
18 19 20 |
# File 'lib/algolia/models/composition/params.rb', line 18 def around_lat_lng @around_lat_lng end |
#around_lat_lng_via_ip ⇒ Object
Whether to obtain the coordinates from the request’s IP address.
21 22 23 |
# File 'lib/algolia/models/composition/params.rb', line 21 def around_lat_lng_via_ip @around_lat_lng_via_ip end |
#around_precision ⇒ Object
Returns the value of attribute around_precision.
25 26 27 |
# File 'lib/algolia/models/composition/params.rb', line 25 def around_precision @around_precision end |
#around_radius ⇒ Object
Returns the value of attribute around_radius.
23 24 25 |
# File 'lib/algolia/models/composition/params.rb', line 23 def around_radius @around_radius end |
#click_analytics ⇒ Object
Whether to include a ‘queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](www.algolia.com/doc/guides/sending-events/getting-started).
28 29 30 |
# File 'lib/algolia/models/composition/params.rb', line 28 def click_analytics @click_analytics end |
#enable_ab_test ⇒ Object
Whether to enable index level A/B testing for this run request. If the composition mixes multiple indices, the A/B test is ignored.
31 32 33 |
# File 'lib/algolia/models/composition/params.rb', line 31 def enable_ab_test @enable_ab_test end |
#enable_personalization ⇒ Object
Whether to enable Personalization.
34 35 36 |
# File 'lib/algolia/models/composition/params.rb', line 34 def enable_personalization @enable_personalization end |
#enable_re_ranking ⇒ Object
Whether this search will use [Dynamic Re-Ranking](www.algolia.com/doc/guides/algolia-ai/re-ranking) This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
37 38 39 |
# File 'lib/algolia/models/composition/params.rb', line 37 def enable_re_ranking @enable_re_ranking end |
#enable_rules ⇒ Object
Whether to enable composition rules.
40 41 42 |
# File 'lib/algolia/models/composition/params.rb', line 40 def enable_rules @enable_rules end |
#facet_filters ⇒ Object
Returns the value of attribute facet_filters.
42 43 44 |
# File 'lib/algolia/models/composition/params.rb', line 42 def facet_filters @facet_filters end |
#facets ⇒ Object
Facets for which to retrieve facet values that match the search criteria and the number of matching facet values To retrieve all facets, use the wildcard character ‘*`. To retrieve disjunctive facets lists, annotate any facets with the `disjunctive` modifier. For more information, see [facets](www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts) and [disjunctive faceting for Smart Groups](www.algolia.com/doc/guides/managing-results/compositions/search-based-groups#facets-including-disjunctive-faceting).
45 46 47 |
# File 'lib/algolia/models/composition/params.rb', line 45 def facets @facets end |
#filters ⇒ Object
Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** ‘<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - Ranges. `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can’t use ‘NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can’t combine conjunctions (‘AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](www.algolia.com/doc/guides/managing-results/refine-results/filtering).
48 49 50 |
# File 'lib/algolia/models/composition/params.rb', line 48 def filters @filters end |
#get_ranking_info ⇒ Object
Whether the run response should include detailed ranking information.
51 52 53 |
# File 'lib/algolia/models/composition/params.rb', line 51 def get_ranking_info @get_ranking_info end |
#hits_per_page ⇒ Object
Number of hits per page.
54 55 56 |
# File 'lib/algolia/models/composition/params.rb', line 54 def hits_per_page @hits_per_page end |
#injected_items ⇒ Object
A list of extenrally injected objectID groups into from an external source.
57 58 59 |
# File 'lib/algolia/models/composition/params.rb', line 57 def injected_items @injected_items end |
#inside_bounding_box ⇒ Object
Returns the value of attribute inside_bounding_box.
59 60 61 |
# File 'lib/algolia/models/composition/params.rb', line 59 def inside_bounding_box @inside_bounding_box end |
#inside_polygon ⇒ Object
Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify ‘insideBoundingBox`.
62 63 64 |
# File 'lib/algolia/models/composition/params.rb', line 62 def inside_polygon @inside_polygon end |
#minimum_around_radius ⇒ Object
Minimum radius (in meters) for a search around a location when ‘aroundRadius` isn’t set.
65 66 67 |
# File 'lib/algolia/models/composition/params.rb', line 65 def minimum_around_radius @minimum_around_radius end |
#natural_languages ⇒ Object
ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches) - Sets ‘removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
68 69 70 |
# File 'lib/algolia/models/composition/params.rb', line 68 def natural_languages @natural_languages end |
#numeric_filters ⇒ Object
Returns the value of attribute numeric_filters.
70 71 72 |
# File 'lib/algolia/models/composition/params.rb', line 70 def numeric_filters @numeric_filters end |
#optional_filters ⇒ Object
Returns the value of attribute optional_filters.
72 73 74 |
# File 'lib/algolia/models/composition/params.rb', line 72 def optional_filters @optional_filters end |
#page ⇒ Object
Page of search results to retrieve.
75 76 77 |
# File 'lib/algolia/models/composition/params.rb', line 75 def page @page end |
#query ⇒ Object
Search query.
78 79 80 |
# File 'lib/algolia/models/composition/params.rb', line 78 def query @query end |
#query_languages ⇒ Object
Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the ‘removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language first **You should always specify a query language.** If you don’t specify an indexing language, the search engine uses all [supported languages](www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages), or the languages you specified with the ‘ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations).
84 85 86 |
# File 'lib/algolia/models/composition/params.rb', line 84 def query_languages @query_languages end |
#relevancy_strictness ⇒ Object
Relevancy threshold below which less relevant results aren’t included in the results You can only set ‘relevancyStrictness` on [virtual replica indices](www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results.
81 82 83 |
# File 'lib/algolia/models/composition/params.rb', line 81 def relevancy_strictness @relevancy_strictness end |
#rule_contexts ⇒ Object
Assigns a rule context to the run query [Rule contexts](www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
87 88 89 |
# File 'lib/algolia/models/composition/params.rb', line 87 def rule_contexts @rule_contexts end |
#user_token ⇒ Object
Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](www.algolia.com/doc/guides/sending-events/concepts/usertoken).
90 91 92 |
# File 'lib/algolia/models/composition/params.rb', line 90 def user_token @user_token end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 |
# File 'lib/algolia/models/composition/params.rb', line 430 def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end # model else # models (e.g. Pet) or oneOf klass = Algolia::Composition.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass .build_from_hash(value) end end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/algolia/models/composition/params.rb', line 93 def self.attribute_map { :analytics => :analytics, :analytics_tags => :analyticsTags, :around_lat_lng => :aroundLatLng, :around_lat_lng_via_ip => :aroundLatLngViaIP, :around_radius => :aroundRadius, :around_precision => :aroundPrecision, :click_analytics => :clickAnalytics, :enable_ab_test => :enableABTest, :enable_personalization => :enablePersonalization, :enable_re_ranking => :enableReRanking, :enable_rules => :enableRules, :facet_filters => :facetFilters, :facets => :facets, :filters => :filters, :get_ranking_info => :getRankingInfo, :hits_per_page => :hitsPerPage, :injected_items => :injectedItems, :inside_bounding_box => :insideBoundingBox, :inside_polygon => :insidePolygon, :minimum_around_radius => :minimumAroundRadius, :natural_languages => :naturalLanguages, :numeric_filters => :numericFilters, :optional_filters => :optionalFilters, :page => :page, :query => :query, :relevancy_strictness => :relevancyStrictness, :query_languages => :queryLanguages, :rule_contexts => :ruleContexts, :user_token => :userToken } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/algolia/models/composition/params.rb', line 403 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} types_mapping.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash[key.to_sym] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
163 164 165 166 167 168 169 |
# File 'lib/algolia/models/composition/params.rb', line 163 def self.openapi_nullable Set.new( [ :inside_bounding_box ] ) end |
.types_mapping ⇒ Object
Attribute type mapping.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/algolia/models/composition/params.rb', line 128 def self.types_mapping { :analytics => :"Boolean", :analytics_tags => :"Array<String>", :around_lat_lng => :"String", :around_lat_lng_via_ip => :"Boolean", :around_radius => :"AroundRadius", :around_precision => :"AroundPrecision", :click_analytics => :"Boolean", :enable_ab_test => :"Boolean", :enable_personalization => :"Boolean", :enable_re_ranking => :"Boolean", :enable_rules => :"Boolean", :facet_filters => :"FacetFilters", :facets => :"Array<String>", :filters => :"String", :get_ranking_info => :"Boolean", :hits_per_page => :"Integer", :injected_items => :"Hash<String, ExternalInjectedItem>", :inside_bounding_box => :"InsideBoundingBox", :inside_polygon => :"Array<Array<Float>>", :minimum_around_radius => :"Integer", :natural_languages => :"Array<SupportedLanguage>", :numeric_filters => :"NumericFilters", :optional_filters => :"OptionalFilters", :page => :"Integer", :query => :"String", :relevancy_strictness => :"Integer", :query_languages => :"Array<SupportedLanguage>", :rule_contexts => :"Array<String>", :user_token => :"String" } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/algolia/models/composition/params.rb', line 324 def ==(other) return true if self.equal?(other) self.class == other.class && analytics == other.analytics && == other. && around_lat_lng == other.around_lat_lng && around_lat_lng_via_ip == other.around_lat_lng_via_ip && around_radius == other.around_radius && around_precision == other.around_precision && click_analytics == other.click_analytics && enable_ab_test == other.enable_ab_test && enable_personalization == other.enable_personalization && enable_re_ranking == other.enable_re_ranking && enable_rules == other.enable_rules && facet_filters == other.facet_filters && facets == other.facets && filters == other.filters && get_ranking_info == other.get_ranking_info && hits_per_page == other.hits_per_page && injected_items == other.injected_items && inside_bounding_box == other.inside_bounding_box && inside_polygon == other.inside_polygon && minimum_around_radius == other.minimum_around_radius && natural_languages == other.natural_languages && numeric_filters == other.numeric_filters && optional_filters == other.optional_filters && page == other.page && query == other.query && relevancy_strictness == other.relevancy_strictness && query_languages == other.query_languages && rule_contexts == other.rule_contexts && user_token == other.user_token end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
509 510 511 512 513 514 515 516 517 518 519 520 521 |
# File 'lib/algolia/models/composition/params.rb', line 509 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to?(:to_hash) value.to_hash else value end end |
#eql?(other) ⇒ Boolean
360 361 362 |
# File 'lib/algolia/models/composition/params.rb', line 360 def eql?(other) self == other end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 |
# File 'lib/algolia/models/composition/params.rb', line 366 def hash [ analytics, , around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, click_analytics, enable_ab_test, enable_personalization, enable_re_ranking, enable_rules, facet_filters, facets, filters, get_ranking_info, hits_per_page, injected_items, inside_bounding_box, inside_polygon, minimum_around_radius, natural_languages, numeric_filters, optional_filters, page, query, relevancy_strictness, query_languages, rule_contexts, user_token ].hash end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
480 481 482 |
# File 'lib/algolia/models/composition/params.rb', line 480 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
490 491 492 493 494 495 496 497 498 499 500 501 502 503 |
# File 'lib/algolia/models/composition/params.rb', line 490 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_json(*_args) ⇒ Object
484 485 486 |
# File 'lib/algolia/models/composition/params.rb', line 484 def to_json(*_args) to_hash.to_json end |
#to_s ⇒ String
Returns the string representation of the object
474 475 476 |
# File 'lib/algolia/models/composition/params.rb', line 474 def to_s to_hash.to_s end |