algolia 3.0.0.alpha.16 → 3.0.0.alpha.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +10 -167
  3. data/CHANGELOG.md +16 -0
  4. data/Gemfile.lock +4 -4
  5. data/lib/algolia/api/abtesting_client.rb +20 -20
  6. data/lib/algolia/api/analytics_client.rb +76 -76
  7. data/lib/algolia/api/personalization_client.rb +12 -12
  8. data/lib/algolia/api/recommend_client.rb +22 -22
  9. data/lib/algolia/api/search_client.rb +8 -8
  10. data/lib/algolia/api/usage_client.rb +329 -0
  11. data/lib/algolia/models/abtesting/ab_test.rb +41 -16
  12. data/lib/algolia/models/abtesting/ab_test_configuration.rb +217 -0
  13. data/lib/algolia/models/abtesting/ab_test_response.rb +2 -2
  14. data/lib/algolia/models/abtesting/ab_tests_variant.rb +21 -3
  15. data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +21 -3
  16. data/lib/algolia/models/abtesting/add_ab_tests_request.rb +1 -1
  17. data/lib/algolia/models/abtesting/custom_search_params.rb +1 -1
  18. data/lib/algolia/models/abtesting/effect.rb +35 -0
  19. data/lib/algolia/models/abtesting/empty_search.rb +198 -0
  20. data/lib/algolia/models/abtesting/list_ab_tests_response.rb +1 -1
  21. data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +247 -0
  22. data/lib/algolia/models/abtesting/outliers.rb +198 -0
  23. data/lib/algolia/models/abtesting/status.rb +35 -0
  24. data/lib/algolia/models/abtesting/variant.rb +31 -13
  25. data/lib/algolia/models/analytics/get_status_response.rb +1 -1
  26. data/lib/algolia/models/ingestion/auth_algolia_insights.rb +212 -0
  27. data/lib/algolia/models/{recommend/consequence_query_object.rb → ingestion/auth_algolia_insights_partial.rb} +21 -24
  28. data/lib/algolia/models/ingestion/auth_input.rb +1 -0
  29. data/lib/algolia/models/ingestion/auth_input_partial.rb +1 -0
  30. data/lib/algolia/models/ingestion/authentication_type.rb +2 -1
  31. data/lib/algolia/models/ingestion/destination_index_name.rb +1 -1
  32. data/lib/algolia/models/ingestion/shopify_input.rb +212 -0
  33. data/lib/algolia/models/ingestion/shopify_market.rb +227 -0
  34. data/lib/algolia/models/ingestion/shopify_metafield.rb +221 -0
  35. data/lib/algolia/models/ingestion/source_input.rb +2 -1
  36. data/lib/algolia/models/ingestion/source_shopify.rb +278 -0
  37. data/lib/algolia/models/{recommend/base_recommended_for_you_query_parameters.rb → ingestion/source_shopify_base.rb} +14 -14
  38. data/lib/algolia/models/ingestion/source_update_input.rb +2 -1
  39. data/lib/algolia/models/ingestion/source_update_shopify.rb +258 -0
  40. data/lib/algolia/models/ingestion/task_input.rb +1 -0
  41. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +2 -2
  42. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +2 -2
  43. data/lib/algolia/models/insights/clicked_filters.rb +2 -2
  44. data/lib/algolia/models/insights/clicked_object_ids.rb +2 -2
  45. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +2 -2
  46. data/lib/algolia/models/insights/converted_filters.rb +2 -2
  47. data/lib/algolia/models/insights/converted_object_ids.rb +2 -2
  48. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +2 -2
  49. data/lib/algolia/models/insights/purchased_object_ids.rb +2 -2
  50. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +2 -2
  51. data/lib/algolia/models/insights/viewed_filters.rb +2 -2
  52. data/lib/algolia/models/insights/viewed_object_ids.rb +2 -2
  53. data/lib/algolia/models/monitoring/incidents_inner.rb +1 -1
  54. data/lib/algolia/models/monitoring/probes_metric.rb +1 -1
  55. data/lib/algolia/models/monitoring/time_inner.rb +1 -1
  56. data/lib/algolia/models/personalization/delete_user_profile_response.rb +2 -2
  57. data/lib/algolia/models/personalization/event_scoring.rb +25 -4
  58. data/lib/algolia/models/personalization/event_type.rb +34 -0
  59. data/lib/algolia/models/personalization/facet_scoring.rb +2 -2
  60. data/lib/algolia/models/personalization/get_user_token_response.rb +3 -3
  61. data/lib/algolia/models/personalization/personalization_strategy_params.rb +21 -3
  62. data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +3 -3
  63. data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +1 -1
  64. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +1 -1
  65. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +1 -1
  66. data/lib/algolia/models/query-suggestions/source_index.rb +1 -1
  67. data/lib/algolia/models/recommend/auto_facet_filter.rb +208 -0
  68. data/lib/algolia/models/recommend/base_recommend_request.rb +37 -8
  69. data/lib/algolia/models/recommend/base_search_params.rb +4 -4
  70. data/lib/algolia/models/recommend/base_search_params_without_query.rb +4 -4
  71. data/lib/algolia/models/recommend/bought_together_query.rb +319 -0
  72. data/lib/algolia/models/recommend/condition.rb +12 -62
  73. data/lib/algolia/models/recommend/consequence.rb +32 -54
  74. data/lib/algolia/models/recommend/deleted_at_response.rb +1 -1
  75. data/lib/algolia/models/recommend/{recommended_for_you_query_parameters.rb → fallback_params.rb} +17 -20
  76. data/lib/algolia/models/recommend/{edit_type.rb → fbt_model.rb} +5 -6
  77. data/lib/algolia/models/recommend/{base_trending_facets_query.rb → frequently_bought_together.rb} +20 -18
  78. data/lib/algolia/models/recommend/get_recommendations_params.rb +2 -2
  79. data/lib/algolia/models/recommend/{consequence_hide.rb → hide_consequence_object.rb} +4 -6
  80. data/lib/algolia/models/recommend/index_settings_as_search_params.rb +10 -10
  81. data/lib/algolia/models/recommend/{base_recommendations_query.rb → looking_similar.rb} +6 -15
  82. data/lib/algolia/models/recommend/{anchoring.rb → looking_similar_model.rb} +5 -8
  83. data/lib/algolia/models/recommend/looking_similar_query.rb +328 -0
  84. data/lib/algolia/models/recommend/{params.rb → params_consequence.rb} +26 -28
  85. data/lib/algolia/models/recommend/{promote_object_id.rb → promote_consequence_object.rb} +19 -9
  86. data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +1 -1
  87. data/lib/algolia/models/recommend/{rule_response.rb → recommend_rule.rb} +13 -18
  88. data/lib/algolia/models/recommend/{rule_response_metadata.rb → recommend_rule_metadata.rb} +5 -4
  89. data/lib/algolia/models/recommend/recommendations_hits.rb +4 -24
  90. data/lib/algolia/models/recommend/recommendations_request.rb +3 -1
  91. data/lib/algolia/models/recommend/recommendations_results.rb +4 -24
  92. data/lib/algolia/models/recommend/{base_recommended_for_you_query.rb → recommended_for_you.rb} +5 -14
  93. data/lib/algolia/models/recommend/recommended_for_you_query.rb +36 -16
  94. data/lib/algolia/models/recommend/{recommendation_models.rb → related_model.rb} +4 -5
  95. data/lib/algolia/models/recommend/{edit.rb → related_products.rb} +27 -24
  96. data/lib/algolia/models/recommend/{recommendations_query.rb → related_query.rb} +40 -20
  97. data/lib/algolia/models/recommend/{consequence_params.rb → search_params.rb} +33 -52
  98. data/lib/algolia/models/recommend/search_params_object.rb +15 -14
  99. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +58 -10
  100. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +2 -2
  101. data/lib/algolia/models/recommend/trending_facet_hit.rb +2 -2
  102. data/lib/algolia/models/recommend/trending_facets.rb +243 -0
  103. data/lib/algolia/models/recommend/trending_facets_query.rb +51 -11
  104. data/lib/algolia/models/recommend/{base_trending_items_query.rb → trending_items.rb} +12 -15
  105. data/lib/algolia/models/recommend/trending_items_query.rb +43 -17
  106. data/lib/algolia/models/search/add_api_key_response.rb +1 -1
  107. data/lib/algolia/models/search/base_get_api_key_response.rb +1 -1
  108. data/lib/algolia/models/search/base_index_settings.rb +10 -10
  109. data/lib/algolia/models/search/base_search_params.rb +4 -4
  110. data/lib/algolia/models/search/base_search_params_without_query.rb +4 -4
  111. data/lib/algolia/models/search/browse_params_object.rb +14 -14
  112. data/lib/algolia/models/search/consequence_params.rb +14 -14
  113. data/lib/algolia/models/search/created_at_response.rb +1 -1
  114. data/lib/algolia/models/search/delete_api_key_response.rb +1 -1
  115. data/lib/algolia/models/search/delete_by_params.rb +2 -2
  116. data/lib/algolia/models/search/delete_source_response.rb +1 -1
  117. data/lib/algolia/models/search/deleted_at_response.rb +1 -1
  118. data/lib/algolia/models/search/fetched_index.rb +1 -1
  119. data/lib/algolia/models/search/get_api_key_response.rb +1 -1
  120. data/lib/algolia/models/search/index_settings.rb +20 -20
  121. data/lib/algolia/models/search/index_settings_as_search_params.rb +10 -10
  122. data/lib/algolia/models/search/log.rb +1 -1
  123. data/lib/algolia/models/search/multiple_batch_request.rb +1 -1
  124. data/lib/algolia/models/search/operation_index_params.rb +1 -1
  125. data/lib/algolia/models/search/re_ranking_apply_filter.rb +1 -1
  126. data/lib/algolia/models/search/remove_user_id_response.rb +1 -1
  127. data/lib/algolia/models/search/replace_source_response.rb +1 -1
  128. data/lib/algolia/models/search/save_object_response.rb +1 -1
  129. data/lib/algolia/models/search/save_synonym_response.rb +1 -1
  130. data/lib/algolia/models/search/search_for_facets.rb +15 -15
  131. data/lib/algolia/models/search/search_for_facets_options.rb +1 -1
  132. data/lib/algolia/models/search/search_for_hits.rb +15 -15
  133. data/lib/algolia/models/search/search_for_hits_options.rb +1 -1
  134. data/lib/algolia/models/search/search_params_object.rb +15 -14
  135. data/lib/algolia/models/search/search_user_ids_response.rb +1 -1
  136. data/lib/algolia/models/search/secured_api_key_restrictions.rb +1 -1
  137. data/lib/algolia/models/search/update_api_key_response.rb +1 -1
  138. data/lib/algolia/models/search/updated_at_response.rb +1 -1
  139. data/lib/algolia/models/search/updated_at_with_object_id_response.rb +1 -1
  140. data/lib/algolia/models/search/updated_rule_response.rb +1 -1
  141. data/lib/algolia/models/search/user_hit.rb +1 -1
  142. data/lib/algolia/models/search/user_id.rb +1 -1
  143. data/lib/algolia/models/usage/error_base.rb +205 -0
  144. data/lib/algolia/models/usage/get_usage200_response.rb +198 -0
  145. data/lib/algolia/models/usage/get_usage200_response_statistics_inner.rb +206 -0
  146. data/lib/algolia/models/usage/get_usage400_response.rb +198 -0
  147. data/lib/algolia/models/usage/get_usage400_response_error.rb +216 -0
  148. data/lib/algolia/models/usage/get_usage400_response_error_errors_inner.rb +225 -0
  149. data/lib/algolia/models/usage/granularity.rb +33 -0
  150. data/lib/algolia/models/usage/statistic.rb +116 -0
  151. data/lib/algolia/models/{recommend/promote.rb → usage/statistic_value.rb} +5 -5
  152. data/lib/algolia/version.rb +1 -1
  153. metadata +47 -25
  154. data/lib/algolia/models/recommend/automatic_facet_filter.rb +0 -220
  155. data/lib/algolia/models/recommend/automatic_facet_filters.rb +0 -97
  156. data/lib/algolia/models/recommend/consequence_query.rb +0 -97
  157. data/lib/algolia/models/recommend/promote_object_ids.rb +0 -228
