algolia 3.10.2 → 3.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (448) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/Bug_report.yml +1 -1
  3. data/.github/workflows/release.yml +1 -1
  4. data/CHANGELOG.md +11 -0
  5. data/Gemfile.lock +1 -1
  6. data/lib/algolia/api/ingestion_client.rb +8 -2
  7. data/lib/algolia/api/search_client.rb +56 -51
  8. data/lib/algolia/models/abtesting/ab_test.rb +0 -5
  9. data/lib/algolia/models/abtesting/ab_test_configuration.rb +0 -5
  10. data/lib/algolia/models/abtesting/ab_test_response.rb +0 -5
  11. data/lib/algolia/models/abtesting/ab_tests_variant.rb +0 -5
  12. data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +5 -3
  13. data/lib/algolia/models/abtesting/add_ab_tests_request.rb +0 -5
  14. data/lib/algolia/models/abtesting/add_ab_tests_variant.rb +5 -6
  15. data/lib/algolia/models/abtesting/currency.rb +0 -5
  16. data/lib/algolia/models/abtesting/empty_search.rb +0 -5
  17. data/lib/algolia/models/abtesting/empty_search_filter.rb +0 -5
  18. data/lib/algolia/models/abtesting/error_base.rb +0 -5
  19. data/lib/algolia/models/abtesting/estimate_ab_test_request.rb +0 -5
  20. data/lib/algolia/models/abtesting/estimate_ab_test_response.rb +0 -5
  21. data/lib/algolia/models/abtesting/estimate_configuration.rb +0 -5
  22. data/lib/algolia/models/abtesting/filter_effects.rb +0 -5
  23. data/lib/algolia/models/abtesting/list_ab_tests_response.rb +0 -5
  24. data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +0 -5
  25. data/lib/algolia/models/abtesting/outliers.rb +0 -5
  26. data/lib/algolia/models/abtesting/outliers_filter.rb +0 -5
  27. data/lib/algolia/models/abtesting/schedule_ab_test_response.rb +0 -5
  28. data/lib/algolia/models/abtesting/schedule_ab_tests_request.rb +0 -5
  29. data/lib/algolia/models/abtesting/variant.rb +0 -5
  30. data/lib/algolia/models/analytics/click_position.rb +0 -5
  31. data/lib/algolia/models/analytics/currency_code.rb +0 -5
  32. data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +0 -5
  33. data/lib/algolia/models/analytics/daily_average_clicks.rb +0 -5
  34. data/lib/algolia/models/analytics/daily_click_through_rates.rb +0 -5
  35. data/lib/algolia/models/analytics/daily_conversion_rates.rb +0 -5
  36. data/lib/algolia/models/analytics/daily_no_click_rates.rb +0 -5
  37. data/lib/algolia/models/analytics/daily_no_results_rates.rb +0 -5
  38. data/lib/algolia/models/analytics/daily_purchase_rates.rb +0 -5
  39. data/lib/algolia/models/analytics/daily_revenue.rb +0 -5
  40. data/lib/algolia/models/analytics/daily_searches.rb +0 -5
  41. data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +0 -5
  42. data/lib/algolia/models/analytics/daily_searches_no_results.rb +0 -5
  43. data/lib/algolia/models/analytics/daily_users.rb +0 -5
  44. data/lib/algolia/models/analytics/error_base.rb +0 -5
  45. data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +0 -5
  46. data/lib/algolia/models/analytics/get_average_click_position_response.rb +0 -5
  47. data/lib/algolia/models/analytics/get_click_positions_response.rb +0 -5
  48. data/lib/algolia/models/analytics/get_click_through_rate_response.rb +0 -5
  49. data/lib/algolia/models/analytics/get_conversion_rate_response.rb +0 -5
  50. data/lib/algolia/models/analytics/get_no_click_rate_response.rb +0 -5
  51. data/lib/algolia/models/analytics/get_no_results_rate_response.rb +0 -5
  52. data/lib/algolia/models/analytics/get_purchase_rate_response.rb +0 -5
  53. data/lib/algolia/models/analytics/get_revenue.rb +0 -5
  54. data/lib/algolia/models/analytics/get_searches_count_response.rb +0 -5
  55. data/lib/algolia/models/analytics/get_searches_no_clicks_response.rb +0 -5
  56. data/lib/algolia/models/analytics/get_searches_no_results_response.rb +0 -5
  57. data/lib/algolia/models/analytics/get_status_response.rb +0 -5
  58. data/lib/algolia/models/analytics/get_top_countries_response.rb +0 -5
  59. data/lib/algolia/models/analytics/get_top_filter_attribute.rb +0 -5
  60. data/lib/algolia/models/analytics/get_top_filter_attributes_response.rb +0 -5
  61. data/lib/algolia/models/analytics/get_top_filter_for_attribute.rb +0 -5
  62. data/lib/algolia/models/analytics/get_top_filter_for_attribute_response.rb +0 -5
  63. data/lib/algolia/models/analytics/get_top_filters_no_results_response.rb +0 -5
  64. data/lib/algolia/models/analytics/get_top_filters_no_results_value.rb +0 -5
  65. data/lib/algolia/models/analytics/get_top_filters_no_results_values.rb +0 -5
  66. data/lib/algolia/models/analytics/get_top_hits_response.rb +5 -6
  67. data/lib/algolia/models/analytics/get_top_searches_response.rb +5 -6
  68. data/lib/algolia/models/analytics/get_users_count_response.rb +0 -5
  69. data/lib/algolia/models/analytics/top_country.rb +0 -5
  70. data/lib/algolia/models/analytics/top_hit.rb +0 -5
  71. data/lib/algolia/models/analytics/top_hit_with_analytics.rb +0 -5
  72. data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +0 -5
  73. data/lib/algolia/models/analytics/top_hits_response.rb +0 -5
  74. data/lib/algolia/models/analytics/top_hits_response_with_analytics.rb +0 -5
  75. data/lib/algolia/models/analytics/top_hits_response_with_revenue_analytics.rb +0 -5
  76. data/lib/algolia/models/analytics/top_search.rb +0 -5
  77. data/lib/algolia/models/analytics/top_search_with_analytics.rb +0 -5
  78. data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +0 -5
  79. data/lib/algolia/models/analytics/top_searches_response.rb +0 -5
  80. data/lib/algolia/models/analytics/top_searches_response_with_analytics.rb +0 -5
  81. data/lib/algolia/models/analytics/top_searches_response_with_revenue_analytics.rb +0 -5
  82. data/lib/algolia/models/ingestion/auth_algolia.rb +0 -5
  83. data/lib/algolia/models/ingestion/auth_algolia_insights.rb +0 -5
  84. data/lib/algolia/models/ingestion/auth_algolia_insights_partial.rb +0 -5
  85. data/lib/algolia/models/ingestion/auth_algolia_partial.rb +0 -5
  86. data/lib/algolia/models/ingestion/auth_api_key.rb +5 -3
  87. data/lib/algolia/models/ingestion/auth_api_key_partial.rb +5 -3
  88. data/lib/algolia/models/ingestion/auth_basic.rb +6 -3
  89. data/lib/algolia/models/ingestion/auth_basic_partial.rb +5 -3
  90. data/lib/algolia/models/ingestion/auth_google_service_account.rb +6 -3
  91. data/lib/algolia/models/ingestion/auth_google_service_account_partial.rb +5 -3
  92. data/lib/algolia/models/ingestion/auth_input.rb +5 -6
  93. data/lib/algolia/models/ingestion/auth_input_partial.rb +5 -6
  94. data/lib/algolia/models/ingestion/auth_o_auth.rb +7 -3
  95. data/lib/algolia/models/ingestion/auth_o_auth_partial.rb +5 -3
  96. data/lib/algolia/models/ingestion/authentication.rb +0 -5
  97. data/lib/algolia/models/ingestion/authentication_create.rb +0 -5
  98. data/lib/algolia/models/ingestion/authentication_create_response.rb +0 -5
  99. data/lib/algolia/models/ingestion/authentication_search.rb +0 -5
  100. data/lib/algolia/models/ingestion/authentication_update.rb +0 -5
  101. data/lib/algolia/models/ingestion/authentication_update_response.rb +0 -5
  102. data/lib/algolia/models/ingestion/big_commerce_channel.rb +0 -5
  103. data/lib/algolia/models/ingestion/big_commerce_metafield.rb +0 -5
  104. data/lib/algolia/models/ingestion/commercetools_custom_fields.rb +0 -5
  105. data/lib/algolia/models/ingestion/delete_response.rb +0 -5
  106. data/lib/algolia/models/ingestion/destination.rb +0 -5
  107. data/lib/algolia/models/ingestion/destination_create.rb +0 -5
  108. data/lib/algolia/models/ingestion/destination_create_response.rb +0 -5
  109. data/lib/algolia/models/ingestion/destination_index_name.rb +0 -5
  110. data/lib/algolia/models/ingestion/destination_input.rb +5 -6
  111. data/lib/algolia/models/ingestion/destination_search.rb +0 -5
  112. data/lib/algolia/models/ingestion/destination_update.rb +0 -5
  113. data/lib/algolia/models/ingestion/destination_update_response.rb +0 -5
  114. data/lib/algolia/models/ingestion/docker_image_type.rb +1 -2
  115. data/lib/algolia/models/ingestion/docker_streams.rb +0 -5
  116. data/lib/algolia/models/ingestion/docker_streams_input.rb +6 -4
  117. data/lib/algolia/models/ingestion/email_notifications.rb +207 -0
  118. data/lib/algolia/models/ingestion/error_base.rb +0 -5
  119. data/lib/algolia/models/ingestion/event.rb +0 -5
  120. data/lib/algolia/models/ingestion/list_authentications_response.rb +0 -5
  121. data/lib/algolia/models/ingestion/list_destinations_response.rb +0 -5
  122. data/lib/algolia/models/ingestion/list_events_response.rb +0 -5
  123. data/lib/algolia/models/ingestion/list_sources_response.rb +0 -5
  124. data/lib/algolia/models/ingestion/list_tasks_response.rb +0 -5
  125. data/lib/algolia/models/ingestion/list_tasks_response_v1.rb +0 -5
  126. data/lib/algolia/models/ingestion/list_transformations_response.rb +0 -5
  127. data/lib/algolia/models/ingestion/mapping_field_directive.rb +0 -5
  128. data/lib/algolia/models/ingestion/mapping_input.rb +6 -3
  129. data/lib/algolia/models/ingestion/mapping_kit_action.rb +0 -5
  130. data/lib/algolia/models/ingestion/notifications.rb +209 -0
  131. data/lib/algolia/models/ingestion/on_demand_trigger.rb +0 -5
  132. data/lib/algolia/models/ingestion/on_demand_trigger_input.rb +0 -5
  133. data/lib/algolia/models/ingestion/pagination.rb +0 -5
  134. data/lib/algolia/models/ingestion/platform_with_none.rb +5 -6
  135. data/lib/algolia/models/ingestion/policies.rb +205 -0
  136. data/lib/algolia/models/ingestion/push_task_payload.rb +0 -5
  137. data/lib/algolia/models/ingestion/push_task_records.rb +0 -5
  138. data/lib/algolia/models/ingestion/run.rb +0 -5
  139. data/lib/algolia/models/ingestion/run_list_response.rb +0 -5
  140. data/lib/algolia/models/ingestion/run_progress.rb +0 -5
  141. data/lib/algolia/models/ingestion/run_response.rb +0 -5
  142. data/lib/algolia/models/ingestion/run_source_payload.rb +0 -5
  143. data/lib/algolia/models/ingestion/run_source_response.rb +0 -5
  144. data/lib/algolia/models/ingestion/schedule_trigger.rb +0 -5
  145. data/lib/algolia/models/ingestion/schedule_trigger_input.rb +5 -3
  146. data/lib/algolia/models/ingestion/shopify_input.rb +0 -5
  147. data/lib/algolia/models/ingestion/shopify_market.rb +0 -5
  148. data/lib/algolia/models/ingestion/shopify_metafield.rb +0 -5
  149. data/lib/algolia/models/ingestion/source.rb +0 -5
  150. data/lib/algolia/models/ingestion/source_big_commerce.rb +5 -3
  151. data/lib/algolia/models/ingestion/source_big_query.rb +5 -3
  152. data/lib/algolia/models/ingestion/source_commercetools.rb +5 -3
  153. data/lib/algolia/models/ingestion/source_create.rb +0 -5
  154. data/lib/algolia/models/ingestion/source_create_response.rb +0 -5
  155. data/lib/algolia/models/ingestion/source_csv.rb +0 -5
  156. data/lib/algolia/models/ingestion/source_docker.rb +8 -3
  157. data/lib/algolia/models/ingestion/source_ga4_big_query_export.rb +7 -3
  158. data/lib/algolia/models/ingestion/source_input.rb +5 -6
  159. data/lib/algolia/models/ingestion/source_json.rb +0 -5
  160. data/lib/algolia/models/ingestion/source_search.rb +0 -5
  161. data/lib/algolia/models/ingestion/source_shopify.rb +5 -3
  162. data/lib/algolia/models/ingestion/source_update.rb +0 -5
  163. data/lib/algolia/models/ingestion/source_update_commercetools.rb +0 -5
  164. data/lib/algolia/models/ingestion/source_update_docker.rb +5 -3
  165. data/lib/algolia/models/ingestion/source_update_input.rb +5 -6
  166. data/lib/algolia/models/ingestion/source_update_response.rb +0 -5
  167. data/lib/algolia/models/ingestion/source_update_shopify.rb +0 -5
  168. data/lib/algolia/models/ingestion/streaming_input.rb +5 -3
  169. data/lib/algolia/models/ingestion/streaming_trigger.rb +0 -5
  170. data/lib/algolia/models/ingestion/subscription_trigger.rb +0 -5
  171. data/lib/algolia/models/ingestion/task.rb +20 -5
  172. data/lib/algolia/models/ingestion/task_create.rb +22 -9
  173. data/lib/algolia/models/ingestion/task_create_response.rb +0 -5
  174. data/lib/algolia/models/ingestion/task_create_trigger.rb +5 -6
  175. data/lib/algolia/models/ingestion/task_create_v1.rb +0 -5
  176. data/lib/algolia/models/ingestion/task_input.rb +5 -6
  177. data/lib/algolia/models/ingestion/task_search.rb +0 -5
  178. data/lib/algolia/models/ingestion/task_update.rb +22 -9
  179. data/lib/algolia/models/ingestion/task_update_response.rb +0 -5
  180. data/lib/algolia/models/ingestion/task_update_v1.rb +0 -5
  181. data/lib/algolia/models/ingestion/task_v1.rb +20 -5
  182. data/lib/algolia/models/ingestion/transformation.rb +0 -5
  183. data/lib/algolia/models/ingestion/transformation_create.rb +0 -5
  184. data/lib/algolia/models/ingestion/transformation_create_response.rb +0 -5
  185. data/lib/algolia/models/ingestion/transformation_error.rb +0 -5
  186. data/lib/algolia/models/ingestion/transformation_search.rb +0 -5
  187. data/lib/algolia/models/ingestion/transformation_try.rb +0 -5
  188. data/lib/algolia/models/ingestion/transformation_try_response.rb +0 -5
  189. data/lib/algolia/models/ingestion/transformation_update_response.rb +0 -5
  190. data/lib/algolia/models/ingestion/trigger.rb +5 -6
  191. data/lib/algolia/models/ingestion/trigger_update_input.rb +0 -5
  192. data/lib/algolia/models/ingestion/watch_response.rb +0 -5
  193. data/lib/algolia/models/ingestion/window.rb +0 -5
  194. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +7 -3
  195. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +8 -3
  196. data/lib/algolia/models/insights/clicked_filters.rb +6 -3
  197. data/lib/algolia/models/insights/clicked_object_ids.rb +6 -3
  198. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +7 -3
  199. data/lib/algolia/models/insights/converted_filters.rb +6 -3
  200. data/lib/algolia/models/insights/converted_object_ids.rb +6 -3
  201. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +6 -3
  202. data/lib/algolia/models/insights/discount.rb +5 -6
  203. data/lib/algolia/models/insights/error_base.rb +0 -5
  204. data/lib/algolia/models/insights/events_items.rb +5 -6
  205. data/lib/algolia/models/insights/events_response.rb +0 -5
  206. data/lib/algolia/models/insights/insights_events.rb +0 -5
  207. data/lib/algolia/models/insights/object_data.rb +0 -5
  208. data/lib/algolia/models/insights/object_data_after_search.rb +0 -5
  209. data/lib/algolia/models/insights/price.rb +5 -6
  210. data/lib/algolia/models/insights/purchased_object_ids.rb +7 -3
  211. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +8 -3
  212. data/lib/algolia/models/insights/value.rb +5 -6
  213. data/lib/algolia/models/insights/viewed_filters.rb +6 -3
  214. data/lib/algolia/models/insights/viewed_object_ids.rb +6 -3
  215. data/lib/algolia/models/monitoring/error_base.rb +0 -5
  216. data/lib/algolia/models/monitoring/incident.rb +0 -5
  217. data/lib/algolia/models/monitoring/incident_entry.rb +0 -5
  218. data/lib/algolia/models/monitoring/incidents_response.rb +0 -5
  219. data/lib/algolia/models/monitoring/indexing_metric.rb +0 -5
  220. data/lib/algolia/models/monitoring/indexing_time_response.rb +0 -5
  221. data/lib/algolia/models/monitoring/infrastructure_response.rb +0 -5
  222. data/lib/algolia/models/monitoring/inventory_response.rb +0 -5
  223. data/lib/algolia/models/monitoring/latency_metric.rb +0 -5
  224. data/lib/algolia/models/monitoring/latency_response.rb +0 -5
  225. data/lib/algolia/models/monitoring/metrics.rb +0 -5
  226. data/lib/algolia/models/monitoring/probes_metric.rb +0 -5
  227. data/lib/algolia/models/monitoring/server.rb +0 -5
  228. data/lib/algolia/models/monitoring/status_response.rb +0 -5
  229. data/lib/algolia/models/monitoring/time_entry.rb +0 -5
  230. data/lib/algolia/models/personalization/delete_user_profile_response.rb +0 -5
  231. data/lib/algolia/models/personalization/error_base.rb +0 -5
  232. data/lib/algolia/models/personalization/{event_scoring.rb → events_scoring.rb} +3 -8
  233. data/lib/algolia/models/personalization/{facet_scoring.rb → facets_scoring.rb} +3 -8
  234. data/lib/algolia/models/personalization/get_user_token_response.rb +0 -5
  235. data/lib/algolia/models/personalization/personalization_strategy_params.rb +17 -22
  236. data/lib/algolia/models/personalization/set_personalization_strategy_response.rb +0 -5
  237. data/lib/algolia/models/query-suggestions/base_response.rb +0 -5
  238. data/lib/algolia/models/query-suggestions/config_status.rb +0 -5
  239. data/lib/algolia/models/query-suggestions/configuration.rb +0 -5
  240. data/lib/algolia/models/query-suggestions/configuration_response.rb +0 -5
  241. data/lib/algolia/models/query-suggestions/configuration_with_index.rb +0 -5
  242. data/lib/algolia/models/query-suggestions/error_base.rb +0 -5
  243. data/lib/algolia/models/query-suggestions/facet.rb +0 -5
  244. data/lib/algolia/models/query-suggestions/languages.rb +5 -6
  245. data/lib/algolia/models/query-suggestions/log_file.rb +0 -5
  246. data/lib/algolia/models/query-suggestions/source_index.rb +0 -5
  247. data/lib/algolia/models/recommend/around_precision.rb +5 -6
  248. data/lib/algolia/models/recommend/around_radius.rb +5 -6
  249. data/lib/algolia/models/recommend/auto_facet_filter.rb +0 -5
  250. data/lib/algolia/models/recommend/banner.rb +0 -5
  251. data/lib/algolia/models/recommend/banner_image.rb +0 -5
  252. data/lib/algolia/models/recommend/banner_image_url.rb +0 -5
  253. data/lib/algolia/models/recommend/banner_link.rb +0 -5
  254. data/lib/algolia/models/recommend/bought_together_query.rb +0 -5
  255. data/lib/algolia/models/recommend/condition.rb +0 -5
  256. data/lib/algolia/models/recommend/consequence.rb +0 -5
  257. data/lib/algolia/models/recommend/deleted_at_response.rb +0 -5
  258. data/lib/algolia/models/recommend/distinct.rb +5 -6
  259. data/lib/algolia/models/recommend/error_base.rb +0 -5
  260. data/lib/algolia/models/recommend/exhaustive.rb +0 -5
  261. data/lib/algolia/models/recommend/facet_filters.rb +5 -6
  262. data/lib/algolia/models/recommend/facet_ordering.rb +0 -5
  263. data/lib/algolia/models/recommend/facet_stats.rb +0 -5
  264. data/lib/algolia/models/recommend/fallback_params.rb +0 -5
  265. data/lib/algolia/models/recommend/get_recommend_task_response.rb +0 -5
  266. data/lib/algolia/models/recommend/get_recommendations_params.rb +0 -5
  267. data/lib/algolia/models/recommend/get_recommendations_response.rb +0 -5
  268. data/lib/algolia/models/recommend/hide_consequence_object.rb +0 -5
  269. data/lib/algolia/models/recommend/highlight_result.rb +5 -6
  270. data/lib/algolia/models/recommend/highlight_result_option.rb +6 -3
  271. data/lib/algolia/models/recommend/ignore_plurals.rb +5 -6
  272. data/lib/algolia/models/recommend/index_settings_facets.rb +0 -5
  273. data/lib/algolia/models/recommend/inside_bounding_box.rb +5 -6
  274. data/lib/algolia/models/recommend/looking_similar_query.rb +0 -5
  275. data/lib/algolia/models/recommend/matched_geo_location.rb +0 -5
  276. data/lib/algolia/models/recommend/numeric_filters.rb +5 -6
  277. data/lib/algolia/models/recommend/optional_filters.rb +5 -6
  278. data/lib/algolia/models/recommend/optional_words.rb +5 -6
  279. data/lib/algolia/models/recommend/params_consequence.rb +0 -5
  280. data/lib/algolia/models/recommend/personalization.rb +0 -5
  281. data/lib/algolia/models/recommend/promote_consequence_object.rb +0 -5
  282. data/lib/algolia/models/recommend/range.rb +0 -5
  283. data/lib/algolia/models/recommend/ranking_info.rb +0 -5
  284. data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +5 -6
  285. data/lib/algolia/models/recommend/recommend_hit.rb +5 -3
  286. data/lib/algolia/models/recommend/recommend_rule.rb +0 -5
  287. data/lib/algolia/models/recommend/recommend_search_params.rb +0 -5
  288. data/lib/algolia/models/recommend/recommend_updated_at_response.rb +0 -5
  289. data/lib/algolia/models/recommend/recommendations_hit.rb +5 -6
  290. data/lib/algolia/models/recommend/recommendations_request.rb +5 -6
  291. data/lib/algolia/models/recommend/recommendations_results.rb +0 -5
  292. data/lib/algolia/models/recommend/redirect.rb +0 -5
  293. data/lib/algolia/models/recommend/redirect_rule_index_data.rb +0 -5
  294. data/lib/algolia/models/recommend/redirect_rule_index_metadata.rb +0 -5
  295. data/lib/algolia/models/recommend/redirect_url.rb +0 -5
  296. data/lib/algolia/models/recommend/related_query.rb +0 -5
  297. data/lib/algolia/models/recommend/remove_stop_words.rb +5 -6
  298. data/lib/algolia/models/recommend/rendering_content.rb +0 -5
  299. data/lib/algolia/models/recommend/rule_metadata.rb +0 -5
  300. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +0 -5
  301. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +0 -5
  302. data/lib/algolia/models/recommend/snippet_result.rb +5 -6
  303. data/lib/algolia/models/recommend/snippet_result_option.rb +5 -3
  304. data/lib/algolia/models/recommend/tag_filters.rb +5 -6
  305. data/lib/algolia/models/recommend/time_range.rb +0 -5
  306. data/lib/algolia/models/recommend/trending_facet_hit.rb +6 -3
  307. data/lib/algolia/models/recommend/trending_facets_query.rb +0 -5
  308. data/lib/algolia/models/recommend/trending_items_query.rb +0 -5
  309. data/lib/algolia/models/recommend/typo_tolerance.rb +5 -6
  310. data/lib/algolia/models/recommend/value.rb +0 -5
  311. data/lib/algolia/models/recommend/widgets.rb +0 -5
  312. data/lib/algolia/models/search/add_api_key_response.rb +0 -5
  313. data/lib/algolia/models/search/api_key.rb +0 -5
  314. data/lib/algolia/models/search/around_precision.rb +5 -6
  315. data/lib/algolia/models/search/around_radius.rb +5 -6
  316. data/lib/algolia/models/search/assign_user_id_params.rb +0 -5
  317. data/lib/algolia/models/search/attribute_to_update.rb +5 -6
  318. data/lib/algolia/models/search/automatic_facet_filter.rb +0 -5
  319. data/lib/algolia/models/search/automatic_facet_filters.rb +5 -6
  320. data/lib/algolia/models/search/banner.rb +0 -5
  321. data/lib/algolia/models/search/banner_image.rb +0 -5
  322. data/lib/algolia/models/search/banner_image_url.rb +0 -5
  323. data/lib/algolia/models/search/banner_link.rb +0 -5
  324. data/lib/algolia/models/search/batch_assign_user_ids_params.rb +0 -5
  325. data/lib/algolia/models/search/batch_dictionary_entries_params.rb +0 -5
  326. data/lib/algolia/models/search/batch_dictionary_entries_request.rb +0 -5
  327. data/lib/algolia/models/search/batch_params.rb +0 -5
  328. data/lib/algolia/models/search/batch_request.rb +0 -5
  329. data/lib/algolia/models/search/batch_response.rb +0 -5
  330. data/lib/algolia/models/search/batch_write_params.rb +0 -5
  331. data/lib/algolia/models/search/browse_params.rb +5 -6
  332. data/lib/algolia/models/search/browse_params_object.rb +0 -5
  333. data/lib/algolia/models/search/browse_response.rb +0 -5
  334. data/lib/algolia/models/search/built_in_operation.rb +0 -5
  335. data/lib/algolia/models/search/built_in_operation_value.rb +5 -6
  336. data/lib/algolia/models/search/condition.rb +0 -5
  337. data/lib/algolia/models/search/consequence.rb +0 -5
  338. data/lib/algolia/models/search/consequence_hide.rb +0 -5
  339. data/lib/algolia/models/search/consequence_params.rb +0 -5
  340. data/lib/algolia/models/search/consequence_query.rb +5 -6
  341. data/lib/algolia/models/search/consequence_query_object.rb +0 -5
  342. data/lib/algolia/models/search/created_at_response.rb +0 -5
  343. data/lib/algolia/models/search/delete_api_key_response.rb +0 -5
  344. data/lib/algolia/models/search/delete_by_params.rb +0 -5
  345. data/lib/algolia/models/search/delete_source_response.rb +0 -5
  346. data/lib/algolia/models/search/deleted_at_response.rb +0 -5
  347. data/lib/algolia/models/search/dictionary_entry.rb +0 -5
  348. data/lib/algolia/models/search/dictionary_language.rb +0 -5
  349. data/lib/algolia/models/search/dictionary_settings_params.rb +0 -5
  350. data/lib/algolia/models/search/distinct.rb +5 -6
  351. data/lib/algolia/models/search/edit.rb +0 -5
  352. data/lib/algolia/models/search/error_base.rb +0 -5
  353. data/lib/algolia/models/search/exhaustive.rb +0 -5
  354. data/lib/algolia/models/search/facet_filters.rb +5 -6
  355. data/lib/algolia/models/search/facet_hits.rb +0 -5
  356. data/lib/algolia/models/search/facet_ordering.rb +0 -5
  357. data/lib/algolia/models/search/facet_stats.rb +0 -5
  358. data/lib/algolia/models/search/facets.rb +0 -5
  359. data/lib/algolia/models/search/fetched_index.rb +0 -5
  360. data/lib/algolia/models/search/get_api_key_response.rb +0 -5
  361. data/lib/algolia/models/search/get_dictionary_settings_response.rb +0 -5
  362. data/lib/algolia/models/search/get_logs_response.rb +0 -5
  363. data/lib/algolia/models/search/get_objects_params.rb +0 -5
  364. data/lib/algolia/models/search/get_objects_request.rb +0 -5
  365. data/lib/algolia/models/search/get_objects_response.rb +0 -5
  366. data/lib/algolia/models/search/get_task_response.rb +0 -5
  367. data/lib/algolia/models/search/get_top_user_ids_response.rb +0 -5
  368. data/lib/algolia/models/search/has_pending_mappings_response.rb +0 -5
  369. data/lib/algolia/models/search/highlight_result.rb +5 -6
  370. data/lib/algolia/models/search/highlight_result_option.rb +6 -3
  371. data/lib/algolia/models/search/hit.rb +0 -5
  372. data/lib/algolia/models/search/ignore_plurals.rb +5 -6
  373. data/lib/algolia/models/search/index_settings.rb +0 -5
  374. data/lib/algolia/models/search/inside_bounding_box.rb +5 -6
  375. data/lib/algolia/models/search/languages.rb +0 -5
  376. data/lib/algolia/models/search/list_api_keys_response.rb +0 -5
  377. data/lib/algolia/models/search/list_clusters_response.rb +0 -5
  378. data/lib/algolia/models/search/list_indices_response.rb +0 -5
  379. data/lib/algolia/models/search/list_user_ids_response.rb +0 -5
  380. data/lib/algolia/models/search/log.rb +0 -5
  381. data/lib/algolia/models/search/log_query.rb +0 -5
  382. data/lib/algolia/models/search/matched_geo_location.rb +0 -5
  383. data/lib/algolia/models/search/multiple_batch_request.rb +0 -5
  384. data/lib/algolia/models/search/multiple_batch_response.rb +0 -5
  385. data/lib/algolia/models/search/numeric_filters.rb +5 -6
  386. data/lib/algolia/models/search/operation_index_params.rb +0 -5
  387. data/lib/algolia/models/search/optional_filters.rb +5 -6
  388. data/lib/algolia/models/search/optional_words.rb +5 -6
  389. data/lib/algolia/models/search/personalization.rb +0 -5
  390. data/lib/algolia/models/search/promote.rb +5 -6
  391. data/lib/algolia/models/search/promote_object_id.rb +5 -3
  392. data/lib/algolia/models/search/promote_object_ids.rb +5 -3
  393. data/lib/algolia/models/search/range.rb +0 -5
  394. data/lib/algolia/models/search/ranking_info.rb +0 -5
  395. data/lib/algolia/models/search/re_ranking_apply_filter.rb +5 -6
  396. data/lib/algolia/models/search/redirect.rb +0 -5
  397. data/lib/algolia/models/search/redirect_rule_index_data.rb +0 -5
  398. data/lib/algolia/models/search/redirect_rule_index_metadata.rb +0 -5
  399. data/lib/algolia/models/search/redirect_url.rb +0 -5
  400. data/lib/algolia/models/search/remove_stop_words.rb +5 -6
  401. data/lib/algolia/models/search/remove_user_id_response.rb +0 -5
  402. data/lib/algolia/models/search/rendering_content.rb +0 -5
  403. data/lib/algolia/models/search/replace_all_objects_response.rb +0 -5
  404. data/lib/algolia/models/search/replace_source_response.rb +0 -5
  405. data/lib/algolia/models/search/rule.rb +0 -5
  406. data/lib/algolia/models/search/save_object_response.rb +0 -5
  407. data/lib/algolia/models/search/save_synonym_response.rb +0 -5
  408. data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -5
  409. data/lib/algolia/models/search/search_dictionary_entries_response.rb +0 -5
  410. data/lib/algolia/models/search/search_for_facet_values_request.rb +0 -5
  411. data/lib/algolia/models/search/search_for_facet_values_response.rb +5 -3
  412. data/lib/algolia/models/search/search_for_facets.rb +6 -3
  413. data/lib/algolia/models/search/search_for_hits.rb +0 -5
  414. data/lib/algolia/models/search/search_method_params.rb +0 -5
  415. data/lib/algolia/models/search/search_params.rb +5 -6
  416. data/lib/algolia/models/search/search_params_object.rb +0 -5
  417. data/lib/algolia/models/search/search_params_string.rb +5 -3
  418. data/lib/algolia/models/search/search_query.rb +5 -6
  419. data/lib/algolia/models/search/search_response.rb +0 -5
  420. data/lib/algolia/models/search/search_responses.rb +0 -5
  421. data/lib/algolia/models/search/search_result.rb +5 -6
  422. data/lib/algolia/models/search/search_rules_params.rb +0 -5
  423. data/lib/algolia/models/search/search_rules_response.rb +0 -5
  424. data/lib/algolia/models/search/search_synonyms_params.rb +0 -5
  425. data/lib/algolia/models/search/search_synonyms_response.rb +0 -5
  426. data/lib/algolia/models/search/search_user_ids_params.rb +0 -5
  427. data/lib/algolia/models/search/search_user_ids_response.rb +0 -5
  428. data/lib/algolia/models/search/secured_api_key_restrictions.rb +0 -5
  429. data/lib/algolia/models/search/semantic_search.rb +0 -5
  430. data/lib/algolia/models/search/settings_response.rb +0 -5
  431. data/lib/algolia/models/search/snippet_result.rb +5 -6
  432. data/lib/algolia/models/search/snippet_result_option.rb +5 -3
  433. data/lib/algolia/models/search/source.rb +0 -5
  434. data/lib/algolia/models/search/standard_entries.rb +0 -5
  435. data/lib/algolia/models/search/synonym_hit.rb +0 -5
  436. data/lib/algolia/models/search/tag_filters.rb +5 -6
  437. data/lib/algolia/models/search/time_range.rb +0 -5
  438. data/lib/algolia/models/search/typo_tolerance.rb +5 -6
  439. data/lib/algolia/models/search/update_api_key_response.rb +0 -5
  440. data/lib/algolia/models/search/updated_at_response.rb +0 -5
  441. data/lib/algolia/models/search/updated_at_with_object_id_response.rb +0 -5
  442. data/lib/algolia/models/search/user_highlight_result.rb +0 -5
  443. data/lib/algolia/models/search/user_hit.rb +0 -5
  444. data/lib/algolia/models/search/user_id.rb +0 -5
  445. data/lib/algolia/models/search/value.rb +0 -5
  446. data/lib/algolia/models/search/widgets.rb +0 -5
  447. data/lib/algolia/version.rb +1 -1
  448. metadata +8 -9
