algolia 3.4.0 → 3.5.1

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -210,7 +210,7 @@ module Algolia
210
210
 
211
211
  # Retrieves known incidents for the selected clusters.
212
212
 
213
- # @param clusters [String] Subset of clusters, separated by comma. (required)
213
+ # @param clusters [String] Subset of clusters, separated by commas. (required)
214
214
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
215
215
  # @return [Http::Response] the response
216
216
  def get_cluster_incidents_with_http_info(clusters, request_options = {})
@@ -240,7 +240,7 @@ module Algolia
240
240
 
241
241
  # Retrieves known incidents for the selected clusters.
242
242
 
243
- # @param clusters [String] Subset of clusters, separated by comma. (required)
243
+ # @param clusters [String] Subset of clusters, separated by commas. (required)
244
244
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
245
245
  # @return [IncidentsResponse]
246
246
  def get_cluster_incidents(clusters, request_options = {})
@@ -250,7 +250,7 @@ module Algolia
250
250
 
251
251
  # Retrieves the status of selected clusters.
252
252
 
253
- # @param clusters [String] Subset of clusters, separated by comma. (required)
253
+ # @param clusters [String] Subset of clusters, separated by commas. (required)
254
254
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
255
255
  # @return [Http::Response] the response
256
256
  def get_cluster_status_with_http_info(clusters, request_options = {})
@@ -280,7 +280,7 @@ module Algolia
280
280
 
281
281
  # Retrieves the status of selected clusters.
282
282
 
283
- # @param clusters [String] Subset of clusters, separated by comma. (required)
283
+ # @param clusters [String] Subset of clusters, separated by commas. (required)
284
284
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
285
285
  # @return [StatusResponse]
286
286
  def get_cluster_status(clusters, request_options = {})
@@ -323,7 +323,7 @@ module Algolia
323
323
 
324
324
  # Retrieves average times for indexing operations for selected clusters.
325
325
 
326
- # @param clusters [String] Subset of clusters, separated by comma. (required)
326
+ # @param clusters [String] Subset of clusters, separated by commas. (required)
327
327
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
328
328
  # @return [Http::Response] the response
329
329
  def get_indexing_time_with_http_info(clusters, request_options = {})
@@ -353,7 +353,7 @@ module Algolia
353
353
 
354
354
  # Retrieves average times for indexing operations for selected clusters.
355
355
 
356
- # @param clusters [String] Subset of clusters, separated by comma. (required)
356
+ # @param clusters [String] Subset of clusters, separated by commas. (required)
357
357
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
358
358
  # @return [IndexingTimeResponse]
359
359
  def get_indexing_time(clusters, request_options = {})
@@ -363,7 +363,7 @@ module Algolia
363
363
 
364
364
  # Retrieves the average latency for search requests for selected clusters.
365
365
 
366
- # @param clusters [String] Subset of clusters, separated by comma. (required)
366
+ # @param clusters [String] Subset of clusters, separated by commas. (required)
367
367
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
368
368
  # @return [Http::Response] the response
369
369
  def get_latency_with_http_info(clusters, request_options = {})
@@ -393,7 +393,7 @@ module Algolia
393
393
 
394
394
  # Retrieves the average latency for search requests for selected clusters.
395
395
 
396
- # @param clusters [String] Subset of clusters, separated by comma. (required)
396
+ # @param clusters [String] Subset of clusters, separated by commas. (required)
397
397
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
398
398
  # @return [LatencyResponse]
399
399
  def get_latency(clusters, request_options = {})
@@ -454,7 +454,7 @@ module Algolia
454
454
 
455
455
  # Test whether clusters are reachable or not.
456
456
 
457
- # @param clusters [String] Subset of clusters, separated by comma. (required)
457
+ # @param clusters [String] Subset of clusters, separated by commas. (required)
458
458
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
459
459
  # @return [Http::Response] the response
460
460
  def get_reachability_with_http_info(clusters, request_options = {})
@@ -484,12 +484,12 @@ module Algolia
484
484
 
485
485
  # Test whether clusters are reachable or not.
486
486
 
487
- # @param clusters [String] Subset of clusters, separated by comma. (required)
487
+ # @param clusters [String] Subset of clusters, separated by commas. (required)
488
488
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
489
489
  # @return [Hash<String, Hash>]
490
490
  def get_reachability(clusters, request_options = {})
491
491
  response = get_reachability_with_http_info(clusters, request_options)
