algolia 3.37.1 → 3.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/Gemfile.lock +1 -1
  4. data/lib/algolia/api/monitoring_client.rb +2 -2
  5. data/lib/algolia/api/search_client.rb +4 -4
  6. data/lib/algolia/models/composition/external_injected_item.rb +1 -0
  7. data/lib/algolia/models/composition/external_injection.rb +1 -1
  8. data/lib/algolia/models/composition/{external.rb → injected_item_external.rb} +6 -3
  9. data/lib/algolia/models/composition/{external_source.rb → injected_item_external_source.rb} +4 -4
  10. data/lib/algolia/models/composition/injected_item_recommend_source.rb +216 -0
  11. data/lib/algolia/models/composition/{search.rb → injected_item_search.rb} +6 -3
  12. data/lib/algolia/models/composition/{search_source.rb → injected_item_search_source.rb} +4 -4
  13. data/lib/algolia/models/composition/injected_item_source.rb +3 -2
  14. data/lib/algolia/models/composition/injection.rb +2 -2
  15. data/lib/algolia/models/composition/{injected_item.rb → injection_injected_item.rb} +3 -3
  16. data/lib/algolia/models/composition/{main.rb → injection_main.rb} +8 -6
  17. data/lib/algolia/models/composition/injection_main_recommend_source.rb +216 -0
  18. data/lib/algolia/models/composition/{composition_source.rb → injection_main_search_source.rb} +12 -4
  19. data/lib/algolia/models/composition/injection_main_source.rb +109 -0
  20. data/lib/algolia/models/composition/main_recommend.rb +250 -0
  21. data/lib/algolia/models/composition/{composition_source_search.rb → main_search.rb} +4 -4
  22. data/lib/algolia/models/composition/model.rb +33 -0
  23. data/lib/algolia/models/composition/params.rb +1 -1
  24. data/lib/algolia/models/composition/recommend.rb +250 -0
  25. data/lib/algolia/models/composition/request_body.rb +16 -4
  26. data/lib/algolia/models/ingestion/source_algolia_index.rb +227 -0
  27. data/lib/algolia/models/ingestion/source_input.rb +1 -0
  28. data/lib/algolia/models/ingestion/source_type.rb +13 -1
  29. data/lib/algolia/models/ingestion/source_update_algolia_index.rb +218 -0
  30. data/lib/algolia/models/ingestion/source_update_input.rb +1 -0
  31. data/lib/algolia/models/search/auto_filtering_filter_entry.rb +108 -0
  32. data/lib/algolia/models/search/auto_filtering_result.rb +242 -0
  33. data/lib/algolia/models/search/browse_response.rb +10 -0
  34. data/lib/algolia/models/search/category_prediction.rb +218 -0
  35. data/lib/algolia/models/search/category_prediction_bin.rb +37 -0
  36. data/lib/algolia/models/search/hierarchy_path_entry.rb +227 -0
  37. data/lib/algolia/models/search/query_categorization.rb +248 -0
  38. data/lib/algolia/models/search/query_categorization_type.rb +36 -0
  39. data/lib/algolia/models/search/response_extensions.rb +207 -0
  40. data/lib/algolia/models/search/search_extensions.rb +207 -0
  41. data/lib/algolia/models/search/search_extensions_query_categorization.rb +218 -0
  42. data/lib/algolia/models/search/search_for_hits.rb +14 -4
  43. data/lib/algolia/models/search/search_response.rb +14 -4
  44. data/lib/algolia/version.rb +1 -1
  45. metadata +27 -9