@@ -18,11 +18,6 @@ module Algolia
18
18
  }
19
19
  end
20
20
 
21
- # Returns all the JSON keys this model knows about
22
- def self.acceptable_attributes
23
- attribute_map.values
24
- end
25
-
26
21
  # Attribute type mapping.
27
22
  def self.types_mapping
28
23
  {
@@ -21,11 +21,6 @@ module Algolia
21
21
  }
22
22
  end
23
23
 
24
- # Returns all the JSON keys this model knows about
25
- def self.acceptable_attributes
26
- attribute_map.values
27
- end
28
-
29
24
  # Attribute type mapping.
30
25
  def self.types_mapping
31
26
  {
@@ -27,11 +27,6 @@ module Algolia
27
27
  }
28
28
  end
29
29
 
30
- # Returns all the JSON keys this model knows about
31
- def self.acceptable_attributes
32
- attribute_map.values
33
- end
34
-
35
30
  # Attribute type mapping.
36
31
  def self.types_mapping
37
32
  {
@@ -20,11 +20,6 @@ module Algolia
20
20
  }
21
21
  end
22
22
 
23
- # Returns all the JSON keys this model knows about
24
- def self.acceptable_attributes
25
- attribute_map.values
26
- end
27
-
28
23
  # Attribute type mapping.
