algolia 3.4.0 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -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 +32 -88
  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 +19 -74
  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.rb +218 -0
  70. data/lib/algolia/models/{query-suggestions/base_query_suggestions_configuration_response.rb → recommend/banner_image.rb} +31 -38
  71. data/lib/algolia/models/{query-suggestions/base_query_suggestions_configuration_with_index.rb → recommend/banner_image_url.rb} +23 -23
  72. data/lib/algolia/models/{query-suggestions/get_config_status200_response.rb → recommend/banner_link.rb} +13 -53
  73. data/lib/algolia/models/recommend/bought_together_query.rb +0 -36
  74. data/lib/algolia/models/recommend/condition.rb +0 -15
  75. data/lib/algolia/models/recommend/consequence.rb +0 -28
  76. data/lib/algolia/models/recommend/fallback_params.rb +8 -100
  77. data/lib/algolia/models/recommend/looking_similar_query.rb +0 -36
  78. data/lib/algolia/models/recommend/numeric_filters.rb +1 -1
  79. data/lib/algolia/models/recommend/promote_consequence_object.rb +0 -14
  80. data/lib/algolia/models/recommend/ranking_info.rb +0 -112
  81. data/lib/algolia/models/recommend/recommend_hit.rb +0 -18
  82. data/lib/algolia/models/recommend/recommend_search_params.rb +8 -100
  83. data/lib/algolia/models/recommend/recommendations_results.rb +0 -61
  84. data/lib/algolia/models/recommend/recommended_for_you_query.rb +0 -36
  85. data/lib/algolia/models/recommend/related_query.rb +0 -36
  86. data/lib/algolia/models/recommend/rendering_content.rb +14 -5
  87. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +0 -50
  88. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +0 -14
  89. data/lib/algolia/models/recommend/trending_facet_hit.rb +0 -18
  90. data/lib/algolia/models/recommend/trending_facets_query.rb +0 -36
  91. data/lib/algolia/models/recommend/trending_items_query.rb +0 -36
  92. data/lib/algolia/models/recommend/typo_tolerance.rb +1 -1
  93. data/lib/algolia/models/recommend/widgets.rb +212 -0
  94. data/lib/algolia/models/search/api_key.rb +1 -1
  95. data/lib/algolia/models/search/banner.rb +218 -0
  96. data/lib/algolia/models/{query-suggestions/get_log_file200_response.rb → search/banner_image.rb} +21 -61
  97. data/lib/algolia/models/search/banner_image_url.rb +212 -0
  98. data/lib/algolia/models/search/banner_link.rb +212 -0
  99. data/lib/algolia/models/search/browse_params_object.rb +4 -132
  100. data/lib/algolia/models/search/browse_response.rb +0 -61
  101. data/lib/algolia/models/search/condition.rb +0 -15
  102. data/lib/algolia/models/search/consequence.rb +0 -28
  103. data/lib/algolia/models/search/consequence_params.rb +4 -132
  104. data/lib/algolia/models/search/delete_by_params.rb +1 -1
  105. data/lib/algolia/models/search/get_api_key_response.rb +1 -1
  106. data/lib/algolia/models/search/index_settings.rb +7 -85
  107. data/lib/algolia/models/search/log.rb +0 -34
  108. data/lib/algolia/models/search/numeric_filters.rb +1 -1
  109. data/lib/algolia/models/search/promote_object_ids.rb +0 -14
  110. data/lib/algolia/models/search/ranking_info.rb +0 -112
  111. data/lib/algolia/models/search/rendering_content.rb +14 -5
  112. data/lib/algolia/models/search/rule.rb +0 -18
  113. data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -32
  114. data/lib/algolia/models/search/search_dictionary_entries_response.rb +0 -14
  115. data/lib/algolia/models/search/search_for_facet_values_request.rb +0 -14
  116. data/lib/algolia/models/search/search_for_facets.rb +4 -132
  117. data/lib/algolia/models/search/search_for_hits.rb +4 -132
  118. data/lib/algolia/models/search/search_params_object.rb +4 -132
  119. data/lib/algolia/models/search/search_response.rb +0 -61
  120. data/lib/algolia/models/search/search_rules_params.rb +0 -32
  121. data/lib/algolia/models/search/search_synonyms_params.rb +0 -32
  122. data/lib/algolia/models/search/search_user_ids_params.rb +0 -32
  123. data/lib/algolia/models/search/search_user_ids_response.rb +0 -32
  124. data/lib/algolia/models/search/settings_response.rb +7 -85
  125. data/lib/algolia/models/search/typo_tolerance.rb +1 -1
  126. data/lib/algolia/models/search/user_hit.rb +0 -15
  127. data/lib/algolia/models/search/user_id.rb +0 -15
  128. data/lib/algolia/models/search/widgets.rb +212 -0
  129. data/lib/algolia/version.rb +1 -1
  130. metadata +12 -9
  131. data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +0 -276
  132. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +0 -316
  133. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +0 -295