492
- @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::Hash<String, Hash>")
492
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Hash<String, Hash>")
493
493
  end
494
494
 
495
495
  # Retrieves the servers that belong to clusters. The response depends on whether you authenticate your API request: - With authentication, the response lists the servers assigned to your Algolia application&#39;s cluster. - Without authentication, the response lists the servers for all Algolia clusters.
@@ -93,7 +93,7 @@ module Algolia
93
93
  # - addObject
94
94
  # @param index_name [String] Name of the index on which to perform the operation. (required)
95
95
  # @param object_id [String] Unique record identifier. (required)
96
- # @param body [Object] The record, a schemaless object with attributes that are useful in the context of search and discovery. (required)
96
+ # @param body [Object] The record. A schemaless object with attributes that are useful in the context of search and discovery. (required)
97
97
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
98
98
  # @return [Http::Response] the response
99
99
  def add_or_update_object_with_http_info(index_name, object_id, body, request_options = {})
@@ -138,7 +138,7 @@ module Algolia
138
138
  # - addObject
139
139
  # @param index_name [String] Name of the index on which to perform the operation. (required)
140
140
  # @param object_id [String] Unique record identifier. (required)
141
- # @param body [Object] The record, a schemaless object with attributes that are useful in the context of search and discovery. (required)
141
+ # @param body [Object] The record. A schemaless object with attributes that are useful in the context of search and discovery. (required)
142
142
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
143
143
  # @return [UpdatedAtWithObjectIdResponse]
144
144
  def add_or_update_object(index_name, object_id, body, request_options = {})
@@ -206,15 +206,6 @@ module Algolia
206
206
  if @api_client.config.client_side_validation && x_algolia_user_id.nil?
207
207
  raise ArgumentError, "Parameter `x_algolia_user_id` is required when calling `assign_user_id`."
208
208
  end
209
-
210
- pattern = /^[a-zA-Z0-9 \-*.]+$/
211
- if @api_client.config.client_side_validation && x_algolia_user_id !~ pattern
212
- raise(
213
- ArgumentError,
214
- "invalid value for 'x_algolia_user_id' when calling SearchClient.assign_user_id, must conform to the pattern #{pattern}."
215
- )
216
- end
217
-
218
209
  # verify the required parameter 'assign_user_id_params' is set
219
210
  if @api_client.config.client_side_validation && assign_user_id_params.nil?
220
211
  raise ArgumentError, "Parameter `assign_user_id_params` is required when calling `assign_user_id`."
@@ -312,15 +303,6 @@ module Algolia
312
303
  if @api_client.config.client_side_validation && x_algolia_user_id.nil?
313
304
  raise ArgumentError, "Parameter `x_algolia_user_id` is required when calling `batch_assign_user_ids`."
314
305
  end
315
-
316
- pattern = /^[a-zA-Z0-9 \-*.]+$/
317
- if @api_client.config.client_side_validation && x_algolia_user_id !~ pattern
318
- raise(
319
- ArgumentError,
320
- "invalid value for 'x_algolia_user_id' when calling SearchClient.batch_assign_user_ids, must conform to the pattern #{pattern}."
321
- )
322
- end
323
-
324
306
  # verify the required parameter 'batch_assign_user_ids_params' is set
325
307
  if @api_client.config.client_side_validation && batch_assign_user_ids_params.nil?
