algolia 3.0.0.beta.10 → 3.0.0.beta.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/Gemfile.lock +2 -2
  4. data/lib/algolia/api/ingestion_client.rb +912 -359
  5. data/lib/algolia/api/query_suggestions_client.rb +4 -10
  6. data/lib/algolia/api/search_client.rb +4 -4
  7. data/lib/algolia/api/usage_client.rb +4 -4
  8. data/lib/algolia/error.rb +10 -0
  9. data/lib/algolia/logger_helper.rb +11 -2
  10. data/lib/algolia/models/abtesting/{filter_effects_empty_search.rb → empty_search_filter.rb} +3 -3
  11. data/lib/algolia/models/abtesting/filter_effects.rb +2 -2
  12. data/lib/algolia/models/abtesting/{filter_effects_outliers.rb → outliers_filter.rb} +3 -3
  13. data/lib/algolia/models/analytics/{click_positions_inner.rb → click_position.rb} +3 -3
  14. data/lib/algolia/models/analytics/get_click_positions_response.rb +1 -1
  15. data/lib/algolia/models/analytics/top_search_with_analytics.rb +1 -1
  16. data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +1 -1
  17. data/lib/algolia/models/ingestion/action.rb +45 -0
  18. data/lib/algolia/models/{search/search_for_hits_options.rb → ingestion/batch_request.rb} +22 -20
  19. data/lib/algolia/models/ingestion/{source_shopify_base.rb → batch_write_params.rb} +14 -12
  20. data/lib/algolia/models/ingestion/docker_streams_input.rb +1 -0
  21. data/lib/algolia/models/{recommend/recommendations_hits.rb → ingestion/list_tasks_response_v1.rb} +26 -14
  22. data/lib/algolia/models/ingestion/task.rb +30 -9
  23. data/lib/algolia/models/ingestion/task_create.rb +11 -12
  24. data/lib/algolia/models/{search/search_for_facets_options.rb → ingestion/task_create_v1.rb} +86 -51
  25. data/lib/algolia/models/ingestion/task_update.rb +8 -7
  26. data/lib/algolia/models/{search/browse_pagination.rb → ingestion/task_update_v1.rb} +50 -55
  27. data/lib/algolia/models/{recommend/looking_similar.rb → ingestion/task_v1.rb} +147 -30
  28. data/lib/algolia/models/ingestion/{transformation_try_response_error.rb → transformation_error.rb} +3 -3
  29. data/lib/algolia/models/ingestion/transformation_try_response.rb +1 -1
  30. data/lib/algolia/models/monitoring/{incidents_inner.rb → incident_entry.rb} +3 -3
  31. data/lib/algolia/models/monitoring/{indexing_time_response_metrics.rb → indexing_metric.rb} +3 -3
  32. data/lib/algolia/models/monitoring/indexing_time_response.rb +1 -1
  33. data/lib/algolia/models/monitoring/infrastructure_response.rb +1 -1
  34. data/lib/algolia/models/monitoring/{latency_response_metrics.rb → latency_metric.rb} +3 -3
  35. data/lib/algolia/models/monitoring/latency_response.rb +1 -1
  36. data/lib/algolia/models/monitoring/{infrastructure_response_metrics.rb → metrics.rb} +3 -6
  37. data/lib/algolia/models/monitoring/{time_inner.rb → time_entry.rb} +3 -3
  38. data/lib/algolia/models/{recommend/trending_items.rb → query-suggestions/config_status.rb} +46 -58
  39. data/lib/algolia/models/{recommend/related_products.rb → query-suggestions/log_file.rb} +36 -32
  40. data/lib/algolia/models/recommend/around_precision.rb +1 -1
  41. data/lib/algolia/models/recommend/fallback_params.rb +1 -1
  42. data/lib/algolia/models/recommend/{around_precision_from_value_inner.rb → range.rb} +3 -6
  43. data/lib/algolia/models/recommend/recommend_rule.rb +1 -1
  44. data/lib/algolia/models/recommend/{redirect_rule_index_metadata_data.rb → redirect_rule_index_data.rb} +3 -3
  45. data/lib/algolia/models/recommend/redirect_rule_index_metadata.rb +1 -1
  46. data/lib/algolia/models/recommend/{recommend_rule_metadata.rb → rule_metadata.rb} +3 -3
  47. data/lib/algolia/models/recommend/search_params.rb +1 -1
  48. data/lib/algolia/models/recommend/search_params_object.rb +1 -1
  49. data/lib/algolia/models/search/around_precision.rb +1 -1
  50. data/lib/algolia/models/search/browse_params_object.rb +1 -1
  51. data/lib/algolia/models/search/built_in_operation.rb +1 -2
  52. data/lib/algolia/models/search/built_in_operation_value.rb +105 -0
  53. data/lib/algolia/models/search/consequence_params.rb +1 -1
  54. data/lib/algolia/models/search/dictionary_entry.rb +0 -2
  55. data/lib/algolia/models/search/index_settings.rb +2 -2
  56. data/lib/algolia/models/search/{around_precision_from_value_inner.rb → range.rb} +3 -6
  57. data/lib/algolia/models/search/{redirect_rule_index_metadata_data.rb → redirect_rule_index_data.rb} +3 -3
  58. data/lib/algolia/models/search/redirect_rule_index_metadata.rb +1 -1
  59. data/lib/algolia/models/search/search_for_facets.rb +1 -1
  60. data/lib/algolia/models/search/search_for_hits.rb +1 -1
  61. data/lib/algolia/models/search/search_params_object.rb +1 -1
  62. data/lib/algolia/models/search/search_params_string.rb +1 -0
  63. data/lib/algolia/models/search/{index_settings_as_search_params.rb → settings_response.rb} +251 -11
  64. data/lib/algolia/models/usage/{get_usage400_response_error_errors_inner.rb → error_item.rb} +3 -3
  65. data/lib/algolia/models/usage/{get_usage400_response_error.rb → forbidden_error.rb} +4 -4
  66. data/lib/algolia/models/usage/{get_usage200_response.rb → index_usage.rb} +4 -4
  67. data/lib/algolia/models/usage/invalid_request_error.rb +231 -0
  68. data/lib/algolia/models/usage/{get_usage200_response_statistics_inner.rb → statistic_entry.rb} +3 -3
  69. data/lib/algolia/transport/transport.rb +8 -2
  70. data/lib/algolia/version.rb +1 -1
  71. metadata +32 -63
  72. data/lib/algolia/models/abtesting/custom_search_params.rb +0 -214
  73. data/lib/algolia/models/abtesting/error_base.rb +0 -212
  74. data/lib/algolia/models/analytics/error_base.rb +0 -212
  75. data/lib/algolia/models/ingestion/error_base.rb +0 -212
  76. data/lib/algolia/models/insights/error_base.rb +0 -212
  77. data/lib/algolia/models/monitoring/error_base.rb +0 -212
  78. data/lib/algolia/models/monitoring/get_servers403_response.rb +0 -211
  79. data/lib/algolia/models/personalization/error_base.rb +0 -212
  80. data/lib/algolia/models/query-suggestions/app_id.rb +0 -209
  81. data/lib/algolia/models/query-suggestions/error_base.rb +0 -212
  82. data/lib/algolia/models/recommend/base_recommend_request.rb +0 -281
  83. data/lib/algolia/models/recommend/base_search_params.rb +0 -635
  84. data/lib/algolia/models/recommend/base_search_params_without_query.rb +0 -616
  85. data/lib/algolia/models/recommend/base_search_response.rb +0 -499
  86. data/lib/algolia/models/recommend/error_base.rb +0 -212
  87. data/lib/algolia/models/recommend/frequently_bought_together.rb +0 -247
  88. data/lib/algolia/models/recommend/index_settings_as_search_params.rb +0 -788
  89. data/lib/algolia/models/recommend/recommended_for_you.rb +0 -244
  90. data/lib/algolia/models/recommend/search_pagination.rb +0 -282
  91. data/lib/algolia/models/recommend/search_params_query.rb +0 -212
  92. data/lib/algolia/models/recommend/trending_facets.rb +0 -258
  93. data/lib/algolia/models/search/base_get_api_key_response.rb +0 -224
  94. data/lib/algolia/models/search/base_index_settings.rb +0 -426
  95. data/lib/algolia/models/search/base_search_params.rb +0 -635
  96. data/lib/algolia/models/search/base_search_params_without_query.rb +0 -616
  97. data/lib/algolia/models/search/base_search_response.rb +0 -499
  98. data/lib/algolia/models/search/cursor.rb +0 -209
  99. data/lib/algolia/models/search/error_base.rb +0 -212
  100. data/lib/algolia/models/search/params.rb +0 -236
  101. data/lib/algolia/models/search/search_hits.rb +0 -240
  102. data/lib/algolia/models/search/search_pagination.rb +0 -282
  103. data/lib/algolia/models/search/search_params_query.rb +0 -212
  104. data/lib/algolia/models/usage/error_base.rb +0 -212
  105. data/lib/algolia/models/usage/get_usage400_response.rb +0 -213
