algolia 3.5.0 → 3.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/Gemfile.lock +1 -1
  4. data/lib/algolia/api/abtesting_client.rb +0 -7
  5. data/lib/algolia/api/analytics_client.rb +0 -168
  6. data/lib/algolia/api/ingestion_client.rb +2 -170
  7. data/lib/algolia/api/insights_client.rb +0 -22
  8. data/lib/algolia/api/monitoring_client.rb +11 -11
  9. data/lib/algolia/api/search_client.rb +3 -58
  10. data/lib/algolia/models/abtesting/ab_tests_variant.rb +0 -18
  11. data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +0 -18
  12. data/lib/algolia/models/abtesting/add_ab_tests_request.rb +0 -18
  13. data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +0 -18
  14. data/lib/algolia/models/abtesting/schedule_ab_tests_request.rb +0 -18
  15. data/lib/algolia/models/abtesting/variant.rb +0 -18
  16. data/lib/algolia/models/analytics/click_position.rb +0 -32
  17. data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +0 -28
  18. data/lib/algolia/models/analytics/daily_average_clicks.rb +0 -24
  19. data/lib/algolia/models/analytics/daily_click_through_rates.rb +0 -28
  20. data/lib/algolia/models/analytics/daily_conversion_rates.rb +0 -28
  21. data/lib/algolia/models/analytics/daily_no_click_rates.rb +0 -32
  22. data/lib/algolia/models/analytics/daily_no_results_rates.rb +0 -18
  23. data/lib/algolia/models/analytics/daily_purchase_rates.rb +0 -14
  24. data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +0 -14
  25. data/lib/algolia/models/analytics/daily_searches_no_results.rb +0 -14
  26. data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +0 -28
  27. data/lib/algolia/models/analytics/get_average_click_position_response.rb +0 -24
  28. data/lib/algolia/models/analytics/get_click_positions_response.rb +0 -18
  29. data/lib/algolia/models/analytics/get_click_through_rate_response.rb +0 -28
  30. data/lib/algolia/models/analytics/get_conversion_rate_response.rb +0 -28
  31. data/lib/algolia/models/analytics/get_no_click_rate_response.rb +0 -32
  32. data/lib/algolia/models/analytics/get_no_results_rate_response.rb +0 -18
  33. data/lib/algolia/models/analytics/get_purchase_rate_response.rb +0 -14
  34. data/lib/algolia/models/analytics/top_hit_with_analytics.rb +0 -56
  35. data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +0 -98
  36. data/lib/algolia/models/analytics/top_search_with_analytics.rb +0 -90
  37. data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +0 -132
  38. data/lib/algolia/models/ingestion/event.rb +0 -14
  39. data/lib/algolia/models/ingestion/pagination.rb +0 -60
  40. data/lib/algolia/models/ingestion/run.rb +0 -18
  41. data/lib/algolia/models/ingestion/source_csv.rb +0 -21
  42. data/lib/algolia/models/ingestion/task.rb +0 -18
  43. data/lib/algolia/models/ingestion/task_create.rb +0 -18
  44. data/lib/algolia/models/ingestion/task_create_v1.rb +0 -18
  45. data/lib/algolia/models/ingestion/task_update.rb +0 -18
  46. data/lib/algolia/models/ingestion/task_update_v1.rb +0 -18
  47. data/lib/algolia/models/ingestion/task_v1.rb +0 -18
  48. data/lib/algolia/models/ingestion/transformation.rb +1 -1
  49. data/lib/algolia/models/ingestion/transformation_create.rb +1 -1
  50. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +0 -123
  51. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +0 -149
  52. data/lib/algolia/models/insights/clicked_filters.rb +0 -105
  53. data/lib/algolia/models/insights/clicked_object_ids.rb +0 -105
  54. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +0 -149
  55. data/lib/algolia/models/insights/converted_filters.rb +0 -105
  56. data/lib/algolia/models/insights/converted_object_ids.rb +0 -105
  57. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +0 -131
  58. data/lib/algolia/models/insights/insights_events.rb +0 -18
  59. data/lib/algolia/models/insights/object_data_after_search.rb +0 -26
  60. data/lib/algolia/models/insights/purchased_object_ids.rb +0 -123
  61. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +0 -123
  62. data/lib/algolia/models/insights/viewed_filters.rb +0 -105
  63. data/lib/algolia/models/insights/viewed_object_ids.rb +0 -105
  64. data/lib/algolia/models/personalization/personalization_strategy_params.rb +0 -18
  65. data/lib/algolia/models/query-suggestions/configuration.rb +0 -17
  66. data/lib/algolia/models/query-suggestions/configuration_response.rb +0 -17
  67. data/lib/algolia/models/query-suggestions/configuration_with_index.rb +0 -17
  68. data/lib/algolia/models/query-suggestions/source_index.rb +0 -28
  69. data/lib/algolia/models/recommend/banner_image.rb +4 -2
  70. data/lib/algolia/models/recommend/bought_together_query.rb +0 -36
  71. data/lib/algolia/models/recommend/condition.rb +0 -15
  72. data/lib/algolia/models/recommend/consequence.rb +0 -28
  73. data/lib/algolia/models/recommend/fallback_params.rb +0 -92
  74. data/lib/algolia/models/recommend/looking_similar_query.rb +0 -36
  75. data/lib/algolia/models/recommend/promote_consequence_object.rb +0 -14
  76. data/lib/algolia/models/recommend/ranking_info.rb +0 -112
  77. data/lib/algolia/models/recommend/recommend_hit.rb +0 -18
  78. data/lib/algolia/models/recommend/recommend_search_params.rb +0 -92
  79. data/lib/algolia/models/recommend/recommendations_results.rb +0 -61
  80. data/lib/algolia/models/recommend/recommended_for_you_query.rb +0 -36
  81. data/lib/algolia/models/recommend/related_query.rb +0 -36
  82. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +0 -50
  83. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +0 -14
  84. data/lib/algolia/models/recommend/trending_facet_hit.rb +0 -18
  85. data/lib/algolia/models/recommend/trending_facets_query.rb +0 -36
  86. data/lib/algolia/models/recommend/trending_items_query.rb +0 -36
  87. data/lib/algolia/models/recommend/widgets.rb +5 -2
  88. data/lib/algolia/models/search/banner_image.rb +4 -2
  89. data/lib/algolia/models/search/browse_params_object.rb +0 -128
  90. data/lib/algolia/models/search/browse_response.rb +0 -61
  91. data/lib/algolia/models/search/condition.rb +0 -15
  92. data/lib/algolia/models/search/consequence.rb +0 -28
  93. data/lib/algolia/models/search/consequence_params.rb +0 -128
  94. data/lib/algolia/models/search/index_settings.rb +0 -78
  95. data/lib/algolia/models/search/log.rb +0 -34
  96. data/lib/algolia/models/search/promote_object_ids.rb +0 -14
  97. data/lib/algolia/models/search/ranking_info.rb +0 -112
  98. data/lib/algolia/models/search/rule.rb +0 -18
  99. data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -32
  100. data/lib/algolia/models/search/search_dictionary_entries_response.rb +0 -14
  101. data/lib/algolia/models/search/search_for_facet_values_request.rb +0 -14
  102. data/lib/algolia/models/search/search_for_facets.rb +0 -128
  103. data/lib/algolia/models/search/search_for_hits.rb +0 -128
  104. data/lib/algolia/models/search/search_params_object.rb +0 -128
  105. data/lib/algolia/models/search/search_response.rb +0 -61
  106. data/lib/algolia/models/search/search_rules_params.rb +0 -32
  107. data/lib/algolia/models/search/search_synonyms_params.rb +0 -32
  108. data/lib/algolia/models/search/search_user_ids_params.rb +0 -32
  109. data/lib/algolia/models/search/search_user_ids_response.rb +0 -32
  110. data/lib/algolia/models/search/settings_response.rb +0 -78
  111. data/lib/algolia/models/search/user_hit.rb +0 -15
  112. data/lib/algolia/models/search/user_id.rb +0 -15
  113. data/lib/algolia/models/search/widgets.rb +5 -2
  114. data/lib/algolia/version.rb +1 -1
  115. metadata +2 -11
  116. data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_response.rb +0 -230
  117. data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_with_index.rb +0 -212
  118. data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +0 -252
  119. data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +0 -263
  120. data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +0 -276
  121. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +0 -316
  122. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +0 -295
  123. data/lib/algolia/models/recommend/banners.rb +0 -209
  124. data/lib/algolia/models/search/banners.rb +0 -209
