lib/algolia/models/recommend/recommend_search_params.rb in algolia-3.5.0 vs lib/algolia/models/recommend/recommend_search_params.rb in algolia-3.5.1

- old
+ new

@@ -870,101 +870,9 @@ if attributes.key?(:re_ranking_apply_filter) self.re_ranking_apply_filter = attributes[:re_ranking_apply_filter] end end - # Custom attribute writer method with validation - # @param [Object] minimum_around_radius Value to be assigned - def minimum_around_radius=(minimum_around_radius) - if minimum_around_radius.nil? - raise ArgumentError, "minimum_around_radius cannot be nil" - end - - if minimum_around_radius < 1 - raise ArgumentError, "invalid value for \"minimum_around_radius\", must be greater than or equal to 1." - end - - @minimum_around_radius = minimum_around_radius - end - - # Custom attribute writer method with validation - # @param [Object] personalization_impact Value to be assigned - def personalization_impact=(personalization_impact) - if personalization_impact.nil? - raise ArgumentError, "personalization_impact cannot be nil" - end - - if personalization_impact > 100 - raise ArgumentError, "invalid value for \"personalization_impact\", must be smaller than or equal to 100." - end - - if personalization_impact < 0 - raise ArgumentError, "invalid value for \"personalization_impact\", must be greater than or equal to 0." - end - - @personalization_impact = personalization_impact - end - - # Custom attribute writer method with validation - # @param [Object] pagination_limited_to Value to be assigned - def pagination_limited_to=(pagination_limited_to) - if pagination_limited_to.nil? - raise ArgumentError, "pagination_limited_to cannot be nil" - end - - if pagination_limited_to > 20000 - raise ArgumentError, "invalid value for \"pagination_limited_to\", must be smaller than or equal to 20000." - end - - @pagination_limited_to = pagination_limited_to - end - - # Custom attribute writer method with validation - # @param [Object] min_proximity Value to be assigned - def min_proximity=(min_proximity) - if min_proximity.nil? - raise ArgumentError, "min_proximity cannot be nil" - end - - if min_proximity > 7 - raise ArgumentError, "invalid value for \"min_proximity\", must be smaller than or equal to 7." - end - - if min_proximity < 1 - raise ArgumentError, "invalid value for \"min_proximity\", must be greater than or equal to 1." - end - - @min_proximity = min_proximity - end - - # Custom attribute writer method with validation - # @param [Object] max_facet_hits Value to be assigned - def max_facet_hits=(max_facet_hits) - if max_facet_hits.nil? - raise ArgumentError, "max_facet_hits cannot be nil" - end - - if max_facet_hits > 100 - raise ArgumentError, "invalid value for \"max_facet_hits\", must be smaller than or equal to 100." - end - - @max_facet_hits = max_facet_hits - end - - # Custom attribute writer method with validation - # @param [Object] max_values_per_facet Value to be assigned - def max_values_per_facet=(max_values_per_facet) - if max_values_per_facet.nil? - raise ArgumentError, "max_values_per_facet cannot be nil" - end - - if max_values_per_facet > 1000 - raise ArgumentError, "invalid value for \"max_values_per_facet\", must be smaller than or equal to 1000." - end - - @max_values_per_facet = max_values_per_facet - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) return true if self.equal?(other) self.class == other.class &&