@@ -5,7 +5,58 @@ require "time"
5
5
 
6
6
  module Algolia
7
7
  module Search
8
- class IndexSettingsAsSearchParams
8
+ class SettingsResponse
9
+ # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are attributes that let you categorize search results. They can be used for filtering search results. By default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows using this attribute as a filter, but doesn't evalue the facet values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
10
+ attr_accessor :attributes_for_faceting
11
+
12
+ # Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier** - `virtual(\"REPLICA\")`. Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
13
+ attr_accessor :replicas
14
+
15
+ # Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed.
16
+ attr_accessor :pagination_limited_to
17
+
18
+ # Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. Attribute names are case-sensitive.
19
+ attr_accessor :unretrievable_attributes
20
+
21
+ # Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
22
+ attr_accessor :disable_typo_tolerance_on_words
23
+
24
+ # Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. Attribute names are case-sensitive.
25
+ attr_accessor :attributes_to_transliterate
26
+
27
+ # Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. Attribute names are case-sensitive.
28
+ attr_accessor :camel_case_attributes
29
+
30
+ # Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Attribute names are case-sensitive. Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
31
+ attr_accessor :decompounded_attributes
32
+
33
+ # Languages for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
34
+ attr_accessor :index_languages
35
+
36
+ # Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). Attribute names are case-sensitive.
37
+ attr_accessor :disable_prefix_on_attributes
38
+
39
+ # Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered.
40
+ attr_accessor :allow_compression_of_integer_array
41
+
42
+ # Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
43
+ attr_accessor :numeric_attributes_for_filtering
44
+
45
+ # Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches.
46
+ attr_accessor :separators_to_index
47
+
48
+ # Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without modifier, matches at the beginning of an attribute rank higer than matches at the end.
49
+ attr_accessor :searchable_attributes
50
+
51
+ # An object with custom data. You can store up to 32kB as custom data.
52
+ attr_accessor :user_data
53
+
54
+ # Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
55
+ attr_accessor :custom_normalization
56
+
57
+ # Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts.
58
+ attr_accessor :attribute_for_distinct
59
+
9
60
  # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included.