326
308
  raise(
@@ -422,7 +404,7 @@ module Algolia
422
404
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedAtResponse")
423
405
  end
424
406
 
425
- # Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn&#39;t collect data when using &#x60;browse&#x60;. - Records are ranked by attributes and custom ranking. - There&#39;s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - &#x60;advancedSyntax&#x60;: &#x60;false&#x60; - &#x60;attributesToHighlight&#x60;: &#x60;[]&#x60; - &#x60;attributesToSnippet&#x60;: &#x60;[]&#x60; - &#x60;distinct&#x60;: &#x60;false&#x60; - &#x60;enablePersonalization&#x60;: &#x60;false&#x60; - &#x60;enableRules&#x60;: &#x60;false&#x60; - &#x60;facets&#x60;: &#x60;[]&#x60; - &#x60;getRankingInfo&#x60;: &#x60;false&#x60; - &#x60;ignorePlurals&#x60;: &#x60;false&#x60; - &#x60;optionalFilters&#x60;: &#x60;[]&#x60; - &#x60;typoTolerance&#x60;: &#x60;true&#x60; or &#x60;false&#x60; (&#x60;min&#x60; and &#x60;strict&#x60; is evaluated to &#x60;true&#x60;) If you send these parameters with your browse requests, they&#39;ll be ignored.
407
+ # Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn&#39;t collect data when using &#x60;browse&#x60;. - Records are ranked by attributes and custom ranking. - There&#39;s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - &#x60;advancedSyntax&#x60;: &#x60;false&#x60; - &#x60;attributesToHighlight&#x60;: &#x60;[]&#x60; - &#x60;attributesToSnippet&#x60;: &#x60;[]&#x60; - &#x60;distinct&#x60;: &#x60;false&#x60; - &#x60;enablePersonalization&#x60;: &#x60;false&#x60; - &#x60;enableRules&#x60;: &#x60;false&#x60; - &#x60;facets&#x60;: &#x60;[]&#x60; - &#x60;getRankingInfo&#x60;: &#x60;false&#x60; - &#x60;ignorePlurals&#x60;: &#x60;false&#x60; - &#x60;optionalFilters&#x60;: &#x60;[]&#x60; - &#x60;typoTolerance&#x60;: &#x60;true&#x60; or &#x60;false&#x60; (&#x60;min&#x60; and &#x60;strict&#x60; evaluate to &#x60;true&#x60;) If you send these parameters with your browse requests, they&#39;ll be ignored.
426
408
  #
427
409
  # Required API Key ACLs:
428
410
  # - browse
@@ -449,13 +431,13 @@ module Algolia
449
431
  :header_params => header_params,
450
432
  :query_params => query_params,
451
433
  :body => post_body,
452
- :use_read_transporter => false
434
+ :use_read_transporter => true
453
435
  )
454
436
 
455
437
  @api_client.call_api(:POST, path, new_options)
456
438
  end
457
439
 
458
- # Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` is evaluated to `true`) If you send these parameters with your browse requests, they'll be ignored.
440
+ # Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn't collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` evaluate to `true`) If you send these parameters with your browse requests, they'll be ignored.
459
441
  #
460
442
  # Required API Key ACLs:
461
443
  # - browse
@@ -1245,7 +1227,7 @@ module Algolia
1245
1227
  # @return [Hash<String, Languages>]
1246
1228
  def get_dictionary_languages(request_options = {})
1247
1229
  response = get_dictionary_languages_with_http_info(request_options)
1248
- @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::Hash<String, Languages>")
1230
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Hash<String, Languages>")
1249
1231
  end
1250
1232
 
1251
1233
  # Retrieves the languages for which standard dictionary entries are turned off.
@@ -1299,13 +1281,6 @@ module Algolia
1299
1281
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1300
1282
  # @return [Http::Response] the response
1301
1283
  def get_logs_with_http_info(offset = nil, length = nil, index_name = nil, type = nil, request_options = {})
1302
- if @api_client.config.client_side_validation && !length.nil? && length > 1000
1303
- raise(
1304
- ArgumentError,
1305
- "invalid value for \"\"length\"\" when calling SearchClient.get_logs, must be smaller than or equal to 1000."
1306
- )
1307
- end
1308
-
1309
1284
  path = "/1/logs"
1310
1285
  query_params = {}
1311
1286
  query_params[:offset] = offset unless offset.nil?
@@ -1400,7 +1375,7 @@ module Algolia
1400
1375
  # @return [Object]
1401
1376
  def get_object(index_name, object_id, attributes_to_retrieve = nil, request_options = {})
1402
1377
  response = get_object_with_http_info(index_name, object_id, attributes_to_retrieve, request_options)
1403
- @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::Object")
1378
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
1404
1379
  end
1405
1380
 
1406
1381
  # Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
@@ -1580,7 +1555,7 @@ module Algolia
1580
1555
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Array<Search::Source>")
1581
1556
  end
1582
1557
 
1583
- # Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [&#x60;search&#x60; operation](#tag/Synonyms/operation/searchSynonyms).
1558
+ # Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [&#x60;search&#x60; operation](#tag/Synonyms/operation/searchSynonyms).
1584
1559
  #
1585
1560
  # Required API Key ACLs:
1586
1561
  # - settings
@@ -1619,7 +1594,7 @@ module Algolia
1619
1594
  @api_client.call_api(:GET, path, new_options)
1620
1595
  end
1621
1596
 
1622
- # Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
1597
+ # Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
1623
1598
  #
1624
1599
  # Required API Key ACLs:
