algolia 3.0.0.beta.11 → 3.0.0.beta.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/Gemfile.lock +2 -2
  4. data/lib/algolia/api/ingestion_client.rb +127 -3
  5. data/lib/algolia/api/query_suggestions_client.rb +4 -10
  6. data/lib/algolia/api/search_client.rb +2 -2
  7. data/lib/algolia/api/usage_client.rb +4 -4
  8. data/lib/algolia/models/abtesting/{filter_effects_empty_search.rb → empty_search_filter.rb} +3 -3
  9. data/lib/algolia/models/abtesting/filter_effects.rb +2 -2
  10. data/lib/algolia/models/abtesting/{filter_effects_outliers.rb → outliers_filter.rb} +3 -3
  11. data/lib/algolia/models/analytics/{click_positions_inner.rb → click_position.rb} +3 -3
  12. data/lib/algolia/models/analytics/get_click_positions_response.rb +1 -1
  13. data/lib/algolia/models/analytics/top_search_with_analytics.rb +1 -1
  14. data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +1 -1
  15. data/lib/algolia/models/ingestion/destination.rb +15 -4
  16. data/lib/algolia/models/ingestion/destination_create.rb +15 -4
  17. data/lib/algolia/models/ingestion/destination_input.rb +1 -2
  18. data/lib/algolia/models/ingestion/destination_update.rb +15 -4
  19. data/lib/algolia/models/ingestion/docker_streams_input.rb +1 -0
  20. data/lib/algolia/models/ingestion/entity_type.rb +32 -0
  21. data/lib/algolia/models/ingestion/{destination_index_prefix.rb → model.rb} +55 -15
  22. data/lib/algolia/models/{recommend/trending_items.rb → ingestion/run_source_payload.rb} +39 -34
  23. data/lib/algolia/models/{search/base_get_api_key_response.rb → ingestion/run_source_response.rb} +19 -15
  24. data/lib/algolia/models/ingestion/{transformation_try_response_error.rb → transformation_error.rb} +3 -3
  25. data/lib/algolia/models/ingestion/{source_shopify_base.rb → transformation_models.rb} +14 -12
  26. data/lib/algolia/models/ingestion/transformation_try_response.rb +1 -1
  27. data/lib/algolia/models/monitoring/{incidents_inner.rb → incident_entry.rb} +3 -3
  28. data/lib/algolia/models/monitoring/{indexing_time_response_metrics.rb → indexing_metric.rb} +3 -3
  29. data/lib/algolia/models/monitoring/indexing_time_response.rb +1 -1
  30. data/lib/algolia/models/monitoring/infrastructure_response.rb +1 -1
  31. data/lib/algolia/models/monitoring/{latency_response_metrics.rb → latency_metric.rb} +3 -3
  32. data/lib/algolia/models/monitoring/latency_response.rb +1 -1
  33. data/lib/algolia/models/monitoring/{infrastructure_response_metrics.rb → metrics.rb} +3 -6
  34. data/lib/algolia/models/monitoring/{time_inner.rb → time_entry.rb} +3 -3
  35. data/lib/algolia/models/{search/search_for_hits_options.rb → query-suggestions/config_status.rb} +43 -36
  36. data/lib/algolia/models/{recommend/related_products.rb → query-suggestions/log_file.rb} +36 -32
  37. data/lib/algolia/models/recommend/around_precision.rb +1 -1
  38. data/lib/algolia/models/recommend/fallback_params.rb +1 -1
  39. data/lib/algolia/models/recommend/{around_precision_from_value_inner.rb → range.rb} +3 -6
  40. data/lib/algolia/models/recommend/recommend_rule.rb +1 -1
  41. data/lib/algolia/models/recommend/{redirect_rule_index_metadata_data.rb → redirect_rule_index_data.rb} +3 -3
  42. data/lib/algolia/models/recommend/redirect_rule_index_metadata.rb +1 -1
  43. data/lib/algolia/models/recommend/{recommend_rule_metadata.rb → rule_metadata.rb} +3 -3
  44. data/lib/algolia/models/recommend/search_params.rb +1 -1
  45. data/lib/algolia/models/recommend/search_params_object.rb +1 -1
  46. data/lib/algolia/models/search/around_precision.rb +1 -1
  47. data/lib/algolia/models/search/browse_params_object.rb +1 -1
  48. data/lib/algolia/models/search/built_in_operation.rb +1 -2
  49. data/lib/algolia/models/search/built_in_operation_value.rb +105 -0
  50. data/lib/algolia/models/search/consequence_params.rb +1 -1
  51. data/lib/algolia/models/search/dictionary_entry.rb +13 -6
  52. data/lib/algolia/models/search/dictionary_entry_type.rb +32 -0
  53. data/lib/algolia/models/search/index_settings.rb +2 -2
  54. data/lib/algolia/models/search/multiple_batch_request.rb +0 -2
  55. data/lib/algolia/models/search/{around_precision_from_value_inner.rb → range.rb} +3 -6
  56. data/lib/algolia/models/search/{redirect_rule_index_metadata_data.rb → redirect_rule_index_data.rb} +3 -3
  57. data/lib/algolia/models/search/redirect_rule_index_metadata.rb +1 -1
  58. data/lib/algolia/models/search/search_for_facets.rb +1 -1
  59. data/lib/algolia/models/search/search_for_hits.rb +1 -1
  60. data/lib/algolia/models/search/search_params_object.rb +1 -1
  61. data/lib/algolia/models/search/search_params_string.rb +1 -0
  62. data/lib/algolia/models/search/settings_response.rb +2 -2
  63. data/lib/algolia/models/usage/{get_usage400_response_error_errors_inner.rb → error_item.rb} +3 -3
  64. data/lib/algolia/models/usage/{get_usage400_response_error.rb → forbidden_error.rb} +4 -4
  65. data/lib/algolia/models/usage/{get_usage200_response.rb → index_usage.rb} +4 -4
  66. data/lib/algolia/models/usage/invalid_request_error.rb +231 -0
  67. data/lib/algolia/models/usage/{get_usage200_response_statistics_inner.rb → statistic_entry.rb} +3 -3
  68. data/lib/algolia/version.rb +1 -1
  69. metadata +30 -65
  70. data/lib/algolia/models/abtesting/custom_search_params.rb +0 -214
  71. data/lib/algolia/models/abtesting/error_base.rb +0 -212
  72. data/lib/algolia/models/analytics/error_base.rb +0 -212
  73. data/lib/algolia/models/ingestion/error_base.rb +0 -212
  74. data/lib/algolia/models/insights/error_base.rb +0 -212
  75. data/lib/algolia/models/monitoring/error_base.rb +0 -212
  76. data/lib/algolia/models/monitoring/get_servers403_response.rb +0 -211
  77. data/lib/algolia/models/personalization/error_base.rb +0 -212
  78. data/lib/algolia/models/query-suggestions/app_id.rb +0 -209
  79. data/lib/algolia/models/query-suggestions/error_base.rb +0 -212
  80. data/lib/algolia/models/recommend/base_recommend_request.rb +0 -281
  81. data/lib/algolia/models/recommend/base_search_params.rb +0 -635
  82. data/lib/algolia/models/recommend/base_search_params_without_query.rb +0 -616
  83. data/lib/algolia/models/recommend/base_search_response.rb +0 -499
  84. data/lib/algolia/models/recommend/error_base.rb +0 -212
  85. data/lib/algolia/models/recommend/frequently_bought_together.rb +0 -247
  86. data/lib/algolia/models/recommend/index_settings_as_search_params.rb +0 -788
  87. data/lib/algolia/models/recommend/looking_similar.rb +0 -256
  88. data/lib/algolia/models/recommend/recommendations_hits.rb +0 -215
  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_index_settings.rb +0 -426
  94. data/lib/algolia/models/search/base_search_params.rb +0 -635
  95. data/lib/algolia/models/search/base_search_params_without_query.rb +0 -616
  96. data/lib/algolia/models/search/base_search_response.rb +0 -499
  97. data/lib/algolia/models/search/browse_pagination.rb +0 -274
  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/index_settings_as_search_params.rb +0 -788
  101. data/lib/algolia/models/search/params.rb +0 -236
  102. data/lib/algolia/models/search/search_for_facets_options.rb +0 -293
  103. data/lib/algolia/models/search/search_hits.rb +0 -240
  104. data/lib/algolia/models/search/search_pagination.rb +0 -282
  105. data/lib/algolia/models/search/search_params_query.rb +0 -212
  106. data/lib/algolia/models/search/with_primary.rb +0 -212
  107. data/lib/algolia/models/usage/error_base.rb +0 -212
  108. data/lib/algolia/models/usage/get_usage400_response.rb +0 -213