@@ -0,0 +1,329 @@
1
+ # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ module Algolia
4
+ class UsageClient
5
+ attr_accessor :api_client
6
+
7
+ def initialize(config = nil)
8
+ raise '`config` is missing.' if config.nil?
9
+ raise '`app_id` is missing.' if config.app_id.nil? || config.app_id == ''
10
+ raise '`api_key` is missing.' if config.api_key.nil? || config.api_key == ''
11
+
12
+ @api_client = Algolia::ApiClient.new(config)
13
+ end
14
+
15
+ def self.create(app_id, api_key, opts = {})
16
+ hosts = []
17
+ hosts << Transport::StatefulHost.new("#{app_id}-dsn.algolia.net", accept: CallType::READ)
18
+ hosts << Transport::StatefulHost.new("#{app_id}.algolia.net", accept: CallType::WRITE)
19
+
20
+ hosts += 1.upto(3).map do |i|
21
+ Transport::StatefulHost.new("#{app_id}-#{i}.algolianet.com", accept: CallType::READ | CallType::WRITE)
22
+ end.shuffle
23
+
24
+ config = Algolia::Configuration.new(app_id, api_key, hosts, 'Usage', opts)
25
+ create_with_config(config)
26
+ end
27
+
28
+ def self.create_with_config(config)
29
+ new(config)
30
+ end
31
+
32
+ # This method allow you to send requests to the Algolia REST API.
33
+
34
+ # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
35
+ # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
36
+ # @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)
37
+ # @return [Http::Response] the response
38
+ def custom_delete_with_http_info(path, parameters = nil, request_options = {})
39
+ # verify the required parameter 'path' is set
40
+ if @api_client.config.client_side_validation && path.nil?
41
+ raise ArgumentError, "Parameter `path` is required when calling `custom_delete`."
42
+ end
43
+
44
+ path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
45
+ query_params = {}
46
+ query_params = query_params.merge(parameters) unless parameters.nil?
47
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
48
+ header_params = {}
49
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
50
+
51
+ post_body = request_options[:debug_body]
52
+
53
+ new_options = request_options.merge(
54
+ :operation => :'UsageClient.custom_delete',
55
+ :header_params => header_params,
56
+ :query_params => query_params,
57
+ :body => post_body,
58
+ :use_read_transporter => false
59
+ )
60
+
61
+ @api_client.call_api(:DELETE, path, new_options)
62
+ end
63
+
64
+ # This method allow you to send requests to the Algolia REST API.
65
+
66
+ # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
67
+ # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
68
+ # @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)
69
+ # @return [Object]
70
+ def custom_delete(path, parameters = nil, request_options = {})
71
+ response = custom_delete_with_http_info(path, parameters, request_options)
72
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
73
+ end
74
+
75
+ # This method allow you to send requests to the Algolia REST API.
76
+
77
+ # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
78
+ # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
79
+ # @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)
80
+ # @return [Http::Response] the response
81
+ def custom_get_with_http_info(path, parameters = nil, request_options = {})
82
+ # verify the required parameter 'path' is set
83
+ if @api_client.config.client_side_validation && path.nil?
84
+ raise ArgumentError, "Parameter `path` is required when calling `custom_get`."
85
+ end
86
+
87
+ path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
88
+ query_params = {}
89
+ query_params = query_params.merge(parameters) unless parameters.nil?
90
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
91
+ header_params = {}
92
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
93
+
94
+ post_body = request_options[:debug_body]
95
+
96
+ new_options = request_options.merge(
97
+ :operation => :'UsageClient.custom_get',
98
+ :header_params => header_params,
99
+ :query_params => query_params,
100
+ :body => post_body,
101
+ :use_read_transporter => false
102
+ )
103
+
104
+ @api_client.call_api(:GET, path, new_options)
105
+ end
106
+
107
+ # This method allow you to send requests to the Algolia REST API.
108
+
109
+ # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
110
+ # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
111
+ # @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)
112
+ # @return [Object]
113
+ def custom_get(path, parameters = nil, request_options = {})
114
+ response = custom_get_with_http_info(path, parameters, request_options)
115
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
116
+ end
117
+
118
+ # This method allow you to send requests to the Algolia REST API.
119
+
120
+ # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
121
+ # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
122
+ # @param body [Object] Parameters to send with the custom request.
123
+ # @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)
124
+ # @return [Http::Response] the response
125
+ def custom_post_with_http_info(path, parameters = nil, body = nil, request_options = {})
126
+ # verify the required parameter 'path' is set
127
+ if @api_client.config.client_side_validation && path.nil?
128
+ raise ArgumentError, "Parameter `path` is required when calling `custom_post`."
129
+ end
130
+
131
+ path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
132
+ query_params = {}
133
+ query_params = query_params.merge(parameters) unless parameters.nil?
134
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
135
+ header_params = {}
136
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
137
+
138
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)
139
+
140
+ new_options = request_options.merge(
141
+ :operation => :'UsageClient.custom_post',
142
+ :header_params => header_params,
143
+ :query_params => query_params,
144
+ :body => post_body,
145
+ :use_read_transporter => false
146
+ )
147
+
148
+ @api_client.call_api(:POST, path, new_options)
149
+ end
150
+
151
+ # This method allow you to send requests to the Algolia REST API.
152
+
153
+ # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
154
+ # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
155
+ # @param body [Object] Parameters to send with the custom request.
156
+ # @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)
157
+ # @return [Object]
158
+ def custom_post(path, parameters = nil, body = nil, request_options = {})
159
+ response = custom_post_with_http_info(path, parameters, body, request_options)
160
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
161
+ end
162
+
163
+ # This method allow you to send requests to the Algolia REST API.
164
+
165
+ # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
166
+ # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
167
+ # @param body [Object] Parameters to send with the custom request.
168
+ # @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)
169
+ # @return [Http::Response] the response
170
+ def custom_put_with_http_info(path, parameters = nil, body = nil, request_options = {})
171
+ # verify the required parameter 'path' is set
172
+ if @api_client.config.client_side_validation && path.nil?
173
+ raise ArgumentError, "Parameter `path` is required when calling `custom_put`."
174
+ end
175
+
176
+ path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
177
+ query_params = {}
178
+ query_params = query_params.merge(parameters) unless parameters.nil?
179
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
180
+ header_params = {}
181
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
182
+
183
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)
184
+
185
+ new_options = request_options.merge(
186
+ :operation => :'UsageClient.custom_put',
187
+ :header_params => header_params,
188
+ :query_params => query_params,
189
+ :body => post_body,
190
+ :use_read_transporter => false
191
+ )
192
+
193
+ @api_client.call_api(:PUT, path, new_options)
194
+ end
195
+
196
+ # This method allow you to send requests to the Algolia REST API.
197
+
198
+ # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
199
+ # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
200
+ # @param body [Object] Parameters to send with the custom request.
201
+ # @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)
202
+ # @return [Object]
203
+ def custom_put(path, parameters = nil, body = nil, request_options = {})
204
+ response = custom_put_with_http_info(path, parameters, body, request_options)
205
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
206
+ end
207
+
208
+ # Retrieves the selected usage statistics for one index.
209
+
210
+ # @param statistic [Statistic] Usage statistics to retrieve. Use &#x60;*&#x60; to retrieve all usage metrics, otherwise add one or more of the following metrics, separated by a comma. **Search operations** - &#x60;search_operations&#x60;. All search operations. - &#x60;total_search_operations&#x60;: Sum of all search operations. - &#x60;total_search_requests&#x60;: Sum of all [search requests](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-). The number of billed search requests is equal to this value minus &#x60;querysuggestions_total_search_requests&#x60;. - &#x60;queries_operations&#x60;. Number of [single index search](/specs/search#tag/Search/operation/searchSingleIndex) operations. - &#x60;multi_queries_operations&#x60;. Number of [multi-index search](/specs/search#tag/Search/operation/search) operations. **ACL operations** - &#x60;acl_operations&#x60;. All ACL operations. - &#x60;total_acl_operations&#x60;. Sum of all ACL operations. - &#x60;get_api_keys_operations&#x60;. Number of [list API keys](/specs/search#tag/Api-Keys/operation/listApiKeys) operations. - &#x60;get_api_key_operations&#x60;. Number of [get API key permission](/specs/search#tag/Api-Keys/operation/getApiKey) operations. - &#x60;add_api_key_operations&#x60;. Number of [create API key](/specs/search#tag/Api-Keys/operation/addApiKey) operations. - &#x60;update_api_key_operations&#x60;. Number of [update API key](/specs/search#tag/Api-Keys/operation/updateApiKey) operations. - &#x60;delete_api_key_operations&#x60;. Number of [delete API key](/specs/search#tag/Api-Keys/operation/deleteApiKey) operations. - &#x60;list_api_key_operations&#x60;. Number of list index API keys operations. **Indexing operations** - &#x60;indexing_operations&#x60;. All indexing operations. - &#x60;total_indexing_operations&#x60;. Sum of all indexing operations. - &#x60;browse_operations&#x60;. Number of [browse index](/specs/search#tag/Search/operation/browse) operations. - &#x60;clear_index_operations&#x60;. Number of [clear records](/specs/search#tag/Records/operation/clearObjects) operations. - &#x60;copy_move_operations&#x60;. Number of [copy or move index](/specs/search#tag/Indices/operation/operationIndex) operations. - &#x60;delete_index_operations&#x60;. Number of [delete index](/specs/search#tag/Indices/operation/deleteIndex) operations. - &#x60;get_log_operations&#x60;. Number of [get logs](/specs/search#tag/Advanced/operation/getLogs) operations. - &#x60;get_settings_operations&#x60;. Number of [get settings](/specs/search#operation/getIndexUsage) operations. - &#x60;set_settings_operations&#x60;. Number of [set settings](/specs/search#tag/Indices/operation/setSettings) operations. - &#x60;list_indices_operations&#x60;. Number of [list indices](/specs/search#tag/Indices/operation/listIndices) operations. - &#x60;wait_task_operations&#x60;. Number of [wait](/specs/search#tag/Indices/operation/getTask) operations. **Record operations** - &#x60;record_operations&#x60;. All record operations. - &#x60;total_records_operations&#x60;. Sum of all record operations. - &#x60;add_record_operations&#x60;. Number of [add or replace record](/specs/search#tag/Records/operation/saveObject) operations. - &#x60;batch_operations&#x60;. Number of [batch indexing](/specs/search#tag/Records/operation/multipleBatch) operations. - &#x60;delete_by_query_operations&#x60;. Number of [delete by query](/specs/search#tag/Records/operation/deleteBy) operations. - &#x60;delete_record_operations&#x60;. Number of [delete record](/specs/search#tag/Records/operation/deleteObject) operations. - &#x60;get_record_operations&#x60;. Number of [get record](/specs/search#tag/Records/operation/getObject) operations. - &#x60;partial_update_record_operations&#x60;. Number of [partially update records](/specs/search#tag/Records/operation/partialUpdateObject) operations. - &#x60;update_record_operations&#x60;. Number of [add or replace record by objectID](/specs/search#tag/Records/operation/addOrUpdateObject) operations. **Synonym operations** - &#x60;synonym_operations&#x60;. All synonym operations. - &#x60;total_synonym_operations&#x60;. Sum of all synonym operations. - &#x60;batch_synonym_operations&#x60;. Number of [save all synonyms](/specs/search#tag/Synonyms/operation/saveSynonyms) operations. - &#x60;clear_synonym_operations&#x60;. Number of [clear synonyms](/specs/search#tag/Synonyms/operation/clearSynonyms) operations. - &#x60;delete_synonym_operations&#x60;. Number of [delete synonym](/specs/search#tag/Synonyms/operation/deleteSynonym) operations. - &#x60;get_synonym_operations&#x60;. Number of [get synonym](/specs/search#tag/Synonyms/operation/getSynonym) operations. - &#x60;query_synonym_operations&#x60;. Number of [search synonyms](/specs/search#tag/Synonyms/operation/searchSynonyms) operations. - &#x60;update_synonym_operations&#x60;. Number of [save a synonym](/specs/search#tag/Synonyms/operation/saveSynonym) operations. **Rule operations** - &#x60;rule_operations&#x60;. All rule operations. - &#x60;total_rules_operations&#x60;. Sum of all rule operations. - &#x60;batch_rules_operations&#x60;. Number of [batch rules](/specs/search#tag/Rules/operation/saveRules) operations. - &#x60;clear_rules_operations&#x60;. Number of [delete rule](/specs/search#tag/Rules/operation/deleteRule) operations. - &#x60;delete_rules_operations&#x60;. Number of [clear rules](/specs/search#tag/Rules/operation/clearRules) operations. - &#x60;get_rules_operations&#x60;. Number of [get rule](/specs/search#tag/Rules/operation/getRule) operations. - &#x60;save_rules_operations&#x60;. Number of [save rule](/specs/search#operation/getIndexUsage) operations. - &#x60;search_rules_operations&#x60;. Number of [search rules](/specs/search#tag/Rules/operation/searchRules) operations. **Total operations** - &#x60;total_recommend_requests&#x60;. Number of [Recommend requests](https://www.algolia.com/doc/guides/algolia-ai/recommend/) - &#x60;total_write_operations&#x60;. Number of Write operations - &#x60;total_read_operations&#x60;. Number of read operations - &#x60;total_operations&#x60;. Sum of all operations **Total Query Suggestions operations** Query Suggestions operations are a subset of &#x60;total_search_operations&#x60;. - &#x60;querysuggestions_total_search_operations&#x60;. Number of Query Suggestions search operations. - &#x60;querysuggestions_total_search_requests&#x60;. Number of Query Suggestions [search requests](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-). - &#x60;querysuggestions_total_acl_operations&#x60;. Sum of all Query Suggestions [ACL operations](#acl-operations). - &#x60;querysuggestions_total_indexing_operations&#x60;. Number of Query Suggestions [indexing operations](#indexing-operations). - &#x60;querysuggestions_total_records_operations&#x60;. Number of Query Suggestions [record operations](#record-operations). - &#x60;querysuggestions_total_synonym_operations&#x60;. Number of Query Suggestions [synonym operations](#synonym-operations). - &#x60;querysuggestions_total_rules_operations&#x60;. Number of Query Suggestions [Rule operations](#rule-operations). - &#x60;querysuggestions_total_write_operations&#x60;. Number of Query Suggestions Write operations. - &#x60;querysuggestions_total_read_operations&#x60;. Number of Query Suggestions Read operations. - &#x60;querysuggestions_total_operations&#x60;. Sum of all Query Suggestions operations. **Processing time** - &#x60;avg_processing_time&#x60;. Average processing time (in milliseconds). - &#x60;90p_processing_time&#x60;. 90th percentile of processing time (in milliseconds). - &#x60;99p_processing_time&#x60;. 99th percentile of processing time (in milliseconds). - &#x60;queries_above_last_ms_processing_time&#x60;. Number of queries that take one or more seconds to process. **Indices** - &#x60;records&#x60;. Number of records. - &#x60;data_size&#x60;. The size of the records (in bytes). - &#x60;file_size&#x60;. The size of the records _and_ index metadata (in bytes). **Maximum queries per second** - &#x60;max_qps&#x60;. [Maximum queries per second](https://support.algolia.com/hc/en-us/articles/4406975224721) per server. - &#x60;region_max_qps&#x60;. Maximum queries per second per region. - &#x60;total_max_qps&#x60;. Maximum queries per second across all servers. **Used search capacity** The following capacities are reported in percent: - &#x60;used_search_capacity&#x60;. Maximum search capacity used per server. - &#x60;avg_used_search_capacity&#x60;. Average search capacity used per server. - &#x60;region_used_search_capacity&#x60;. Maximum search capacity used per region. - &#x60;region_avg_used_search_capacity&#x60;. Average search capacity used per region. - &#x60;total_used_search_capacity&#x60;. Maximum search capacity used for all servers. - &#x60;total_avg_used_search_capacity&#x60;. Average used search capacity for all servers. **Degraded queries** Check the impact of [degraded queries](https://support.algolia.com/hc/en-us/articles/4406981934481). - &#x60;degraded_queries_ssd_used_queries_impacted&#x60;. Percentage of degraded queries due to the Algolia search engine having to read from the server&#39;s SSD. - &#x60;degraded_queries_ssd_used_seconds_impacted&#x60;. Percentage of seconds affected by &#x60;ssd_used&#x60; degraded queries. - &#x60;degraded_queries_max_capacity_queries_impacted&#x60;. Percentage of degraded queries due to all search threads being used. - &#x60;degraded_queries_max_capacity_seconds_impacted&#x60;. Percentage of seconds affected by &#x60;max_capacity&#x60; degraded queries. (required)
211
+ # @param index_name [String] Name of the index on which to perform the operation. (required)
212
+ # @param start_date [String] Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (required)
213
+ # @param end_date [String] End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (required)
214
+ # @param granularity [Granularity] Granularity of the aggregated metrics. - &#x60;hourly&#x60;: the maximum time range for hourly metrics is 7 days. - &#x60;daily&#x60;: the maximum time range for daily metrics is 365 days. (default to 'daily')
215
+ # @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)
216
+ # @return [Http::Response] the response
217
+ def get_index_usage_with_http_info(statistic, index_name, start_date, end_date, granularity = nil, request_options = {})
218
+ # verify the required parameter 'statistic' is set
219
+ if @api_client.config.client_side_validation && statistic.nil?
220
+ raise ArgumentError, "Parameter `statistic` is required when calling `get_index_usage`."
221
+ end
222
+ # verify the required parameter 'index_name' is set
223
+ if @api_client.config.client_side_validation && index_name.nil?
224
+ raise ArgumentError, "Parameter `index_name` is required when calling `get_index_usage`."
225
+ end
226
+ # verify the required parameter 'start_date' is set
227
+ if @api_client.config.client_side_validation && start_date.nil?
228
+ raise ArgumentError, "Parameter `start_date` is required when calling `get_index_usage`."
229
+ end
230
+ # verify the required parameter 'end_date' is set
231
+ if @api_client.config.client_side_validation && end_date.nil?
232
+ raise ArgumentError, "Parameter `end_date` is required when calling `get_index_usage`."
233
+ end
234
+
235
+ path = '/1/usage/{statistic}/{indexName}'.sub('{' + 'statistic' + '}', Transport.encode_uri(statistic.to_s)).sub('{' + 'indexName' + '}',
236
+ Transport.encode_uri(index_name.to_s))
237
+ query_params = {}
238
+ query_params[:startDate] = start_date
239
+ query_params[:endDate] = end_date
240
+ query_params[:granularity] = granularity unless granularity.nil?
241
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
242
+ header_params = {}
243
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
244
+
245
+ post_body = request_options[:debug_body]
246
+
247
+ new_options = request_options.merge(
248
+ :operation => :'UsageClient.get_index_usage',
249
+ :header_params => header_params,
250
+ :query_params => query_params,
251
+ :body => post_body,
252
+ :use_read_transporter => false
253
+ )
254
+
255
+ @api_client.call_api(:GET, path, new_options)
256
+ end
257
+
258
+ # Retrieves the selected usage statistics for one index.
259
+
260
+ # @param statistic [Statistic] Usage statistics to retrieve. Use &#x60;*&#x60; to retrieve all usage metrics, otherwise add one or more of the following metrics, separated by a comma. **Search operations** - &#x60;search_operations&#x60;. All search operations. - &#x60;total_search_operations&#x60;: Sum of all search operations. - &#x60;total_search_requests&#x60;: Sum of all [search requests](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-). The number of billed search requests is equal to this value minus &#x60;querysuggestions_total_search_requests&#x60;. - &#x60;queries_operations&#x60;. Number of [single index search](/specs/search#tag/Search/operation/searchSingleIndex) operations. - &#x60;multi_queries_operations&#x60;. Number of [multi-index search](/specs/search#tag/Search/operation/search) operations. **ACL operations** - &#x60;acl_operations&#x60;. All ACL operations. - &#x60;total_acl_operations&#x60;. Sum of all ACL operations. - &#x60;get_api_keys_operations&#x60;. Number of [list API keys](/specs/search#tag/Api-Keys/operation/listApiKeys) operations. - &#x60;get_api_key_operations&#x60;. Number of [get API key permission](/specs/search#tag/Api-Keys/operation/getApiKey) operations. - &#x60;add_api_key_operations&#x60;. Number of [create API key](/specs/search#tag/Api-Keys/operation/addApiKey) operations. - &#x60;update_api_key_operations&#x60;. Number of [update API key](/specs/search#tag/Api-Keys/operation/updateApiKey) operations. - &#x60;delete_api_key_operations&#x60;. Number of [delete API key](/specs/search#tag/Api-Keys/operation/deleteApiKey) operations. - &#x60;list_api_key_operations&#x60;. Number of list index API keys operations. **Indexing operations** - &#x60;indexing_operations&#x60;. All indexing operations. - &#x60;total_indexing_operations&#x60;. Sum of all indexing operations. - &#x60;browse_operations&#x60;. Number of [browse index](/specs/search#tag/Search/operation/browse) operations. - &#x60;clear_index_operations&#x60;. Number of [clear records](/specs/search#tag/Records/operation/clearObjects) operations. - &#x60;copy_move_operations&#x60;. Number of [copy or move index](/specs/search#tag/Indices/operation/operationIndex) operations. - &#x60;delete_index_operations&#x60;. Number of [delete index](/specs/search#tag/Indices/operation/deleteIndex) operations. - &#x60;get_log_operations&#x60;. Number of [get logs](/specs/search#tag/Advanced/operation/getLogs) operations. - &#x60;get_settings_operations&#x60;. Number of [get settings](/specs/search#operation/getIndexUsage) operations. - &#x60;set_settings_operations&#x60;. Number of [set settings](/specs/search#tag/Indices/operation/setSettings) operations. - &#x60;list_indices_operations&#x60;. Number of [list indices](/specs/search#tag/Indices/operation/listIndices) operations. - &#x60;wait_task_operations&#x60;. Number of [wait](/specs/search#tag/Indices/operation/getTask) operations. **Record operations** - &#x60;record_operations&#x60;. All record operations. - &#x60;total_records_operations&#x60;. Sum of all record operations. - &#x60;add_record_operations&#x60;. Number of [add or replace record](/specs/search#tag/Records/operation/saveObject) operations. - &#x60;batch_operations&#x60;. Number of [batch indexing](/specs/search#tag/Records/operation/multipleBatch) operations. - &#x60;delete_by_query_operations&#x60;. Number of [delete by query](/specs/search#tag/Records/operation/deleteBy) operations. - &#x60;delete_record_operations&#x60;. Number of [delete record](/specs/search#tag/Records/operation/deleteObject) operations. - &#x60;get_record_operations&#x60;. Number of [get record](/specs/search#tag/Records/operation/getObject) operations. - &#x60;partial_update_record_operations&#x60;. Number of [partially update records](/specs/search#tag/Records/operation/partialUpdateObject) operations. - &#x60;update_record_operations&#x60;. Number of [add or replace record by objectID](/specs/search#tag/Records/operation/addOrUpdateObject) operations. **Synonym operations** - &#x60;synonym_operations&#x60;. All synonym operations. - &#x60;total_synonym_operations&#x60;. Sum of all synonym operations. - &#x60;batch_synonym_operations&#x60;. Number of [save all synonyms](/specs/search#tag/Synonyms/operation/saveSynonyms) operations. - &#x60;clear_synonym_operations&#x60;. Number of [clear synonyms](/specs/search#tag/Synonyms/operation/clearSynonyms) operations. - &#x60;delete_synonym_operations&#x60;. Number of [delete synonym](/specs/search#tag/Synonyms/operation/deleteSynonym) operations. - &#x60;get_synonym_operations&#x60;. Number of [get synonym](/specs/search#tag/Synonyms/operation/getSynonym) operations. - &#x60;query_synonym_operations&#x60;. Number of [search synonyms](/specs/search#tag/Synonyms/operation/searchSynonyms) operations. - &#x60;update_synonym_operations&#x60;. Number of [save a synonym](/specs/search#tag/Synonyms/operation/saveSynonym) operations. **Rule operations** - &#x60;rule_operations&#x60;. All rule operations. - &#x60;total_rules_operations&#x60;. Sum of all rule operations. - &#x60;batch_rules_operations&#x60;. Number of [batch rules](/specs/search#tag/Rules/operation/saveRules) operations. - &#x60;clear_rules_operations&#x60;. Number of [delete rule](/specs/search#tag/Rules/operation/deleteRule) operations. - &#x60;delete_rules_operations&#x60;. Number of [clear rules](/specs/search#tag/Rules/operation/clearRules) operations. - &#x60;get_rules_operations&#x60;. Number of [get rule](/specs/search#tag/Rules/operation/getRule) operations. - &#x60;save_rules_operations&#x60;. Number of [save rule](/specs/search#operation/getIndexUsage) operations. - &#x60;search_rules_operations&#x60;. Number of [search rules](/specs/search#tag/Rules/operation/searchRules) operations. **Total operations** - &#x60;total_recommend_requests&#x60;. Number of [Recommend requests](https://www.algolia.com/doc/guides/algolia-ai/recommend/) - &#x60;total_write_operations&#x60;. Number of Write operations - &#x60;total_read_operations&#x60;. Number of read operations - &#x60;total_operations&#x60;. Sum of all operations **Total Query Suggestions operations** Query Suggestions operations are a subset of &#x60;total_search_operations&#x60;. - &#x60;querysuggestions_total_search_operations&#x60;. Number of Query Suggestions search operations. - &#x60;querysuggestions_total_search_requests&#x60;. Number of Query Suggestions [search requests](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-). - &#x60;querysuggestions_total_acl_operations&#x60;. Sum of all Query Suggestions [ACL operations](#acl-operations). - &#x60;querysuggestions_total_indexing_operations&#x60;. Number of Query Suggestions [indexing operations](#indexing-operations). - &#x60;querysuggestions_total_records_operations&#x60;. Number of Query Suggestions [record operations](#record-operations). - &#x60;querysuggestions_total_synonym_operations&#x60;. Number of Query Suggestions [synonym operations](#synonym-operations). - &#x60;querysuggestions_total_rules_operations&#x60;. Number of Query Suggestions [Rule operations](#rule-operations). - &#x60;querysuggestions_total_write_operations&#x60;. Number of Query Suggestions Write operations. - &#x60;querysuggestions_total_read_operations&#x60;. Number of Query Suggestions Read operations. - &#x60;querysuggestions_total_operations&#x60;. Sum of all Query Suggestions operations. **Processing time** - &#x60;avg_processing_time&#x60;. Average processing time (in milliseconds). - &#x60;90p_processing_time&#x60;. 90th percentile of processing time (in milliseconds). - &#x60;99p_processing_time&#x60;. 99th percentile of processing time (in milliseconds). - &#x60;queries_above_last_ms_processing_time&#x60;. Number of queries that take one or more seconds to process. **Indices** - &#x60;records&#x60;. Number of records. - &#x60;data_size&#x60;. The size of the records (in bytes). - &#x60;file_size&#x60;. The size of the records _and_ index metadata (in bytes). **Maximum queries per second** - &#x60;max_qps&#x60;. [Maximum queries per second](https://support.algolia.com/hc/en-us/articles/4406975224721) per server. - &#x60;region_max_qps&#x60;. Maximum queries per second per region. - &#x60;total_max_qps&#x60;. Maximum queries per second across all servers. **Used search capacity** The following capacities are reported in percent: - &#x60;used_search_capacity&#x60;. Maximum search capacity used per server. - &#x60;avg_used_search_capacity&#x60;. Average search capacity used per server. - &#x60;region_used_search_capacity&#x60;. Maximum search capacity used per region. - &#x60;region_avg_used_search_capacity&#x60;. Average search capacity used per region. - &#x60;total_used_search_capacity&#x60;. Maximum search capacity used for all servers. - &#x60;total_avg_used_search_capacity&#x60;. Average used search capacity for all servers. **Degraded queries** Check the impact of [degraded queries](https://support.algolia.com/hc/en-us/articles/4406981934481). - &#x60;degraded_queries_ssd_used_queries_impacted&#x60;. Percentage of degraded queries due to the Algolia search engine having to read from the server&#39;s SSD. - &#x60;degraded_queries_ssd_used_seconds_impacted&#x60;. Percentage of seconds affected by &#x60;ssd_used&#x60; degraded queries. - &#x60;degraded_queries_max_capacity_queries_impacted&#x60;. Percentage of degraded queries due to all search threads being used. - &#x60;degraded_queries_max_capacity_seconds_impacted&#x60;. Percentage of seconds affected by &#x60;max_capacity&#x60; degraded queries. (required)
261
+ # @param index_name [String] Name of the index on which to perform the operation. (required)
262
+ # @param start_date [String] Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (required)
263
+ # @param end_date [String] End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (required)
264
+ # @param granularity [Granularity] Granularity of the aggregated metrics. - &#x60;hourly&#x60;: the maximum time range for hourly metrics is 7 days. - &#x60;daily&#x60;: the maximum time range for daily metrics is 365 days. (default to 'daily')
265
+ # @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)
266
+ # @return [GetUsage200Response]
267
+ def get_index_usage(statistic, index_name, start_date, end_date, granularity = nil, request_options = {})
268
+ response = get_index_usage_with_http_info(statistic, index_name, start_date, end_date, granularity, request_options)
269
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Usage::GetUsage200Response')
270
+ end
271
+
272
+ # Retrieves usage statistics evaluated over a specified period.
273
+
274
+ # @param statistic [Statistic] Usage statistics to retrieve. Use &#x60;*&#x60; to retrieve all usage metrics, otherwise add one or more of the following metrics, separated by a comma. **Search operations** - &#x60;search_operations&#x60;. All search operations. - &#x60;total_search_operations&#x60;: Sum of all search operations. - &#x60;total_search_requests&#x60;: Sum of all [search requests](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-). The number of billed search requests is equal to this value minus &#x60;querysuggestions_total_search_requests&#x60;. - &#x60;queries_operations&#x60;. Number of [single index search](/specs/search#tag/Search/operation/searchSingleIndex) operations. - &#x60;multi_queries_operations&#x60;. Number of [multi-index search](/specs/search#tag/Search/operation/search) operations. **ACL operations** - &#x60;acl_operations&#x60;. All ACL operations. - &#x60;total_acl_operations&#x60;. Sum of all ACL operations. - &#x60;get_api_keys_operations&#x60;. Number of [list API keys](/specs/search#tag/Api-Keys/operation/listApiKeys) operations. - &#x60;get_api_key_operations&#x60;. Number of [get API key permission](/specs/search#tag/Api-Keys/operation/getApiKey) operations. - &#x60;add_api_key_operations&#x60;. Number of [create API key](/specs/search#tag/Api-Keys/operation/addApiKey) operations. - &#x60;update_api_key_operations&#x60;. Number of [update API key](/specs/search#tag/Api-Keys/operation/updateApiKey) operations. - &#x60;delete_api_key_operations&#x60;. Number of [delete API key](/specs/search#tag/Api-Keys/operation/deleteApiKey) operations. - &#x60;list_api_key_operations&#x60;. Number of list index API keys operations. **Indexing operations** - &#x60;indexing_operations&#x60;. All indexing operations. - &#x60;total_indexing_operations&#x60;. Sum of all indexing operations. - &#x60;browse_operations&#x60;. Number of [browse index](/specs/search#tag/Search/operation/browse) operations. - &#x60;clear_index_operations&#x60;. Number of [clear records](/specs/search#tag/Records/operation/clearObjects) operations. - &#x60;copy_move_operations&#x60;. Number of [copy or move index](/specs/search#tag/Indices/operation/operationIndex) operations. - &#x60;delete_index_operations&#x60;. Number of [delete index](/specs/search#tag/Indices/operation/deleteIndex) operations. - &#x60;get_log_operations&#x60;. Number of [get logs](/specs/search#tag/Advanced/operation/getLogs) operations. - &#x60;get_settings_operations&#x60;. Number of [get settings](/specs/search#operation/getIndexUsage) operations. - &#x60;set_settings_operations&#x60;. Number of [set settings](/specs/search#tag/Indices/operation/setSettings) operations. - &#x60;list_indices_operations&#x60;. Number of [list indices](/specs/search#tag/Indices/operation/listIndices) operations. - &#x60;wait_task_operations&#x60;. Number of [wait](/specs/search#tag/Indices/operation/getTask) operations. **Record operations** - &#x60;record_operations&#x60;. All record operations. - &#x60;total_records_operations&#x60;. Sum of all record operations. - &#x60;add_record_operations&#x60;. Number of [add or replace record](/specs/search#tag/Records/operation/saveObject) operations. - &#x60;batch_operations&#x60;. Number of [batch indexing](/specs/search#tag/Records/operation/multipleBatch) operations. - &#x60;delete_by_query_operations&#x60;. Number of [delete by query](/specs/search#tag/Records/operation/deleteBy) operations. - &#x60;delete_record_operations&#x60;. Number of [delete record](/specs/search#tag/Records/operation/deleteObject) operations. - &#x60;get_record_operations&#x60;. Number of [get record](/specs/search#tag/Records/operation/getObject) operations. - &#x60;partial_update_record_operations&#x60;. Number of [partially update records](/specs/search#tag/Records/operation/partialUpdateObject) operations. - &#x60;update_record_operations&#x60;. Number of [add or replace record by objectID](/specs/search#tag/Records/operation/addOrUpdateObject) operations. **Synonym operations** - &#x60;synonym_operations&#x60;. All synonym operations. - &#x60;total_synonym_operations&#x60;. Sum of all synonym operations. - &#x60;batch_synonym_operations&#x60;. Number of [save all synonyms](/specs/search#tag/Synonyms/operation/saveSynonyms) operations. - &#x60;clear_synonym_operations&#x60;. Number of [clear synonyms](/specs/search#tag/Synonyms/operation/clearSynonyms) operations. - &#x60;delete_synonym_operations&#x60;. Number of [delete synonym](/specs/search#tag/Synonyms/operation/deleteSynonym) operations. - &#x60;get_synonym_operations&#x60;. Number of [get synonym](/specs/search#tag/Synonyms/operation/getSynonym) operations. - &#x60;query_synonym_operations&#x60;. Number of [search synonyms](/specs/search#tag/Synonyms/operation/searchSynonyms) operations. - &#x60;update_synonym_operations&#x60;. Number of [save a synonym](/specs/search#tag/Synonyms/operation/saveSynonym) operations. **Rule operations** - &#x60;rule_operations&#x60;. All rule operations. - &#x60;total_rules_operations&#x60;. Sum of all rule operations. - &#x60;batch_rules_operations&#x60;. Number of [batch rules](/specs/search#tag/Rules/operation/saveRules) operations. - &#x60;clear_rules_operations&#x60;. Number of [delete rule](/specs/search#tag/Rules/operation/deleteRule) operations. - &#x60;delete_rules_operations&#x60;. Number of [clear rules](/specs/search#tag/Rules/operation/clearRules) operations. - &#x60;get_rules_operations&#x60;. Number of [get rule](/specs/search#tag/Rules/operation/getRule) operations. - &#x60;save_rules_operations&#x60;. Number of [save rule](/specs/search#operation/getIndexUsage) operations. - &#x60;search_rules_operations&#x60;. Number of [search rules](/specs/search#tag/Rules/operation/searchRules) operations. **Total operations** - &#x60;total_recommend_requests&#x60;. Number of [Recommend requests](https://www.algolia.com/doc/guides/algolia-ai/recommend/) - &#x60;total_write_operations&#x60;. Number of Write operations - &#x60;total_read_operations&#x60;. Number of read operations - &#x60;total_operations&#x60;. Sum of all operations **Total Query Suggestions operations** Query Suggestions operations are a subset of &#x60;total_search_operations&#x60;. - &#x60;querysuggestions_total_search_operations&#x60;. Number of Query Suggestions search operations. - &#x60;querysuggestions_total_search_requests&#x60;. Number of Query Suggestions [search requests](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-). - &#x60;querysuggestions_total_acl_operations&#x60;. Sum of all Query Suggestions [ACL operations](#acl-operations). - &#x60;querysuggestions_total_indexing_operations&#x60;. Number of Query Suggestions [indexing operations](#indexing-operations). - &#x60;querysuggestions_total_records_operations&#x60;. Number of Query Suggestions [record operations](#record-operations). - &#x60;querysuggestions_total_synonym_operations&#x60;. Number of Query Suggestions [synonym operations](#synonym-operations). - &#x60;querysuggestions_total_rules_operations&#x60;. Number of Query Suggestions [Rule operations](#rule-operations). - &#x60;querysuggestions_total_write_operations&#x60;. Number of Query Suggestions Write operations. - &#x60;querysuggestions_total_read_operations&#x60;. Number of Query Suggestions Read operations. - &#x60;querysuggestions_total_operations&#x60;. Sum of all Query Suggestions operations. **Processing time** - &#x60;avg_processing_time&#x60;. Average processing time (in milliseconds). - &#x60;90p_processing_time&#x60;. 90th percentile of processing time (in milliseconds). - &#x60;99p_processing_time&#x60;. 99th percentile of processing time (in milliseconds). - &#x60;queries_above_last_ms_processing_time&#x60;. Number of queries that take one or more seconds to process. **Indices** - &#x60;records&#x60;. Number of records. - &#x60;data_size&#x60;. The size of the records (in bytes). - &#x60;file_size&#x60;. The size of the records _and_ index metadata (in bytes). **Maximum queries per second** - &#x60;max_qps&#x60;. [Maximum queries per second](https://support.algolia.com/hc/en-us/articles/4406975224721) per server. - &#x60;region_max_qps&#x60;. Maximum queries per second per region. - &#x60;total_max_qps&#x60;. Maximum queries per second across all servers. **Used search capacity** The following capacities are reported in percent: - &#x60;used_search_capacity&#x60;. Maximum search capacity used per server. - &#x60;avg_used_search_capacity&#x60;. Average search capacity used per server. - &#x60;region_used_search_capacity&#x60;. Maximum search capacity used per region. - &#x60;region_avg_used_search_capacity&#x60;. Average search capacity used per region. - &#x60;total_used_search_capacity&#x60;. Maximum search capacity used for all servers. - &#x60;total_avg_used_search_capacity&#x60;. Average used search capacity for all servers. **Degraded queries** Check the impact of [degraded queries](https://support.algolia.com/hc/en-us/articles/4406981934481). - &#x60;degraded_queries_ssd_used_queries_impacted&#x60;. Percentage of degraded queries due to the Algolia search engine having to read from the server&#39;s SSD. - &#x60;degraded_queries_ssd_used_seconds_impacted&#x60;. Percentage of seconds affected by &#x60;ssd_used&#x60; degraded queries. - &#x60;degraded_queries_max_capacity_queries_impacted&#x60;. Percentage of degraded queries due to all search threads being used. - &#x60;degraded_queries_max_capacity_seconds_impacted&#x60;. Percentage of seconds affected by &#x60;max_capacity&#x60; degraded queries. (required)
275
+ # @param start_date [String] Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (required)
276
+ # @param end_date [String] End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (required)
277
+ # @param granularity [Granularity] Granularity of the aggregated metrics. - &#x60;hourly&#x60;: the maximum time range for hourly metrics is 7 days. - &#x60;daily&#x60;: the maximum time range for daily metrics is 365 days. (default to 'daily')
278
+ # @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)
279
+ # @return [Http::Response] the response
280
+ def get_usage_with_http_info(statistic, start_date, end_date, granularity = nil, request_options = {})
281
+ # verify the required parameter 'statistic' is set
282
+ if @api_client.config.client_side_validation && statistic.nil?
283
+ raise ArgumentError, "Parameter `statistic` is required when calling `get_usage`."
284
+ end
285
+ # verify the required parameter 'start_date' is set
286
+ if @api_client.config.client_side_validation && start_date.nil?
287
+ raise ArgumentError, "Parameter `start_date` is required when calling `get_usage`."
288
+ end
289
+ # verify the required parameter 'end_date' is set
290
+ if @api_client.config.client_side_validation && end_date.nil?
291
+ raise ArgumentError, "Parameter `end_date` is required when calling `get_usage`."
292
+ end
293
+
294
+ path = '/1/usage/{statistic}'.sub('{' + 'statistic' + '}', Transport.encode_uri(statistic.to_s))
295
+ query_params = {}
296
+ query_params[:startDate] = start_date
297
+ query_params[:endDate] = end_date
298
+ query_params[:granularity] = granularity unless granularity.nil?
299
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
300
+ header_params = {}
301
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
302
+
303
+ post_body = request_options[:debug_body]
304
+
305
+ new_options = request_options.merge(
306
+ :operation => :'UsageClient.get_usage',
307
+ :header_params => header_params,
308
+ :query_params => query_params,
309
+ :body => post_body,
310
+ :use_read_transporter => false
311
+ )
312
+
313
+ @api_client.call_api(:GET, path, new_options)
314
+ end
315
+
316
+ # Retrieves usage statistics evaluated over a specified period.
317
+
318
+ # @param statistic [Statistic] Usage statistics to retrieve. Use &#x60;*&#x60; to retrieve all usage metrics, otherwise add one or more of the following metrics, separated by a comma. **Search operations** - &#x60;search_operations&#x60;. All search operations. - &#x60;total_search_operations&#x60;: Sum of all search operations. - &#x60;total_search_requests&#x60;: Sum of all [search requests](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-). The number of billed search requests is equal to this value minus &#x60;querysuggestions_total_search_requests&#x60;. - &#x60;queries_operations&#x60;. Number of [single index search](/specs/search#tag/Search/operation/searchSingleIndex) operations. - &#x60;multi_queries_operations&#x60;. Number of [multi-index search](/specs/search#tag/Search/operation/search) operations. **ACL operations** - &#x60;acl_operations&#x60;. All ACL operations. - &#x60;total_acl_operations&#x60;. Sum of all ACL operations. - &#x60;get_api_keys_operations&#x60;. Number of [list API keys](/specs/search#tag/Api-Keys/operation/listApiKeys) operations. - &#x60;get_api_key_operations&#x60;. Number of [get API key permission](/specs/search#tag/Api-Keys/operation/getApiKey) operations. - &#x60;add_api_key_operations&#x60;. Number of [create API key](/specs/search#tag/Api-Keys/operation/addApiKey) operations. - &#x60;update_api_key_operations&#x60;. Number of [update API key](/specs/search#tag/Api-Keys/operation/updateApiKey) operations. - &#x60;delete_api_key_operations&#x60;. Number of [delete API key](/specs/search#tag/Api-Keys/operation/deleteApiKey) operations. - &#x60;list_api_key_operations&#x60;. Number of list index API keys operations. **Indexing operations** - &#x60;indexing_operations&#x60;. All indexing operations. - &#x60;total_indexing_operations&#x60;. Sum of all indexing operations. - &#x60;browse_operations&#x60;. Number of [browse index](/specs/search#tag/Search/operation/browse) operations. - &#x60;clear_index_operations&#x60;. Number of [clear records](/specs/search#tag/Records/operation/clearObjects) operations. - &#x60;copy_move_operations&#x60;. Number of [copy or move index](/specs/search#tag/Indices/operation/operationIndex) operations. - &#x60;delete_index_operations&#x60;. Number of [delete index](/specs/search#tag/Indices/operation/deleteIndex) operations. - &#x60;get_log_operations&#x60;. Number of [get logs](/specs/search#tag/Advanced/operation/getLogs) operations. - &#x60;get_settings_operations&#x60;. Number of [get settings](/specs/search#operation/getIndexUsage) operations. - &#x60;set_settings_operations&#x60;. Number of [set settings](/specs/search#tag/Indices/operation/setSettings) operations. - &#x60;list_indices_operations&#x60;. Number of [list indices](/specs/search#tag/Indices/operation/listIndices) operations. - &#x60;wait_task_operations&#x60;. Number of [wait](/specs/search#tag/Indices/operation/getTask) operations. **Record operations** - &#x60;record_operations&#x60;. All record operations. - &#x60;total_records_operations&#x60;. Sum of all record operations. - &#x60;add_record_operations&#x60;. Number of [add or replace record](/specs/search#tag/Records/operation/saveObject) operations. - &#x60;batch_operations&#x60;. Number of [batch indexing](/specs/search#tag/Records/operation/multipleBatch) operations. - &#x60;delete_by_query_operations&#x60;. Number of [delete by query](/specs/search#tag/Records/operation/deleteBy) operations. - &#x60;delete_record_operations&#x60;. Number of [delete record](/specs/search#tag/Records/operation/deleteObject) operations. - &#x60;get_record_operations&#x60;. Number of [get record](/specs/search#tag/Records/operation/getObject) operations. - &#x60;partial_update_record_operations&#x60;. Number of [partially update records](/specs/search#tag/Records/operation/partialUpdateObject) operations. - &#x60;update_record_operations&#x60;. Number of [add or replace record by objectID](/specs/search#tag/Records/operation/addOrUpdateObject) operations. **Synonym operations** - &#x60;synonym_operations&#x60;. All synonym operations. - &#x60;total_synonym_operations&#x60;. Sum of all synonym operations. - &#x60;batch_synonym_operations&#x60;. Number of [save all synonyms](/specs/search#tag/Synonyms/operation/saveSynonyms) operations. - &#x60;clear_synonym_operations&#x60;. Number of [clear synonyms](/specs/search#tag/Synonyms/operation/clearSynonyms) operations. - &#x60;delete_synonym_operations&#x60;. Number of [delete synonym](/specs/search#tag/Synonyms/operation/deleteSynonym) operations. - &#x60;get_synonym_operations&#x60;. Number of [get synonym](/specs/search#tag/Synonyms/operation/getSynonym) operations. - &#x60;query_synonym_operations&#x60;. Number of [search synonyms](/specs/search#tag/Synonyms/operation/searchSynonyms) operations. - &#x60;update_synonym_operations&#x60;. Number of [save a synonym](/specs/search#tag/Synonyms/operation/saveSynonym) operations. **Rule operations** - &#x60;rule_operations&#x60;. All rule operations. - &#x60;total_rules_operations&#x60;. Sum of all rule operations. - &#x60;batch_rules_operations&#x60;. Number of [batch rules](/specs/search#tag/Rules/operation/saveRules) operations. - &#x60;clear_rules_operations&#x60;. Number of [delete rule](/specs/search#tag/Rules/operation/deleteRule) operations. - &#x60;delete_rules_operations&#x60;. Number of [clear rules](/specs/search#tag/Rules/operation/clearRules) operations. - &#x60;get_rules_operations&#x60;. Number of [get rule](/specs/search#tag/Rules/operation/getRule) operations. - &#x60;save_rules_operations&#x60;. Number of [save rule](/specs/search#operation/getIndexUsage) operations. - &#x60;search_rules_operations&#x60;. Number of [search rules](/specs/search#tag/Rules/operation/searchRules) operations. **Total operations** - &#x60;total_recommend_requests&#x60;. Number of [Recommend requests](https://www.algolia.com/doc/guides/algolia-ai/recommend/) - &#x60;total_write_operations&#x60;. Number of Write operations - &#x60;total_read_operations&#x60;. Number of read operations - &#x60;total_operations&#x60;. Sum of all operations **Total Query Suggestions operations** Query Suggestions operations are a subset of &#x60;total_search_operations&#x60;. - &#x60;querysuggestions_total_search_operations&#x60;. Number of Query Suggestions search operations. - &#x60;querysuggestions_total_search_requests&#x60;. Number of Query Suggestions [search requests](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-). - &#x60;querysuggestions_total_acl_operations&#x60;. Sum of all Query Suggestions [ACL operations](#acl-operations). - &#x60;querysuggestions_total_indexing_operations&#x60;. Number of Query Suggestions [indexing operations](#indexing-operations). - &#x60;querysuggestions_total_records_operations&#x60;. Number of Query Suggestions [record operations](#record-operations). - &#x60;querysuggestions_total_synonym_operations&#x60;. Number of Query Suggestions [synonym operations](#synonym-operations). - &#x60;querysuggestions_total_rules_operations&#x60;. Number of Query Suggestions [Rule operations](#rule-operations). - &#x60;querysuggestions_total_write_operations&#x60;. Number of Query Suggestions Write operations. - &#x60;querysuggestions_total_read_operations&#x60;. Number of Query Suggestions Read operations. - &#x60;querysuggestions_total_operations&#x60;. Sum of all Query Suggestions operations. **Processing time** - &#x60;avg_processing_time&#x60;. Average processing time (in milliseconds). - &#x60;90p_processing_time&#x60;. 90th percentile of processing time (in milliseconds). - &#x60;99p_processing_time&#x60;. 99th percentile of processing time (in milliseconds). - &#x60;queries_above_last_ms_processing_time&#x60;. Number of queries that take one or more seconds to process. **Indices** - &#x60;records&#x60;. Number of records. - &#x60;data_size&#x60;. The size of the records (in bytes). - &#x60;file_size&#x60;. The size of the records _and_ index metadata (in bytes). **Maximum queries per second** - &#x60;max_qps&#x60;. [Maximum queries per second](https://support.algolia.com/hc/en-us/articles/4406975224721) per server. - &#x60;region_max_qps&#x60;. Maximum queries per second per region. - &#x60;total_max_qps&#x60;. Maximum queries per second across all servers. **Used search capacity** The following capacities are reported in percent: - &#x60;used_search_capacity&#x60;. Maximum search capacity used per server. - &#x60;avg_used_search_capacity&#x60;. Average search capacity used per server. - &#x60;region_used_search_capacity&#x60;. Maximum search capacity used per region. - &#x60;region_avg_used_search_capacity&#x60;. Average search capacity used per region. - &#x60;total_used_search_capacity&#x60;. Maximum search capacity used for all servers. - &#x60;total_avg_used_search_capacity&#x60;. Average used search capacity for all servers. **Degraded queries** Check the impact of [degraded queries](https://support.algolia.com/hc/en-us/articles/4406981934481). - &#x60;degraded_queries_ssd_used_queries_impacted&#x60;. Percentage of degraded queries due to the Algolia search engine having to read from the server&#39;s SSD. - &#x60;degraded_queries_ssd_used_seconds_impacted&#x60;. Percentage of seconds affected by &#x60;ssd_used&#x60; degraded queries. - &#x60;degraded_queries_max_capacity_queries_impacted&#x60;. Percentage of degraded queries due to all search threads being used. - &#x60;degraded_queries_max_capacity_seconds_impacted&#x60;. Percentage of seconds affected by &#x60;max_capacity&#x60; degraded queries. (required)
319
+ # @param start_date [String] Start date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (required)
320
+ # @param end_date [String] End date of the period to analyze, in &#x60;YYYY-MM-DD&#x60; format. (required)
321
+ # @param granularity [Granularity] Granularity of the aggregated metrics. - &#x60;hourly&#x60;: the maximum time range for hourly metrics is 7 days. - &#x60;daily&#x60;: the maximum time range for daily metrics is 365 days. (default to 'daily')
322
+ # @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)
323
+ # @return [GetUsage200Response]
324
+ def get_usage(statistic, start_date, end_date, granularity = nil, request_options = {})
325
+ response = get_usage_with_http_info(statistic, start_date, end_date, granularity, request_options)
326
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Usage::GetUsage200Response')
327
+ end
328
+ end
329
+ end
@@ -6,42 +6,60 @@ require 'time'
6
6
  module Algolia