@@ -178,155 +178,6 @@ module Algolia
178
178
  end
179
179
  end
180
180
 
181
- # Custom attribute writer method with validation
182
- # @param [Object] event_name Value to be assigned
183
- def event_name=(event_name)
184
- if event_name.nil?
185
- raise ArgumentError, "event_name cannot be nil"
186
- end
187
-
188
- if event_name.to_s.length > 64
189
- raise(
190
- ArgumentError,
191
- "invalid value for \"event_name\", the character length must be smaller than or equal to 64."
192
- )
193
- end
194
-
195
- if event_name.to_s.length < 1
196
- raise(
197
- ArgumentError,
198
- "invalid value for \"event_name\", the character length must be great than or equal to 1."
199
- )
200
- end
201
-
202
- pattern = /[\x20-\x7E]{1,64}/
203
- if event_name !~ pattern
204
- raise ArgumentError, "invalid value for \"event_name\", must conform to the pattern #{pattern}."
205
- end
206
-
207
- @event_name = event_name
208
- end
209
-
210
- # Custom attribute writer method with validation
211
- # @param [Object] query_id Value to be assigned
212
- def query_id=(query_id)
213
- if query_id.nil?
214
- raise ArgumentError, "query_id cannot be nil"
215
- end
216
-
217
- if query_id.to_s.length > 32
218
- raise(
219
- ArgumentError,
220
- "invalid value for \"query_id\", the character length must be smaller than or equal to 32."
221
- )
222
- end
223
-
224
- if query_id.to_s.length < 32
225
- raise ArgumentError, "invalid value for \"query_id\", the character length must be great than or equal to 32."
226
- end
227
-
228
- pattern = /[0-9a-f]{32}/
229
- if query_id !~ pattern
230
- raise ArgumentError, "invalid value for \"query_id\", must conform to the pattern #{pattern}."
231
- end
232
-
233
- @query_id = query_id
234
- end
235
-
236
- # Custom attribute writer method with validation
237
- # @param [Object] object_ids Value to be assigned
238
- def object_ids=(object_ids)
239
- if object_ids.nil?
240
- raise ArgumentError, "object_ids cannot be nil"
241
- end
242
-
243
- if object_ids.length > 20
244
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be less than or equal to 20."
245
- end
246
-
247
- if object_ids.length < 1
248
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be greater than or equal to 1."
249
- end
250
-
251
- @object_ids = object_ids
252
- end
253
-
254
- # Custom attribute writer method with validation
255
- # @param [Object] user_token Value to be assigned
256
- def user_token=(user_token)
257
- if user_token.nil?
258
- raise ArgumentError, "user_token cannot be nil"
259
- end
260
-
261
- if user_token.to_s.length > 129
262
- raise(
263
- ArgumentError,
264
- "invalid value for \"user_token\", the character length must be smaller than or equal to 129."
265
- )
266
- end
267
-
268
- if user_token.to_s.length < 1
269
- raise(
270
- ArgumentError,
271
- "invalid value for \"user_token\", the character length must be great than or equal to 1."
272
- )
273
- end
274
-
275
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
276
- if user_token !~ pattern
277
- raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
278
- end
279
-
280
- @user_token = user_token
281
- end
282
-
283
- # Custom attribute writer method with validation
284
- # @param [Object] authenticated_user_token Value to be assigned
285
- def authenticated_user_token=(authenticated_user_token)
286
- if authenticated_user_token.nil?
287
- raise ArgumentError, "authenticated_user_token cannot be nil"
288
- end
289
-
290
- if authenticated_user_token.to_s.length > 129
291
- raise(
292
- ArgumentError,
293
- "invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
294
- )
295
- end
296
-
297
- if authenticated_user_token.to_s.length < 1
298
- raise(
299
- ArgumentError,
300
- "invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
301
- )
302
- end
303
-
304
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
305
- if authenticated_user_token !~ pattern
306
- raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
307
- end
308
-
309
- @authenticated_user_token = authenticated_user_token
310
- end
311
-
312
- # Custom attribute writer method with validation
313
- # @param [Object] object_data Value to be assigned
314
- def object_data=(object_data)
315
- if object_data.nil?
316
- raise ArgumentError, "object_data cannot be nil"
317
- end
318
-
319
- if object_data.length > 20
320
- raise ArgumentError, "invalid value for \"object_data\", number of items must be less than or equal to 20."
321
- end
322
-
323
- if object_data.length < 1
324
- raise ArgumentError, "invalid value for \"object_data\", number of items must be greater than or equal to 1."
325
- end
326
-
327
- @object_data = object_data
328
- end
329
-
330
181
  # Checks equality by comparing each attribute.