@@ -0,0 +1,218 @@
1
+ # frozen_string_literal: true
2
+
3
+ # 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.
4
+
5
+ require "date"
6
+ require "time"
7
+
8
+ module Algolia
9
+ module Ingestion
10
+ # Specific configuration attributes of an `algoliaIndex` source.
11
+ class SourceUpdateAlgoliaIndex
12
+ # Name of the Algolia index to read records from.
13
+ attr_accessor :index_name
14
+
15
+ # SQL-like filter expression applied while browsing the source index. See [filters](https://www.algolia.com/doc/api-reference/api-parameters/filters/).
16
+ attr_accessor :filters
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :index_name => :indexName,
22
+ :filters => :filters
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.types_mapping
28
+ {
29
+ :index_name => :"String",
30
+ :filters => :"String"
31
+ }
32
+ end
33
+
34
+ # List of attributes with nullable: true
35
+ def self.openapi_nullable
36
+ Set.new(
37
+ []
38
+ )
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ if (!attributes.is_a?(Hash))
45
+ raise(
46
+ ArgumentError,
47
+ "The input argument (attributes) must be a hash in `Algolia::SourceUpdateAlgoliaIndex` initialize method"
48
+ )
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ raise(
55
+ ArgumentError,
56
+ "`#{k}` is not a valid attribute in `Algolia::SourceUpdateAlgoliaIndex`. Please check the name to make sure it's valid. List of attributes: " +
57
+ self.class.attribute_map.keys.inspect
58
+ )
59
+ end
60
+
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:index_name)
65
+ self.index_name = attributes[:index_name]
66
+ end
67
+
68
+ if attributes.key?(:filters)
69
+ self.filters = attributes[:filters]
70
+ end
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param [Object] Object to be compared
75
+ def ==(other)
76
+ return true if self.equal?(other)
77
+ self.class == other.class &&
78
+ index_name == other.index_name &&
79
+ filters == other.filters
80
+ end
81
+
82
+ # @see the `==` method
83
+ # @param [Object] Object to be compared
84
+ def eql?(other)
85
+ self == other
86
+ end
87
+
88
+ # Calculates hash code according to all attributes.
89
+ # @return [Integer] Hash code
90
+ def hash
91
+ [index_name, filters].hash
92
+ end
93
+
94
+ # Builds the object from hash
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ # @return [Object] Returns the model itself
97
+ def self.build_from_hash(attributes)
98
+ return nil unless attributes.is_a?(Hash)
99
+ attributes = attributes.transform_keys(&:to_sym)
100
+ transformed_hash = {}
101
+ types_mapping.each_pair do |key, type|
102
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
103
+ transformed_hash[key.to_sym] = nil
104
+ elsif type =~ /\AArray<(.*)>/i
105
+ # check to ensure the input is an array given that the attribute
106
+ # is documented as an array but the input is not
107
+ if attributes[attribute_map[key]].is_a?(Array)
108
+ transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
109
+ _deserialize(::Regexp.last_match(1), v)
110
+ }
111
+ end
112
+ elsif !attributes[attribute_map[key]].nil?
113
+ transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
114
+ end
115
+ end
116
+
117
+ new(transformed_hash)
118
+ end
119
+
120
+ # Deserializes the data based on type
121
+ # @param string type Data type
122
+ # @param string value Value to be deserialized
123
+ # @return [Object] Deserialized data
124
+ def self._deserialize(type, value)
125
+ case type.to_sym
126
+ when :Time
127
+ Time.parse(value)
128
+ when :Date
129
+ Date.parse(value)
130
+ when :String
131
+ value.to_s
132
+ when :Integer
133
+ value.to_i
134
+ when :Float
135
+ value.to_f
136
+ when :Boolean
137
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
+ true
139
+ else
140
+ false
141
+ end
142
+
143
+ when :Object
144
+ # generic object (usually a Hash), return directly
145
+ value
146
+ when /\AArray<(?<inner_type>.+)>\z/
147
+ inner_type = Regexp.last_match[:inner_type]
148
+ value.map { |v| _deserialize(inner_type, v) }
149
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
150
+ k_type = Regexp.last_match[:k_type]
151
+ v_type = Regexp.last_match[:v_type]
152
+ {}.tap do |hash|
153
+ value.each do |k, v|
154
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
155
+ end
156
+ end
157
+ # model
158
+ else
159
+ # models (e.g. Pet) or oneOf
160
+ klass = Algolia::Ingestion.const_get(type)
161
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
162
+ .build_from_hash(value)
163
+ end
164
+ end
165
+
166
+ # Returns the string representation of the object
167
+ # @return [String] String presentation of the object
168
+ def to_s
169
+ to_hash.to_s
170
+ end
171
+
172
+ # to_body is an alias to to_hash (backward compatibility)
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_body
175
+ to_hash
176
+ end
177
+
178
+ def to_json(*_args)
179
+ to_hash.to_json
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+
196
+ hash
197
+ end
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map { |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to?(:to_hash)
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+ end
217
+ end
218
+ end
@@ -16,6 +16,7 @@ module Algolia
16
16
  :"SourceCSV",
17
17
  :"SourceGA4BigQueryExport",
18
18
  :"SourceJSON",
19
+ :"SourceUpdateAlgoliaIndex",
19
20
  :"SourceUpdateCommercetools",
20
21
  :"SourceUpdateDocker",
21
22
  :"SourceUpdateShopify"
@@ -0,0 +1,108 @@
1
+ # frozen_string_literal: true
2
+
3
+ # 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.
4
+
5
+ require "date"
6
+ require "time"
7
+
8
+ module Algolia
9
+ module Search
10
+ module AutoFilteringFilterEntry
11
+ class << self
12
+ # List of class defined in oneOf (OpenAPI v3)
13
+ def openapi_one_of
14
+ [
15
+ :"Array<String>",
16
+ :"String"
17
+ ]
18
+ end
19
+
20
+ # Builds the object
21
+ # @param [Mixed] Data to be matched against the list of oneOf items
22
+ # @return [Object] Returns the model or the data itself
23
+ def build(data)
24
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
25
+ # Note:
26
+ # - We do not attempt to check whether exactly one item matches.
27
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
28
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
29
+ # - TODO: scalar values are de facto behaving as if they were nullable.
30
+ # - TODO: logging when debugging is set.
31
+ openapi_one_of.each do |klass|
32
+ begin
33
+ # "nullable: true"
34
+ next if klass == :AnyType
35
+ typed_data = find_and_cast_into_type(klass, data)
36
+ return typed_data if typed_data
37
+ # rescue all errors so we keep iterating even if the current item lookup raises
38
+ rescue
39
+ end
40
+ end
41
+
42
+ openapi_one_of.include?(:AnyType) ? data : nil
43
+ end
44
+
45
+ private
46
+
47
+ SchemaMismatchError = Class.new(StandardError)
48
+
49
+ def find_and_cast_into_type(klass, data)
50
+ return if data.nil?
51
+
52
+ case klass.to_s
53
+ when "Boolean"
54
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
55
+ when "Float"
56
+ return data if data.instance_of?(Float)
57
+ when "Integer"
58
+ return data if data.instance_of?(Integer)
59
+ when "Time"
60
+ return Time.parse(data)
61
+ when "Date"
62
+ return Date.parse(data)
63
+ when "String"
64
+ return data if data.instance_of?(String)
65
+ # "type: object"
66
+ when "Object"
67
+ return data if data.instance_of?(Hash)
68
+ # "type: array"
69
+ when /\AArray<(?<sub_type>.+)>\z/
70
+ if data.instance_of?(Array)
71
+ sub_type = Regexp.last_match[:sub_type]
72
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
73
+ end
74
+ # "type: object" with "additionalProperties: { ... }"
75
+ when /\AHash<String, (?<sub_type>.+)>\z/
76
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
77
+ sub_type = Regexp.last_match[:sub_type]
78
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
79
+ end
80
+ # model
81
+ else
82
+ const = Algolia::Search.const_get(klass)
83
+ if const
84
+ if const.respond_to?(:openapi_one_of)
85
+ # nested oneOf model
86
+ model = const.build(data)
87
+ elsif const.respond_to?(:discriminator_attributes)
88
+ if const.discriminator_attributes.all? { |attr| data.key?(attr) }
89
+ model = const.build_from_hash(data)
90
+ end
91
+ else
92
+ # maybe it's an enum, or doens't have discriminators
93
+ model = const.build_from_hash(data)
94
+ end
95
+
96
+ return model if model
97
+ end
98
+ end
99
+
100
+ # if no match by now, raise
101
+ raise
102
+ rescue
103
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,242 @@
1
+ # frozen_string_literal: true
2
+
3
+ # 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.
4
+
5
+ require "date"
6
+ require "time"
7
+
8
+ module Algolia
9
+ module Search
10
+ # Result of automatic filtering applied by Query Categorization.
11
+ class AutoFilteringResult
12
+ # Whether automatic filtering was applied to this query.
13
+ attr_accessor :enabled
14
+
15
+ # Maximum category hierarchy depth used for filtering.
16
+ attr_accessor :max_depth
17
+
18
+ # Facet filters automatically applied to the query.
19
+ attr_accessor :facet_filters
20
+
21
+ # Optional filters automatically applied to boost relevant categories.
22
+ attr_accessor :optional_filters
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :enabled => :enabled,
28
+ :max_depth => :maxDepth,
29
+ :facet_filters => :facetFilters,
30
+ :optional_filters => :optionalFilters
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.types_mapping
36
+ {
37
+ :enabled => :"Boolean",
38
+ :max_depth => :"Integer",
39
+ :facet_filters => :"Array<AutoFilteringFilterEntry>",
40
+ :optional_filters => :"Array<AutoFilteringFilterEntry>"
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new(
47
+ []
48
+ )
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ raise(
56
+ ArgumentError,
57
+ "The input argument (attributes) must be a hash in `Algolia::AutoFilteringResult` initialize method"
58
+ )
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ raise(
65
+ ArgumentError,
66
+ "`#{k}` is not a valid attribute in `Algolia::AutoFilteringResult`. Please check the name to make sure it's valid. List of attributes: " +
67
+ self.class.attribute_map.keys.inspect
68
+ )
69
+ end
70
+
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:enabled)
75
+ self.enabled = attributes[:enabled]
76
+ end
77
+
78
+ if attributes.key?(:max_depth)
79
+ self.max_depth = attributes[:max_depth]
80
+ end
81
+
82
+ if attributes.key?(:facet_filters)
83
+ if (value = attributes[:facet_filters]).is_a?(Array)
84
+ self.facet_filters = value
85
+ end
86
+ end
87
+
88
+ if attributes.key?(:optional_filters)
89
+ if (value = attributes[:optional_filters]).is_a?(Array)
90
+ self.optional_filters = value
91
+ end
92
+ end
93
+ end
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param [Object] Object to be compared
97
+ def ==(other)
98
+ return true if self.equal?(other)
99
+ self.class == other.class &&
100
+ enabled == other.enabled &&
101
+ max_depth == other.max_depth &&
102
+ facet_filters == other.facet_filters &&
103
+ optional_filters == other.optional_filters
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(other)
109
+ self == other
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ def hash
115
+ [enabled, max_depth, facet_filters, optional_filters].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def self.build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ attributes = attributes.transform_keys(&:to_sym)
124
+ transformed_hash = {}
125
+ types_mapping.each_pair do |key, type|
126
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
127
+ transformed_hash[key.to_sym] = nil
128
+ elsif type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[attribute_map[key]].is_a?(Array)
132
+ transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
133
+ _deserialize(::Regexp.last_match(1), v)
134
+ }
135
+ end
136
+ elsif !attributes[attribute_map[key]].nil?
137
+ transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
138
+ end
139
+ end
140
+
141
+ new(transformed_hash)
142
+ end
143
+
144
+ # Deserializes the data based on type
145
+ # @param string type Data type
146
+ # @param string value Value to be deserialized
147
+ # @return [Object] Deserialized data
148
+ def self._deserialize(type, value)
149
+ case type.to_sym
150
+ when :Time
151
+ Time.parse(value)
152
+ when :Date
153
+ Date.parse(value)
154
+ when :String
155
+ value.to_s
156
+ when :Integer
157
+ value.to_i
158
+ when :Float
159
+ value.to_f
160
+ when :Boolean
161
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
162
+ true
163
+ else
164
+ false
165
+ end
166
+
167
+ when :Object
168
+ # generic object (usually a Hash), return directly
169
+ value
170
+ when /\AArray<(?<inner_type>.+)>\z/
171
+ inner_type = Regexp.last_match[:inner_type]
172
+ value.map { |v| _deserialize(inner_type, v) }
173
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
174
+ k_type = Regexp.last_match[:k_type]
175
+ v_type = Regexp.last_match[:v_type]
176
+ {}.tap do |hash|
177
+ value.each do |k, v|
178
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
179
+ end
180
+ end
181
+ # model
182
+ else
183
+ # models (e.g. Pet) or oneOf
184
+ klass = Algolia::Search.const_get(type)
185
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
186
+ .build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ def to_json(*_args)
203
+ to_hash.to_json
204
+ end
205
+
206
+ # Returns the object in the form of hash
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_hash
209
+ hash = {}
210
+ self.class.attribute_map.each_pair do |attr, param|
211
+ value = send(attr)
212
+ if value.nil?
213
+ is_nullable = self.class.openapi_nullable.include?(attr)
214
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
215
+ end
216
+
217
+ hash[param] = _to_hash(value)
218
+ end
219
+
220
+ hash
221
+ end
222
+
223
+ # Outputs non-array value in the form of hash
224
+ # For object, use to_hash. Otherwise, just return the value
225
+ # @param [Object] value Any valid value
226
+ # @return [Hash] Returns the value in the form of hash
227
+ def _to_hash(value)
228
+ if value.is_a?(Array)
229
+ value.compact.map { |v| _to_hash(v) }
230
+ elsif value.is_a?(Hash)
231
+ {}.tap do |hash|
232
+ value.each { |k, v| hash[k] = _to_hash(v) }
233
+ end
234
+ elsif value.respond_to?(:to_hash)
235
+ value.to_hash
236
+ else
237
+ value
238
+ end
239
+ end
240
+ end
241
+ end
242
+ end
@@ -104,6 +104,8 @@ module Algolia
104
104
  # URL-encoded string of all search parameters.