10
61
  attr_accessor :attributes_to_retrieve
11
62
 
@@ -63,7 +114,7 @@ module Algolia
63
114
  # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
64
115
  attr_accessor :query_languages
65
116
 
66
- # Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.
117
+ # Whether to split compound words in the query into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
67
118
  attr_accessor :decompound_query
68
119
 
69
120
  # Whether to enable rules.
@@ -127,6 +178,9 @@ module Algolia
127
178
 
128
179
  attr_accessor :re_ranking_apply_filter
129
180
 
181
+ # Replica indices only: the name of the primary index for this replica.
182
+ attr_accessor :primary
183
+
130
184
  class EnumAttributeValidator
131
185
  attr_reader :datatype
132
186
  attr_reader :allowable_values
@@ -152,6 +206,23 @@ module Algolia
152
206
  # Attribute mapping from ruby-style variable name to JSON key.
153
207
  def self.attribute_map
154
208
  {
209
+ :attributes_for_faceting => :attributesForFaceting,
210
+ :replicas => :replicas,
211
+ :pagination_limited_to => :paginationLimitedTo,
212
+ :unretrievable_attributes => :unretrievableAttributes,
213
+ :disable_typo_tolerance_on_words => :disableTypoToleranceOnWords,
214
+ :attributes_to_transliterate => :attributesToTransliterate,
215
+ :camel_case_attributes => :camelCaseAttributes,
216
+ :decompounded_attributes => :decompoundedAttributes,
217
+ :index_languages => :indexLanguages,
218
+ :disable_prefix_on_attributes => :disablePrefixOnAttributes,
219
+ :allow_compression_of_integer_array => :allowCompressionOfIntegerArray,
220
+ :numeric_attributes_for_filtering => :numericAttributesForFiltering,
221
+ :separators_to_index => :separatorsToIndex,
222
+ :searchable_attributes => :searchableAttributes,
223
+ :user_data => :userData,
224
+ :custom_normalization => :customNormalization,
225
+ :attribute_for_distinct => :attributeForDistinct,
155
226
  :attributes_to_retrieve => :attributesToRetrieve,
156
227
  :ranking => :ranking,
157
228
  :custom_ranking => :customRanking,
@@ -195,7 +266,8 @@ module Algolia
195
266
  :attribute_criteria_computed_by_min_proximity => :attributeCriteriaComputedByMinProximity,
196
267
  :rendering_content => :renderingContent,
197
268
  :enable_re_ranking => :enableReRanking,
198
- :re_ranking_apply_filter => :reRankingApplyFilter
269
+ :re_ranking_apply_filter => :reRankingApplyFilter,
270
+ :primary => :primary
199
271
  }
