algolia 3.5.0 → 3.5.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/Gemfile.lock +1 -1
- data/lib/algolia/api/abtesting_client.rb +17 -16
- data/lib/algolia/api/analytics_client.rb +173 -333
- data/lib/algolia/api/ingestion_client.rb +40 -200
- data/lib/algolia/api/insights_client.rb +18 -32
- data/lib/algolia/api/monitoring_client.rb +33 -25
- data/lib/algolia/api/personalization_client.rb +16 -8
- data/lib/algolia/api/query_suggestions_client.rb +17 -9
- data/lib/algolia/api/recommend_client.rb +17 -9
- data/lib/algolia/api/search_client.rb +63 -110
- data/lib/algolia/configuration.rb +16 -1
- data/lib/algolia/models/abtesting/ab_test_configuration.rb +0 -2
- data/lib/algolia/models/abtesting/ab_tests_variant.rb +0 -18
- data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +0 -18
- data/lib/algolia/models/abtesting/add_ab_tests_request.rb +0 -18
- data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +0 -18
- data/lib/algolia/models/abtesting/schedule_ab_tests_request.rb +0 -18
- data/lib/algolia/models/abtesting/variant.rb +0 -20
- data/lib/algolia/models/analytics/click_position.rb +0 -32
- data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +0 -28
- data/lib/algolia/models/analytics/daily_average_clicks.rb +0 -24
- data/lib/algolia/models/analytics/daily_click_through_rates.rb +0 -28
- data/lib/algolia/models/analytics/daily_conversion_rates.rb +0 -28
- data/lib/algolia/models/analytics/daily_no_click_rates.rb +0 -32
- data/lib/algolia/models/analytics/daily_no_results_rates.rb +0 -18
- data/lib/algolia/models/analytics/daily_purchase_rates.rb +0 -14
- data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +0 -14
- data/lib/algolia/models/analytics/daily_searches_no_results.rb +0 -14
- data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +0 -28
- data/lib/algolia/models/analytics/get_average_click_position_response.rb +0 -24
- data/lib/algolia/models/analytics/get_click_positions_response.rb +0 -18
- data/lib/algolia/models/analytics/get_click_through_rate_response.rb +0 -28
- data/lib/algolia/models/analytics/get_conversion_rate_response.rb +0 -28
- data/lib/algolia/models/analytics/get_no_click_rate_response.rb +0 -32
- data/lib/algolia/models/analytics/get_no_results_rate_response.rb +0 -18
- data/lib/algolia/models/analytics/get_purchase_rate_response.rb +0 -14
- data/lib/algolia/models/analytics/top_hit_with_analytics.rb +0 -56
- data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +0 -98
- data/lib/algolia/models/analytics/top_search_with_analytics.rb +0 -90
- data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +0 -132
- data/lib/algolia/models/ingestion/event.rb +1 -25
- data/lib/algolia/models/ingestion/pagination.rb +0 -60
- data/lib/algolia/models/ingestion/run.rb +0 -18
- data/lib/algolia/models/ingestion/source_csv.rb +0 -21
- data/lib/algolia/models/ingestion/task.rb +0 -18
- data/lib/algolia/models/ingestion/task_create.rb +0 -18
- data/lib/algolia/models/ingestion/task_create_v1.rb +0 -18
- data/lib/algolia/models/ingestion/task_update.rb +0 -18
- data/lib/algolia/models/ingestion/task_update_v1.rb +0 -18
- data/lib/algolia/models/ingestion/task_v1.rb +0 -18
- data/lib/algolia/models/ingestion/transformation.rb +1 -1
- data/lib/algolia/models/ingestion/transformation_create.rb +1 -1
- data/lib/algolia/models/insights/added_to_cart_object_ids.rb +0 -123
- data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +0 -149
- data/lib/algolia/models/insights/clicked_filters.rb +0 -105
- data/lib/algolia/models/insights/clicked_object_ids.rb +0 -105
- data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +0 -149
- data/lib/algolia/models/insights/converted_filters.rb +0 -105
- data/lib/algolia/models/insights/converted_object_ids.rb +0 -105
- data/lib/algolia/models/insights/converted_object_ids_after_search.rb +0 -131
- data/lib/algolia/models/insights/insights_events.rb +0 -18
- data/lib/algolia/models/insights/object_data_after_search.rb +0 -26
- data/lib/algolia/models/insights/purchased_object_ids.rb +0 -123
- data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +0 -123
- data/lib/algolia/models/insights/viewed_filters.rb +0 -105
- data/lib/algolia/models/insights/viewed_object_ids.rb +0 -105
- data/lib/algolia/models/personalization/personalization_strategy_params.rb +0 -18
- data/lib/algolia/models/query-suggestions/configuration.rb +0 -17
- data/lib/algolia/models/query-suggestions/configuration_response.rb +0 -17
- data/lib/algolia/models/query-suggestions/configuration_with_index.rb +0 -17
- data/lib/algolia/models/query-suggestions/source_index.rb +0 -28
- data/lib/algolia/models/recommend/banner_image.rb +4 -2
- data/lib/algolia/models/recommend/bought_together_query.rb +0 -36
- data/lib/algolia/models/recommend/condition.rb +0 -15
- data/lib/algolia/models/recommend/consequence.rb +0 -28
- data/lib/algolia/models/recommend/fallback_params.rb +3 -95
- data/lib/algolia/models/recommend/looking_similar_query.rb +0 -36
- data/lib/algolia/models/recommend/promote_consequence_object.rb +0 -14
- data/lib/algolia/models/recommend/ranking_info.rb +0 -112
- data/lib/algolia/models/recommend/recommend_hit.rb +0 -20
- data/lib/algolia/models/recommend/recommend_search_params.rb +3 -95
- data/lib/algolia/models/recommend/recommendations_results.rb +13 -61
- data/lib/algolia/models/recommend/recommended_for_you_query.rb +0 -36
- data/lib/algolia/models/recommend/related_query.rb +0 -36
- data/lib/algolia/models/recommend/search_recommend_rules_params.rb +2 -52
- data/lib/algolia/models/recommend/search_recommend_rules_response.rb +0 -14
- data/lib/algolia/models/recommend/trending_facet_hit.rb +0 -20
- data/lib/algolia/models/recommend/trending_facets_query.rb +0 -36
- data/lib/algolia/models/recommend/trending_items_query.rb +0 -36
- data/lib/algolia/models/recommend/widgets.rb +5 -2
- data/lib/algolia/models/search/banner_image.rb +4 -2
- data/lib/algolia/models/search/browse_params_object.rb +1 -129
- data/lib/algolia/models/search/browse_response.rb +13 -61
- data/lib/algolia/models/search/condition.rb +0 -15
- data/lib/algolia/models/search/consequence.rb +0 -28
- data/lib/algolia/models/search/consequence_params.rb +1 -129
- data/lib/algolia/models/search/get_api_key_response.rb +2 -0
- data/lib/algolia/models/search/get_objects_response.rb +0 -2
- data/lib/algolia/models/search/index_settings.rb +3 -81
- data/lib/algolia/models/search/log.rb +0 -34
- data/lib/algolia/models/search/promote_object_ids.rb +0 -14
- data/lib/algolia/models/search/ranking_info.rb +0 -112
- data/lib/algolia/models/search/rule.rb +0 -18
- data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -32
- data/lib/algolia/models/search/search_dictionary_entries_response.rb +1 -15
- data/lib/algolia/models/search/search_for_facet_values_request.rb +0 -14
- data/lib/algolia/models/search/search_for_facets.rb +1 -129
- data/lib/algolia/models/search/search_for_hits.rb +1 -129
- data/lib/algolia/models/search/search_params_object.rb +1 -129
- data/lib/algolia/models/search/search_response.rb +13 -61
- data/lib/algolia/models/search/search_rules_params.rb +2 -34
- data/lib/algolia/models/search/search_synonyms_params.rb +0 -32
- data/lib/algolia/models/search/search_user_ids_params.rb +0 -32
- data/lib/algolia/models/search/search_user_ids_response.rb +1 -33
- data/lib/algolia/models/search/settings_response.rb +3 -81
- data/lib/algolia/models/search/user_hit.rb +0 -15
- data/lib/algolia/models/search/user_id.rb +0 -15
- data/lib/algolia/models/search/widgets.rb +5 -2
- data/lib/algolia/user_agent.rb +8 -2
- data/lib/algolia/version.rb +1 -1
- metadata +2 -11
- data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_response.rb +0 -230
- data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_with_index.rb +0 -212
- data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +0 -252
- data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +0 -263
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +0 -276
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +0 -316
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +0 -295
- data/lib/algolia/models/recommend/banners.rb +0 -209
- data/lib/algolia/models/search/banners.rb +0 -209
|
@@ -167,129 +167,6 @@ module Algolia
|
|
|
167
167
|
end
|
|
168
168
|
end
|
|
169
169
|
|
|
170
|
-
# Custom attribute writer method with validation
|
|
171
|
-
# @param [Object] event_name Value to be assigned
|
|
172
|
-
def event_name=(event_name)
|
|
173
|
-
if event_name.nil?
|
|
174
|
-
raise ArgumentError, "event_name cannot be nil"
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
if event_name.to_s.length > 64
|
|
178
|
-
raise(
|
|
179
|
-
ArgumentError,
|
|
180
|
-
"invalid value for \"event_name\", the character length must be smaller than or equal to 64."
|
|
181
|
-
)
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
if event_name.to_s.length < 1
|
|
185
|
-
raise(
|
|
186
|
-
ArgumentError,
|
|
187
|
-
"invalid value for \"event_name\", the character length must be great than or equal to 1."
|
|
188
|
-
)
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
pattern = /[\x20-\x7E]{1,64}/
|
|
192
|
-
if event_name !~ pattern
|
|
193
|
-
raise ArgumentError, "invalid value for \"event_name\", must conform to the pattern #{pattern}."
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
@event_name = event_name
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
# Custom attribute writer method with validation
|
|
200
|
-
# @param [Object] object_ids Value to be assigned
|
|
201
|
-
def object_ids=(object_ids)
|
|
202
|
-
if object_ids.nil?
|
|
203
|
-
raise ArgumentError, "object_ids cannot be nil"
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
if object_ids.length > 20
|
|
207
|
-
raise ArgumentError, "invalid value for \"object_ids\", number of items must be less than or equal to 20."
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
if object_ids.length < 1
|
|
211
|
-
raise ArgumentError, "invalid value for \"object_ids\", number of items must be greater than or equal to 1."
|
|
212
|
-
end
|
|
213
|
-
|
|
214
|
-
@object_ids = object_ids
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
# Custom attribute writer method with validation
|
|
218
|
-
# @param [Object] user_token Value to be assigned
|
|
219
|
-
def user_token=(user_token)
|
|
220
|
-
if user_token.nil?
|
|
221
|
-
raise ArgumentError, "user_token cannot be nil"
|
|
222
|
-
end
|
|
223
|
-
|
|
224
|
-
if user_token.to_s.length > 129
|
|
225
|
-
raise(
|
|
226
|
-
ArgumentError,
|
|
227
|
-
"invalid value for \"user_token\", the character length must be smaller than or equal to 129."
|
|
228
|
-
)
|
|
229
|
-
end
|
|
230
|
-
|
|
231
|
-
if user_token.to_s.length < 1
|
|
232
|
-
raise(
|
|
233
|
-
ArgumentError,
|
|
234
|
-
"invalid value for \"user_token\", the character length must be great than or equal to 1."
|
|
235
|
-
)
|
|
236
|
-
end
|
|
237
|
-
|
|
238
|
-
pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
|
|
239
|
-
if user_token !~ pattern
|
|
240
|
-
raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
|
|
241
|
-
end
|
|
242
|
-
|
|
243
|
-
@user_token = user_token
|
|
244
|
-
end
|
|
245
|
-
|
|
246
|
-
# Custom attribute writer method with validation
|
|
247
|
-
# @param [Object] authenticated_user_token Value to be assigned
|
|
248
|
-
def authenticated_user_token=(authenticated_user_token)
|
|
249
|
-
if authenticated_user_token.nil?
|
|
250
|
-
raise ArgumentError, "authenticated_user_token cannot be nil"
|
|
251
|
-
end
|
|
252
|
-
|
|
253
|
-
if authenticated_user_token.to_s.length > 129
|
|
254
|
-
raise(
|
|
255
|
-
ArgumentError,
|
|
256
|
-
"invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
|
|
257
|
-
)
|
|
258
|
-
end
|
|
259
|
-
|
|
260
|
-
if authenticated_user_token.to_s.length < 1
|
|
261
|
-
raise(
|
|
262
|
-
ArgumentError,
|
|
263
|
-
"invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
|
|
264
|
-
)
|
|
265
|
-
end
|
|
266
|
-
|
|
267
|
-
pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
|
|
268
|
-
if authenticated_user_token !~ pattern
|
|
269
|
-
raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
|
|
270
|
-
end
|
|
271
|
-
|
|
272
|
-
@authenticated_user_token = authenticated_user_token
|
|
273
|
-
end
|
|
274
|
-
|
|
275
|
-
# Custom attribute writer method with validation
|
|
276
|
-
# @param [Object] object_data Value to be assigned
|
|
277
|
-
def object_data=(object_data)
|
|
278
|
-
if object_data.nil?
|
|
279
|
-
raise ArgumentError, "object_data cannot be nil"
|
|
280
|
-
end
|
|
281
|
-
|
|
282
|
-
if object_data.length > 20
|
|
283
|
-
raise ArgumentError, "invalid value for \"object_data\", number of items must be less than or equal to 20."
|
|
284
|
-
end
|
|
285
|
-
|
|
286
|
-
if object_data.length < 1
|
|
287
|
-
raise ArgumentError, "invalid value for \"object_data\", number of items must be greater than or equal to 1."
|
|
288
|
-
end
|
|
289
|
-
|
|
290
|
-
@object_data = object_data
|
|
291
|
-
end
|
|
292
|
-
|
|
293
170
|
# Checks equality by comparing each attribute.
|
|
294
171
|
# @param [Object] Object to be compared
|
|
295
172
|
def ==(other)
|
|
@@ -169,129 +169,6 @@ module Algolia
|
|
|
169
169
|
end
|
|
170
170
|
end
|
|
171
171
|
|
|
172
|
-
# Custom attribute writer method with validation
|
|
173
|
-
# @param [Object] event_name Value to be assigned
|
|
174
|
-
def event_name=(event_name)
|
|
175
|
-
if event_name.nil?
|
|
176
|
-
raise ArgumentError, "event_name cannot be nil"
|
|
177
|
-
end
|
|
178
|
-
|
|
179
|
-
if event_name.to_s.length > 64
|
|
180
|
-
raise(
|
|
181
|
-
ArgumentError,
|
|
182
|
-
"invalid value for \"event_name\", the character length must be smaller than or equal to 64."
|
|
183
|
-
)
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
if event_name.to_s.length < 1
|
|
187
|
-
raise(
|
|
188
|
-
ArgumentError,
|
|
189
|
-
"invalid value for \"event_name\", the character length must be great than or equal to 1."
|
|
190
|
-
)
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
pattern = /[\x20-\x7E]{1,64}/
|
|
194
|
-
if event_name !~ pattern
|
|
195
|
-
raise ArgumentError, "invalid value for \"event_name\", must conform to the pattern #{pattern}."
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
@event_name = event_name
|
|
199
|
-
end
|
|
200
|
-
|
|
201
|
-
# Custom attribute writer method with validation
|
|
202
|
-
# @param [Object] object_ids Value to be assigned
|
|
203
|
-
def object_ids=(object_ids)
|
|
204
|
-
if object_ids.nil?
|
|
205
|
-
raise ArgumentError, "object_ids cannot be nil"
|
|
206
|
-
end
|
|
207
|
-
|
|
208
|
-
if object_ids.length > 20
|
|
209
|
-
raise ArgumentError, "invalid value for \"object_ids\", number of items must be less than or equal to 20."
|
|
210
|
-
end
|
|
211
|
-
|
|
212
|
-
if object_ids.length < 1
|
|
213
|
-
raise ArgumentError, "invalid value for \"object_ids\", number of items must be greater than or equal to 1."
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
@object_ids = object_ids
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
# Custom attribute writer method with validation
|
|
220
|
-
# @param [Object] user_token Value to be assigned
|
|
221
|
-
def user_token=(user_token)
|
|
222
|
-
if user_token.nil?
|
|
223
|
-
raise ArgumentError, "user_token cannot be nil"
|
|
224
|
-
end
|
|
225
|
-
|
|
226
|
-
if user_token.to_s.length > 129
|
|
227
|
-
raise(
|
|
228
|
-
ArgumentError,
|
|
229
|
-
"invalid value for \"user_token\", the character length must be smaller than or equal to 129."
|
|
230
|
-
)
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
if user_token.to_s.length < 1
|
|
234
|
-
raise(
|
|
235
|
-
ArgumentError,
|
|
236
|
-
"invalid value for \"user_token\", the character length must be great than or equal to 1."
|
|
237
|
-
)
|
|
238
|
-
end
|
|
239
|
-
|
|
240
|
-
pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
|
|
241
|
-
if user_token !~ pattern
|
|
242
|
-
raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
@user_token = user_token
|
|
246
|
-
end
|
|
247
|
-
|
|
248
|
-
# Custom attribute writer method with validation
|
|
249
|
-
# @param [Object] authenticated_user_token Value to be assigned
|
|
250
|
-
def authenticated_user_token=(authenticated_user_token)
|
|
251
|
-
if authenticated_user_token.nil?
|
|
252
|
-
raise ArgumentError, "authenticated_user_token cannot be nil"
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
if authenticated_user_token.to_s.length > 129
|
|
256
|
-
raise(
|
|
257
|
-
ArgumentError,
|
|
258
|
-
"invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
|
|
259
|
-
)
|
|
260
|
-
end
|
|
261
|
-
|
|
262
|
-
if authenticated_user_token.to_s.length < 1
|
|
263
|
-
raise(
|
|
264
|
-
ArgumentError,
|
|
265
|
-
"invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
|
|
266
|
-
)
|
|
267
|
-
end
|
|
268
|
-
|
|
269
|
-
pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
|
|
270
|
-
if authenticated_user_token !~ pattern
|
|
271
|
-
raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
|
|
272
|
-
end
|
|
273
|
-
|
|
274
|
-
@authenticated_user_token = authenticated_user_token
|
|
275
|
-
end
|
|
276
|
-
|
|
277
|
-
# Custom attribute writer method with validation
|
|
278
|
-
# @param [Object] object_data Value to be assigned
|
|
279
|
-
def object_data=(object_data)
|
|
280
|
-
if object_data.nil?
|
|
281
|
-
raise ArgumentError, "object_data cannot be nil"
|
|
282
|
-
end
|
|
283
|
-
|
|
284
|
-
if object_data.length > 20
|
|
285
|
-
raise ArgumentError, "invalid value for \"object_data\", number of items must be less than or equal to 20."
|
|
286
|
-
end
|
|
287
|
-
|
|
288
|
-
if object_data.length < 1
|
|
289
|
-
raise ArgumentError, "invalid value for \"object_data\", number of items must be greater than or equal to 1."
|
|
290
|
-
end
|
|
291
|
-
|
|
292
|
-
@object_data = object_data
|
|
293
|
-
end
|
|
294
|
-
|
|
295
172
|
# Checks equality by comparing each attribute.
|
|
296
173
|
# @param [Object] Object to be compared
|
|
297
174
|
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)
|
|
@@ -91,24 +91,6 @@ module Algolia
|
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
-
# Custom attribute writer method with validation
|
|
95
|
-
# @param [Object] personalization_impact Value to be assigned
|
|
96
|
-
def personalization_impact=(personalization_impact)
|
|
97
|
-
if personalization_impact.nil?
|
|
98
|
-
raise ArgumentError, "personalization_impact cannot be nil"
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
if personalization_impact > 100
|
|
102
|
-
raise ArgumentError, "invalid value for \"personalization_impact\", must be smaller than or equal to 100."
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
if personalization_impact < 0
|
|
106
|
-
raise ArgumentError, "invalid value for \"personalization_impact\", must be greater than or equal to 0."
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
@personalization_impact = personalization_impact
|
|
110
|
-
end
|
|
111
|
-
|
|
112
94
|
# Checks equality by comparing each attribute.
|
|
113
95
|
# @param [Object] Object to be compared
|
|
114
96
|
def ==(other)
|
|
@@ -106,23 +106,6 @@ module Algolia
|
|
|
106
106
|
end
|
|
107
107
|
end
|
|
108
108
|
|
|
109
|
-
# Custom attribute writer method with validation
|
|
110
|
-
# @param [Object] source_indices Value to be assigned
|
|
111
|
-
def source_indices=(source_indices)
|
|
112
|
-
if source_indices.nil?
|
|
113
|
-
raise ArgumentError, "source_indices cannot be nil"
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
if source_indices.length < 1
|
|
117
|
-
raise(
|
|
118
|
-
ArgumentError,
|
|
119
|
-
"invalid value for \"source_indices\", number of items must be greater than or equal to 1."
|
|
120
|
-
)
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
@source_indices = source_indices
|
|
124
|
-
end
|
|
125
|
-
|
|
126
109
|
# Checks equality by comparing each attribute.
|
|
127
110
|
# @param [Object] Object to be compared
|
|
128
111
|
def ==(other)
|
|
@@ -144,23 +144,6 @@ module Algolia
|
|
|
144
144
|
end
|
|
145
145
|
end
|
|
146
146
|
|
|
147
|
-
# Custom attribute writer method with validation
|
|
148
|
-
# @param [Object] source_indices Value to be assigned
|
|
149
|
-
def source_indices=(source_indices)
|
|
150
|
-
if source_indices.nil?
|
|
151
|
-
raise ArgumentError, "source_indices cannot be nil"
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
if source_indices.length < 1
|
|
155
|
-
raise(
|
|
156
|
-
ArgumentError,
|
|
157
|
-
"invalid value for \"source_indices\", number of items must be greater than or equal to 1."
|
|
158
|
-
)
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
@source_indices = source_indices
|
|
162
|
-
end
|
|
163
|
-
|
|
164
147
|
# Checks equality by comparing each attribute.
|
|
165
148
|
# @param [Object] Object to be compared
|
|
166
149
|
def ==(other)
|
|
@@ -124,23 +124,6 @@ module Algolia
|
|
|
124
124
|
end
|
|
125
125
|
end
|
|
126
126
|
|
|
127
|
-
# Custom attribute writer method with validation
|
|
128
|
-
# @param [Object] source_indices Value to be assigned
|
|
129
|
-
def source_indices=(source_indices)
|
|
130
|
-
if source_indices.nil?
|
|
131
|
-
raise ArgumentError, "source_indices cannot be nil"
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
if source_indices.length < 1
|
|
135
|
-
raise(
|
|
136
|
-
ArgumentError,
|
|
137
|
-
"invalid value for \"source_indices\", number of items must be greater than or equal to 1."
|
|
138
|
-
)
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
@source_indices = source_indices
|
|
142
|
-
end
|
|
143
|
-
|
|
144
127
|
# Checks equality by comparing each attribute.
|
|
145
128
|
# @param [Object] Object to be compared
|
|
146
129
|
def ==(other)
|
|
@@ -138,34 +138,6 @@ module Algolia
|
|
|
138
138
|
end
|
|
139
139
|
end
|
|
140
140
|
|
|
141
|
-
# Custom attribute writer method with validation
|
|
142
|
-
# @param [Object] min_hits Value to be assigned
|
|
143
|
-
def min_hits=(min_hits)
|
|
144
|
-
if min_hits.nil?
|
|
145
|
-
raise ArgumentError, "min_hits cannot be nil"
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
if min_hits < 0
|
|
149
|
-
raise ArgumentError, "invalid value for \"min_hits\", must be greater than or equal to 0."
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
@min_hits = min_hits
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
# Custom attribute writer method with validation
|
|
156
|
-
# @param [Object] min_letters Value to be assigned
|
|
157
|
-
def min_letters=(min_letters)
|
|
158
|
-
if min_letters.nil?
|
|
159
|
-
raise ArgumentError, "min_letters cannot be nil"
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
if min_letters < 0
|
|
163
|
-
raise ArgumentError, "invalid value for \"min_letters\", must be greater than or equal to 0."
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
@min_letters = min_letters
|
|
167
|
-
end
|
|
168
|
-
|
|
169
141
|
# Checks equality by comparing each attribute.
|
|
170
142
|
# @param [Object] Object to be compared
|
|
171
143
|
def ==(other)
|
|
@@ -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
|
-
|
|
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)
|
|
@@ -122,42 +122,6 @@ module Algolia
|
|
|
122
122
|
end
|
|
123
123
|
end
|
|
124
124
|
|
|
125
|
-
# Custom attribute writer method with validation
|
|
126
|
-
# @param [Object] threshold Value to be assigned
|
|
127
|
-
def threshold=(threshold)
|
|
128
|
-
if threshold.nil?
|
|
129
|
-
raise ArgumentError, "threshold cannot be nil"
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
if threshold > 100
|
|
133
|
-
raise ArgumentError, "invalid value for \"threshold\", must be smaller than or equal to 100."
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
if threshold < 0
|
|
137
|
-
raise ArgumentError, "invalid value for \"threshold\", must be greater than or equal to 0."
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
@threshold = threshold
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
# Custom attribute writer method with validation
|
|
144
|
-
# @param [Object] max_recommendations Value to be assigned
|
|
145
|
-
def max_recommendations=(max_recommendations)
|
|
146
|
-
if max_recommendations.nil?
|
|
147
|
-
raise ArgumentError, "max_recommendations cannot be nil"
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
if max_recommendations > 1000
|
|
151
|
-
raise ArgumentError, "invalid value for \"max_recommendations\", must be smaller than or equal to 1000."
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
if max_recommendations < 1
|
|
155
|
-
raise ArgumentError, "invalid value for \"max_recommendations\", must be greater than or equal to 1."
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
@max_recommendations = max_recommendations
|
|
159
|
-
end
|
|
160
|
-
|
|
161
125
|
# Checks equality by comparing each attribute.
|
|
162
126
|
# @param [Object] Object to be compared
|
|
163
127
|
def ==(other)
|