105
105
  attr_accessor :params
106
106
 
107
+ attr_accessor :extensions
108
+
107
109
  # Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute.
108
110
  attr_accessor :cursor
109
111
 
@@ -143,6 +145,7 @@ module Algolia
143
145
  :hits => :hits,
144
146
  :query => :query,
145
147
  :params => :params,
148
+ :extensions => :extensions,
146
149
  :cursor => :cursor
147
150
  }
148
151
  end
@@ -183,6 +186,7 @@ module Algolia
183
186
  :hits => :"Array<Hit>",
184
187
  :query => :"String",
185
188
  :params => :"String",
189
+ :extensions => :"ResponseExtensions",
186
190
  :cursor => :"String"
187
191
  }
188
192
  end
@@ -371,6 +375,10 @@ module Algolia
371
375
  self.params = attributes[:params]
372
376
  end
373
377
 
378
+ if attributes.key?(:extensions)
379
+ self.extensions = attributes[:extensions]
380
+ end
381
+
374
382
  if attributes.key?(:cursor)
375
383
  self.cursor = attributes[:cursor]
376
384
  end
@@ -414,6 +422,7 @@ module Algolia
414
422
  hits == other.hits &&
415
423
  query == other.query &&
416
424
  params == other.params &&
425
+ extensions == other.extensions &&
417
426
  cursor == other.cursor
418
427
  end
419
428
 
@@ -460,6 +469,7 @@ module Algolia
460
469
  hits,
461
470
  query,
462
471
  params,
472
+ extensions,
463
473
  cursor
464
474
  ].hash
465
475
  end