1625
1600
  # - settings
@@ -1734,14 +1709,6 @@ module Algolia
1734
1709
  raise ArgumentError, "Parameter `user_id` is required when calling `get_user_id`."
1735
1710
  end
1736
1711
 
1737
- pattern = /^[a-zA-Z0-9 \-*.]+$/
1738
- if @api_client.config.client_side_validation && user_id !~ pattern
1739
- raise(
1740
- ArgumentError,
1741
- "invalid value for 'user_id' when calling SearchClient.get_user_id, must conform to the pattern #{pattern}."
1742
- )
1743
- end
1744
-
1745
1712
  path = "/1/clusters/mapping/{userID}".sub("{" + "userID" + "}", Transport.encode_uri(user_id.to_s))
1746
1713
  query_params = {}
1747
1714
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -1899,13 +1866,6 @@ module Algolia
1899
1866
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1900
1867
  # @return [Http::Response] the response
1901
1868
  def list_indices_with_http_info(page = nil, hits_per_page = nil, request_options = {})
1902
- if @api_client.config.client_side_validation && !page.nil? && page < 0
1903
- raise(
1904
- ArgumentError,
1905
- "invalid value for \"\"page\"\" when calling SearchClient.list_indices, must be greater than or equal to 0."
1906
- )
1907
- end
1908
-
1909
1869
  path = "/1/indexes"
1910
1870
  query_params = {}
1911
1871
  query_params[:page] = page unless page.nil?
@@ -1949,13 +1909,6 @@ module Algolia
1949
1909
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1950
1910
  # @return [Http::Response] the response
1951
1911
  def list_user_ids_with_http_info(page = nil, hits_per_page = nil, request_options = {})
1952
- if @api_client.config.client_side_validation && !page.nil? && page < 0
1953
- raise(
1954
- ArgumentError,
1955
- "invalid value for \"\"page\"\" when calling SearchClient.list_user_ids, must be greater than or equal to 0."
1956
- )
1957
- end
1958
-
1959
1912
  path = "/1/clusters/mapping"
1960
1913
  query_params = {}
1961
1914
  query_params[:page] = page unless page.nil?
@@ -2030,7 +1983,7 @@ module Algolia
2030
1983
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::MultipleBatchResponse")
2031
1984
  end
2032
1985
 
2033
- # Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn&#39;t exist yet, it&#39;ll be created. **Copy** - Copying a source index that doesn&#39;t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can&#39;t copy the &#x60;enableReRanking&#x60;, &#x60;mode&#x60;, and &#x60;replicas&#x60; settings. - You can&#39;t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn&#39;t exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
1986
+ # Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn&#39;t exist yet, it&#39;ll be created. **Copy** - Copying a source index that doesn&#39;t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can&#39;t copy the &#x60;enableReRanking&#x60;, &#x60;mode&#x60;, and &#x60;replicas&#x60; settings. - You can&#39;t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn&#39;t exist is ignored without returning an error. - When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
2034
1987
  #
2035
1988
  # Required API Key ACLs:
2036
1989
  # - addObject
@@ -2067,7 +2020,7 @@ module Algolia
2067
2020
  @api_client.call_api(:POST, path, new_options)
2068
2021
  end
2069
2022
 
2070
- # Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
2023
+ # Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
2071
2024
  #
2072
2025
  # Required API Key ACLs:
2073
2026
  # - addObject
@@ -2080,7 +2033,7 @@ module Algolia
2080
2033
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedAtResponse")
2081
2034
  end
2082
2035
 
2083
- # Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn&#39;t exist, a new record is added to the index **if** &#x60;createIfNotExists&#x60; is true. - If the index doesn&#39;t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don&#39;t have access to your initial data. - Increment: increment a numeric attribute - Decrement: decrement a numeric attribute - Add: append a number or string element to an array attribute - Remove: remove all matching number or string elements from an array attribute made of numbers or strings - AddUnique: add a number or string element to an array attribute made of numbers or strings only if it&#39;s not already present - IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn&#39;t exist, the engine only creates it if you pass an IncrementFrom value of 0. - IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn&#39;t exist yet, the engine only creates it if you pass an IncrementSet value that&#39;s greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove.
2036
+ # Adds new attributes to a record, or updates existing ones. - If a record with the specified object ID doesn&#39;t exist, a new record is added to the index **if** &#x60;createIfNotExists&#x60; is true. - If the index doesn&#39;t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don&#39;t have access to your initial data. - Increment: increment a numeric attribute - Decrement: decrement a numeric attribute - Add: append a number or string element to an array attribute - Remove: remove all matching number or string elements from an array attribute made of numbers or strings - AddUnique: add a number or string element to an array attribute made of numbers or strings only if it&#39;s not already present - IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn&#39;t exist, the engine only creates it if you pass an IncrementFrom value of 0. - IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn&#39;t exist yet, the engine only creates it if you pass an IncrementSet value greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove.
2084
2037
  #