29
24
  def self.types_mapping
30
25
  {
@@ -28,11 +28,6 @@ module Algolia
28
28
  }
29
29
  end
30
30
 
31
- # Returns all the JSON keys this model knows about
32
- def self.acceptable_attributes
33
- attribute_map.values
34
- end
35
-
36
31
  # Attribute type mapping.
37
32
  def self.types_mapping
38
33
  {
@@ -20,9 +20,11 @@ module Algolia
20
20
  }
21
21
  end
22
22
 
23
- # Returns all the JSON keys this model knows about
24
- def self.acceptable_attributes
25
- attribute_map.values
23
+ # Returns the keys that uniquely identify this oneOf variant when present
24
+ def self.discriminator_attributes
25
+ [
26
+ :cron
27
+ ]
26
28
  end
27
29
 
28
30
  # Attribute type mapping.
@@ -19,11 +19,6 @@ module Algolia
19
19
  }
20
20
  end
21
21
 
22
- # Returns all the JSON keys this model knows about
23
- def self.acceptable_attributes
24
- attribute_map.values
25
- end
26
-
27
22
  # Attribute type mapping.
28
23
  def self.types_mapping
29
24
  {
@@ -22,11 +22,6 @@ module Algolia
22
22
  }
23
23
  end
24
24
 