@@ -23,6 +23,8 @@ module Algolia
23
23
 
24
24
  attr_accessor :state
25
25
 
26
+ attr_accessor :type
27
+
26
28
  attr_accessor :additional_properties
27
29
 
28
30
  class EnumAttributeValidator
@@ -55,7 +57,8 @@ module Algolia
55
57
  :word => :word,
56
58
  :words => :words,
57
59
  :decomposition => :decomposition,
58
- :state => :state
60
+ :state => :state,
61
+ :type => :type
59
62
  }
60
63
  end
61
64
 
@@ -72,7 +75,8 @@ module Algolia
72
75
  :word => :"String",
73
76
  :words => :"Array<String>",
74
77
  :decomposition => :"Array<String>",
75
- :state => :"DictionaryEntryState"
78
+ :state => :"DictionaryEntryState",
79
+ :type => :"DictionaryEntryType"
76
80
  }
77
81
  end
78
82
 
@@ -101,8 +105,6 @@ module Algolia
101
105
 
102
106
  if attributes.key?(:language)
103
107
  self.language = attributes[:language]
104
- else
105
- self.language = nil
106
108
  end
107
109
 
108
110
  if attributes.key?(:word)
@@ -125,6 +127,10 @@ module Algolia
125
127
  self.state = attributes[:state]