7
7
  module Abtesting
8
8
  class ABTest
9
- # Unique A/B test ID.
9
+ # Unique A/B test identifier.
10
10
  attr_accessor :ab_test_id
11
11
 
12
- # [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on click data. A value of 0.95 or over is considered to be _significant_.
13
12
  attr_accessor :click_significance
14
13
 
15
- # [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on conversion. A value of 0.95 or over is considered to be _significant_.
16
14
  attr_accessor :conversion_significance
17
15
 
18
- # [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on add-to-cart data. A value of 0.95 or over is considered to be _significant_.
19
16
  attr_accessor :add_to_cart_significance
20
17
 
21
- # [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on purchase data. A value of 0.95 or over is considered to be _significant_.
22
18
  attr_accessor :purchase_significance
23
19
 
24
- # [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on revenue data. A value of 0.95 or over is considered to be _significant_.
25
20
  attr_accessor :revenue_significance
26
21
 
27
- # Update date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
22
+ # Date and time when the A/B test was last updated, in RFC 3339 format.
28
23
  attr_accessor :updated_at
29
24
 
30
- # Creation date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
25
+ # Date and time when the A/B test was created, in RFC 3339 format.
31
26
  attr_accessor :created_at
32
27
 
33
- # End date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
28
+ # End date and time of the A/B test, in RFC 3339 format.
34
29
  attr_accessor :end_at