2085
2038
  # Required API Key ACLs:
2086
2039
  # - addObject
@@ -2132,7 +2085,7 @@ module Algolia
2132
2085
  @api_client.call_api(:POST, path, new_options)
2133
2086
  end
2134
2087
 
2135
- # Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don't have access to your initial data. - Increment: increment a numeric attribute - Decrement: decrement a numeric attribute - Add: append a number or string element to an array attribute - Remove: remove all matching number or string elements from an array attribute made of numbers or strings - AddUnique: add a number or string element to an array attribute made of numbers or strings only if it's not already present - IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn't exist, the engine only creates it if you pass an IncrementFrom value of 0. - IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn't exist yet, the engine only creates it if you pass an IncrementSet value that's greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove.
2088
+ # Adds new attributes to a record, or updates existing ones. - If a record with the specified object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don't have access to your initial data. - Increment: increment a numeric attribute - Decrement: decrement a numeric attribute - Add: append a number or string element to an array attribute - Remove: remove all matching number or string elements from an array attribute made of numbers or strings - AddUnique: add a number or string element to an array attribute made of numbers or strings only if it's not already present - IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn't exist, the engine only creates it if you pass an IncrementFrom value of 0. - IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn't exist yet, the engine only creates it if you pass an IncrementSet value greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove.
2136
2089
  #
2137
2090
  # Required API Key ACLs:
2138
2091
  # - addObject
@@ -2175,14 +2128,6 @@ module Algolia
2175
2128
  raise ArgumentError, "Parameter `user_id` is required when calling `remove_user_id`."
2176
2129
  end
2177
2130
 
2178
- pattern = /^[a-zA-Z0-9 \-*.]+$/
2179
- if @api_client.config.client_side_validation && user_id !~ pattern
2180
- raise(
2181
- ArgumentError,
2182
- "invalid value for 'user_id' when calling SearchClient.remove_user_id, must conform to the pattern #{pattern}."
2183
- )
2184
- end
2185
-
2186
2131
  path = "/1/clusters/mapping/{userID}".sub("{" + "userID" + "}", Transport.encode_uri(user_id.to_s))
2187
2132
  query_params = {}
2188
2133
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -2307,7 +2252,7 @@ module Algolia
2307
2252
  # Required API Key ACLs:
2308
2253
  # - addObject
2309
2254
  # @param index_name [String] Name of the index on which to perform the operation. (required)
2310
- # @param body [Object] The record, a schemaless object with attributes that are useful in the context of search and discovery. (required)
2255
+ # @param body [Object] The record. A schemaless object with attributes that are useful in the context of search and discovery. (required)
2311
2256
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
2312
2257
  # @return [Http::Response] the response
2313
2258
  def save_object_with_http_info(index_name, body, request_options = {})
@@ -2344,7 +2289,7 @@ module Algolia
2344
2289
  # Required API Key ACLs:
2345
2290
  # - addObject
2346
2291
  # @param index_name [String] Name of the index on which to perform the operation. (required)
2347
- # @param body [Object] The record, a schemaless object with attributes that are useful in the context of search and discovery. (required)
2292
+ # @param body [Object] The record. A schemaless object with attributes that are useful in the context of search and discovery. (required)
2348
2293
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
2349
2294
  # @return [SaveObjectResponse]
2350
2295
  def save_object(index_name, body, request_options = {})
@@ -2616,7 +2561,7 @@ module Algolia
2616
2561
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::UpdatedAtResponse")
2617
2562
  end
2618
2563
 
2619
- # Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
2564
+ # Sends multiple search requests to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
2620
2565
  #
2621
2566
  # Required API Key ACLs:
2622
2567
  # - search
@@ -2648,7 +2593,7 @@ module Algolia
2648
2593
  @api_client.call_api(:POST, path, new_options)
2649
2594
  end
2650
2595
 