126
128
  end
127
129
 
130
+ if attributes.key?(:type)
131
+ self.type = attributes[:type]
132
+ end
133
+
128
134
  # add extra attribute to additional_properties
129
135
  self.additional_properties ||= {}
130
136
  self.additional_properties.merge!(attributes.reject { |k, _| self.class.attribute_map.key?(k.to_sym) })
@@ -140,7 +146,8 @@ module Algolia
140
146
  word == other.word &&
141
147
  words == other.words &&
142
148
  decomposition == other.decomposition &&
143
- state == other.state
149
+ state == other.state &&
150
+ type == other.type
144
151
  end
145
152
 
146
153
  # @see the `==` method
@@ -152,7 +159,7 @@ module Algolia
152
159
  # Calculates hash code according to all attributes.
153
160
  # @return [Integer] Hash code
154
161
  def hash
155
- [object_id, language, word, words, decomposition, state].hash
162
+ [object_id, language, word, words, decomposition, state, type].hash
156
163
  end
157
164
 
158
165
  # Builds the object from hash
@@ -0,0 +1,32 @@
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
+ require "date"
4
+ require "time"
5
+
6
+ module Algolia
7
+ module Search
8
+ class DictionaryEntryType
9
+ CUSTOM = "custom".freeze
10
+ STANDARD = "standard".freeze
11
+
12
+ def self.all_vars
13
+ @all_vars ||= [CUSTOM, STANDARD].freeze
14
+ end
15
+
16
+ # Builds the enum from string
17
+ # @param [String] The enum value in the form of the string
18
+ # @return [String] The enum value
19
+ def self.build_from_hash(value)
20
+ new.build_from_hash(value)
21
+ end
22
+
23
+ # Builds the enum from string
24
+ # @param [String] The enum value in the form of the string
25
+ # @return [String] The enum value
26
+ def build_from_hash(value)
27
+ return value if DictionaryEntryType.all_vars.include?(value)
28
+ raise "Invalid ENUM value #{value} for class #DictionaryEntryType"
29
+ end
30
+ end
31
+ end
32
+ end
@@ -28,7 +28,7 @@ module Algolia
28
28
  # Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. Attribute names are case-sensitive.