331
182
  # @param [Object] Object to be compared
332
183
  def ==(other)
@@ -129,111 +129,6 @@ module Algolia
129
129
  end
130
130
  end
131
131
 
132
- # Custom attribute writer method with validation
133
- # @param [Object] event_name Value to be assigned
134
- def event_name=(event_name)
135
- if event_name.nil?
136
- raise ArgumentError, "event_name cannot be nil"
137
- end
138
-
139
- if event_name.to_s.length > 64
140
- raise(
141
- ArgumentError,
142
- "invalid value for \"event_name\", the character length must be smaller than or equal to 64."
143
- )
144
- end
145
-
146
- if event_name.to_s.length < 1
147
- raise(
148
- ArgumentError,
149
- "invalid value for \"event_name\", the character length must be great than or equal to 1."
150
- )
151
- end
152
-
153
- pattern = /[\x20-\x7E]{1,64}/
154
- if event_name !~ pattern
155
- raise ArgumentError, "invalid value for \"event_name\", must conform to the pattern #{pattern}."
156
- end
157
-
158
- @event_name = event_name
159
- end
160
-
161
- # Custom attribute writer method with validation
162
- # @param [Object] filters Value to be assigned
163
- def filters=(filters)
164
- if filters.nil?
165
- raise ArgumentError, "filters cannot be nil"
166
- end
167
-
168
- if filters.length > 20
169
- raise ArgumentError, "invalid value for \"filters\", number of items must be less than or equal to 20."
170
- end
171
-
172
- if filters.length < 1
173
- raise ArgumentError, "invalid value for \"filters\", number of items must be greater than or equal to 1."
174
- end
175
-
176
- @filters = filters
177
- end
178
-
179
- # Custom attribute writer method with validation
180
- # @param [Object] user_token Value to be assigned
181
- def user_token=(user_token)
182
- if user_token.nil?
183
- raise ArgumentError, "user_token cannot be nil"
184
- end
185
-
186
- if user_token.to_s.length > 129
187
- raise(
188
- ArgumentError,
189
- "invalid value for \"user_token\", the character length must be smaller than or equal to 129."
190
- )
191
- end
192
-
193
- if user_token.to_s.length < 1
194
- raise(
195
- ArgumentError,
196
- "invalid value for \"user_token\", the character length must be great than or equal to 1."
197
- )
198
- end
199
-
200
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
201
- if user_token !~ pattern
202
- raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
203
- end
204
-
205
- @user_token = user_token
206
- end
207
-
208
- # Custom attribute writer method with validation
209
- # @param [Object] authenticated_user_token Value to be assigned
210
- def authenticated_user_token=(authenticated_user_token)
211
- if authenticated_user_token.nil?
212
- raise ArgumentError, "authenticated_user_token cannot be nil"
213
- end
214
-
215
- if authenticated_user_token.to_s.length > 129
216
- raise(
217
- ArgumentError,
218
- "invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
219
- )
220
- end
221
-
222
- if authenticated_user_token.to_s.length < 1
223
- raise(
224
- ArgumentError,
225
- "invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
226
- )
227
- end
228
-
229
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
230
- if authenticated_user_token !~ pattern
231
- raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
232
- end
233
-
234
- @authenticated_user_token = authenticated_user_token
235
- end
236
-
237
132
  # Checks equality by comparing each attribute.