25
- # Returns all the JSON keys this model knows about
26
- def self.acceptable_attributes
27
- attribute_map.values
28
- end
29
-
30
25
  # Attribute type mapping.
31
26
  def self.types_mapping
32
27
  {
@@ -22,11 +22,6 @@ module Algolia
22
22
  }
23
23
  end
24
24
 
25
- # Returns all the JSON keys this model knows about
26
- def self.acceptable_attributes
27
- attribute_map.values
28
- end
29
-
30
25
  # Attribute type mapping.
31
26
  def self.types_mapping
32
27
  {
@@ -37,11 +37,6 @@ module Algolia
37
37
  }
38
38
  end
39
39
 
40
- # Returns all the JSON keys this model knows about
41
- def self.acceptable_attributes
42
- attribute_map.values
43
- end
44
-
45
40
  # Attribute type mapping.
46
41
  def self.types_mapping
47
42
  {
@@ -28,9 +28,11 @@ module Algolia
28
28
  }
29
29
  end
30
30
 
31
- # Returns all the JSON keys this model knows about
32
- def self.acceptable_attributes
33
- attribute_map.values
31
+ # Returns the keys that uniquely identify this oneOf variant when present
32
+ def self.discriminator_attributes
33
+ [
34
+ :storeHash
35
+ ]
34
36
  end