29
29
  attr_accessor :camel_case_attributes
30
30
 
31
- # 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`).
31
+ # 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).
32
32
  attr_accessor :decompounded_attributes
33
33
 
34
34
  # 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/).
@@ -115,7 +115,7 @@ module Algolia
115
115
  # 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/).
116
116
  attr_accessor :query_languages
117
117
 
118
- # 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.
118
+ # 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).
119
119
  attr_accessor :decompound_query
120
120
 
121
121
  # Whether to enable rules.
@@ -97,8 +97,6 @@ module Algolia
97
97
 
98
98
  if attributes.key?(:body)
99
99
  self.body = attributes[:body]
100
- else
101
- self.body = nil
102
100
  end
103
101
 
104
102
  if attributes.key?(:index_name)
@@ -6,7 +6,7 @@ require "time"
6
6
  module Algolia
7
7
  module Search
8
8
  # Range object with lower and upper values in meters to define custom ranges.
9
- class AroundPrecisionFromValueInner
9
+ class Range
10
10
  # Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
11
11
  attr_accessor :from
12
12
 
@@ -45,10 +45,7 @@ module Algolia
45
45
  # @param [Hash] attributes Model attributes in the form of hash
46
46
  def initialize(attributes = {})
47
47
  if (!attributes.is_a?(Hash))
48
- raise(
49
- ArgumentError,
50
- "The input argument (attributes) must be a hash in `Algolia::AroundPrecisionFromValueInner` initialize method"
51
- )
48
+ raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::Range` initialize method"
52
49
  end
53
50
 
54
51
  # check to see if the attribute exists and convert string to symbol for hash key
@@ -56,7 +53,7 @@ module Algolia
56
53
  if (!self.class.attribute_map.key?(k.to_sym))
57
54
  raise(
58
55
  ArgumentError,
59
- "`#{k}` is not a valid attribute in `Algolia::AroundPrecisionFromValueInner`. Please check the name to make sure it's valid. List of attributes: " +
56
+ "`#{k}` is not a valid attribute in `Algolia::Range`. Please check the name to make sure it's valid. List of attributes: " +
60
57
  self.class.attribute_map.keys.inspect
61
58
  )
62
59
  end
@@ -6,7 +6,7 @@ require "time"
6
6
  module Algolia
7
7
  module Search
8
8
  # Redirect rule data.
9
- class RedirectRuleIndexMetadataData
9
+ class RedirectRuleIndexData
10
10
  attr_accessor :rule_object_id
11
11
 
12
12
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -41,7 +41,7 @@ module Algolia
41
41
  if (!attributes.is_a?(Hash))
42
42
  raise(
43
43
  ArgumentError,
44
- "The input argument (attributes) must be a hash in `Algolia::RedirectRuleIndexMetadataData` initialize method"
44
+ "The input argument (attributes) must be a hash in `Algolia::RedirectRuleIndexData` initialize method"
45
45
  )
46
46
  end
47
47
 
@@ -50,7 +50,7 @@ module Algolia
50
50
  if (!self.class.attribute_map.key?(k.to_sym))
51
51
  raise(
52
52
  ArgumentError,
53
- "`#{k}` is not a valid attribute in `Algolia::RedirectRuleIndexMetadataData`. Please check the name to make sure it's valid. List of attributes: " +
53
+ "`#{k}` is not a valid attribute in `Algolia::RedirectRuleIndexData`. Please check the name to make sure it's valid. List of attributes: " +
54
54
  self.class.attribute_map.keys.inspect
55
55
  )
56
56
  end
@@ -43,7 +43,7 @@ module Algolia
43
43
  :dest => :"String",
44
44
  :reason => :"String",
45
45
  :succeed => :"Boolean",
46
- :data => :"RedirectRuleIndexMetadataData"
46
+ :data => :"RedirectRuleIndexData"
47
47
  }
48
48
  end
49
49
 
@@ -156,7 +156,7 @@ module Algolia
156
156
  # 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/).
157
157
  attr_accessor :query_languages
158
158
 
159
- # 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.
159
+ # 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).
160
160
  attr_accessor :decompound_query
161
161
 