238
133
  # @param [Object] Object to be compared
239
134
  def ==(other)
@@ -129,111 +129,6 @@ module Algolia
129
129
  end
130
130
  end
131
131
 
132
- # Custom attribute writer method with validation
133
- # @param [Object] event_name Value to be assigned
134
- def event_name=(event_name)
135
- if event_name.nil?
136
- raise ArgumentError, "event_name cannot be nil"
137
- end
138
-
139
- if event_name.to_s.length > 64
140
- raise(
141
- ArgumentError,
142
- "invalid value for \"event_name\", the character length must be smaller than or equal to 64."
143
- )
144
- end
145
-
146
- if event_name.to_s.length < 1
147
- raise(
148
- ArgumentError,
149
- "invalid value for \"event_name\", the character length must be great than or equal to 1."
150
- )
151
- end
152
-
153
- pattern = /[\x20-\x7E]{1,64}/
154
- if event_name !~ pattern
155
- raise ArgumentError, "invalid value for \"event_name\", must conform to the pattern #{pattern}."
156
- end
157
-
158
- @event_name = event_name
159
- end
160
-
161
- # Custom attribute writer method with validation
162
- # @param [Object] object_ids Value to be assigned
163
- def object_ids=(object_ids)
164
- if object_ids.nil?
165
- raise ArgumentError, "object_ids cannot be nil"
166
- end
167
-
168
- if object_ids.length > 20
169
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be less than or equal to 20."
170
- end
171
-
172
- if object_ids.length < 1
173
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be greater than or equal to 1."
174
- end
175
-
176
- @object_ids = object_ids
177
- end
178
-
179
- # Custom attribute writer method with validation
180
- # @param [Object] user_token Value to be assigned
181
- def user_token=(user_token)
182
- if user_token.nil?
183
- raise ArgumentError, "user_token cannot be nil"
184
- end
185
-
186
- if user_token.to_s.length > 129
187
- raise(
188
- ArgumentError,
189
- "invalid value for \"user_token\", the character length must be smaller than or equal to 129."
190
- )
191
- end
192
-
193
- if user_token.to_s.length < 1
194
- raise(
195
- ArgumentError,
196
- "invalid value for \"user_token\", the character length must be great than or equal to 1."
197
- )
198
- end
199
-
200
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
201
- if user_token !~ pattern
202
- raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
203
- end
204
-
205
- @user_token = user_token
206
- end
207
-
208
- # Custom attribute writer method with validation
209
- # @param [Object] authenticated_user_token Value to be assigned
210
- def authenticated_user_token=(authenticated_user_token)
211
- if authenticated_user_token.nil?
212
- raise ArgumentError, "authenticated_user_token cannot be nil"
213
- end
214
-
215
- if authenticated_user_token.to_s.length > 129
216
- raise(
217
- ArgumentError,
218
- "invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
219
- )
220
- end
221
-
222
- if authenticated_user_token.to_s.length < 1
223
- raise(
224
- ArgumentError,
225
- "invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
226
- )
227
- end
228
-
229
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
230
- if authenticated_user_token !~ pattern
231
- raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
232
- end
233
-
234
- @authenticated_user_token = authenticated_user_token
235
- end
236
-
237
132
  # Checks equality by comparing each attribute.