35
37
 
36
38
  # Attribute type mapping.
@@ -39,9 +39,11 @@ module Algolia
39
39
  }
40
40
  end
41
41
 
42
- # Returns all the JSON keys this model knows about
43
- def self.acceptable_attributes
44
- attribute_map.values
42
+ # Returns the keys that uniquely identify this oneOf variant when present
43
+ def self.discriminator_attributes
44
+ [
45
+ :projectID
46
+ ]
45
47
  end
46
48
 
47
49
  # Attribute type mapping.
@@ -32,9 +32,11 @@ module Algolia
32
32
  }
33
33
  end
34
34
 
35
- # Returns all the JSON keys this model knows about
36
- def self.acceptable_attributes
37
- attribute_map.values
35
+ # Returns the keys that uniquely identify this oneOf variant when present
36
+ def self.discriminator_attributes
37
+ [
38
+ :projectKey
39
+ ]
38
40
  end
39
41
 
40
42
  # Attribute type mapping.
@@ -26,11 +26,6 @@ module Algolia
26
26
  }
27
27
  end
28
28
 
29
- # Returns all the JSON keys this model knows about
30
- def self.acceptable_attributes
31
- attribute_map.values
32
- end
33
-
34
29
  # Attribute type mapping.
35
30
  def self.types_mapping