2651
- # Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
2596
+ # Sends multiple search requests to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
2652
2597
  #
2653
2598
  # Required API Key ACLs:
2654
2599
  # - search
@@ -2840,7 +2785,7 @@ module Algolia
2840
2785
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::SearchRulesResponse")
2841
2786
  end
2842
2787
 
2843
- # Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [&#x60;browse&#x60; operation](#tag/Search/operation/browse) or increase the &#x60;paginatedLimitedTo&#x60; index setting.
2788
+ # Searches a single index and returns matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [&#x60;browse&#x60; operation](#tag/Search/operation/browse) or increase the &#x60;paginatedLimitedTo&#x60; index setting.
2844
2789
  #
2845
2790
  # Required API Key ACLs:
2846
2791
  # - search
@@ -2873,7 +2818,7 @@ module Algolia
2873
2818
  @api_client.call_api(:POST, path, new_options)
2874
2819
  end
2875
2820
 
2876
- # Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting.
2821
+ # Searches a single index and returns matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting.
2877
2822
  #
2878
2823
  # Required API Key ACLs:
2879
2824
  # - search
@@ -85,24 +85,6 @@ module Algolia
85
85
  end
86
86
  end
87
87
 
88
- # Custom attribute writer method with validation
89
- # @param [Object] traffic_percentage Value to be assigned
90
- def traffic_percentage=(traffic_percentage)
91
- if traffic_percentage.nil?
92
- raise ArgumentError, "traffic_percentage cannot be nil"
93
- end
94
-
95
- if traffic_percentage > 100
96
- raise ArgumentError, "invalid value for \"traffic_percentage\", must be smaller than or equal to 100."
97
- end
98
-
99
- if traffic_percentage < 0
100
- raise ArgumentError, "invalid value for \"traffic_percentage\", must be greater than or equal to 0."
101
- end
102
-
103
- @traffic_percentage = traffic_percentage
104
- end
105
-
106
88
  # Checks equality by comparing each attribute.
107
89
  # @param [Object] Object to be compared
108
90
  def ==(other)
@@ -103,24 +103,6 @@ module Algolia
103
103
  end
104
104
  end
105
105
 
106
- # Custom attribute writer method with validation
107
- # @param [Object] traffic_percentage Value to be assigned
108
- def traffic_percentage=(traffic_percentage)
109
- if traffic_percentage.nil?
110
- raise ArgumentError, "traffic_percentage cannot be nil"
111
- end
112
-
113
- if traffic_percentage > 100
114
- raise ArgumentError, "invalid value for \"traffic_percentage\", must be smaller than or equal to 100."
115
- end
116
-
117
- if traffic_percentage < 0
118
- raise ArgumentError, "invalid value for \"traffic_percentage\", must be greater than or equal to 0."
119
- end
120
-
121
- @traffic_percentage = traffic_percentage
122
- end
123
-
124
106
  # Checks equality by comparing each attribute.
125
107
  # @param [Object] Object to be compared
126
108
  def ==(other)
@@ -89,24 +89,6 @@ module Algolia
89
89
  end
90
90
  end
91
91
 
92
- # Custom attribute writer method with validation
93
- # @param [Object] variants Value to be assigned
94
- def variants=(variants)
95
- if variants.nil?
96
- raise ArgumentError, "variants cannot be nil"
97
- end
98
-
99
- if variants.length > 2
100
- raise ArgumentError, "invalid value for \"variants\", number of items must be less than or equal to 2."
101
- end
102
-
103
- if variants.length < 2
104
- raise ArgumentError, "invalid value for \"variants\", number of items must be greater than or equal to 2."
105
- end
106
-
107
- @variants = variants
108
- end
109
-
110
92
  # Checks equality by comparing each attribute.
111
93
  # @param [Object] Object to be compared
112
94
  def ==(other)
@@ -72,24 +72,6 @@ module Algolia
72
72
  end
73
73
  end
74
74
 
75
- # Custom attribute writer method with validation
76
- # @param [Object] size Value to be assigned
77
- def size=(size)
78
- if size.nil?
79
- raise ArgumentError, "size cannot be nil"
80
- end
81
-
82
- if size > 1
83
- raise ArgumentError, "invalid value for \"size\", must be smaller than or equal to 1."
84
- end
85
-
86
- if size < 0
87
- raise ArgumentError, "invalid value for \"size\", must be greater than or equal to 0."
88
- end
89
-
90
- @size = size
91
- end
92
-
93
75
  # Checks equality by comparing each attribute.