238
133
  # @param [Object] Object to be compared
239
134
  def ==(other)
@@ -153,155 +153,6 @@ module Algolia
153
153
  end
154
154
  end
155
155
 
156
- # Custom attribute writer method with validation
157
- # @param [Object] event_name Value to be assigned
158
- def event_name=(event_name)
159
- if event_name.nil?
160
- raise ArgumentError, "event_name cannot be nil"
161
- end
162
-
163
- if event_name.to_s.length > 64
164
- raise(
165
- ArgumentError,
166
- "invalid value for \"event_name\", the character length must be smaller than or equal to 64."
167
- )
168
- end
169
-
170
- if event_name.to_s.length < 1
171
- raise(
172
- ArgumentError,
173
- "invalid value for \"event_name\", the character length must be great than or equal to 1."
174
- )
175
- end
176
-
177
- pattern = /[\x20-\x7E]{1,64}/
178
- if event_name !~ pattern
179
- raise ArgumentError, "invalid value for \"event_name\", must conform to the pattern #{pattern}."
180
- end
181
-
182
- @event_name = event_name
183
- end
184
-
185
- # Custom attribute writer method with validation
186
- # @param [Object] object_ids Value to be assigned
187
- def object_ids=(object_ids)
188
- if object_ids.nil?
189
- raise ArgumentError, "object_ids cannot be nil"
190
- end
191
-
192
- if object_ids.length > 20
193
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be less than or equal to 20."
194
- end
195
-
196
- if object_ids.length < 1
197
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be greater than or equal to 1."
198
- end
199
-
200
- @object_ids = object_ids
201
- end
202
-
203
- # Custom attribute writer method with validation
204
- # @param [Object] positions Value to be assigned
205
- def positions=(positions)
206
- if positions.nil?
207
- raise ArgumentError, "positions cannot be nil"
208
- end
209
-
210
- if positions.length > 20
211
- raise ArgumentError, "invalid value for \"positions\", number of items must be less than or equal to 20."
212
- end
213
-
214
- if positions.length < 1
215
- raise ArgumentError, "invalid value for \"positions\", number of items must be greater than or equal to 1."
216
- end
217
-
218
- @positions = positions
219
- end
220
-
221
- # Custom attribute writer method with validation
222
- # @param [Object] query_id Value to be assigned
223
- def query_id=(query_id)
224
- if query_id.nil?
225
- raise ArgumentError, "query_id cannot be nil"
226
- end
227
-
228
- if query_id.to_s.length > 32
229
- raise(
230
- ArgumentError,
231
- "invalid value for \"query_id\", the character length must be smaller than or equal to 32."
232
- )
233
- end
234
-
235
- if query_id.to_s.length < 32
236
- raise ArgumentError, "invalid value for \"query_id\", the character length must be great than or equal to 32."
237
- end
238
-
239
- pattern = /[0-9a-f]{32}/
240
- if query_id !~ pattern
241
- raise ArgumentError, "invalid value for \"query_id\", must conform to the pattern #{pattern}."
242
- end
243
-
244
- @query_id = query_id
245
- end
246
-
247
- # Custom attribute writer method with validation
248
- # @param [Object] user_token Value to be assigned
249
- def user_token=(user_token)
250
- if user_token.nil?
251
- raise ArgumentError, "user_token cannot be nil"
252
- end
253
-
254
- if user_token.to_s.length > 129
255
- raise(
256
- ArgumentError,
257
- "invalid value for \"user_token\", the character length must be smaller than or equal to 129."
258
- )
259
- end
260
-
261
- if user_token.to_s.length < 1
262
- raise(
263
- ArgumentError,
264
- "invalid value for \"user_token\", the character length must be great than or equal to 1."
265
- )
266
- end
267
-
268
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
269
- if user_token !~ pattern
270
- raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
271
- end
272
-
273
- @user_token = user_token
274
- end
275
-
276
- # Custom attribute writer method with validation
277
- # @param [Object] authenticated_user_token Value to be assigned
278
- def authenticated_user_token=(authenticated_user_token)
279
- if authenticated_user_token.nil?
280
- raise ArgumentError, "authenticated_user_token cannot be nil"
281
- end
282
-
283
- if authenticated_user_token.to_s.length > 129
284
- raise(
285
- ArgumentError,
286
- "invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
287
- )
288
- end
289
-
290
- if authenticated_user_token.to_s.length < 1
291
- raise(
292
- ArgumentError,
293
- "invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
294
- )
295
- end
296
-
297
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
298
- if authenticated_user_token !~ pattern
299
- raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
300
- end
301
-
302
- @authenticated_user_token = authenticated_user_token
303
- end
304
-
305
156
  # Checks equality by comparing each attribute.