200
272
  end
201
273
 
@@ -207,6 +279,23 @@ module Algolia
207
279
  # Attribute type mapping.
208
280
  def self.types_mapping
209
281
  {
282
+ :attributes_for_faceting => :"Array<String>",
283
+ :replicas => :"Array<String>",
284
+ :pagination_limited_to => :"Integer",
285
+ :unretrievable_attributes => :"Array<String>",
286
+ :disable_typo_tolerance_on_words => :"Array<String>",
287
+ :attributes_to_transliterate => :"Array<String>",
288
+ :camel_case_attributes => :"Array<String>",
289
+ :decompounded_attributes => :"Object",
290
+ :index_languages => :"Array<SupportedLanguage>",
291
+ :disable_prefix_on_attributes => :"Array<String>",
292
+ :allow_compression_of_integer_array => :"Boolean",
293
+ :numeric_attributes_for_filtering => :"Array<String>",
294
+ :separators_to_index => :"String",
295
+ :searchable_attributes => :"Array<String>",
296
+ :user_data => :"Object",
297
+ :custom_normalization => :"Hash<String, Hash<String, String>>",
298
+ :attribute_for_distinct => :"String",
210
299
  :attributes_to_retrieve => :"Array<String>",
211
300
  :ranking => :"Array<String>",
212
301
  :custom_ranking => :"Array<String>",
@@ -250,26 +339,33 @@ module Algolia
250
339
  :attribute_criteria_computed_by_min_proximity => :"Boolean",
251
340
  :rendering_content => :"RenderingContent",
252
341
  :enable_re_ranking => :"Boolean",
253
- :re_ranking_apply_filter => :"ReRankingApplyFilter"
342
+ :re_ranking_apply_filter => :"ReRankingApplyFilter",
343
+ :primary => :"String"
254
344
  }
255
345
  end
256
346
 
257
347
  # List of attributes with nullable: true
258
348
  def self.openapi_nullable
259
349
  Set.new(
260
- [
261
- :re_ranking_apply_filter
262
- ]
350
+ []
263
351
  )
264
352
  end
265
353
 
354
+ # List of class defined in allOf (OpenAPI v3)
355
+ def self.openapi_all_of
356
+ [
357
+ :"IndexSettings",
358
+ :"WithPrimary"
359
+ ]
360
+ end
361
+
266
362
  # Initializes the object
267
363
  # @param [Hash] attributes Model attributes in the form of hash
268
364
  def initialize(attributes = {})
269
365
  if (!attributes.is_a?(Hash))
270
366
  raise(
271
367
  ArgumentError,
272
- "The input argument (attributes) must be a hash in `Algolia::IndexSettingsAsSearchParams` initialize method"
368
+ "The input argument (attributes) must be a hash in `Algolia::SettingsResponse` initialize method"
273
369
  )
274
370
  end
275
371
 
@@ -278,7 +374,7 @@ module Algolia
278
374
  if (!self.class.attribute_map.key?(k.to_sym))