162
162
  # Whether to enable rules.
@@ -156,7 +156,7 @@ module Algolia
156
156
  # 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/).
157
157
  attr_accessor :query_languages
158
158
 
159
- # 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.
159
+ # 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).
160
160
  attr_accessor :decompound_query
161
161
 
162
162
  # Whether to enable rules.
@@ -154,7 +154,7 @@ module Algolia
154
154
  # 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/).
155
155
  attr_accessor :query_languages
156
156
 
157
- # 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.
157
+ # 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).
158
158
  attr_accessor :decompound_query
159
159
 
160
160
  # Whether to enable rules.
@@ -5,6 +5,7 @@ require "time"
5
5
 
6
6
  module Algolia
7
7
  module Search
8
+ # Search parameters as query string.
8
9
  class SearchParamsString
9
10
  # Search parameters as a URL-encoded query string.
10
11
  attr_accessor :params
@@ -27,7 +27,7 @@ module Algolia
27
27
  # Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. Attribute names are case-sensitive.
28
28
  attr_accessor :camel_case_attributes
29
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`).
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
31
  attr_accessor :decompounded_attributes
32
32
 
33
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/).
@@ -114,7 +114,7 @@ module Algolia
114
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/).
115
115
  attr_accessor :query_languages
116
116
 
117
- # 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).
118
118
  attr_accessor :decompound_query
119
119
 
120
120
  # Whether to enable rules.
@@ -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
@@ -0,0 +1,231 @@
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
+ require "date"
4
+ require "time"
5
+
6
+ module Algolia
7
+ module Usage
8
+ class InvalidRequestError
9
+ attr_accessor :code
10
+
11
+ attr_accessor :message
12
+
13
+ attr_accessor :errors
14
+
15
+ # Attribute mapping from ruby-style variable name to JSON key.
16
+ def self.attribute_map
17
+ {
18
+ :code => :code,
19
+ :message => :message,
20
+ :errors => :errors
21
+ }
22
+ end
23
+
24
+ # Returns all the JSON keys this model knows about
25
+ def self.acceptable_attributes
26
+ attribute_map.values
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.types_mapping
31
+ {
32
+ :code => :"String",
33
+ :message => :"String",
34
+ :errors => :"Array<ErrorItem>"
35
+ }
36
+ end
37
+
38
+ # List of attributes with nullable: true
39
+ def self.openapi_nullable
40
+ Set.new(
41
+ []
42
+ )
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ raise(
50
+ ArgumentError,
51
+ "The input argument (attributes) must be a hash in `Algolia::InvalidRequestError` initialize method"
52
+ )
53
+ end
54
+
55
+ # check to see if the attribute exists and convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}) { |(k, v), h|
57
+ if (!self.class.attribute_map.key?(k.to_sym))
58
+ raise(
59
+ ArgumentError,
60
+ "`#{k}` is not a valid attribute in `Algolia::InvalidRequestError`. Please check the name to make sure it's valid. List of attributes: " +
61
+ self.class.attribute_map.keys.inspect
62
+ )
63
+ end
64
+
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:code)
69
+ self.code = attributes[:code]
70
+ end
71
+
72
+ if attributes.key?(:message)
73
+ self.message = attributes[:message]
74
+ end
75
+
76
+ if attributes.key?(:errors)
77
+ if (value = attributes[:errors]).is_a?(Array)
78
+ self.errors = value
79
+ end
80
+ end
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(other)
86
+ return true if self.equal?(other)
87
+ self.class == other.class &&
88
+ code == other.code &&
89
+ message == other.message &&
90
+ errors == other.errors
91
+ end
92
+
93
+ # @see the `==` method
94
+ # @param [Object] Object to be compared
95
+ def eql?(other)
96
+ self == other
97
+ end
98
+
99
+ # Calculates hash code according to all attributes.
100
+ # @return [Integer] Hash code
101
+ def hash
102
+ [code, message, errors].hash
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def self.build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ attributes = attributes.transform_keys(&:to_sym)
111
+ transformed_hash = {}
112
+ types_mapping.each_pair do |key, type|
113
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
114
+ transformed_hash[key.to_sym] = nil
115
+ elsif type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[attribute_map[key]].is_a?(Array)
119
+ transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
120
+ _deserialize(::Regexp.last_match(1), v)
121
+ }
122
+ end
123
+ elsif !attributes[attribute_map[key]].nil?
124
+ transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
125
+ end
126
+ end
127
+
128
+ new(transformed_hash)
129
+ end
130
+
131
+ # Deserializes the data based on type
132
+ # @param string type Data type
133
+ # @param string value Value to be deserialized
134
+ # @return [Object] Deserialized data
135
+ def self._deserialize(type, value)
136
+ case type.to_sym
137
+ when :Time
138
+ Time.parse(value)
139
+ when :Date
140
+ Date.parse(value)
141
+ when :String
142
+ value.to_s
143
+ when :Integer
144
+ value.to_i
145
+ when :Float
146
+ value.to_f
147
+ when :Boolean
148
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
149
+ true
150
+ else
151
+ false
152
+ end
153
+
154
+ when :Object
155
+ # generic object (usually a Hash), return directly
156
+ value
157
+ when /\AArray<(?<inner_type>.+)>\z/
158
+ inner_type = Regexp.last_match[:inner_type]
159
+ value.map { |v| _deserialize(inner_type, v) }
160
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
161
+ k_type = Regexp.last_match[:k_type]
162
+ v_type = Regexp.last_match[:v_type]
163
+ {}.tap do |hash|
164
+ value.each do |k, v|
165
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
166
+ end
167
+ end
168
+ # model
169
+ else
170
+ # models (e.g. Pet) or oneOf
171
+ klass = Algolia::Usage.const_get(type)
172
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
173
+ .build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ def to_json(*_args)
190
+ to_hash.to_json
191
+ end
192
+
193
+ # Returns the object in the form of hash
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_hash
196
+ hash = {}
197
+ self.class.attribute_map.each_pair do |attr, param|
198
+ value = send(attr)
199
+ if value.nil?
200
+ is_nullable = self.class.openapi_nullable.include?(attr)
201
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
202
+ end
203
+
204
+ hash[param] = _to_hash(value)
205
+ end
206
+
207
+ hash
208
+ end
209
+
210
+ # Outputs non-array value in the form of hash
211
+ # For object, use to_hash. Otherwise, just return the value
212
+ # @param [Object] value Any valid value
213
+ # @return [Hash] Returns the value in the form of hash
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map { |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to?(:to_hash)
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end
227
+
228
+ end
229
+
230
+ end
231
+ end
@@ -5,7 +5,7 @@ require "time"
5
5
 
6
6
  module Algolia
7
7
  module Usage
8
- class GetUsage200ResponseStatisticsInner
8
+ class StatisticEntry
9
9
  # Timestamp, measured in milliseconds since the Unix epoch.
10
10
  attr_accessor :t
11
11
 
@@ -45,7 +45,7 @@ module Algolia
45
45
  if (!attributes.is_a?(Hash))
46
46
  raise(
47
47
  ArgumentError,
48
- "The input argument (attributes) must be a hash in `Algolia::GetUsage200ResponseStatisticsInner` initialize method"
48
+ "The input argument (attributes) must be a hash in `Algolia::StatisticEntry` initialize method"
49
49
  )
50
50
  end
51
51
 
@@ -54,7 +54,7 @@ module Algolia
54
54
  if (!self.class.attribute_map.key?(k.to_sym))
55
55
  raise(
56
56
  ArgumentError,
57
- "`#{k}` is not a valid attribute in `Algolia::GetUsage200ResponseStatisticsInner`. Please check the name to make sure it's valid. List of attributes: " +
57
+ "`#{k}` is not a valid attribute in `Algolia::StatisticEntry`. Please check the name to make sure it's valid. List of attributes: " +
58
58
  self.class.attribute_map.keys.inspect
59
59
  )
60
60
  end
@@ -1,5 +1,5 @@
1
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
2
 
3
3
  module Algolia
4
- VERSION = "3.0.0.beta.11".freeze
4
+ VERSION = "3.0.0.beta.13".freeze
5
5
  end