94
76
  # @param [Object] Object to be compared
95
77
  def ==(other)
@@ -100,24 +100,6 @@ module Algolia
100
100
  end
101
101
  end
102
102
 
103
- # Custom attribute writer method with validation
104
- # @param [Object] variants Value to be assigned
105
- def variants=(variants)
106
- if variants.nil?
107
- raise ArgumentError, "variants cannot be nil"
108
- end
109
-
110
- if variants.length > 2
111
- raise ArgumentError, "invalid value for \"variants\", number of items must be less than or equal to 2."
112
- end
113
-
114
- if variants.length < 2
115
- raise ArgumentError, "invalid value for \"variants\", number of items must be greater than or equal to 2."
116
- end
117
-
118
- @variants = variants
119
- end
120
-
121
103
  # Checks equality by comparing each attribute.
122
104
  # @param [Object] Object to be compared
123
105
  def ==(other)
@@ -264,24 +264,6 @@ module Algolia
264
264
  end
265
265
  end
266
266
 
267
- # Custom attribute writer method with validation
268
- # @param [Object] traffic_percentage Value to be assigned
269
- def traffic_percentage=(traffic_percentage)
270
- if traffic_percentage.nil?
271
- raise ArgumentError, "traffic_percentage cannot be nil"
272
- end
273
-
274
- if traffic_percentage > 100
275
- raise ArgumentError, "invalid value for \"traffic_percentage\", must be smaller than or equal to 100."
276
- end
277
-
278
- if traffic_percentage < 0
279
- raise ArgumentError, "invalid value for \"traffic_percentage\", must be greater than or equal to 0."
280
- end
281
-
282
- @traffic_percentage = traffic_percentage
283
- end
284
-
285
267
  # Checks equality by comparing each attribute.
286
268
  # @param [Object] Object to be compared
287
269
  def ==(other)
@@ -75,38 +75,6 @@ module Algolia
75
75
  end
76
76
  end
77
77
 
78
- # Custom attribute writer method with validation
79
- # @param [Object] position Value to be assigned
80
- def position=(position)
81
- if position.nil?
82
- raise ArgumentError, "position cannot be nil"
83
- end
84
-
85
- if position.length > 2
86
- raise ArgumentError, "invalid value for \"position\", number of items must be less than or equal to 2."
87
- end
88
-
89
- if position.length < 2
90
- raise ArgumentError, "invalid value for \"position\", number of items must be greater than or equal to 2."
91
- end
92
-
93
- @position = position
94
- end
95
-
96
- # Custom attribute writer method with validation
97
- # @param [Object] click_count Value to be assigned
98
- def click_count=(click_count)
99
- if click_count.nil?
100
- raise ArgumentError, "click_count cannot be nil"
101
- end
102
-
103
- if click_count < 0
104
- raise ArgumentError, "invalid value for \"click_count\", must be greater than or equal to 0."
105
- end
106
-
107
- @click_count = click_count
108
- end
109
-
110
78
  # Checks equality by comparing each attribute.
111
79
  # @param [Object] Object to be compared
112
80
  def ==(other)
@@ -100,34 +100,6 @@ module Algolia
100
100
  end
101
101
  end
102
102
 
103
- # Custom attribute writer method with validation
104
- # @param [Object] rate Value to be assigned
105
- def rate=(rate)
106
- if !rate.nil? && rate > 1
107
- raise ArgumentError, "invalid value for \"rate\", must be smaller than or equal to 1."
108
- end
109
-
110
- if !rate.nil? && rate < 0
111
- raise ArgumentError, "invalid value for \"rate\", must be greater than or equal to 0."
112
- end
113
-
114
- @rate = rate
115
- end
116
-
117
- # Custom attribute writer method with validation
118
- # @param [Object] add_to_cart_count Value to be assigned
119
- def add_to_cart_count=(add_to_cart_count)
120
- if add_to_cart_count.nil?
121
- raise ArgumentError, "add_to_cart_count cannot be nil"
122
- end
123
-
124
- if add_to_cart_count < 0
125
- raise ArgumentError, "invalid value for \"add_to_cart_count\", must be greater than or equal to 0."
126
- end
127
-
128
- @add_to_cart_count = add_to_cart_count
129
- end
130
-
131
103
  # Checks equality by comparing each attribute.
132
104
  # @param [Object] Object to be compared
133
105
  def ==(other)