279
375
  raise(
280
376
  ArgumentError,
281
- "`#{k}` is not a valid attribute in `Algolia::IndexSettingsAsSearchParams`. Please check the name to make sure it's valid. List of attributes: " +
377
+ "`#{k}` is not a valid attribute in `Algolia::SettingsResponse`. Please check the name to make sure it's valid. List of attributes: " +
282
378
  self.class.attribute_map.keys.inspect
283
379
  )
284
380
  end
@@ -286,6 +382,96 @@ module Algolia
286
382
  h[k.to_sym] = v
287
383
  }
288
384
 
385
+ if attributes.key?(:attributes_for_faceting)
386
+ if (value = attributes[:attributes_for_faceting]).is_a?(Array)
387
+ self.attributes_for_faceting = value
388
+ end
389
+ end
390
+
391
+ if attributes.key?(:replicas)
392
+ if (value = attributes[:replicas]).is_a?(Array)
393
+ self.replicas = value
394
+ end
395
+ end
396
+
397
+ if attributes.key?(:pagination_limited_to)
398
+ self.pagination_limited_to = attributes[:pagination_limited_to]
399
+ end
400
+
401
+ if attributes.key?(:unretrievable_attributes)
402
+ if (value = attributes[:unretrievable_attributes]).is_a?(Array)
403
+ self.unretrievable_attributes = value
404
+ end
405
+ end
406
+
407
+ if attributes.key?(:disable_typo_tolerance_on_words)
408
+ if (value = attributes[:disable_typo_tolerance_on_words]).is_a?(Array)
409
+ self.disable_typo_tolerance_on_words = value
410
+ end
411
+ end
412
+
413
+ if attributes.key?(:attributes_to_transliterate)
414
+ if (value = attributes[:attributes_to_transliterate]).is_a?(Array)
415
+ self.attributes_to_transliterate = value
416
+ end
417
+ end
418
+
419
+ if attributes.key?(:camel_case_attributes)
420
+ if (value = attributes[:camel_case_attributes]).is_a?(Array)
421
+ self.camel_case_attributes = value
422
+ end
423
+ end
424
+
425
+ if attributes.key?(:decompounded_attributes)
426
+ self.decompounded_attributes = attributes[:decompounded_attributes]
427
+ end
428
+
429
+ if attributes.key?(:index_languages)
430
+ if (value = attributes[:index_languages]).is_a?(Array)
431
+ self.index_languages = value
432
+ end
433
+ end
434
+
435
+ if attributes.key?(:disable_prefix_on_attributes)
436
+ if (value = attributes[:disable_prefix_on_attributes]).is_a?(Array)
437
+ self.disable_prefix_on_attributes = value
438
+ end
439
+ end
440
+
441
+ if attributes.key?(:allow_compression_of_integer_array)
442
+ self.allow_compression_of_integer_array = attributes[:allow_compression_of_integer_array]
443
+ end
444
+
445
+ if attributes.key?(:numeric_attributes_for_filtering)
446
+ if (value = attributes[:numeric_attributes_for_filtering]).is_a?(Array)
447
+ self.numeric_attributes_for_filtering = value
448
+ end
449
+ end
450
+
451
+ if attributes.key?(:separators_to_index)
452
+ self.separators_to_index = attributes[:separators_to_index]
453
+ end
454
+
455
+ if attributes.key?(:searchable_attributes)
456
+ if (value = attributes[:searchable_attributes]).is_a?(Array)
457
+ self.searchable_attributes = value
458
+ end
459
+ end
460
+
461
+ if attributes.key?(:user_data)
462
+ self.user_data = attributes[:user_data]
463
+ end
464
+
465
+ if attributes.key?(:custom_normalization)
466
+ if (value = attributes[:custom_normalization]).is_a?(Hash)
467
+ self.custom_normalization = value
468
+ end
469
+ end
470
+
471
+ if attributes.key?(:attribute_for_distinct)
472
+ self.attribute_for_distinct = attributes[:attribute_for_distinct]
473
+ end
474
+
289
475
  if attributes.key?(:attributes_to_retrieve)
290
476
  if (value = attributes[:attributes_to_retrieve]).is_a?(Array)
291
477
  self.attributes_to_retrieve = value
@@ -485,6 +671,24 @@ module Algolia
485
671
  if attributes.key?(:re_ranking_apply_filter)
486
672
  self.re_ranking_apply_filter = attributes[:re_ranking_apply_filter]