@@ -100,20 +100,6 @@ module Algolia
100
100
  end
101
101
  end
102
102
 
103
- # Custom attribute writer method with validation
104
- # @param [Object] page Value to be assigned
105
- def page=(page)
106
- if page.nil?
107
- raise ArgumentError, "page cannot be nil"
108
- end
109
-
110
- if page < 0
111
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
112
- end
113
-
114
- @page = page
115
- end
116
-
117
103
  # Checks equality by comparing each attribute.
118
104
  # @param [Object] Object to be compared
119
105
  def ==(other)
@@ -88,24 +88,6 @@ module Algolia
88
88
  end
89
89
  end
90
90
 
91
- # Custom attribute writer method with validation
92
- # @param [Object] _score Value to be assigned
93
- def _score=(_score)
94
- if _score.nil?
95
- raise ArgumentError, "_score cannot be nil"
96
- end
97
-
98
- if _score > 100
99
- raise ArgumentError, "invalid value for \"_score\", must be smaller than or equal to 100."
100
- end
101
-
102
- if _score < 0
103
- raise ArgumentError, "invalid value for \"_score\", must be greater than or equal to 0."
104
- end
105
-
106
- @_score = _score
107
- end
108
-
109
91
  # Checks equality by comparing each attribute.
110
92
  # @param [Object] Object to be compared