306
157
  # @param [Object] Object to be compared
307
158
  def ==(other)
@@ -128,111 +128,6 @@ module Algolia
128
128
  end
129
129
  end
130
130
 
131
- # Custom attribute writer method with validation
132
- # @param [Object] event_name Value to be assigned
133
- def event_name=(event_name)
134
- if event_name.nil?
135
- raise ArgumentError, "event_name cannot be nil"
136
- end
137
-
138
- if event_name.to_s.length > 64
139
- raise(
140
- ArgumentError,
141
- "invalid value for \"event_name\", the character length must be smaller than or equal to 64."
142
- )
143
- end
144
-
145
- if event_name.to_s.length < 1
146
- raise(
147
- ArgumentError,
148
- "invalid value for \"event_name\", the character length must be great than or equal to 1."
149
- )
150
- end
151
-
152
- pattern = /[\x20-\x7E]{1,64}/
153
- if event_name !~ pattern
154
- raise ArgumentError, "invalid value for \"event_name\", must conform to the pattern #{pattern}."
155
- end
156
-
157
- @event_name = event_name
158
- end
159
-
160
- # Custom attribute writer method with validation
161
- # @param [Object] filters Value to be assigned
162
- def filters=(filters)
163
- if filters.nil?
164
- raise ArgumentError, "filters cannot be nil"
165
- end
166
-
167
- if filters.length > 20
168
- raise ArgumentError, "invalid value for \"filters\", number of items must be less than or equal to 20."
169
- end
170
-
171
- if filters.length < 1
172
- raise ArgumentError, "invalid value for \"filters\", number of items must be greater than or equal to 1."
173
- end
174
-
175
- @filters = filters
176
- end
177
-
178
- # Custom attribute writer method with validation
179
- # @param [Object] user_token Value to be assigned
180
- def user_token=(user_token)
181
- if user_token.nil?
182
- raise ArgumentError, "user_token cannot be nil"
183
- end
184
-
185
- if user_token.to_s.length > 129
186
- raise(
187
- ArgumentError,
188
- "invalid value for \"user_token\", the character length must be smaller than or equal to 129."
189
- )
190
- end
191
-
192
- if user_token.to_s.length < 1
193
- raise(
194
- ArgumentError,
195
- "invalid value for \"user_token\", the character length must be great than or equal to 1."
196
- )
197
- end
198
-
199
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
200
- if user_token !~ pattern
201
- raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
202
- end
203
-
204
- @user_token = user_token
205
- end
206
-
207
- # Custom attribute writer method with validation
208
- # @param [Object] authenticated_user_token Value to be assigned
209
- def authenticated_user_token=(authenticated_user_token)
210
- if authenticated_user_token.nil?
211
- raise ArgumentError, "authenticated_user_token cannot be nil"
212
- end
213
-
214
- if authenticated_user_token.to_s.length > 129
215
- raise(
216
- ArgumentError,
217
- "invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
218
- )
219
- end
220
-
221
- if authenticated_user_token.to_s.length < 1
222
- raise(
223
- ArgumentError,
224
- "invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
225
- )
226
- end
227
-
228
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
229
- if authenticated_user_token !~ pattern
230
- raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
231
- end
232
-
233
- @authenticated_user_token = authenticated_user_token
234
- end
235
-
236
131
  # Checks equality by comparing each attribute.
237
132
  # @param [Object] Object to be compared
238
133
  def ==(other)