487
673
  end
674
+
675
+ if attributes.key?(:primary)
676
+ self.primary = attributes[:primary]
677
+ end
678
+ end
679
+
680
+ # Custom attribute writer method with validation
681
+ # @param [Object] pagination_limited_to Value to be assigned
682
+ def pagination_limited_to=(pagination_limited_to)
683
+ if pagination_limited_to.nil?
684
+ raise ArgumentError, "pagination_limited_to cannot be nil"
685
+ end
686
+
687
+ if pagination_limited_to > 20000
688
+ raise ArgumentError, "invalid value for \"pagination_limited_to\", must be smaller than or equal to 20000."
689
+ end
690
+
691
+ @pagination_limited_to = pagination_limited_to
488
692
  end
489
693
 
490
694
  # Custom attribute writer method with validation
@@ -556,6 +760,23 @@ module Algolia
556
760
  def ==(other)
557
761
  return true if self.equal?(other)
558
762
  self.class == other.class &&
763
+ attributes_for_faceting == other.attributes_for_faceting &&
764
+ replicas == other.replicas &&
765
+ pagination_limited_to == other.pagination_limited_to &&
766
+ unretrievable_attributes == other.unretrievable_attributes &&
767
+ disable_typo_tolerance_on_words == other.disable_typo_tolerance_on_words &&
768
+ attributes_to_transliterate == other.attributes_to_transliterate &&
769
+ camel_case_attributes == other.camel_case_attributes &&
770
+ decompounded_attributes == other.decompounded_attributes &&
771
+ index_languages == other.index_languages &&
772
+ disable_prefix_on_attributes == other.disable_prefix_on_attributes &&
773
+ allow_compression_of_integer_array == other.allow_compression_of_integer_array &&
774
+ numeric_attributes_for_filtering == other.numeric_attributes_for_filtering &&
775
+ separators_to_index == other.separators_to_index &&
776
+ searchable_attributes == other.searchable_attributes &&
777
+ user_data == other.user_data &&
778
+ custom_normalization == other.custom_normalization &&
779
+ attribute_for_distinct == other.attribute_for_distinct &&
559
780
  attributes_to_retrieve == other.attributes_to_retrieve &&
560
781
  ranking == other.ranking &&
561
782
  custom_ranking == other.custom_ranking &&
@@ -599,7 +820,8 @@ module Algolia
599
820
  attribute_criteria_computed_by_min_proximity == other.attribute_criteria_computed_by_min_proximity &&
600
821
  rendering_content == other.rendering_content &&
601
822
  enable_re_ranking == other.enable_re_ranking &&
602
- re_ranking_apply_filter == other.re_ranking_apply_filter
823
+ re_ranking_apply_filter == other.re_ranking_apply_filter &&
824
+ primary == other.primary
603
825
  end
604
826
 
605
827
  # @see the `==` method
@@ -612,6 +834,23 @@ module Algolia
612
834
  # @return [Integer] Hash code
613
835
  def hash
614
836
  [
837
+ attributes_for_faceting,
838
+ replicas,
839
+ pagination_limited_to,
840
+ unretrievable_attributes,
841
+ disable_typo_tolerance_on_words,
842
+ attributes_to_transliterate,
843
+ camel_case_attributes,
844
+ decompounded_attributes,
845
+ index_languages,
846
+ disable_prefix_on_attributes,
847
+ allow_compression_of_integer_array,
848
+ numeric_attributes_for_filtering,
849
+ separators_to_index,
850
+ searchable_attributes,
851
+ user_data,
852
+ custom_normalization,
853
+ attribute_for_distinct,
615
854
  attributes_to_retrieve,
616
855
  ranking,
617
856
  custom_ranking,
@@ -655,7 +894,8 @@ module Algolia
655
894
  attribute_criteria_computed_by_min_proximity,
656
895
  rendering_content,
657
896
  enable_re_ranking,
658
- re_ranking_apply_filter
897
+ re_ranking_apply_filter,
898
+ primary
659
899
  ].hash
660
900
  end
661
901
 
@@ -5,7 +5,7 @@ require "time"
5
5
 
6
6
  module Algolia
7
7
  module Usage
8
- class GetUsage400ResponseErrorErrorsInner
8
+ class ErrorItem
9
9
  attr_accessor :code