111
93
  def ==(other)
@@ -132,42 +132,6 @@ module Algolia
132
132
  end
133
133
  end
134
134
 
135
- # Custom attribute writer method with validation
136
- # @param [Object] threshold Value to be assigned
137
- def threshold=(threshold)
138
- if threshold.nil?
139
- raise ArgumentError, "threshold cannot be nil"
140
- end
141
-
142
- if threshold > 100
143
- raise ArgumentError, "invalid value for \"threshold\", must be smaller than or equal to 100."
144
- end
145
-
146
- if threshold < 0
147
- raise ArgumentError, "invalid value for \"threshold\", must be greater than or equal to 0."
148
- end
149
-
150
- @threshold = threshold
151
- end
152
-
153
- # Custom attribute writer method with validation
154
- # @param [Object] max_recommendations Value to be assigned
155
- def max_recommendations=(max_recommendations)
156
- if max_recommendations.nil?
157
- raise ArgumentError, "max_recommendations cannot be nil"
158
- end
159
-
160
- if max_recommendations > 1000
161
- raise ArgumentError, "invalid value for \"max_recommendations\", must be smaller than or equal to 1000."
162
- end
163
-
164
- if max_recommendations < 1
165
- raise ArgumentError, "invalid value for \"max_recommendations\", must be greater than or equal to 1."
166
- end
167
-
168
- @max_recommendations = max_recommendations
169
- end
170
-
171
135
  # Checks equality by comparing each attribute.
172
136
  # @param [Object] Object to be compared
173
137
  def ==(other)
@@ -137,42 +137,6 @@ module Algolia
137
137
  end
138
138
  end
139
139
 
140
- # Custom attribute writer method with validation
141
- # @param [Object] threshold Value to be assigned
142
- def threshold=(threshold)
143
- if threshold.nil?
144
- raise ArgumentError, "threshold cannot be nil"
145
- end
146
-
147
- if threshold > 100
148
- raise ArgumentError, "invalid value for \"threshold\", must be smaller than or equal to 100."
149
- end
150
-
151
- if threshold < 0
152
- raise ArgumentError, "invalid value for \"threshold\", must be greater than or equal to 0."
153
- end
154
-
155
- @threshold = threshold
156
- end
157
-
158
- # Custom attribute writer method with validation
159
- # @param [Object] max_recommendations Value to be assigned
160
- def max_recommendations=(max_recommendations)
161
- if max_recommendations.nil?
162
- raise ArgumentError, "max_recommendations cannot be nil"
163
- end
164
-
165
- if max_recommendations > 1000
166
- raise ArgumentError, "invalid value for \"max_recommendations\", must be smaller than or equal to 1000."
167
- end
168
-
169
- if max_recommendations < 1
170
- raise ArgumentError, "invalid value for \"max_recommendations\", must be greater than or equal to 1."
171
- end
172
-
173
- @max_recommendations = max_recommendations
174
- end
175
-
176
140
  # Checks equality by comparing each attribute.
177
141
  # @param [Object] Object to be compared
178
142
  def ==(other)
@@ -7,6 +7,7 @@ module Algolia
7
7
  module Recommend
8
8
  # widgets returned from any rules that are applied to the current search.
9
9
  class Widgets