36
31
  {
@@ -24,11 +24,6 @@ module Algolia
24
24
  }
25
25
  end
26
26
 
27
- # Returns all the JSON keys this model knows about
28
- def self.acceptable_attributes
29
- attribute_map.values
30
- end
31
-
32
27
  # Attribute type mapping.
33
28
  def self.types_mapping
34
29
  {
@@ -31,11 +31,6 @@ module Algolia
31
31
  }
32
32
  end
33
33
 
34
- # Returns all the JSON keys this model knows about
35
- def self.acceptable_attributes
36
- attribute_map.values
37
- end
38
-
39
34
  # Attribute type mapping.
40
35
  def self.types_mapping
41
36
  {
@@ -30,9 +30,14 @@ module Algolia
30
30
  }
31
31
  end
32
32
 
33
- # Returns all the JSON keys this model knows about
34
- def self.acceptable_attributes
35
- attribute_map.values
33
+ # Returns the keys that uniquely identify this oneOf variant when present
34
+ def self.discriminator_attributes
35
+ [
36
+ :registry,
37
+ :image,
38
+ :imageType,
39
+ :configuration
40
+ ]
36
41
  end
37
42
 
38
43
  # Attribute type mapping.
@@ -24,9 +24,13 @@ module Algolia
24
24
  }