10
10
 
11
11
  attr_accessor :message
@@ -52,7 +52,7 @@ module Algolia
52
52
  if (!attributes.is_a?(Hash))
53
53
  raise(
54
54
  ArgumentError,
55
- "The input argument (attributes) must be a hash in `Algolia::GetUsage400ResponseErrorErrorsInner` initialize method"
55
+ "The input argument (attributes) must be a hash in `Algolia::ErrorItem` initialize method"
56
56
  )
57
57
  end
58
58
 
@@ -61,7 +61,7 @@ module Algolia
61
61
  if (!self.class.attribute_map.key?(k.to_sym))
62
62
  raise(
63
63
  ArgumentError,
64
- "`#{k}` is not a valid attribute in `Algolia::GetUsage400ResponseErrorErrorsInner`. Please check the name to make sure it's valid. List of attributes: " +
64
+ "`#{k}` is not a valid attribute in `Algolia::ErrorItem`. Please check the name to make sure it's valid. List of attributes: " +
65
65
  self.class.attribute_map.keys.inspect
66
66
  )
67
67
  end
@@ -5,7 +5,7 @@ require "time"
5
5
 
6
6
  module Algolia
7
7
  module Usage
8
- class GetUsage400ResponseError
8
+ class ForbiddenError
9
9
  attr_accessor :code
10
10
 
11
11
  attr_accessor :message
@@ -31,7 +31,7 @@ module Algolia
31
31
  {
32
32
  :code => :"String",
33
33
  :message => :"String",
34
- :errors => :"Array<GetUsage400ResponseErrorErrorsInner>"
34
+ :errors => :"Array<ErrorItem>"
35
35
  }
36
36
  end
37
37
 
@@ -48,7 +48,7 @@ module Algolia
48
48
  if (!attributes.is_a?(Hash))
49
49
  raise(
50
50
  ArgumentError,
51
- "The input argument (attributes) must be a hash in `Algolia::GetUsage400ResponseError` initialize method"
51
+ "The input argument (attributes) must be a hash in `Algolia::ForbiddenError` initialize method"
52
52
  )
53
53
  end
54
54
 
@@ -57,7 +57,7 @@ module Algolia
57
57
  if (!self.class.attribute_map.key?(k.to_sym))
58
58
  raise(
59
59
  ArgumentError,
60
- "`#{k}` is not a valid attribute in `Algolia::GetUsage400ResponseError`. Please check the name to make sure it's valid. List of attributes: " +
60
+ "`#{k}` is not a valid attribute in `Algolia::ForbiddenError`. Please check the name to make sure it's valid. List of attributes: " +
61
61
  self.class.attribute_map.keys.inspect
62
62
  )
63
63
  end
@@ -5,7 +5,7 @@ require "time"
5
5
 
6
6
  module Algolia
7
7
  module Usage
8
- class GetUsage200Response
8
+ class IndexUsage
9
9
  attr_accessor :statistics
10
10
 
11
11
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -23,7 +23,7 @@ module Algolia
23
23
  # Attribute type mapping.
24
24
  def self.types_mapping
25
25
  {
26
- :statistics => :"Array<GetUsage200ResponseStatisticsInner>"
26
+ :statistics => :"Array<StatisticEntry>"
27
27
  }
28
28
  end
29
29
 
@@ -40,7 +40,7 @@ module Algolia
40
40
  if (!attributes.is_a?(Hash))
41
41
  raise(
42
42
  ArgumentError,
43
- "The input argument (attributes) must be a hash in `Algolia::GetUsage200Response` initialize method"
43
+ "The input argument (attributes) must be a hash in `Algolia::IndexUsage` initialize method"
44
44
  )
45
45
  end
46
46
 
@@ -49,7 +49,7 @@ module Algolia
49
49
  if (!self.class.attribute_map.key?(k.to_sym))
50
50
  raise(
51
51
  ArgumentError,
52
- "`#{k}` is not a valid attribute in `Algolia::GetUsage200Response`. Please check the name to make sure it's valid. List of attributes: " +
52
+ "`#{k}` is not a valid attribute in `Algolia::IndexUsage`. Please check the name to make sure it's valid. List of attributes: " +
53
53
  self.class.attribute_map.keys.inspect
54
54
  )
55
55
  end