10
+ # banners defined in the merchandising studio for the given search.
10
11
  attr_accessor :banners
11
12
 
12
13
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -24,7 +25,7 @@ module Algolia
24
25
  # Attribute type mapping.
25
26
  def self.types_mapping
26
27
  {
27
- :banners => :"Banners"
28
+ :banners => :"Array<Banner>"
28
29
  }
29
30
  end
30
31
 
@@ -56,7 +57,9 @@ module Algolia
56
57
  }
57
58
 
58
59
  if attributes.key?(:banners)
59
- self.banners = attributes[:banners]
60
+ if (value = attributes[:banners]).is_a?(Array)
61
+ self.banners = value
62
+ end
60
63
  end
61
64
  end
62
65
 
@@ -27,7 +27,7 @@ module Algolia
27
27
  # Attribute type mapping.
28
28
  def self.types_mapping
29
29
  {
30
- :urls => :"BannerImageUrl",
30
+ :urls => :"Array<BannerImageUrl>",
31
31
  :title => :"String"
32
32
  }
33
33
  end
@@ -63,7 +63,9 @@ module Algolia
63
63
  }
64
64
 
65
65
  if attributes.key?(:urls)
66
- self.urls = attributes[:urls]
66
+ if (value = attributes[:urls]).is_a?(Array)
67
+ self.urls = value
68
+ end
67
69
  end
68
70
 
69
71
  if attributes.key?(:title)
@@ -776,134 +776,6 @@ module Algolia
776
776
  end
777
777
  end
778
778
 
779
- # Custom attribute writer method with validation
780
- # @param [Object] page Value to be assigned
781
- def page=(page)
782
- if page.nil?
783
- raise ArgumentError, "page cannot be nil"
784
- end
785
-
786
- if page < 0
787
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
788
- end
789
-
790
- @page = page
791
- end
792
-
793
- # Custom attribute writer method with validation
794
- # @param [Object] length Value to be assigned
795
- def length=(length)
796
- if length.nil?
797
- raise ArgumentError, "length cannot be nil"
798
- end
799
-
800
- if length > 1000
801
- raise ArgumentError, "invalid value for \"length\", must be smaller than or equal to 1000."
802
- end
803
-
804
- if length < 0
805
- raise ArgumentError, "invalid value for \"length\", must be greater than or equal to 0."
806
- end
807
-
808
- @length = length
809
- end
810
-
811
- # Custom attribute writer method with validation
812
- # @param [Object] minimum_around_radius Value to be assigned
813
- def minimum_around_radius=(minimum_around_radius)
814
- if minimum_around_radius.nil?
815
- raise ArgumentError, "minimum_around_radius cannot be nil"
816
- end
817
-
818
- if minimum_around_radius < 1
819
- raise ArgumentError, "invalid value for \"minimum_around_radius\", must be greater than or equal to 1."
820
- end
821
-
822
- @minimum_around_radius = minimum_around_radius
823
- end
824
-
825
- # Custom attribute writer method with validation
826
- # @param [Object] personalization_impact Value to be assigned
827
- def personalization_impact=(personalization_impact)
828
- if personalization_impact.nil?
829
- raise ArgumentError, "personalization_impact cannot be nil"
830
- end
831
-
832
- if personalization_impact > 100
833
- raise ArgumentError, "invalid value for \"personalization_impact\", must be smaller than or equal to 100."
834
- end
835
-
836
- if personalization_impact < 0
837
- raise ArgumentError, "invalid value for \"personalization_impact\", must be greater than or equal to 0."
838
- end
839
-
840
- @personalization_impact = personalization_impact
841
- end
842
-
843
- # Custom attribute writer method with validation
844
- # @param [Object] hits_per_page Value to be assigned
845
- def hits_per_page=(hits_per_page)
846
- if hits_per_page.nil?
847
- raise ArgumentError, "hits_per_page cannot be nil"
848
- end
849
-
850
- if hits_per_page > 1000
851
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
852
- end
853
-
854
- if hits_per_page < 1
855
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
856
- end
857
-
858
- @hits_per_page = hits_per_page
859
- end
860
-
861
- # Custom attribute writer method with validation
862
- # @param [Object] min_proximity Value to be assigned
863
- def min_proximity=(min_proximity)
864
- if min_proximity.nil?
865
- raise ArgumentError, "min_proximity cannot be nil"
866
- end
867
-
868
- if min_proximity > 7
869
- raise ArgumentError, "invalid value for \"min_proximity\", must be smaller than or equal to 7."
870
- end
871
-
872
- if min_proximity < 1
873
- raise ArgumentError, "invalid value for \"min_proximity\", must be greater than or equal to 1."
874
- end
875
-
876
- @min_proximity = min_proximity
877
- end
878
-
879
- # Custom attribute writer method with validation
880
- # @param [Object] max_facet_hits Value to be assigned
881
- def max_facet_hits=(max_facet_hits)
882
- if max_facet_hits.nil?
883
- raise ArgumentError, "max_facet_hits cannot be nil"
884
- end
885
-
886
- if max_facet_hits > 100
887
- raise ArgumentError, "invalid value for \"max_facet_hits\", must be smaller than or equal to 100."
888
- end
889
-
890
- @max_facet_hits = max_facet_hits
891
- end
892
-
893
- # Custom attribute writer method with validation
894
- # @param [Object] max_values_per_facet Value to be assigned
895
- def max_values_per_facet=(max_values_per_facet)
896
- if max_values_per_facet.nil?
897
- raise ArgumentError, "max_values_per_facet cannot be nil"
898
- end
899
-
900
- if max_values_per_facet > 1000
901
- raise ArgumentError, "invalid value for \"max_values_per_facet\", must be smaller than or equal to 1000."
902
- end
903
-
904
- @max_values_per_facet = max_values_per_facet
905
- end
906
-
907
779
  # Checks equality by comparing each attribute.