25
25
  end
26
26
 
27
- # Returns all the JSON keys this model knows about
28
- def self.acceptable_attributes
29
- attribute_map.values
27
+ # Returns the keys that uniquely identify this oneOf variant when present
28
+ def self.discriminator_attributes
29
+ [
30
+ :projectID,
31
+ :datasetID,
32
+ :tablePrefix
33
+ ]
30
34
  end
31
35
 
32
36
  # Attribute type mapping.
@@ -50,7 +50,6 @@ module Algolia
50
50
 
51
51
  SchemaMismatchError = Class.new(StandardError)
52
52
 
53
- # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
54
53
  def find_and_cast_into_type(klass, data)
55
54
  return if data.nil?
56
55
 
@@ -89,12 +88,12 @@ module Algolia
89
88
  if const.respond_to?(:openapi_one_of)
90
89
  # nested oneOf model
91
90
  model = const.build(data)
92
- elsif const.respond_to?(:acceptable_attributes)
93
- # raise if data contains keys that are not known to the model
94
- raise unless (data.keys - const.acceptable_attributes).empty?
95
- model = const.build_from_hash(data)
91
+ elsif const.respond_to?(:discriminator_attributes)
92
+ if const.discriminator_attributes.all? { |attr| data.key?(attr) }
93
+ model = const.build_from_hash(data)
94
+ end
96
95
  else
97
- # maybe it's an enum
96
+ # maybe it's an enum, or doens't have discriminators
98
97
  model = const.build_from_hash(data)
99
98
  end
100
99
 
@@ -23,11 +23,6 @@ module Algolia
23
23
  }
24
24
  end
25
25
 
26
- # Returns all the JSON keys this model knows about
27
- def self.acceptable_attributes
28
- attribute_map.values
29
- end
30
-
31
26
  # Attribute type mapping.
32
27
  def self.types_mapping
33
28
  {
@@ -15,11 +15,6 @@ module Algolia
15
15
  }
16
16
  end
17
17
 
18
- # Returns all the JSON keys this model knows about
19
- def self.acceptable_attributes
20
- attribute_map.values
21
- end
22
-
23
18
  # Attribute type mapping.
24
19
  def self.types_mapping
25
20
  {
@@ -20,9 +20,11 @@ module Algolia
20
20
  }
21
21
  end
22
22
 
23
- # Returns all the JSON keys this model knows about
24
- def self.acceptable_attributes
25
- attribute_map.values
23
+ # Returns the keys that uniquely identify this oneOf variant when present
24
+ def self.discriminator_attributes
25
+ [
26
+ :shopURL
27
+ ]
26
28
  end
27
29
 
28
30
  # Attribute type mapping.
@@ -23,11 +23,6 @@ module Algolia
23
23
  }
24
24
  end
25
25
 
26
- # Returns all the JSON keys this model knows about
27
- def self.acceptable_attributes
28
- attribute_map.values
29
- end
30
-
31
26
  # Attribute type mapping.
32
27
  def self.types_mapping
33
28
  {
@@ -29,11 +29,6 @@ module Algolia
29
29
  }
30
30
  end
31
31
 
32
- # Returns all the JSON keys this model knows about
33
- def self.acceptable_attributes
34
- attribute_map.values
35
- end
36
-
37
32
  # Attribute type mapping.
38
33
  def self.types_mapping
39
34
  {
@@ -27,9 +27,11 @@ module Algolia
27
27
  }
28
28
  end
29
29
 
30
- # Returns all the JSON keys this model knows about
31
- def self.acceptable_attributes
32
- attribute_map.values
30
+ # Returns the keys that uniquely identify this oneOf variant when present
31
+ def self.discriminator_attributes
32
+ [
33
+ :configuration
34
+ ]
33
35
  end
34
36
 
35
37
  # Attribute type mapping.
@@ -49,7 +49,6 @@ module Algolia
49
49
 
50
50
  SchemaMismatchError = Class.new(StandardError)
51
51
 
52
- # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
53
52
  def find_and_cast_into_type(klass, data)
54
53
  return if data.nil?
55
54
 
@@ -88,12 +87,12 @@ module Algolia
88
87
  if const.respond_to?(:openapi_one_of)
89
88
  # nested oneOf model
90
89
  model = const.build(data)
91
- elsif const.respond_to?(:acceptable_attributes)
92
- # raise if data contains keys that are not known to the model
93
- raise unless (data.keys - const.acceptable_attributes).empty?
94
- model = const.build_from_hash(data)
90
+ elsif const.respond_to?(:discriminator_attributes)
91
+ if const.discriminator_attributes.all? { |attr| data.key?(attr) }
92
+ model = const.build_from_hash(data)
93
+ end
95
94
  else
96
- # maybe it's an enum
95
+ # maybe it's an enum, or doens't have discriminators
97
96
  model = const.build_from_hash(data)
98
97
  end
99
98
 
@@ -24,11 +24,6 @@ module Algolia
24
24
  }
25
25
  end
26
26
 
27
- # Returns all the JSON keys this model knows about
28
- def self.acceptable_attributes
29
- attribute_map.values
30
- end
31
-
32
27
  # Attribute type mapping.
33
28
  def self.types_mapping
34
29
  {
@@ -16,11 +16,6 @@ module Algolia
16
16
  }
17
17
  end
18
18
 
19
- # Returns all the JSON keys this model knows about
20
- def self.acceptable_attributes
21
- attribute_map.values
22
- end
23
-
24
19
  # Attribute type mapping.
25
20
  def self.types_mapping
26
21
  {
@@ -16,9 +16,11 @@ module Algolia
16
16
  }
17
17
  end
18
18
 
19
- # Returns all the JSON keys this model knows about
20
- def self.acceptable_attributes
21
- attribute_map.values
19
+ # Returns the keys that uniquely identify this oneOf variant when present
20
+ def self.discriminator_attributes
21
+ [
22
+ :mapping
23
+ ]
22
24
  end
23
25
 
24
26
  # Attribute type mapping.
@@ -16,11 +16,6 @@ module Algolia
16
16
  }
17
17
  end
18
18
 
19
- # Returns all the JSON keys this model knows about
20
- def self.acceptable_attributes
21
- attribute_map.values
22
- end
23
-
24
19
  # Attribute type mapping.
25
20
  def self.types_mapping
26
21
  {
@@ -16,11 +16,6 @@ module Algolia
16
16
  }
17
17
  end
18
18
 
19
- # Returns all the JSON keys this model knows about
20
- def self.acceptable_attributes
21
- attribute_map.values
22
- end
23
-
24
19
  # Attribute type mapping.
25
20
  def self.types_mapping