35
30
 
36
31
  # A/B test name.
37
32
  attr_accessor :name
38
33
 
39
- # A/B test status.
40
34
  attr_accessor :status
41
35
 
42
- # A/B test variants.
36
+ # A/B test variants. The first variant is your _control_ index, typically your production index. The second variant is an index with changed settings that you want to test against the control.
43
37
  attr_accessor :variants
44
38
 
39
+ attr_accessor :configuration
40
+
41
+ class EnumAttributeValidator
42
+ attr_reader :datatype
43
+ attr_reader :allowable_values
44
+
45
+ def initialize(datatype, allowable_values)
46
+ @allowable_values = allowable_values.map do |value|
47
+ case datatype.to_s
48
+ when /Integer/i
49
+ value.to_i
50
+ when /Float/i
51
+ value.to_f
52
+ else
53
+ value
54
+ end
55
+ end
56
+ end
57
+
58
+ def valid?(value)
59
+ !value || allowable_values.include?(value)
60
+ end
61
+ end
62
+
45
63
  # Attribute mapping from ruby-style variable name to JSON key.
46
64
  def self.attribute_map
47
65
  {
@@ -56,7 +74,8 @@ module Algolia
56
74
  :end_at => :endAt,
57
75
  :name => :name,
58
76
  :status => :status,
59
- :variants => :variants
77
+ :variants => :variants,
78
+ :configuration => :configuration
60
79
  }