908
780
  # @param [Object] Object to be compared
909
781
  def ==(other)
@@ -372,67 +372,6 @@ module Algolia
372
372
  end
373
373
  end
374
374
 
375
- # Custom attribute writer method with validation
376
- # @param [Object] ab_test_variant_id Value to be assigned
377
- def ab_test_variant_id=(ab_test_variant_id)
378
- if ab_test_variant_id.nil?
379
- raise ArgumentError, "ab_test_variant_id cannot be nil"
380
- end
381
-
382
- if ab_test_variant_id < 1
383
- raise ArgumentError, "invalid value for \"ab_test_variant_id\", must be greater than or equal to 1."
384
- end
385
-
386
- @ab_test_variant_id = ab_test_variant_id
387
- end
388
-
389
- # Custom attribute writer method with validation
390
- # @param [Object] around_lat_lng Value to be assigned
391
- def around_lat_lng=(around_lat_lng)
392
- if around_lat_lng.nil?
393
- raise ArgumentError, "around_lat_lng cannot be nil"
394
- end
395
-
396
- pattern = /^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$/
397
- if around_lat_lng !~ pattern
398
- raise ArgumentError, "invalid value for \"around_lat_lng\", must conform to the pattern #{pattern}."
399
- end
400
-
401
- @around_lat_lng = around_lat_lng
402
- end
403
-
404
- # Custom attribute writer method with validation
405
- # @param [Object] page Value to be assigned
406
- def page=(page)
407
- if page.nil?
408
- raise ArgumentError, "page cannot be nil"
409
- end
410
-
411
- if page < 0
412
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
413
- end
414
-
415
- @page = page
416
- end
417
-
418
- # Custom attribute writer method with validation
419
- # @param [Object] hits_per_page Value to be assigned
420
- def hits_per_page=(hits_per_page)
421
- if hits_per_page.nil?
422
- raise ArgumentError, "hits_per_page cannot be nil"
423
- end
424
-
425
- if hits_per_page > 1000
426
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
427
- end
428
-
429
- if hits_per_page < 1
430
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
431
- end
432
-
433
- @hits_per_page = hits_per_page
434
- end
435
-
436
375
  # Checks equality by comparing each attribute.
437
376
  # @param [Object] Object to be compared
438
377
  def ==(other)
@@ -98,21 +98,6 @@ module Algolia
98
98
  end
99
99
  end
100
100
 
101
- # Custom attribute writer method with validation
102
- # @param [Object] context Value to be assigned
103
- def context=(context)
104
- if context.nil?
105
- raise ArgumentError, "context cannot be nil"
106
- end
107
-
108
- pattern = /[A-Za-z0-9_-]+/
109
- if context !~ pattern
110
- raise ArgumentError, "invalid value for \"context\", must conform to the pattern #{pattern}."
111
- end
112
-
113
- @context = context
114
- end
115
-
116
101
  # Checks equality by comparing each attribute.