26
21
  {
@@ -37,6 +37,10 @@ module Algolia
37
37
  # Date of the last cursor in RFC 3339 format.
38
38
  attr_accessor :cursor
39
39
 
40
+ attr_accessor :notifications
41
+
42
+ attr_accessor :policies
43
+
40
44
  # Date of creation in RFC 3339 format.
41
45
  attr_accessor :created_at
42
46
 
@@ -57,16 +61,13 @@ module Algolia
57
61
  :failure_threshold => :failureThreshold,
58
62
  :action => :action,
59
63
  :cursor => :cursor,
64
+ :notifications => :notifications,
65
+ :policies => :policies,
60
66
  :created_at => :createdAt,
61
67
  :updated_at => :updatedAt
62
68
  }
63
69
  end
64
70
 
65
- # Returns all the JSON keys this model knows about
66
- def self.acceptable_attributes
67
- attribute_map.values
68
- end
69
-
70
71
  # Attribute type mapping.
71
72
  def self.types_mapping
72
73
  {
@@ -81,6 +82,8 @@ module Algolia
81
82
  :failure_threshold => :"Integer",
82
83
  :action => :"ActionType",
83
84
  :cursor => :"String",
85
+ :notifications => :"Notifications",
86
+ :policies => :"Policies",
84
87
  :created_at => :"String",
85
88
  :updated_at => :"String"
86
89
  }
@@ -165,6 +168,14 @@ module Algolia
165
168
  self.cursor = attributes[:cursor]
166
169
  end
167
170
 
171
+ if attributes.key?(:notifications)
172
+ self.notifications = attributes[:notifications]
173
+ end
174
+
175
+ if attributes.key?(:policies)
176
+ self.policies = attributes[:policies]
177
+ end
178
+
168
179
  if attributes.key?(:created_at)
169
180
  self.created_at = attributes[:created_at]
170
181
  else
@@ -192,6 +203,8 @@ module Algolia
192
203
  failure_threshold == other.failure_threshold &&
193
204
  action == other.action &&
194
205
  cursor == other.cursor &&
206
+ notifications == other.notifications &&
207
+ policies == other.policies &&
195
208
  created_at == other.created_at &&
196
209
  updated_at == other.updated_at
197
210
  end
@@ -217,6 +230,8 @@ module Algolia
217
230
  failure_threshold,
218
231
  action,
219
232
  cursor,
233
+ notifications,
234
+ policies,
220
235
  created_at,
221
236
  updated_at
222
237
  ].hash
@@ -29,6 +29,10 @@ module Algolia
29
29
  # Date of the last cursor in RFC 3339 format.
30
30
  attr_accessor :cursor
31
31
 
32
+ attr_accessor :notifications
33
+
34
+ attr_accessor :policies
35
+
32
36
  # Attribute mapping from ruby-style variable name to JSON key.
33
37
  def self.attribute_map
34
38
  {
@@ -39,15 +43,12 @@ module Algolia
39
43
  :enabled => :enabled,
40
44
  :failure_threshold => :failureThreshold,
41
45
  :input => :input,
42
- :cursor => :cursor
46
+ :cursor => :cursor,
47
+ :notifications => :notifications,
48
+ :policies => :policies
43
49
  }
44
50
  end
45
51
 
46
- # Returns all the JSON keys this model knows about
47
- def self.acceptable_attributes
48
- attribute_map.values
49
- end
50
-
51
52
  # Attribute type mapping.
52
53
  def self.types_mapping
53
54
  {
@@ -58,7 +59,9 @@ module Algolia
58
59
  :enabled => :"Boolean",
59
60
  :failure_threshold => :"Integer",
60
61
  :input => :"TaskInput",
61
- :cursor => :"String"
62
+ :cursor => :"String",
63
+ :notifications => :"Notifications",
64
+ :policies => :"Policies"
62
65
  }
63
66
  end
64
67
 
@@ -129,6 +132,14 @@ module Algolia
129
132
  if attributes.key?(:cursor)
130
133
  self.cursor = attributes[:cursor]
131
134
  end
135
+
136
+ if attributes.key?(:notifications)
137
+ self.notifications = attributes[:notifications]
138
+ end
139
+
140
+ if attributes.key?(:policies)
141
+ self.policies = attributes[:policies]
142
+ end
132
143
  end
133
144
 
134
145
  # Checks equality by comparing each attribute.
@@ -143,7 +154,9 @@ module Algolia
143
154
  enabled == other.enabled &&
144
155
  failure_threshold == other.failure_threshold &&
145
156
  input == other.input &&
146
- cursor == other.cursor
157
+ cursor == other.cursor &&
158
+ notifications == other.notifications &&
159
+ policies == other.policies
147
160
  end
148
161
 
149
162
  # @see the `==` method
@@ -155,7 +168,7 @@ module Algolia
155
168
  # Calculates hash code according to all attributes.
156
169
  # @return [Integer] Hash code
157
170
  def hash
158
- [source_id, destination_id, action, cron, enabled, failure_threshold, input, cursor].hash
171
+ [source_id, destination_id, action, cron, enabled, failure_threshold, input, cursor, notifications, policies].hash
159
172
  end
160
173
 
161
174
  # Builds the object from hash
@@ -21,11 +21,6 @@ module Algolia
21
21
  }
22
22
  end
23
23
 
24
- # Returns all the JSON keys this model knows about
25
- def self.acceptable_attributes
26
- attribute_map.values
27
- end
28
-
29
24
  # Attribute type mapping.
30
25
  def self.types_mapping
31
26
  {
@@ -46,7 +46,6 @@ module Algolia
46
46
 
47
47
  SchemaMismatchError = Class.new(StandardError)
48
48
 
49
- # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
50
49
  def find_and_cast_into_type(klass, data)
51
50
  return if data.nil?
52
51
 
@@ -85,12 +84,12 @@ module Algolia
85
84
  if const.respond_to?(:openapi_one_of)
86
85
  # nested oneOf model
87
86
  model = const.build(data)
88
- elsif const.respond_to?(:acceptable_attributes)
89
- # raise if data contains keys that are not known to the model
90
- raise unless (data.keys - const.acceptable_attributes).empty?
91
- model = const.build_from_hash(data)
87
+ elsif const.respond_to?(:discriminator_attributes)
88
+ if const.discriminator_attributes.all? { |attr| data.key?(attr) }
89
+ model = const.build_from_hash(data)
90
+ end
92
91
  else
93
- # maybe it's an enum
92
+ # maybe it's an enum, or doens't have discriminators
94
93
  model = const.build_from_hash(data)
95
94
  end
96
95
 
@@ -42,11 +42,6 @@ module Algolia
42
42
  }
43
43
  end
44
44
 
45
- # Returns all the JSON keys this model knows about
46
- def self.acceptable_attributes
47
- attribute_map.values
48
- end
49
-
50
45
  # Attribute type mapping.
51
46
  def self.types_mapping
52
47
  {