61
80
  end
62
81
 
@@ -78,8 +97,9 @@ module Algolia
78
97
  :created_at => :String,
79
98
  :end_at => :String,
80
99
  :name => :String,
81
- :status => :String,
82
- :variants => :'Array<Variant>'
100
+ :status => :Status,
101
+ :variants => :'Array<Variant>',
102
+ :configuration => :ABTestConfiguration
83
103
  }
84
104
  end
85
105
 
@@ -186,6 +206,10 @@ module Algolia
186
206
  else
187
207
  self.variants = nil
188
208
  end
209
+
210
+ if attributes.key?(:configuration)
211
+ self.configuration = attributes[:configuration]
212
+ end
189
213
  end
190
214
 
191
215
  # Checks equality by comparing each attribute.
@@ -205,7 +229,8 @@ module Algolia
205
229
  end_at == other.end_at &&
206
230
  name == other.name &&
207
231
  status == other.status &&
208
- variants == other.variants
232
+ variants == other.variants &&
233
+ configuration == other.configuration
209
234
  end
210
235
 
211
236
  # @see the `==` method
@@ -218,7 +243,7 @@ module Algolia
218
243
  # @return [Integer] Hash code
219
244
  def hash
220
245
  [ab_test_id, click_significance, conversion_significance, add_to_cart_significance, purchase_significance, revenue_significance, updated_at, created_at, end_at, name,
221
- status, variants].hash
246
+ status, variants, configuration].hash
222
247
  end
223
248
 
224
249
  # Builds the object from hash