117
102
  # @param [Object] Object to be compared
118
103
  def ==(other)
@@ -105,34 +105,6 @@ module Algolia
105
105
  end
106
106
  end
107
107
 
108
- # Custom attribute writer method with validation
109
- # @param [Object] promote Value to be assigned
110
- def promote=(promote)
111
- if promote.nil?
112
- raise ArgumentError, "promote cannot be nil"
113
- end
114
-
115
- if promote.length > 300
116
- raise ArgumentError, "invalid value for \"promote\", number of items must be less than or equal to 300."
117
- end
118
-
119
- @promote = promote
120
- end
121
-
122
- # Custom attribute writer method with validation
123
- # @param [Object] hide Value to be assigned
124
- def hide=(hide)
125
- if hide.nil?
126
- raise ArgumentError, "hide cannot be nil"
127
- end
128
-
129
- if hide.length > 50
130
- raise ArgumentError, "invalid value for \"hide\", number of items must be less than or equal to 50."
131
- end
132
-
133
- @hide = hide
134
- end
135
-
136
108
  # Checks equality by comparing each attribute.
137
109
  # @param [Object] Object to be compared
138
110
  def ==(other)
@@ -783,134 +783,6 @@ module Algolia
783
783
  end
784
784
  end
785
785
 
786
- # Custom attribute writer method with validation
787
- # @param [Object] page Value to be assigned
788
- def page=(page)
789
- if page.nil?
790
- raise ArgumentError, "page cannot be nil"
791
- end
792
-
793
- if page < 0
794
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
795
- end
796
-
797
- @page = page
798
- end
799
-
800
- # Custom attribute writer method with validation
801
- # @param [Object] length Value to be assigned
802
- def length=(length)
803
- if length.nil?
804
- raise ArgumentError, "length cannot be nil"
805
- end
806
-
807
- if length > 1000
808
- raise ArgumentError, "invalid value for \"length\", must be smaller than or equal to 1000."
809
- end
810
-
811
- if length < 0
812
- raise ArgumentError, "invalid value for \"length\", must be greater than or equal to 0."
813
- end
814
-
815
- @length = length
816
- end
817
-
818
- # Custom attribute writer method with validation
819
- # @param [Object] minimum_around_radius Value to be assigned
820
- def minimum_around_radius=(minimum_around_radius)
821
- if minimum_around_radius.nil?
822
- raise ArgumentError, "minimum_around_radius cannot be nil"
823
- end
824
-
825
- if minimum_around_radius < 1
826
- raise ArgumentError, "invalid value for \"minimum_around_radius\", must be greater than or equal to 1."
827
- end
828
-
829
- @minimum_around_radius = minimum_around_radius
830
- end
831
-
832
- # Custom attribute writer method with validation
833
- # @param [Object] personalization_impact Value to be assigned
834
- def personalization_impact=(personalization_impact)
835
- if personalization_impact.nil?
836
- raise ArgumentError, "personalization_impact cannot be nil"
837
- end
838
-
839
- if personalization_impact > 100
840
- raise ArgumentError, "invalid value for \"personalization_impact\", must be smaller than or equal to 100."
841
- end
842
-
843
- if personalization_impact < 0
844
- raise ArgumentError, "invalid value for \"personalization_impact\", must be greater than or equal to 0."
845
- end
846
-
847
- @personalization_impact = personalization_impact
848
- end
849
-
850
- # Custom attribute writer method with validation
851
- # @param [Object] hits_per_page Value to be assigned
852
- def hits_per_page=(hits_per_page)
853
- if hits_per_page.nil?
854
- raise ArgumentError, "hits_per_page cannot be nil"
855
- end
856
-
857
- if hits_per_page > 1000
858
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
859
- end
860
-
861
- if hits_per_page < 1
862
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
863
- end
864
-
865
- @hits_per_page = hits_per_page
866
- end
867
-
868
- # Custom attribute writer method with validation
869
- # @param [Object] min_proximity Value to be assigned
870
- def min_proximity=(min_proximity)
871
- if min_proximity.nil?
872
- raise ArgumentError, "min_proximity cannot be nil"
873
- end
874
-
875
- if min_proximity > 7
876
- raise ArgumentError, "invalid value for \"min_proximity\", must be smaller than or equal to 7."
877
- end
878
-
879
- if min_proximity < 1
880
- raise ArgumentError, "invalid value for \"min_proximity\", must be greater than or equal to 1."
881
- end
882
-
883
- @min_proximity = min_proximity
884
- end
885
-
886
- # Custom attribute writer method with validation
887
- # @param [Object] max_facet_hits Value to be assigned
888
- def max_facet_hits=(max_facet_hits)
889
- if max_facet_hits.nil?
890
- raise ArgumentError, "max_facet_hits cannot be nil"
891
- end
892
-
893
- if max_facet_hits > 100
894
- raise ArgumentError, "invalid value for \"max_facet_hits\", must be smaller than or equal to 100."
895
- end
896
-
897
- @max_facet_hits = max_facet_hits
898
- end
899
-
900
- # Custom attribute writer method with validation
901
- # @param [Object] max_values_per_facet Value to be assigned
902
- def max_values_per_facet=(max_values_per_facet)
903
- if max_values_per_facet.nil?
904
- raise ArgumentError, "max_values_per_facet cannot be nil"
905
- end
906
-
907
- if max_values_per_facet > 1000
908
- raise ArgumentError, "invalid value for \"max_values_per_facet\", must be smaller than or equal to 1000."
909
- end
910
-
911
- @max_values_per_facet = max_values_per_facet
912
- end
913
-
914
786
  # Checks equality by comparing each attribute.
915
787
  # @param [Object] Object to be compared
916
788
  def ==(other)
@@ -647,84 +647,6 @@ module Algolia
647
647
  end
648
648
  end
649
649
 
650
- # Custom attribute writer method with validation
651
- # @param [Object] pagination_limited_to Value to be assigned
652
- def pagination_limited_to=(pagination_limited_to)
653
- if pagination_limited_to.nil?
654
- raise ArgumentError, "pagination_limited_to cannot be nil"
655
- end
656
-
657
- if pagination_limited_to > 20000
658
- raise ArgumentError, "invalid value for \"pagination_limited_to\", must be smaller than or equal to 20000."
659
- end
660
-
661
- @pagination_limited_to = pagination_limited_to
662
- end
663
-
664
- # Custom attribute writer method with validation
665
- # @param [Object] hits_per_page Value to be assigned
666
- def hits_per_page=(hits_per_page)
667
- if hits_per_page.nil?
668
- raise ArgumentError, "hits_per_page cannot be nil"
669
- end
670
-
671
- if hits_per_page > 1000
672
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
673
- end
674
-
675
- if hits_per_page < 1
676
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
677
- end
678
-
679
- @hits_per_page = hits_per_page
680
- end
681
-
682
- # Custom attribute writer method with validation
683
- # @param [Object] min_proximity Value to be assigned
684
- def min_proximity=(min_proximity)
685
- if min_proximity.nil?
686
- raise ArgumentError, "min_proximity cannot be nil"
687
- end
688
-
689
- if min_proximity > 7
690
- raise ArgumentError, "invalid value for \"min_proximity\", must be smaller than or equal to 7."
691
- end
692
-
693
- if min_proximity < 1
694
- raise ArgumentError, "invalid value for \"min_proximity\", must be greater than or equal to 1."
695
- end
696
-
697
- @min_proximity = min_proximity
698
- end
699
-
700
- # Custom attribute writer method with validation
701
- # @param [Object] max_facet_hits Value to be assigned
702
- def max_facet_hits=(max_facet_hits)
703
- if max_facet_hits.nil?
704
- raise ArgumentError, "max_facet_hits cannot be nil"
705
- end
706
-
707
- if max_facet_hits > 100
708
- raise ArgumentError, "invalid value for \"max_facet_hits\", must be smaller than or equal to 100."
709
- end
710
-
711
- @max_facet_hits = max_facet_hits
712
- end
713
-
714
- # Custom attribute writer method with validation
715
- # @param [Object] max_values_per_facet Value to be assigned
716
- def max_values_per_facet=(max_values_per_facet)
717
- if max_values_per_facet.nil?
718
- raise ArgumentError, "max_values_per_facet cannot be nil"
719
- end
720
-
721
- if max_values_per_facet > 1000
722
- raise ArgumentError, "invalid value for \"max_values_per_facet\", must be smaller than or equal to 1000."
723
- end
724
-
725
- @max_values_per_facet = max_values_per_facet
726
- end
727
-
728
650
  # Checks equality by comparing each attribute.
729
651
  # @param [Object] Object to be compared
730
652
  def ==(other)